:root {
    --wh-primary:      #1a2744;
    --wh-primary-dark: #111c35;
    --wh-bg:           #f0f2f7;
}

/* ── Base ──────────────────────────────────────────────── */
body {
    background-color: var(--wh-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.925rem;
}

/* ── Navbar ─────────────────────────────────────────────── */
.warehouse-nav {
    background-color: var(--wh-primary) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.warehouse-nav .navbar-brand {
    font-size: 1.05rem;
    letter-spacing: 0.4px;
}
.warehouse-nav .nav-link { color: rgba(255,255,255,.75); }
.warehouse-nav .nav-link:hover,
.warehouse-nav .nav-link.active { color: #fff !important; }

/* ── Cards ───────────────────────────────────────────────── */
.card { border-radius: 12px; }

/* ── Stat cards ──────────────────────────────────────────── */
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
}
.stat-card-link { transition: box-shadow .15s, transform .1s; cursor: pointer; }
.stat-card-link:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12) !important; transform: translateY(-2px); }
.stat-link-hint { font-size: 0.7rem; color: #aaa; margin-top: 4px; }

/* ── Table ───────────────────────────────────────────────── */
.table-dark-custom {
    background-color: var(--wh-primary);
    color: #fff;
}
.table-dark-custom th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 12px;
    border: none;
    white-space: nowrap;
}
.table tbody td {
    padding: 11px 12px;
    border-color: #e8ebf3;
    vertical-align: middle;
}
.table tbody tr:hover td { background-color: rgba(26,39,68,.035); }

/* ── Quantity buttons ────────────────────────────────────── */
.qty-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    font-size: 0.9rem;
    line-height: 1;
}
.qty-value { min-width: 32px; text-align: center; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { border-radius: 8px; }
.warehouse-btn,
.warehouse-btn:hover,
.warehouse-btn:focus,
.warehouse-btn:active {
    background-color: var(--wh-primary) !important;
    border-color:     var(--wh-primary) !important;
    color: #fff !important;
}
.warehouse-btn:hover { background-color: var(--wh-primary-dark) !important; }

/* ── Forms ───────────────────────────────────────────────── */
.form-control, .input-group-text, .form-select { border-radius: 8px !important; }
.input-group .form-control:not(:last-child) { border-radius: 8px 0 0 8px !important; }
.input-group .btn:last-child,
.input-group .input-group-text:last-child  { border-radius: 0 8px 8px 0 !important; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    border-radius: 6px;
    font-size: 0.72rem;
    padding: 4px 10px;
    font-weight: 600;
}

/* ── Inline code ─────────────────────────────────────────── */
code {
    color: #445;
    background: #e8ebf3;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.85em;
}

/* ── Navbar logo ─────────────────────────────────────────── */
.navbar-logo-wrap {
    background: #fff;
    border-radius: 7px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
}
.navbar-brand-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

/* ── Login page ──────────────────────────────────────────── */
.login-logo {
    height: 72px;
    width: auto;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid #e3e6ef;
}
.footer-tagline-wrap {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-tagline {
    font-size: 0.82rem;
    color: #9aa3b5;
    letter-spacing: 0.3px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.footer-tagline strong {
    color: #6b7a99;
    font-weight: 600;
}

/* ── Barcode containers ───────────────────────────────────── */
.barcode-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 16px;
    display: inline-block;
}

/* ── Take Out button ─────────────────────────────────────── */
.btn-take-out {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(192,57,43,.35);
    transition: box-shadow .15s, transform .1s;
}
.btn-take-out:hover {
    background: linear-gradient(135deg, #a93226 0%, #cb4335 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(192,57,43,.45);
    transform: translateY(-1px);
}
.btn-take-out:active { transform: translateY(0); }
.btn-take-out:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* ── Shared width for action pair ───────────────────────── */
.btn-take-out,
.btn-stock-in { min-width: 90px; }

/* ── Stock In button ─────────────────────────────────────── */
.btn-stock-in {
    background: linear-gradient(135deg, #1a7a3c 0%, #27ae60 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(26,122,60,.35);
    transition: box-shadow .15s, transform .1s;
}
.btn-stock-in:hover {
    background: linear-gradient(135deg, #155f30 0%, #219150 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,122,60,.45);
    transform: translateY(-1px);
}
.btn-stock-in:active { transform: translateY(0); }

/* ── Transaction history badges ─────────────────────────── */
.txn-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.txn-badge-success { background:#e6f4ec; color:#1a7a3c; border-color:#b7dfc8; }
.txn-badge-primary { background:#e8eef9; color:#1a4aad; border-color:#b8ccf0; }
.txn-badge-danger  { background:#fce8e8; color:#b91c1c; border-color:#f5b8b8; }

/* ── Phone scanner banner ────────────────────────────────── */
.scanner-banner {
    background: linear-gradient(135deg, #1a2744 0%, #2d4080 100%);
    border-radius: 14px;
    padding: 16px 20px;
    color: #fff;
    box-shadow: 0 4px 18px rgba(26,39,68,.25);
}
.scanner-banner-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.scanner-url {
    display: inline-block;
    margin-top: 4px;
    background: rgba(0,0,0,.25);
    color: #a8c4ff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    user-select: all;
}

/* ── Item filter pills (take out history) ────────────────── */
.item-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #444;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .15s;
}
.item-pill:hover {
    background: #f0f2f7;
    border-color: #adb5bd;
    color: #222;
}
.item-pill.active {
    background: var(--wh-primary);
    border-color: var(--wh-primary);
    color: #fff;
}
.item-pill-count {
    background: rgba(0,0,0,.12);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.72rem;
    font-weight: 700;
}
.item-pill.active .item-pill-count { background: rgba(255,255,255,.25); }

.item-link { color: var(--wh-primary); }
.item-link:hover { color: var(--wh-primary-dark); text-decoration: underline !important; }

/* ── Transaction filter pills ───────────────────────────── */
.txn-filter-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    color: #555;
    border-radius: 20px !important;
    padding: 3px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all .15s;
}
.txn-filter-btn:hover {
    background: #f0f2f7;
    border-color: #adb5bd;
    color: #333;
}
.txn-filter-btn.active {
    background: var(--wh-primary);
    border-color: var(--wh-primary);
    color: #fff;
}

/* ── Timeline (item history) ─────────────────────────────── */
.timeline-item:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.timeline-icon { width: 24px; padding-top: 2px; text-align: center; }

/* ── Misc ────────────────────────────────────────────────── */
.text-muted-sm { color: #9aa3b5; font-size: 0.8rem; }
.min-w-0 { min-width: 0; }
