@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --primary: #d97706;
    --accent: #0f766e;
    --muted: #2b2d42;
    --bg-soft: #eef2ff;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-soft);
    color: #1a202c;
}

.nav-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px 1fr;
    background: radial-gradient(circle at 15% 15%, rgba(217, 119, 6, 0.12), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(15, 118, 110, 0.12), transparent 30%),
                var(--bg-soft);
}

.nav-shell.nav-collapsed {
    grid-template-columns: 70px 1fr;
}

.nav-shell.nav-collapsed .nav-panel {
    padding: 1rem .75rem;
    align-items: center;
}

.sidebar-toggle {
    border-color: #e5e7eb;
    color: #0f172a;
}

.sidebar-toggle i {
    transition: transform .2s ease, opacity .2s ease;
}

.nav-shell.nav-collapsed .sidebar-toggle [data-icon-expanded] {
    opacity: 0;
    transform: translateX(-4px);
}

.nav-shell.nav-collapsed .sidebar-toggle [data-icon-collapsed] {
    opacity: 1;
    transform: translateX(0);
}

.nav-panel {
    background: linear-gradient(160deg, #02182a, #061526);
    color: #f8fafc;
    padding: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.nav-panel .brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.nav-panel .brand .avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.nav-panel .brand .name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.nav-shell.nav-collapsed .brand .name,
.nav-shell.nav-collapsed .brand small {
    display: none;
}
.nav-shell.nav-collapsed .brand {
    justify-content: center;
}

.nav-panel .nav-label {
    text-transform: uppercase;
    letter-spacing: .8px;
    font-size: .7rem;
    color: rgba(226, 232, 240, 0.7);
    margin: 0 0 .5rem;
}

.nav-panel .nav-link {
    color: #d0e4ff;
    padding: .65rem .75rem;
    border-radius: 10px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .2s ease;
}

.nav-panel .nav-link span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-panel .nav-link .chevron {
    transition: transform .2s ease;
}

.nav-panel .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-panel .nav-link.active {
    background: linear-gradient(120deg, rgba(217, 119, 6, 0.4), rgba(15, 118, 110, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.nav-panel .collapse.show + .nav-link .chevron,
.nav-panel .nav-link.active .chevron {
    transform: rotate(-180deg);
}

.nav-panel .nav-children {
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: .35rem;
    padding-left: .75rem;
}

.nav-panel .nav-children .nav-link {
    font-size: .85rem;
    padding: .5rem .65rem;
}

.nav-text {
    display: inline-block;
}

.nav-shell.nav-collapsed .nav-text {
    display: none;
}

.nav-shell.nav-collapsed .nav-link {
    justify-content: center;
    padding: .65rem;
}

.nav-shell.nav-collapsed .nav-children {
    display: none !important;
}

.nav-panel .footer {
    margin-top: auto;
    font-size: .85rem;
    color: rgba(226, 232, 240, 0.7);
}

.content-area {
    min-height: 100vh;
    backdrop-filter: blur(4px);
}

.topbar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.user-menu-toggle {
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.35rem 0.9rem;
    box-shadow: 0 0.65rem 1.5rem rgba(15, 23, 42, 0.12);
}

.user-menu-toggle:focus,
.user-menu-toggle:focus-visible {
    border-color: #cbd5f5;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
    outline: none;
}

.user-menu-toggle.dropdown-toggle::after {
    display: none;
}

.user-menu .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.user-menu .user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-menu .user-name {
    font-weight: 600;
    color: #0f172a;
}

.user-menu .user-role {
    font-size: 0.8rem;
}

.user-menu-dropdown {
    min-width: 240px;
    border: 0;
    box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.15);
    padding: 0.5rem 0;
}

.user-menu-dropdown .dropdown-item {
    font-size: 0.95rem;
    padding: 0.45rem 1rem;
}

.user-menu-dropdown .dropdown-item i {
    width: 1rem;
    text-align: center;
}

.user-menu-dropdown .dropdown-item.text-danger i {
    color: #dc2626;
}


.page-inner {
    padding: 1.5rem;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('../img/bg/login-bg.png') center/cover no-repeat!important;
}

.auth-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(247, 249, 252, 0.7); /* soften the background image */
}

.toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast-stack .toast {
    min-width: 300px;
    max-width: 360px;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
    pointer-events: auto;
    color: #fff;
}

.toast-stack .toast .toast-title {
    letter-spacing: 0.08em;
}

.toast-stack .toast .toast-body {
    font-size: 0.95rem;
}

.toast-stack .toast.toast-success {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.toast-stack .toast.toast-error {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.toast-stack .toast.toast-info {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.toast-stack .toast.toast-warning {
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #431407;
}

@media (max-width: 575.98px) {
    .toast-stack {
        left: 0;
        right: 0;
        padding: 0 1rem;
        bottom: 1rem;
    }

    .toast-stack .toast {
        width: 100%;
        min-width: auto;
        max-width: none;
    }
}

.auth-wrapper .container {
    max-width: 1080px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    max-height: 960px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 440px;
    margin: 0 auto;
    font-size: 0.92rem;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    letter-spacing: .4px;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    box-shadow: 0 8px 25px rgba(90, 103, 216, 0.3);
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(90, 103, 216, 0.35);
}

.btn-primary:hover {
    background: #4c51bf;
    border-color: #4c51bf;
}

.nav-side {
    background: #0f172a;
    color: #e2e8f0;
}

.nav-side .nav-link {
    color: #cbd5e1;
    border-radius: 10px;
    padding: .7rem .9rem;
    transition: all .2s ease;
}

.nav-side .nav-link:hover,
.nav-side .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.content-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px 1fr;
}

@media (max-width: 991px) {
    .content-shell {
        grid-template-columns: 1fr;
    }
}

.tracker-status-pill {
    background-color: #f8fafc;
}

.vehicle-location-map {
    position: relative;
}

.vehicle-location-map .vehicle-location-placeholder {
    position: absolute;
    inset: 0;
    text-align: center;
}

.vehicle-location-map-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stock-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 260px;
    overflow-y: auto;
}

.picking-shell {
    min-height: 100vh;
    background: radial-gradient(circle at 15% 20%, rgba(90, 103, 216, 0.12), transparent 30%),
                radial-gradient(circle at 80% 0%, rgba(72, 187, 120, 0.12), transparent 25%),
                var(--bg-soft, #f7f9fc);
    padding: 2rem 1rem;
}

.picking-app {
    max-width: 1400px;
    margin: 0 auto;
}

.picking-header {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.picking-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .picking-grid {
        grid-template-columns: 1fr;
    }
}

.picking-panel {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    min-height: 520px;
}

.picking-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.picking-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.picking-order {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.picking-order:hover,
.picking-order:focus {
    border-color: var(--primary, #5a67d8);
    box-shadow: 0 12px 25px rgba(90, 103, 216, 0.15);
}

.picking-order.active {
    background: rgba(90, 103, 216, 0.08);
    border-color: var(--primary, #5a67d8);
}

.picking-order-placeholder {
    text-align: center;
    border: 1px dashed #cbd5f5;
    border-radius: 16px;
    padding: 2rem 1rem;
    color: #94a3b8;
}

.picking-order-placeholder i {
    font-size: 2rem;
    display: block;
}

.picking-panel--detail {
    position: relative;
}

.picking-detail-empty {
    text-align: center;
    color: #94a3b8;
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 3rem 1rem;
}

.picking-detail-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.picking-detail-feedback {
    margin-top: 1rem;
}

.print-hide {
    display: block;
}

.print-only {
    display: none;
}

.picking-print-qr {
    display: none;
    text-align: left;
   
}

.picking-print-qr img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

.picking-print-customer {
    display: none;
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    background: #fdfdfd;
}

.picking-print-customer h6 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.picking-print-customer p {
    margin-bottom: 0.35rem;
}

.picking-line-disabled {
    background: #f3f4f6;
    color: #6b7280;
}

.picking-line-disabled input,
.picking-line-disabled button {
    pointer-events: none;
}

.picking-print-logo {
    display: none;
    max-height: 48px;
    width: auto;
}

.picking-lines-table table {
    border-radius: 12px;
    overflow: hidden;
}

.picking-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.picking-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.picking-overlay__inner {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    width: min(420px, 100%);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    text-align: center;
}

.picking-lock-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(90, 103, 216, 0.1);
    color: var(--primary, #5a67d8);
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.picking-order-list::-webkit-scrollbar,
.picking-lines-table::-webkit-scrollbar {
    width: 6px;
}

.picking-order-list::-webkit-scrollbar-thumb,
.picking-lines-table::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 3px;
}

@media print {
    body.picking-shell {
        background: #fff;
        padding: 2rem;
    }

    .col-hide {
        display:none;
    }

    .picking-header,
    .picking-panel--orders,
    .picking-overlay,
    #app-toast-container,
    [data-action="complete-order"],
    [data-action="refresh-orders"],
    [data-action="force-lock"],
    #pickingScanInput {
        display: none !important;
    }

    .picking-panel--detail {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    .picking-detail {
        display: block !important;
        padding-top: 5%!important;
    }

    .picking-note{
        margin-top:1%!important;
    }

    .picking-detail .row,
    .picking-detail table,
    .picking-detail .table {
        width: 100%;
    }

    .picking-print-qr {
        display: block !important;
        margin-bottom: 1rem;
        position: fixed !important;
        right: 0 !important;
        top: 0 !important;
    }

    .picking-print-customer,
    .print-only {
        display: block !important;
    }

    .picking-print-logo {
        display: block !important;
        margin-bottom: 0.3rem;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
    }

    .print-hide {
        display: none !important;
    }
}
