/* GBWarehousing/style.css */

:root {
    --bg: #f7f7fb;
    --card: #ffffff;
    --border: #e6e8f2;
    --text: #0f1222;
    --muted: #6a6f85;
    --accent: #0f1115;
    --accent-2: #1a1f2e;
    --soft: #f4f6fb;
    --danger: #c62828;
    --radius-1: 10px;
    --radius-2: 14px;
    --radius-3: 18px;
    --shadow-1: 0 6px 20px rgba(10,14,30,.06);
    --shadow-2: 0 10px 30px rgba(10,14,30,.08);
    --focus: 0 0 0 3px rgba(15,17,21,.12);
    --d1: #0b3b8f;
    --d2: #3b82f6; /* dashboard */
    --o1: #0b7a55;
    --o2: #43c08a; /* nieuwe orders */
    --w1: #6a2cff;
    --w2: #9b7bff; /* pallets */
    --s1: #c2410c;
    --s2: #ff8a4a; /* scan */
    --a1: #0f172a;
    --a2: #475569; /* admin */
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 100% -10%, #eef1ff, transparent), radial-gradient(1200px 800px at -10% 110%, #eef9ff, transparent), var(--bg);
    touch-action: pan-y;
}

/* utilities */
.wrap {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 22px 18px 40px;
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
}

.muted {
    color: var(--muted);
}

.w-100 {
    width: 100%;
}

code {
    background: var(--soft);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: .92em;
}

/* brand */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .brand.compact .brand-sub {
        display: none;
    }

.brand-text {
    min-width: 0;
}

.brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-sub {
    font-size: .85rem;
    color: var(--muted);
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
    padding: 4px;
    flex: 0 0 auto;
}

    .brand-logo.small {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        padding: 3px;
    }

/* auth */
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px,100%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-3);
    padding: 28px 26px 22px;
    box-shadow: var(--shadow-2);
}

.auth-title {
    margin: 14px 0 6px;
    font-size: 1.5rem;
}

.auth-hint {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: .95rem;
}

.auth-divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

.auth-foot {
    margin-top: 14px;
    font-size: .85rem;
    color: var(--muted);
    display: flex;
    justify-content: center;
}

/* forms */
.form {
    display: grid;
    gap: 12px;
}

.label {
    display: grid;
    gap: 6px;
    font-size: .9rem;
}

.input {
    appearance: none;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-1);
    border: 1px solid var(--border);
    background: #fff;
    font-size: .98rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .input::placeholder {
        color: #9aa0b5;
    }

    .input:focus {
        outline: none;
        border-color: #cfd4e6;
        box-shadow: var(--focus);
        background: #fff;
    }

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-1);
    text-decoration: none;
    font-weight: 650;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .06s ease, filter .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
    white-space: nowrap;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: linear-gradient(135deg,var(--accent),var(--accent-2));
    color: #fff;
    box-shadow: var(--shadow-1);
}

.btn-secondary {
    background: var(--soft);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

/* alerts */
.alert {
    border-radius: var(--radius-1);
    padding: 10px 12px;
    font-size: .95rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: #fff4f4;
    border-color: #ffd7d7;
    color: var(--danger);
}

/* demo */
.demo-box {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: 12px;
}

.demo-title {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 8px;
}

.demo-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pill {
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .82rem;
}

    .pill.muted {
        color: var(--muted);
    }

/* topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar-left {
    flex: 1 1 auto;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* user chip */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--soft);
    border: 1px solid var(--border);
    font-size: .85rem;
    max-width: 100%;
}

    .user-chip .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #20c15a;
        display: inline-block;
    }

.user-name {
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-role {
    color: var(--muted);
    padding-left: 6px;
    border-left: 1px solid #dfe3f3;
    white-space: nowrap;
}

/* page title */
.page-title {
    margin-top: 16px;
    margin-bottom: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.page-title h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: .2px;
}

.page-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 650;
    background: linear-gradient(135deg,var(--accent),var(--accent-2));
    color: #fff;
}

    .badge.soft {
        background: var(--soft);
        color: var(--muted);
        border: 1px solid var(--border);
    }

/* grid */
.grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 14px;
    width: 100%;
}

/* base card */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
    padding: 18px;
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 185px;
}

/* module cards */
.module-card {
    position: relative;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

    .module-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

.m-dashboard::before {
    background: linear-gradient(90deg,var(--d1),var(--d2));
}

.m-orders::before {
    background: linear-gradient(90deg,var(--o1),var(--o2));
}

.m-pallets::before {
    background: linear-gradient(90deg,var(--w1),var(--w2));
}

.m-scan::before {
    background: linear-gradient(90deg,var(--s1),var(--s2));
}

.m-admin::before {
    background: linear-gradient(90deg,var(--a1),var(--a2));
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: #d9def0;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card h3 {
    margin: 0;
    font-size: 1.08rem;
}

.card-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
    font-size: .95rem;
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* icons */
.icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--soft);
    border: 1px solid var(--border);
    position: relative;
    flex: 0 0 auto;
}

    .icon::after {
        content: "";
        position: absolute;
        inset: 9px;
        border-radius: 4px;
        background: var(--accent);
        opacity: .12;
    }

.i-dashboard::after {
    opacity: .22;
}

.i-clipboard::after {
    opacity: .16;
}

.i-grid::after {
    opacity: .14;
}

.i-scan::after {
    opacity: .2;
}

.i-shield::after {
    opacity: .22;
}

.mini-tag {
    font-size: .7rem;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--soft);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* info */
.info-strip {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 12px;
}

.info-card {
    background: var(--card);
    border: 1px dashed #dfe3f3;
    border-radius: var(--radius-2);
    padding: 14px 16px;
}

.info-title {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 4px;
}

.info-text {
    color: var(--muted);
    font-size: .92rem;
}

/* footer */
.footer {
    margin-top: 18px;
    padding: 10px 2px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: .85rem;
    color: var(--muted);
    flex-wrap: wrap;
}

/* mobile */
@media (max-width:560px) {
    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .user-role {
        display: none;
    }

    .user-name {
        max-width: 160px;
    }

    .btn-logout {
        padding: 8px 10px;
        font-size: .9rem;
    }
}

@media (max-width:480px) {
    .auth-card {
        padding: 22px 20px 18px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .page-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .page-title h1 {
        font-size: 1.45rem;
    }
}
