:root {
    --sidebar-bg: #101827;
    --sidebar-muted: #92a1b8;
    --sidebar-active: #15b8a6;
    --page-bg: #f5f7fb;
    --border: #dfe5ef;
    --text: #172033;
}

body {
    background: var(--page-bg);
    color: var(--text);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar-bg);
    color: #fff;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    width: 270px;
}

.brand {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 1.05rem;
    font-weight: 700;
    gap: 10px;
    margin-bottom: 22px;
    padding: 8px 10px;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    align-items: center;
    background: var(--sidebar-active);
    border-radius: 8px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.sidebar-nav {
    width: 100%;
}

.sidebar-link {
    align-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--sidebar-muted);
    display: flex;
    font-weight: 600;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(21, 184, 166, .18);
    color: #fff;
}

.mobile-sidebar {
    background: var(--sidebar-bg);
    color: #fff;
}

.mobile-sidebar .btn-close {
    filter: invert(1);
}

.app-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    min-height: 70px;
    padding: 0 24px;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.content {
    flex: 1;
    padding: 24px;
}

.avatar {
    align-items: center;
    background: #e8f7f5;
    border-radius: 50%;
    color: #0c8176;
    display: inline-flex;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 24, 39, .05);
}

.panel-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 18px 20px;
}

.panel-body {
    padding: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.stat-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 1.2rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.quick-access-section {
    margin-top: 8px;
}

.quick-access-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.quick-access-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 6px solid #0d6efd;
    border-radius: 8px;
    color: var(--text);
    display: flex;
    gap: 14px;
    min-height: 96px;
    padding: 18px;
    text-decoration: none;
    transition: box-shadow .15s ease, transform .15s ease;
}

.quick-access-button:hover,
.quick-access-button:focus {
    box-shadow: 0 12px 24px rgba(16, 24, 39, .09);
    color: var(--text);
    transform: translateY(-2px);
}

.quick-access-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.45rem;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.quick-access-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.quick-access-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.quick-access-description {
    color: #667085;
    font-size: .88rem;
    line-height: 1.3;
    margin-top: 4px;
}

.quick-access-arrow {
    color: #98a2b3;
    flex: 0 0 auto;
}

.quick-access-primary {
    border-left-color: #0d6efd;
}

.quick-access-primary .quick-access-icon {
    background: #eaf2ff;
    color: #0d6efd;
}

.quick-access-success {
    border-left-color: #198754;
}

.quick-access-success .quick-access-icon {
    background: #e8f6ef;
    color: #198754;
}

.quick-access-warning {
    border-left-color: #d8a108;
}

.quick-access-warning .quick-access-icon {
    background: #fff6dc;
    color: #8a6400;
}

.quick-access-info {
    border-left-color: #0aa2c0;
}

.quick-access-info .quick-access-icon {
    background: #e7f8fb;
    color: #087990;
}

.quick-access-secondary {
    border-left-color: #6c757d;
}

.quick-access-secondary .quick-access-icon {
    background: #eef1f4;
    color: #5c636a;
}

.quick-access-dark {
    border-left-color: #212529;
}

.quick-access-dark .quick-access-icon {
    background: #edf0f2;
    color: #212529;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(21, 184, 166, .22), transparent 34rem),
        linear-gradient(145deg, #f8fbff 0%, #eef3f8 100%);
    min-height: 100vh;
}

.login-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(16, 24, 39, .12);
    max-width: 430px;
    width: 100%;
}

.empty-state {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-icon {
    align-items: center;
    background: #fff3cd;
    border-radius: 50%;
    color: #946200;
    display: inline-flex;
    font-size: 2rem;
    height: 76px;
    justify-content: center;
    margin-bottom: 18px;
    width: 76px;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.permission-table th,
.permission-table td {
    text-align: center;
}

.permission-table th:first-child,
.permission-table td:first-child {
    text-align: left;
}

.warehouse-map {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.container-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left-width: 5px;
    border-radius: 8px;
    color: var(--text);
    display: block;
    min-height: 124px;
    padding: 14px;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.container-card:hover {
    box-shadow: 0 12px 24px rgba(16, 24, 39, .09);
    color: var(--text);
    transform: translateY(-2px);
}

.container-card.selected {
    outline: 3px solid rgba(13, 110, 253, .18);
}

.capacity-green {
    border-left-color: #1aa36f;
}

.capacity-yellow {
    border-left-color: #d8a108;
}

.capacity-red {
    border-left-color: #c93333;
}

.container-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.capacity-green .container-icon {
    background: #e8f7ef;
    color: #10734d;
}

.capacity-yellow .container-icon {
    background: #fff6dc;
    color: #8a6400;
}

.capacity-red .container-icon {
    background: #fde7e7;
    color: #a51f1f;
}

.camera-preview {
    background: #111827;
    border-radius: 8px;
    max-height: 340px;
    object-fit: cover;
    width: 100%;
}

.scan-result {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.label-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.printable-label {
    border: 1px dashed #526070;
    border-radius: 8px;
    min-height: 112px;
    padding: 14px;
}

.printable-label .label-code {
    font-size: 1.2rem;
    font-weight: 800;
}

.assignment-table input {
    min-width: 160px;
}

.container-lookup-result {
    border: 3px solid transparent;
    border-radius: 18px;
    padding: clamp(24px, 5vw, 56px);
    text-align: center;
}

.container-lookup-result.is-found {
    background: #e8f7ef;
    border-color: #1aa36f;
    color: #0c583b;
}

.container-lookup-result.is-unassigned {
    background: #fff6dc;
    border-color: #d8a108;
    color: #6a4d00;
}

.container-lookup-result.is-missing {
    background: #fde7e7;
    border-color: #c93333;
    color: #851c1c;
}

.container-lookup-title {
    font-size: clamp(.85rem, 2vw, 1.1rem);
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.container-lookup-code {
    font-size: clamp(2rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.container-lookup-location {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 700;
}

.route-map {
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 420px;
    overflow: hidden;
    width: 100%;
}

.route-map.compact {
    min-height: 320px;
}

.route-map.public {
    min-height: 460px;
}

.route-toolbar {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.route-metric {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.route-progress {
    background: #dfe5ef;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.route-progress-bar {
    background: #15b8a6;
    height: 100%;
}

.vehicle-marker {
    align-items: center;
    background: #0d6efd;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(13, 110, 253, .35);
    color: #fff;
    display: flex;
    font-size: 20px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.guest-page {
    background:
        radial-gradient(circle at top left, rgba(21, 184, 166, .20), transparent 32rem),
        linear-gradient(145deg, #f8fbff 0%, #eef3f8 100%);
    min-height: 100vh;
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .mobile-sidebar,
    .no-print {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .content {
        display: block;
        min-height: 0;
        padding: 0;
    }

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

    .panel-header,
    .panel-body {
        padding: 0;
    }

    .printable-label {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

@media (max-width: 991.98px) {
    .topbar {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }
}
