:root {
    --brand: #7c3aed;
    --brand-dark: #5b21b6;
    --brand-soft: #f2ecff;
    --accent: #06b6d4;
    --ink: #171425;
    --muted: #78718a;
    --line: #ebe7f3;
    --surface: #ffffff;
    --soft: #f8f6fc;
    --radius: 14px;
    --radius-sm: 10px;
    --card-shadow: 0 16px 42px rgba(56, 37, 102, .11);
    --card-shadow-hover: 0 22px 54px rgba(56, 37, 102, .15);
}

[data-theme="dark"] {
    --brand: #a78bfa;
    --brand-dark: #8b5cf6;
    --brand-soft: #2c2142;
    --accent: #22d3ee;
    --ink: #f8fafc;
    --muted: #b6adc8;
    --line: #332a44;
    --surface: #181322;
    --soft: #0f0b17;
    --card-shadow: 0 18px 46px rgba(0,0,0,.34);
    --card-shadow-hover: 0 22px 58px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,.78) rgba(237,233,254,.9);
}
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: rgba(237,233,254,.85);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #5b21b6);
    border: 3px solid rgba(237,233,254,.95);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed, #4c1d95);
}
body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}
body[data-theme="dark"] {
    background:
        radial-gradient(circle at top left, rgba(124,58,237,.16), transparent 30%),
        #0f0b17;
    color: var(--ink);
}
body[data-theme="dark"] {
    scrollbar-color: rgba(167,139,250,.82) rgba(24,19,34,.95);
}
body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(24,19,34,.95);
}
body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a78bfa, #6d28d9);
    border-color: rgba(24,19,34,.95);
}

.portal-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    background:
        radial-gradient(circle at 35% 28%, rgba(124, 58, 237, .16), transparent 28%),
        radial-gradient(circle at 68% 70%, rgba(6, 182, 212, .13), transparent 30%),
        rgba(248, 246, 252, .96);
    color: var(--ink);
    transition: opacity .35s ease, visibility .35s ease;
}

.portal-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-orbit {
    position: relative;
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
}

.preloader-orbit img {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    object-fit: contain;
    background: #fff;
    padding: 9px;
    box-shadow: 0 18px 48px rgba(91, 33, 182, .22);
    animation: preloader-logo-roll 1.45s ease-in-out infinite alternate;
}

.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 3px solid rgba(124, 58, 237, .12);
    border-left-color: var(--brand);
    border-right-color: var(--accent);
    animation: preloader-spin 1.05s linear infinite;
}

.portal-preloader strong {
    font-size: 18px;
    letter-spacing: .2px;
}

.portal-preloader small {
    color: var(--muted);
    font-weight: 700;
}

body[data-theme="dark"] .portal-preloader {
    background:
        radial-gradient(circle at 35% 28%, rgba(167, 139, 250, .18), transparent 28%),
        radial-gradient(circle at 68% 70%, rgba(34, 211, 238, .12), transparent 30%),
        rgba(15, 11, 23, .97);
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-logo-roll {
    0% { transform: rotate(-10deg) translateX(-4px); }
    100% { transform: rotate(10deg) translateX(4px); }
}

@media (max-width: 640px) {
    .preloader-orbit {
        width: 86px;
        height: 86px;
    }

    .preloader-orbit img {
        width: 60px;
        height: 60px;
        border-radius: 20px;
    }

    .portal-preloader strong {
        font-size: 16px;
    }
}
img, svg, canvas, video { max-width: 100%; }
button, input, select, textarea { font: inherit; max-width: 100%; }
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at top left, rgba(124,58,237,.16), transparent 34%),
        linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.06) 52%, rgba(255,255,255,0)),
        var(--soft);
}
.auth-shell {
    width: min(880px, 100%);
    min-height: 520px;
    display: grid;
    grid-template-columns: .9fr 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(49,46,129,.16);
}
.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: #fff;
    background:
        linear-gradient(160deg, #7c3aed 0%, #5b21b6 58%, #312e81 100%);
}
.auth-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: var(--brand);
    font-weight: 900;
    font-size: 19px;
    margin-bottom: 20px;
}
.auth-brand-panel h1 { margin: 0 0 10px; font-size: 31px; font-weight: 900; }
.auth-brand-panel p { max-width: 320px; color: rgba(255,255,255,.86); line-height: 1.6; margin: 0; }
.auth-points { display: grid; gap: 9px; margin-top: 26px; }
.auth-points span {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-weight: 800;
    font-size: 12px;
}
.auth-points svg { width: 15px; height: 15px; }
.auth-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
    background: #fff;
}
.auth-head span { color: var(--brand); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.auth-head h2 { font-size: 27px; font-weight: 900; margin: 5px 0 6px; }
.auth-head p { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.auth-card form { display: grid; gap: 13px; margin-bottom: 16px; }
.auth-card label { color: #373047; font-size: 12px; }
.auth-card .form-control {
    min-height: 46px;
    background: #fbfbff;
    border-color: #ded6f5;
    border-radius: 8px;
}
.auth-card .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124,58,237,.13);
}
.register-shell {
    width: min(1180px, 100%);
    min-height: 590px;
    grid-template-columns: .58fr 1.42fr;
    border-radius: 18px;
}
.register-shell .auth-brand-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(124,58,237,.98) 0%, rgba(91,33,182,.98) 56%, rgba(49,46,129,.98) 100%);
}
.register-shell .auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -110px auto;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.register-shell .auth-brand-panel > * { position: relative; z-index: 1; }
.register-brand-card {
    width: min(280px, 100%);
    margin-top: 34px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.register-brand-card b,
.register-brand-card small { display: block; }
.register-brand-card b { margin-bottom: 4px; font-size: 13px; }
.register-brand-card small { color: rgba(255,255,255,.82); line-height: 1.45; }
.register-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 18px;
}
.register-steps span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #ece7fb;
    border-radius: 12px;
    color: #7a738b;
    background: #fbfaff;
    font-size: 12px;
    font-weight: 900;
}
.register-steps b {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--brand);
    background: #eee7ff;
    font-size: 11px;
}
.register-steps span.active {
    color: #221735;
    border-color: #d8cdf8;
    background: #fff;
    box-shadow: 0 10px 24px rgba(124,58,237,.08);
}
.register-steps span.active b {
    color: #fff;
    background: var(--brand);
}
.register-form { margin-bottom: 16px; }
.register-step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.register-step-grid[hidden] { display: none; }
.register-step-grid label {
    display: grid;
    gap: 6px;
    margin: 0;
    font-weight: 900;
}
.register-step-grid label > span {
    color: #221735;
    line-height: 1.1;
}
.register-step-grid .form-control {
    height: 48px;
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.register-step-grid .form-control:hover { background: #fff; }
.register-file-field .form-control {
    padding: 10px 12px;
    cursor: pointer;
}
.register-file-field .form-control::file-selector-button {
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    margin-right: 10px;
    color: #fff;
    background: var(--brand);
    font-weight: 800;
    cursor: pointer;
}
.register-primary-action,
.register-actions {
    grid-column: 1 / -1;
}
.register-primary-action {
    min-height: 46px;
    margin-top: 4px;
    border-radius: 12px;
}
.register-actions {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: 10px;
}
.register-actions .btn {
    min-height: 44px;
    border-radius: 12px;
}
.bank-step-intro {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e7ddff;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfaff, #f3fffb);
}
.bank-step label { grid-column: span 1; }
.bank-step-intro > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: #eee7ff;
}
.bank-step-intro svg { width: 20px; height: 20px; }
.theme-choice {
    display: grid;
    grid-template-columns: auto repeat(2, minmax(150px, 1fr));
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fbfaff);
}
.theme-choice > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}
.theme-choice label {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.theme-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.theme-choice b {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #ded6f5;
    border-radius: 12px;
    color: #4b425f;
    background: #fff;
    font-size: 12px;
}
.theme-choice svg {
    width: 16px;
    height: 16px;
}
.theme-choice input:checked + b {
    color: #fff;
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 12px 28px rgba(124,58,237,.2);
}

.profile-theme-mini {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 28px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #fbfaff);
}
.profile-theme-mini > span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.profile-theme-mini label {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.profile-theme-mini input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.profile-theme-mini b {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #ded6f5;
    border-radius: 12px;
    color: #4b425f;
    background: #fff;
    font-size: 11px;
    font-weight: 900;
}
.profile-theme-mini svg {
    width: 14px;
    height: 14px;
}
.profile-theme-mini input:checked + b {
    color: #fff;
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 10px 24px rgba(124,58,237,.2);
}

body[data-theme="dark"] .portal-shell,
body[data-theme="dark"] .portal-main {
    background: transparent;
}
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .address-card,
body[data-theme="dark"] .notification-panel,
body[data-theme="dark"] .order-modal-panel,
body[data-theme="dark"] .confirm-panel,
body[data-theme="dark"] .profile-panel,
body[data-theme="dark"] .page-search-card {
    color: var(--ink);
    background: #181322;
    border-color: var(--line);
    box-shadow: var(--card-shadow);
}
body[data-theme="dark"] .chart-panel,
body[data-theme="dark"] .customer-work-card,
body[data-theme="dark"] .latest-bookings-card,
body[data-theme="dark"] .status-strip article,
body[data-theme="dark"] .ratio-card {
    background: linear-gradient(180deg, #1c1428, #15101f);
    border-color: rgba(134,239,172,.34);
    box-shadow: 0 18px 48px rgba(0,0,0,.32), inset 0 0 0 1px rgba(34,197,94,.08);
}
body[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #171225, #0f0b17);
    border-color: var(--line);
}
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .search-input,
body[data-theme="dark"] .page-search-box input {
    color: var(--ink);
    background: #221a30;
    border-color: #3b304d;
}
body[data-theme="dark"] .form-control::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: #8f86a1;
}
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .data-table td,
body[data-theme="dark"] table th,
body[data-theme="dark"] table td {
    color: var(--ink);
    border-color: rgba(134,239,172,.18);
    background: transparent;
}
body[data-theme="dark"] .data-table thead,
body[data-theme="dark"] table thead {
    background: #21192d;
}
body[data-theme="dark"] .data-table thead th,
body[data-theme="dark"] table thead th {
    color: #dcfce7;
    background: rgba(34,197,94,.1);
}
body[data-theme="dark"] .muted-copy,
body[data-theme="dark"] .topbar p,
body[data-theme="dark"] small,
body[data-theme="dark"] .field-hint {
    color: var(--muted);
}
body[data-theme="dark"] .theme-choice,
body[data-theme="dark"] .profile-theme-mini,
body[data-theme="dark"] .bank-step-intro {
    background: #1d1628;
    border-color: var(--line);
}
body[data-theme="dark"] .theme-choice b,
body[data-theme="dark"] .profile-theme-mini b {
    color: var(--ink);
    background: #241b32;
    border-color: #3b304d;
}
body[data-theme="dark"] .theme-choice input:checked + b,
body[data-theme="dark"] .profile-theme-mini input:checked + b {
    color: #052e16;
    border-color: #86efac;
    background: linear-gradient(135deg, #86efac, #22c55e);
    box-shadow: 0 0 0 1px rgba(134,239,172,.18), 0 12px 32px rgba(34,197,94,.28);
}
body[data-theme="dark"] .settings-app-box,
body[data-theme="dark"] .app-download-card,
body[data-theme="dark"] .profile-bank-summary section {
    color: var(--ink);
    border-color: rgba(134,239,172,.34);
    background: linear-gradient(180deg, #1c1428, #15101f);
    box-shadow: 0 18px 48px rgba(0,0,0,.28), inset 0 0 0 1px rgba(34,197,94,.06);
}
body[data-theme="dark"] .settings-app-box a,
body[data-theme="dark"] .app-download-card .eyebrow {
    color: #86efac;
}
body[data-theme="dark"] .app-download-icon {
    color: #052e16;
    background: linear-gradient(135deg, #86efac, #22c55e);
    box-shadow: 0 16px 36px rgba(34,197,94,.24);
}
body[data-theme="dark"] .app-download-meta span {
    color: #86efac;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(134,239,172,.2);
}
body[data-theme="dark"] .settings-app-actions label {
    color: #fca5a5;
}
body[data-theme="dark"] .btn-brand {
    color: #052e16;
    border-color: #22c55e;
    background: linear-gradient(135deg, #86efac, #22c55e);
    box-shadow: 0 12px 28px rgba(34,197,94,.22);
}
body[data-theme="dark"] .btn-brand:hover {
    color: #052e16;
    border-color: #16a34a;
    background: #86efac;
}
body[data-theme="dark"] .btn-outline-brand,
body[data-theme="dark"] .icon-button,
body[data-theme="dark"] .orders-pagination a {
    color: #86efac;
    border-color: rgba(134,239,172,.38);
    background: #1d1628;
}
body[data-theme="dark"] .btn-outline-brand:hover,
body[data-theme="dark"] .icon-button:hover,
body[data-theme="dark"] .orders-pagination a:hover,
body[data-theme="dark"] .orders-pagination a.is-active {
    color: #052e16;
    border-color: #86efac;
    background: linear-gradient(135deg, #86efac, #22c55e);
    box-shadow: 0 10px 24px rgba(34,197,94,.22);
}
body[data-theme="dark"] .notification-button {
    color: #86efac;
    border-color: rgba(134,239,172,.44);
    background: #1d1628;
    box-shadow: 0 0 0 1px rgba(134,239,172,.08), 0 12px 28px rgba(0,0,0,.22);
}
body[data-theme="dark"] .search-box,
body[data-theme="dark"] .orders-selected-actions,
body[data-theme="dark"] .orders-pagination {
    color: var(--ink);
    border-color: rgba(134,239,172,.28);
    background: #181322;
}
body[data-theme="dark"] .search-box input {
    color: var(--ink);
    background: transparent;
}
body[data-theme="dark"] .search-box input::placeholder {
    color: #9ca3af;
}
body[data-theme="dark"] .orders-clear-btn.is-muted {
    color: #64748b;
    border-color: rgba(134,239,172,.14);
    background: #181322;
}
body[data-theme="dark"] .orders-clear-btn.is-active {
    color: #86efac;
    border-color: rgba(134,239,172,.44);
    background: #1d1628;
}
body[data-theme="dark"] .orders-page-size,
body[data-theme="dark"] .orders-page-nav {
    color: var(--ink);
}
body[data-theme="dark"] .row-actions .icon-button {
    color: #86efac;
    border-color: rgba(134,239,172,.34);
    background: #21192d;
}
body[data-theme="dark"] .row-actions .icon-button:hover {
    color: #052e16;
    background: #86efac;
}
body[data-theme="dark"] .orders-table .status-date,
body[data-theme="dark"] .orders-table small {
    color: #b6adc8;
}
body[data-theme="dark"] .orders-table a {
    color: #86efac;
}
body[data-theme="dark"] .courier-logo-badge {
    border-color: rgba(134,239,172,.34);
    background: #fff;
}
.register-body {
    background:
        radial-gradient(circle at 12% 14%, rgba(124,58,237,.17), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(6,182,212,.12), transparent 24%),
        linear-gradient(135deg, #f8fbff 0%, #f3edff 50%, #f4fffb 100%);
}
.register-pro-shell {
    width: min(1240px, calc(100vw - 36px));
    min-height: 640px;
    grid-template-columns: 370px minmax(0, 1fr);
    border: 1px solid rgba(124,58,237,.12);
    box-shadow: 0 30px 90px rgba(47,31,83,.17);
}
.register-pro-brand {
    justify-content: flex-start;
    gap: 0;
    padding: 30px;
    background:
        linear-gradient(150deg, rgba(124,58,237,.97), rgba(91,33,182,.98) 58%, rgba(31,41,55,.96));
}
.register-logo-card {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    margin-bottom: 22px;
}
.register-logo-card img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}
.register-pro-brand h1 {
    max-width: 270px;
    font-size: 34px;
    line-height: 1.08;
}
.register-pro-brand p {
    max-width: 100%;
    font-size: 14px;
}
.register-feature-grid {
    gap: 10px;
    margin-top: 24px;
    width: 100%;
}
.register-feature-grid span {
    min-width: 0;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 11px;
    border-radius: 14px;
    overflow: hidden;
}
.register-feature-grid svg {
    width: 30px;
    height: 30px;
    padding: 7px;
}
.register-feature-grid b {
    font-size: 12px;
    line-height: 1.15;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}
.register-feature-grid small {
    font-size: 10.5px;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}
.register-brand-card {
    width: 100%;
    margin-top: auto;
}
.register-card {
    min-width: 0;
    padding: 36px 38px;
}
.register-card-logo {
    margin-bottom: 18px;
}
.register-card .auth-head h2 {
    font-size: 32px;
}
.register-card .auth-head p {
    margin-bottom: 18px;
}
.register-card .password-field {
    display: block;
}
.register-card .password-toggle {
    top: 50%;
    transform: translateY(-50%);
}
.register-file-field .form-control {
    height: 48px;
    color: #5f5870;
    background: #fff;
}
.register-file-field .form-control::file-selector-button {
    height: 29px;
    padding-inline: 10px;
    box-shadow: 0 8px 20px rgba(124,58,237,.18);
}
.bank-step-intro strong,
.bank-step-intro small { display: block; }
.bank-step-intro strong { font-weight: 900; }
.bank-step-intro small { color: var(--muted); font-size: 12px; }
.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.user-detail-grid section {
    min-width: 0;
    padding: 10px;
    border: 1px solid #ece7fb;
    border-radius: 10px;
    background: #fbfaff;
}
.user-detail-grid span,
.user-detail-grid strong {
    display: block;
}
.user-detail-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.user-detail-grid strong {
    margin-top: 3px;
    color: #20142f;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.password-field {
    position: relative;
    display: block;
}
.password-field .form-control {
    padding-right: 46px;
}
.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--brand);
}
.password-toggle:hover {
    background: var(--brand-soft);
}
.password-toggle svg {
    width: 18px;
    height: 18px;
}
.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted) !important;
    font-weight: 800;
}
.remember-row input {
    width: 15px;
    height: 15px;
    accent-color: var(--brand);
}
.auth-switch { margin: 0; color: var(--muted); font-size: 13px; }
.auth-switch a { color: var(--brand); font-weight: 900; text-decoration: none; }
.auth-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 12px;
}
.auth-options .btn {
    min-height: 40px;
    box-shadow: 0 10px 24px rgba(56,37,102,.08);
}
.login-body {
    background:
        radial-gradient(circle at 12% 16%, rgba(124,58,237,.16), transparent 28%),
        radial-gradient(circle at 86% 12%, rgba(16,185,129,.12), transparent 24%),
        linear-gradient(135deg, #f8fbff 0%, #f3ecff 48%, #eefdf7 100%);
}
.login-shell {
    width: min(1040px, 100%);
    min-height: 620px;
    grid-template-columns: 1.05fr .95fr;
    border: 1px solid rgba(124,58,237,.12);
    box-shadow: 0 28px 90px rgba(47, 31, 83, .18);
}
.login-brand-panel {
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    gap: 0;
    padding: 42px;
    background:
        linear-gradient(150deg, rgba(124,58,237,.96), rgba(76,29,149,.98) 58%, rgba(15,23,42,.95));
}
.login-brand-panel::before {
    content: "";
    position: absolute;
    inset: 22px 22px auto auto;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 38px;
    transform: rotate(16deg);
}
.login-brand-panel::after {
    content: "";
    position: absolute;
    left: -74px;
    bottom: -92px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
}
.login-brand-panel > * {
    position: relative;
    z-index: 1;
}
.login-logo-card {
    width: 118px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 42px rgba(0,0,0,.18);
    margin-bottom: 26px;
}
.login-logo-card img,
.login-card-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.login-eyebrow {
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ede9fe;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.login-brand-panel h1 {
    max-width: 360px;
    margin: 0 0 14px;
    font-size: 40px;
    line-height: 1.08;
}
.login-brand-panel p {
    max-width: 420px;
    font-size: 15px;
}
.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
    width: 100%;
}
.login-feature-grid span {
    display: grid;
    grid-template-columns: 38px 1fr;
    column-gap: 10px;
    align-items: center;
    padding: 13px;
    border-radius: 16px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
}
.login-feature-grid svg {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.16);
}
.login-feature-grid b {
    font-size: 13px;
}
.login-feature-grid small {
    color: rgba(255,255,255,.76);
}
.login-card {
    justify-content: center;
    padding: 48px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92)),
        #fff;
}
.login-card-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin-bottom: 26px;
    padding: 8px 14px 8px 8px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #ebe4ff;
    box-shadow: 0 14px 32px rgba(56,37,102,.08);
}
.login-card-logo img {
    width: 42px;
    height: 42px;
}
.login-card-logo span {
    font-weight: 900;
    color: #1f1730;
}
.login-card .auth-head h2 {
    font-size: 32px;
}
.login-card form {
    gap: 15px;
}
.login-card .form-control {
    min-height: 50px;
    border-radius: 14px;
    font-weight: 700;
}
.login-submit {
    min-height: 50px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 15px;
    padding: 0 12px 0 22px;
}
.login-submit svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    box-shadow: 0 8px 18px rgba(31,23,48,.13);
}
.login-form-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 2px;
}
.login-form-links .remember-row {
    margin: 0;
    color: #6b647a;
    font-size: 12px;
    font-weight: 800;
}
.login-form-links a,
.login-support a {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}
.login-form-links a:hover,
.login-support a:hover {
    color: var(--brand-dark);
}
.login-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px 0 0;
    color: #7a738b;
    font-size: 12px;
    font-weight: 800;
}
.login-support svg {
    width: 18px;
    height: 18px;
    color: var(--brand);
}
.approval-state {
    display: grid;
    gap: 10px;
    text-align: center;
    margin-bottom: 18px;
}
.approval-state > span {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 18px;
    color: var(--brand);
    background: var(--brand-soft);
}
.approval-state > span.is-rejected {
    color: #be123c;
    background: #fff0f3;
}
.approval-state svg { width: 31px; height: 31px; }
.approval-state h2 { margin: 0; font-size: 24px; font-weight: 900; }
.approval-state p { margin: 0; color: var(--muted); line-height: 1.55; }
.approval-details {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.approval-details section {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfbff;
}
.approval-details small { display: block; color: var(--muted); }
.approval-details strong { display: block; margin-top: 2px; }
.approval-actions {
    display: grid;
    gap: 10px;
}
.approval-actions .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
}
.app-toast {
    position: fixed;
    right: 18px;
    top: 82px;
    max-width: min(420px, calc(100% - 36px));
    padding: 13px 16px;
    border-radius: 8px;
    background: #17191f;
    color: #fff;
    box-shadow: 0 16px 40px rgba(28,35,54,.22);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 1000;
    font-weight: 800;
    font-size: 13px;
}

.push-monitor {
    overflow: hidden;
}
.push-monitor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.push-monitor-head.compact {
    margin-bottom: 12px;
}
.push-monitor-head h2 {
    margin: 4px 0 6px;
}
.push-monitor-head p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
}
.push-endpoint-grid,
.push-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.push-endpoint-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}
.push-endpoint-card,
.push-stat,
.push-empty {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #faf7ff);
    padding: 14px;
}
.push-endpoint-card span,
.push-stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 7px;
}
.push-endpoint-card code {
    display: block;
    white-space: normal;
    word-break: break-word;
    color: var(--ink);
    font-weight: 800;
    font-family: inherit;
}
.push-stat strong {
    display: block;
    font-size: 20px;
}
.push-stat.good {
    background: #ecfdf3;
    border-color: #bbf7d0;
}
.push-stat.bad {
    background: #fff1f2;
    border-color: #fecdd3;
}
.push-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.push-pill.ok {
    color: #047857;
    background: #dcfce7;
    border: 1px solid #86efac;
}
.push-pill.warn {
    color: #be123c;
    background: #ffe4e6;
    border: 1px solid #fda4af;
}
.push-pill.neutral {
    color: #6d28d9;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
}
.push-log-table td small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}
.push-error {
    max-width: 360px;
    color: #be123c;
}
.push-empty {
    display: grid;
    gap: 6px;
    color: var(--muted);
}
.push-empty strong {
    color: var(--ink);
}
body[data-theme="dark"] .push-endpoint-card,
body[data-theme="dark"] .push-stat,
body[data-theme="dark"] .push-empty {
    border-color: rgba(74, 222, 128, .28);
    background: linear-gradient(180deg, rgba(22, 33, 27, .96), rgba(16, 24, 20, .96));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
body[data-theme="dark"] .push-stat.good {
    background: linear-gradient(180deg, rgba(20, 83, 45, .44), rgba(13, 52, 33, .52));
    border-color: rgba(74, 222, 128, .44);
}
body[data-theme="dark"] .push-stat.bad {
    background: linear-gradient(180deg, rgba(88, 28, 28, .46), rgba(59, 18, 28, .54));
    border-color: rgba(248, 113, 113, .36);
}
body[data-theme="dark"] .push-endpoint-card code,
body[data-theme="dark"] .push-stat strong,
body[data-theme="dark"] .push-empty strong {
    color: #ecfdf5;
}
body[data-theme="dark"] .push-pill.ok {
    color: #bbf7d0;
    background: rgba(22, 101, 52, .38);
    border-color: rgba(74, 222, 128, .42);
}
body[data-theme="dark"] .push-pill.warn {
    color: #fecdd3;
    background: rgba(127, 29, 29, .42);
    border-color: rgba(248, 113, 113, .38);
}
body[data-theme="dark"] .push-pill.neutral {
    color: #d9f99d;
    background: rgba(63, 98, 18, .34);
    border-color: rgba(190, 242, 100, .34);
}
body[data-theme="dark"] .push-error {
    color: #fca5a5;
}

@media (max-width: 900px) {
    .push-monitor-head {
        display: grid;
    }
    .push-endpoint-grid,
    .push-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .push-endpoint-grid,
    .push-stats-grid {
        grid-template-columns: 1fr;
    }
    .push-monitor-head .toolbar {
        width: 100%;
    }
    .push-monitor-head .toolbar .btn {
        flex: 1;
    }
}
.app-toast.show { opacity: 1; transform: translateY(0); }
.app-toast.success { background: #5b21b6; }
.app-toast.error { background: #be123c; }

.portal-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}
.sidebar {
    width: 226px;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 58%, #312e81 100%);
    color: #fff;
    padding: 24px 8px;
    z-index: 20;
}
.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 24px 28px;
    color: #fff;
    text-decoration: none;
}
.brand svg { width: 28px; height: 28px; }
.brand strong { display: block; font-size: 17px; }
.brand small { display: block; color: rgba(255,255,255,.82); text-decoration: underline; }
.brand-logo-link {
    display: grid;
    place-items: center;
    min-height: 74px;
    padding: 10px 12px 18px;
    margin-bottom: 4px;
}
.sidebar-spacer { height: 8px; }
.brand-logo-link img {
    width: 118px;
    height: 52px;
    object-fit: contain;
    display: block;
    background: rgba(255,255,255,.96);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 12px 26px rgba(23,20,37,.16);
}
.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 9px 16px;
    margin: 2px 0;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}
.side-nav a:hover, .side-nav a.is-active { background: rgba(255,255,255,.18); box-shadow: inset 3px 0 0 rgba(255,255,255,.85); }
.side-nav svg { width: 17px; height: 17px; flex: 0 0 auto; }
.nav-label { padding: 18px 16px 5px; color: rgba(255,255,255,.7); font-size: 11px; text-transform: uppercase; font-weight: 800; }
.courier-badge {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 18px;
    border-radius: 3px;
    color: #111;
    font-weight: 900;
    font-size: 11px;
}
.courier-badge.yellow { background: #facc15; }
.courier-badge.green { background: #22d3ee; }
.courier-badge.red { background: #fb7185; }
.courier-logo-badge {
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee3ff;
}
.courier-logo-badge img {
    max-width: 22px;
    max-height: 14px;
    display: block;
    object-fit: contain;
}

.portal-main {
    width: calc(100vw - 246px);
    max-width: calc(100vw - 246px);
    margin-left: 226px;
    min-width: 0;
    box-sizing: border-box;
}
.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px 14px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 800; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { text-align: right; font-size: 12px; }
.user-chip strong, .user-chip span { display: block; }
.user-chip span { color: var(--muted); }
.content-wrap {
    padding: 18px 20px 18px 18px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.notification-menu { position: relative; }
.notification-button { position: relative; }
.notification-button span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #ef4444;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 900;
}
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 92px));
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(23,20,37,.22);
    z-index: 50;
    display: none;
}
.notification-menu.is-open .notification-panel { display: block; }
.notification-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 4px 10px;
}
.notification-head strong { font-size: 14px; font-weight: 900; }
.notification-head small,
.notification-empty { color: var(--muted); font-size: 12px; }
.notification-empty { padding: 14px 6px; text-align: center; }
.notification-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid #f0ecf8;
    border-radius: 11px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}
.notification-item + .notification-item { margin-top: 8px; }
.notification-dot {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--brand);
}
.notification-item.delivered .notification-dot { background: #16a34a; }
.notification-item.return .notification-dot { background: #f97316; }
.notification-item strong,
.notification-item b,
.notification-item small,
.notification-item em,
.notification-item time {
    display: block;
}
.notification-item strong { font-size: 12px; font-weight: 900; }
.notification-item b { margin-top: 3px; font-size: 12px; }
.notification-item small,
.notification-item em,
.notification-item time {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    font-style: normal;
}
.notification-item em { margin-top: 3px; color: #4b5563; }

@media (max-width: 640px) {
    .notification-menu { position: static; }
    .notification-panel {
        position: fixed;
        top: 64px;
        right: 10px;
        left: auto;
        width: min(320px, calc(100vw - 20px));
        max-height: calc(100vh - 82px);
        border-radius: 12px;
        padding: 8px;
    }
    .notification-item {
        grid-template-columns: 8px minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
    }
    .notification-item section { min-width: 0; }
    .notification-item b,
    .notification-item small,
    .notification-item time {
        overflow-wrap: anywhere;
    }
}

.btn { border-radius: var(--radius-sm); font-weight: 700; font-size: 12px; min-height: 34px; display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.btn svg { width: 16px; height: 16px; }
.btn-brand { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border-color: var(--brand); box-shadow: 0 8px 18px rgba(124,58,237,.2); }
.btn-brand:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-brand { color: var(--brand); border-color: #d8cdf8; background: #fff; }
.btn-cancel {
    color: #be123c;
    background: #fff1f5;
    border: 1px solid #fecdd3;
    min-height: 30px;
    padding-inline: 10px;
}
.btn-cancel:hover { color: #fff; background: #be123c; border-color: #be123c; }
.icon-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius-sm);
    color: var(--brand);
}
.orders-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}
.orders-table input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: .35;
}
.bulk-print-button {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-color: var(--brand);
    box-shadow: 0 8px 18px rgba(124,58,237,.18);
}
.icon-button svg { width: 18px; height: 18px; }
.sidebar-toggle { display: none; }

.dashboard-grid { display: grid; grid-template-columns: 360px 1fr 166px; gap: 18px; align-items: stretch; }
.dashboard-grid > *, .two-column > *, .report-layout > * { min-width: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat-card, .panel, .status-strip article, .ratio-card {
    background: var(--surface);
    border: 1px solid rgba(235,231,243,.9);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.stat-card, .panel, .ratio-card {
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.stat-card:hover, .panel:hover, .ratio-card:hover {
    border-color: rgba(216,205,248,.95);
    box-shadow: var(--card-shadow-hover);
}
.stat-card { min-height: 104px; padding: 16px; }
.stat-icon { display: inline-grid; place-items: center; color: var(--brand); margin-bottom: 8px; }
.stat-icon svg { width: 34px; height: 34px; stroke-width: 1.7; }
.stat-card span:not(.stat-icon), .status-strip span, .ratio-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong, .status-strip strong, .ratio-card strong { display: block; margin-top: 4px; font-size: 17px; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.user-summary-card strong { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.panel { padding: 16px; }
.panel h2 { font-size: 15px; margin: 0 0 12px; font-weight: 800; }
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-head a { color: var(--brand); font-size: 12px; text-decoration: none; }
.panel-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.ratio-stack { display: grid; gap: 14px; }
.ratio-card { display: grid; place-items: center; text-align: center; }
.ratio-card strong {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
    background:
        radial-gradient(circle closest-side, #fff 71%, transparent 72%),
        conic-gradient(var(--brand) var(--ratio), #eee9fb 0);
}
body[data-theme="dark"] .ratio-card strong {
    color: #dcfce7;
    background:
        radial-gradient(circle closest-side, #241b32 68%, transparent 70%),
        conic-gradient(#22c55e var(--ratio), rgba(134,239,172,.18) 0);
    box-shadow: 0 0 28px rgba(34,197,94,.25);
}
.status-strip { display: grid; grid-template-columns: repeat(11, minmax(92px, 1fr)); gap: 10px; margin: 14px 0; }
.status-strip article {
    min-height: 78px;
    padding: 10px 10px;
    text-align: center;
    display: grid;
    grid-template-rows: minmax(32px, auto) 1fr;
    align-items: end;
}
.status-strip article span {
    min-height: 32px;
    display: grid !important;
    place-items: center;
    line-height: 1.25;
}
.status-strip article strong {
    align-self: start;
}
.status-card-link { color: inherit; text-decoration: none; display: block; border-radius: var(--radius); }
.status-card-link article { height: 100%; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.status-card-link:hover article,
.status-card-link.selected article {
    border-color: var(--brand);
    box-shadow: 0 18px 44px rgba(124,58,237,.16);
}
.status-card-link.selected article { outline: 2px solid rgba(124,58,237,.95); outline-offset: -2px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .form-control { width: 110px; min-height: 34px; font-size: 12px; }
.search-box { min-height: 36px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 10px; min-width: 260px; }
.search-box svg { width: 16px; color: var(--muted); }
.search-box input { border: 0; outline: 0; width: 100%; font-size: 12px; }
.page-search-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto auto;
    gap: 8px;
    align-items: center;
    margin: 10px 0 14px;
    padding: 10px;
    border: 1px solid #e6dcff;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #faf7ff);
    box-shadow: 0 10px 26px rgba(124, 58, 237, .06);
}
.page-search-box {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d8cdf8;
    border-radius: 12px;
    background: #fff;
}
.page-search-box svg { width: 17px; color: var(--brand); flex: 0 0 auto; }
.page-search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    background: transparent;
}
.search-result-chip {
    justify-self: end;
    border-radius: 999px;
    padding: 8px 11px;
    background: #f3e8ff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .page-search-card {
        grid-template-columns: 1fr 44px;
        gap: 8px;
        padding: 9px;
        margin: 8px 0 12px;
    }
    .page-search-box {
        min-height: 44px;
        padding: 0 10px;
    }
    .page-search-box input {
        font-size: 16px;
    }
    .page-search-card .btn-brand {
        min-width: 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    .page-search-card .btn-brand svg {
        margin: 0;
    }
    .page-search-card .btn-brand:not(.search-clear-btn) {
        font-size: 0;
    }
    .page-search-card .search-clear-btn,
    .page-search-card .search-result-chip {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
.orders-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto minmax(360px, auto);
    align-items: center;
}
.orders-search-row {
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
    min-width: 0;
}
.orders-filter.has-selected-orders .orders-search-row {
    grid-template-columns: minmax(185px, .72fr) 36px auto;
}
.orders-search-row .search-box { min-width: 0; }
.orders-date-row {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, 110px);
    gap: 8px;
}
.orders-date-row .form-control { width: 100%; }
.orders-action-row {
    grid-column: 4;
    display: grid;
    grid-template-columns: minmax(72px, .7fr) minmax(142px, 1fr) minmax(148px, 1fr);
    gap: 8px;
    align-items: center;
}
.orders-action-row .btn,
.orders-clear-placeholder { width: 100%; }
.orders-clear-placeholder { min-height: 34px; }
.orders-clear-btn.is-muted {
    color: #a7a0b6;
    border-color: #ece7f5;
    background: #fbfaff;
    box-shadow: none;
    pointer-events: none;
}
.orders-clear-btn.is-active {
    color: var(--brand);
    border-color: #c7b7f4;
    background: #fff;
}
.orders-selected-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px;
    border: 1px solid #e8ddff;
    border-radius: var(--radius-sm);
    background: #fbfaff;
}
.orders-search-row .orders-selected-actions {
    min-height: 36px;
    padding: 4px 5px;
    white-space: nowrap;
}
.orders-selected-actions span {
    min-width: 82px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.orders-delete-button {
    color: #be123c;
    border-color: #fecdd3;
    background: #fff1f5;
}
.excel { color: #0f8a4b; background: #ecfff5; border-color: #c7f5db; }

.sql-clean-form {
    align-items: end;
}
.sql-clean-keep {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fbfaff;
}
.sql-clean-keep strong {
    margin-right: 6px;
}
.sql-clean-keep span,
.sql-clean-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #14532d;
    background: #dcfce7;
    font-size: 12px;
    font-weight: 900;
}
.sql-clean-result {
    margin-top: 14px;
}
.sql-clean-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    background: #f0fdf4;
}
.sql-clean-summary strong {
    color: #166534;
    font-size: 18px;
}
.sql-clean-summary small {
    flex: 1 1 100%;
    color: #15803d;
    font-weight: 800;
}
body[data-theme="dark"] .sql-clean-keep,
body[data-theme="dark"] .sql-clean-summary {
    border-color: rgba(134,239,172,.34);
    background: #181322;
}
body[data-theme="dark"] .sql-clean-summary strong,
body[data-theme="dark"] .sql-clean-summary small {
    color: #86efac;
}

.table { margin-bottom: 0; color: #333946; }
.table-responsive { position: relative; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive::after {
    content: "";
    position: sticky;
    display: block;
    float: right;
    top: 0;
    right: 0;
    width: 26px;
    height: 1px;
    pointer-events: none;
}
.table th { background: #f7f7f8; color: #747986; font-size: 12px; font-weight: 700; white-space: nowrap; }
.table td { font-size: 12px; vertical-align: middle; border-color: var(--line); }
.table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.table small { display: block; color: #6b7280; }
.inner-y-scroll {
    max-height: 315px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    scrollbar-color: var(--brand) #eee8ff;
    scrollbar-width: thin;
}
.inner-y-scroll::-webkit-scrollbar { width: 7px; }
.inner-y-scroll::-webkit-scrollbar-track { background: #eee8ff; border-radius: 999px; }
.inner-y-scroll::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
.orders-table a { color: var(--brand); text-decoration: none; }
.orders-table tr.clickable-order-row { cursor: pointer; }
.orders-table tr.clickable-order-row:hover td { background: rgba(124, 58, 237, .06); }
body[data-theme="dark"] .orders-table tr.clickable-order-row:hover td { background: rgba(47, 224, 125, .08); }
.orders-table .tracking-link {
    color: #4c1d95;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 800;
}
.orders-table .tracking-link:hover { color: var(--brand); }
.orders-table .status-date {
    display: block;
    margin-top: 3px;
    padding-left: 15px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
}
.row-actions { display: flex; gap: 6px; }
.row-actions .icon-button { width: 30px; height: 30px; }
.orders-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 14px;
    flex-wrap: wrap;
}
.orders-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.orders-page-size {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    padding: 4px;
    border: 1px solid #eee7ff;
    border-radius: 10px;
    background: #fbfaff;
}
.orders-page-size b {
    padding: 0 5px;
    color: var(--muted);
    font-size: 11px;
}
.orders-pagination span {
    margin-right: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.orders-pagination a {
    min-width: 34px;
    min-height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 6px 10px;
    border: 1px solid #decfff;
    border-radius: 9px;
    color: var(--brand);
    text-decoration: none;
    font-weight: 900;
    font-size: 12px;
    background: #fff;
}
.orders-pagination a.is-active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 22px rgba(109,40,217,.22);
}
.orders-pagination a.disabled {
    pointer-events: none;
    opacity: .45;
}
.orders-mobile-all { display: none !important; }
.icon-button.success {
    color: #0f8a4b;
    border-color: #b9f0d0;
    background: #ecfff5;
}
.approval-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    color: #6d4b00;
    background: #fff7dc;
}
.approval-badge.approved { color: #0f6b3a; background: #e8fff1; }
.approval-badge.rejected { color: #b00020; background: #fff0f2; }
.status-dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #ffba1a; margin-right: 6px; }
.status-dot.out-for-delivery { background: #7c3aed; }
.status-dot.delivered { background: #0baa25; }
.status-dot.office-return { background: #ffba1a; }
.status-dot.returned,
.status-dot.return,
.status-dot.return-to-origin,
.status-dot.returned-to-origin,
.status-dot.returned-at-merchant-warehouse { background: #ef2222; }

.service-busy-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 10, 22, .62);
    backdrop-filter: blur(4px);
}
.service-busy-popup-card {
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid rgba(74, 222, 128, .55);
    border-radius: 16px;
    background: #161121;
    color: #f8fafc;
    box-shadow: 0 24px 65px rgba(0, 0, 0, .42);
    text-align: center;
}
.service-busy-popup-card strong { display: block; font-size: 20px; color: #86efac; }
.service-busy-popup-card p { margin: 10px 0 18px; color: #d1fae5; line-height: 1.55; }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 36px; align-items: start; }
.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
label { color: #5c6370; font-size: 12px; font-weight: 700; }
.wide { grid-column: 1 / -1; }
.settings-compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
}
.settings-compact-grid > label {
    grid-column: span 1;
    min-width: 0;
}
.settings-compact-grid > label.setting-small {
    grid-column: span 1;
}
.settings-compact-grid > label.setting-half {
    grid-column: span 3;
}
.settings-compact-grid > .setting-half {
    grid-column: span 3;
}
.settings-compact-grid > label.wide {
    grid-column: 1 / -1;
}
.settings-compact-grid .form-control,
.settings-compact-grid .form-select {
    min-height: 38px;
    padding-block: 9px;
    font-size: 12px;
    width: 100%;
}
.settings-compact-grid .field-hint {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
    display: block;
}
.settings-app-box {
    min-height: 66px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: linear-gradient(180deg, #fff, #faf7ff);
}
.settings-app-box span,
.settings-app-box small,
.settings-app-box a {
    display: block;
    font-size: 11px;
}
.settings-app-box span,
.settings-app-box small {
    color: var(--muted);
}
.settings-app-box strong {
    display: block;
    margin: 2px 0;
    font-size: 12px;
}
.settings-app-box a {
    margin-top: 3px;
    color: var(--brand);
    font-weight: 900;
    text-decoration: none;
}
.settings-app-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 3px;
}
.settings-app-actions label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: #ef4444;
    font-size: 11px;
}
.settings-help {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fff, #faf7ff);
}
.settings-help h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 900;
}
.settings-help p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}
.settings-code {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 12px;
}
.settings-code > div {
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow-wrap: anywhere;
}
.form-control, .form-select { border-color: var(--line); background-color: #f7f7f8; border-radius: var(--radius-sm); min-height: 38px; font-size: 13px; }
.fixed-value { display: flex; align-items: center; font-weight: 800; color: var(--brand); background: #f4efff; border-color: rgba(124, 58, 237, .28); }
.select-search { display: grid; gap: 7px; }
.select-search-input {
    background: #fff;
    border-color: #d8cdf8;
}
.city-autocomplete { position: relative; }
.city-suggestions {
    position: absolute;
    inset: calc(100% + 6px) 0 auto 0;
    display: none;
    max-height: 230px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d8cdf8;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow-hover);
    z-index: 30;
    padding: 6px;
}
.city-suggestions.show { display: grid; gap: 4px; }
.city-suggestions button {
    min-height: 34px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    text-align: left;
    padding: 7px 9px;
    font-size: 13px;
    font-weight: 700;
}
.city-suggestions button:hover { background: var(--brand-soft); color: var(--brand); }
.city-suggestions button:disabled { color: var(--muted); cursor: default; }
.courier-panel { display: grid; gap: 14px; position: sticky; top: 88px; }
.courier-select { border: 2px solid var(--brand); background: var(--brand-soft); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.segmented input { display: none; }
.segmented label { min-height: 42px; border-radius: var(--radius-sm); background: #fff; box-shadow: 0 10px 24px rgba(56,37,102,.09); display: grid; place-items: center; cursor: pointer; }
.segmented input:checked + label { color: var(--brand); border: 1px solid var(--brand); background: var(--brand-soft); }
.ai-paste-panel textarea {
    min-height: 190px;
    resize: vertical;
    background: #fbfbff;
}
.ai-paste-panel textarea::placeholder {
    color: #9a93ad;
    opacity: .72;
}

.courier-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.courier-title h2 { margin: 0; font-size: 20px; }
.upload-panel p { color: var(--muted); }
.upload-zone { min-height: 220px; border: 1px dashed #cfd4dc; border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); margin: 16px 0; }
.upload-zone svg { width: 42px; height: 42px; color: var(--brand); }
.bulk-panel .panel-head,
.bulk-preview-panel .panel-head {
    align-items: center;
    margin-bottom: 16px;
}
.bulk-panel p,
.bulk-preview-panel p {
    margin: 2px 0 0;
    color: var(--muted);
}
.bulk-format {
    display: grid;
    grid-template-columns: repeat(10, minmax(82px, 1fr));
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.bulk-format span {
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.bulk-upload-grid {
    display: grid;
    grid-template-columns: 180px minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.bulk-file-picker input { min-height: 38px; }
.bulk-paste-box {
    display: grid;
    grid-template-columns: 220px minmax(280px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #f8f4ff);
}
.bulk-paste-box strong {
    display: block;
    font-size: 14px;
}
.bulk-paste-box small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
}
.bulk-paste-box textarea {
    min-height: 116px;
    font-family: Consolas, Monaco, monospace;
    resize: vertical;
}
.bulk-preview-table td { vertical-align: middle; }
.bulk-ok,
.bulk-error {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 900;
}
.bulk-ok {
    color: #047857;
    background: #d1fae5;
}
.bulk-error {
    color: #be123c;
    background: #ffe4e6;
}
.row-invalid { background: #fff7f7; }
.timeline { display: grid; gap: 14px; margin-top: 18px; }
.timeline div { display: grid; grid-template-columns: 18px 160px 1fr; gap: 10px; align-items: center; }
.timeline span { width: 12px; height: 12px; background: var(--brand); border-radius: 50%; }
.timeline small { color: var(--muted); }
.track-result { margin-top: 16px; }
.track-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    align-items: start;
}
.track-result-main { min-width: 0; }
.track-result-side { min-width: 0; }
.live-route-card {
    padding: 8px;
    margin-bottom: 0;
    border-radius: 10px;
    color: #e8f0ff;
    background:
        radial-gradient(circle at 55% 45%, rgba(57,79,170,.18), transparent 34%),
        linear-gradient(180deg, #10192b 0%, #091322 100%);
    border: 1px solid rgba(87,116,169,.18);
    box-shadow: 0 18px 44px rgba(15,23,42,.26);
    overflow: hidden;
}
.live-route-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.live-route-head strong { font-size: 11px; }
.live-route-head span { color: #a78bfa; font-size: 9px; font-weight: 900; }
.route-map {
    position: relative;
    min-height: 118px;
    border: 1px solid rgba(77,101,142,.24);
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 18%, rgba(74,222,128,.20), transparent 14%),
        radial-gradient(circle at 45% 45%, rgba(99,102,241,.22), transparent 25%),
        linear-gradient(160deg, rgba(10,24,46,.94), rgba(5,14,28,.98)),
        #071321;
}
.route-map::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0 52%, rgba(3,8,17,.66) 100%);
    pointer-events: none;
    z-index: 6;
}
.route-map-grid {
    position: absolute;
    inset: 0;
    opacity: .13;
    background-image:
        linear-gradient(rgba(99,128,176,.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,128,176,.5) 1px, transparent 1px);
    background-size: 34px 34px;
}
.route-roads {
    position: absolute;
    inset: -12%;
    opacity: .30;
    background:
        linear-gradient(166deg, transparent 18%, rgba(148,163,184,.55) 18.4%, transparent 18.9% 100%),
        linear-gradient(19deg, transparent 30%, rgba(148,163,184,.42) 30.4%, transparent 30.9% 100%),
        linear-gradient(144deg, transparent 52%, rgba(148,163,184,.42) 52.4%, transparent 52.9% 100%),
        linear-gradient(8deg, transparent 68%, rgba(148,163,184,.34) 68.4%, transparent 68.9% 100%);
    transform: rotate(-5deg);
}
.route-art { position: absolute; inset: 4% 4%; width: 92%; height: 88%; overflow: visible; z-index: 2; }
.route-shadow,
.route-base,
.route-active { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-network path { fill: none; stroke: rgba(148, 163, 184, .16); stroke-width: 3; stroke-linecap: round; }
.route-shadow { stroke: rgba(95, 88, 255, .34); stroke-width: 18; filter: url(#routeGlow); }
.route-base { stroke: rgba(226,232,240,.25); stroke-width: 8; }
.route-active { stroke: #7367ff; stroke-width: 8; stroke-dasharray: var(--route-progress) 100; filter: drop-shadow(0 0 8px rgba(124,58,237,.95)); }
.route-dots circle { fill: #fff; stroke: #6448ff; stroke-width: 4; filter: drop-shadow(0 0 5px rgba(124,58,237,.85)); }
.route-pin {
    position: absolute;
    z-index: 8;
    display: grid;
    justify-items: center;
    gap: 3px;
    color: #fff;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: 950;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.route-pin span {
    position: relative;
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border: 3px solid currentColor;
    border-radius: 50% 50% 50% 0;
    background: #101827;
    transform: rotate(-45deg);
    box-shadow: 0 0 16px currentColor;
}
.route-pin span::after {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.route-pin b {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    line-height: 1;
}
.route-pin-start {
    left: 13%;
    top: 75%;
    color: #ef4444;
}
.route-pin-end {
    left: 80%;
    top: 22%;
    color: #22c55e;
}
.route-status {
    position: absolute;
    left: var(--truck-left, 59%);
    top: var(--truck-top, 40%);
    transform: translate(-50%, -50%);
    width: 86px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    box-shadow: none;
    border: 0;
    backdrop-filter: none;
    z-index: 9;
}
.route-status svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    margin: 0 auto 2px;
    border-radius: 50%;
    background: #536cff;
    color: #fff;
    border: 3px solid #9ba9ff;
    box-shadow: 0 0 22px rgba(92,93,255,.9);
}
.route-status.is-origin svg {
    background: #ef4444;
    border-color: #fecaca;
    box-shadow: 0 0 20px rgba(239, 68, 68, .78);
}
.route-status.is-transit svg,
.route-status.is-moving svg {
    background: #6d5dfc;
    border-color: #c4b5fd;
    box-shadow: 0 0 22px rgba(124, 58, 237, .82);
}
.route-status.is-near svg {
    background: #22c55e;
    border-color: #bbf7d0;
    box-shadow: 0 0 22px rgba(34, 197, 94, .82);
}
.route-status.is-delivered svg {
    background: #16a34a;
    border-color: #dcfce7;
    box-shadow: 0 0 24px rgba(34, 197, 94, .9);
}
.route-status.is-return svg {
    background: #f97316;
    border-color: #fed7aa;
    box-shadow: 0 0 22px rgba(249, 115, 22, .78);
}
.route-status strong,
.route-status small { display: block; line-height: 1.15; }
.route-status strong {
    font-size: 8px;
    white-space: normal;
    text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.route-status small {
    max-width: 112px;
    margin-top: 1px;
    color: #cbd5e1;
    font-size: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.track-empty {
    min-height: 170px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #d8cdf8;
    border-radius: 8px;
    background: #fff;
    padding: 22px;
}
.track-empty span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}
.track-empty svg { width: 24px; height: 24px; }
.track-empty h2 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 900; }
.track-empty p { margin: 0; max-width: 520px; line-height: 1.5; }
.user-guide-panel {
    max-width: 980px;
}
.guide-video-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    border: 1px solid rgba(124, 58, 237, .18);
    background:
        linear-gradient(135deg, rgba(23, 20, 37, .96), rgba(76, 29, 149, .82)),
        #171425;
    box-shadow: 0 18px 50px rgba(56, 37, 102, .16);
}
.guide-video-card iframe,
.guide-video-card video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #111827;
}
.guide-empty {
    min-height: 310px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px dashed rgba(124, 58, 237, .34);
    background: linear-gradient(180deg, #fff, #faf7ff);
}
.guide-empty span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--brand);
    background: var(--brand-soft);
}
.guide-empty svg { width: 26px; height: 26px; }
.guide-empty h2 { margin: 0; font-size: 19px; font-weight: 900; }
.guide-empty p { margin: 0; color: var(--muted); }
.track-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.track-summary section {
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.track-summary span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.track-summary strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.track-remarks {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
}
.compact-empty { min-height: 180px; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.report-tile { min-height: 86px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; align-content: center; gap: 8px; font-weight: 800; color: #333; box-shadow: var(--card-shadow); }
.report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.report-hero h2 { margin: 0; font-size: 22px; font-weight: 900; }
.report-hero p { margin: 3px 0 0; color: var(--muted); }
.report-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--card-shadow);
}
.report-tabs {
    display: inline-grid;
    grid-template-columns: repeat(4, minmax(76px, 1fr));
    gap: 6px;
}
.billing-payment-tabs {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    margin: 10px 0;
}
.report-tabs button {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #f7f7f8;
    color: var(--ink);
    font-weight: 800;
}
.report-tabs button.is-active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(109,40,217,.22);
}
.report-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.report-custom input {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    background: #f7f7f8;
    font-size: 13px;
}
.report-custom .is-active { background: var(--brand-soft); color: var(--brand); border-color: rgba(124,58,237,.32); }
.report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.report-metrics article {
    min-height: 104px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--card-shadow);
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 5px;
    box-shadow: 0 10px 28px rgba(49,46,129,.05);
}
.report-metrics span, .report-metrics small { color: var(--muted); }
.report-metrics strong { font-size: 24px; font-weight: 950; overflow-wrap: anywhere; }
.billing-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.billing-metrics article {
    min-height: 86px;
    padding: 12px;
}
.billing-metrics article strong {
    font-size: 21px;
}
.billing-return-card {
    border-color: rgba(239,68,68,.26) !important;
    background: linear-gradient(180deg, #fff, #fff7f7) !important;
}
.billing-return-card span {
    color: #991b1b !important;
    font-weight: 900;
}
.billing-return-card strong {
    color: #dc2626;
}
.report-summary-metrics {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.billing-net-card {
    border-color: rgba(124,58,237,.32) !important;
    background:
        linear-gradient(180deg, #fff, #fbf7ff) !important;
    box-shadow: 0 14px 30px rgba(124,58,237,.12) !important;
}
.billing-net-card span { color: var(--brand) !important; font-weight: 900; }
.billing-net-card strong { color: var(--brand-dark); }
.billing-sender-filter {
    min-width: 230px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.billing-sender-filter .form-select {
    min-height: 34px;
    border-color: #d8cdf8;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(124,58,237,.08);
}
.invoice-ready-option {
    color: #0f8a4b;
    font-weight: 800;
}
.invoice-ready-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #0f7a3d;
    background: #eafff1;
    border: 1px solid #b9f0d0;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.invoice-ready-chip i {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 50%;
    background: #20c45a;
    box-shadow: 0 0 0 3px rgba(32, 196, 90, .16);
}
.pay-done-chip,
.pay-pending-chip,
.pay-return-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}
.pay-done-chip {
    color: #047857;
    background: #dffbea;
    border: 1px solid #a7f3d0;
}
.pay-pending-chip {
    color: #8a5b00;
    background: #fff7db;
    border: 1px solid #fde68a;
}
.pay-return-chip {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
}
.billing-pdf-panel { max-width: 460px; }
.billing-pdf-choice {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}
.report-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    margin-bottom: 14px;
}
.report-chart { min-height: 320px; }
.report-chart canvas { max-height: 230px; }
.report-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}
.report-rates { display: grid; gap: 12px; align-content: start; }
.report-rates h2 { margin: 0; font-size: 16px; font-weight: 900; }
.report-rates section {
    min-height: 104px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.report-rates span { color: var(--muted); font-size: 12px; }
.report-rates strong {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background:
        radial-gradient(circle closest-side, #fff 68%, transparent 70%),
        conic-gradient(var(--brand) var(--rate), #eee8ff 0);
}
.report-rates .best-day-card {
    place-items: center;
    text-align: center;
    padding: 10px;
    gap: 4px;
    background: linear-gradient(180deg, #fff, #fbf7ff);
    border-color: rgba(124,58,237,.28);
}
.report-rates .best-day-card strong {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 50%;
    background:
        radial-gradient(circle closest-side, #fff 68%, transparent 70%),
        conic-gradient(var(--brand) var(--rate), #eee8ff 0);
    color: var(--brand-dark);
    line-height: 1.15;
    text-align: center;
}
.report-rates .best-day-card strong b {
    max-width: 54px;
    display: block;
    font-size: 10px;
    line-height: 1.05;
}
.report-rates .best-day-card strong em {
    max-width: 56px;
    display: block;
    font-style: normal;
    font-size: 9px;
    line-height: 1.05;
    color: var(--ink);
}
.report-rates .best-day-card small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.15;
    font-weight: 800;
}
.destination-list { display: grid; gap: 9px; }
.destination-list section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.destination-list strong { display: block; font-size: 14px; }
.destination-list span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.destination-list b {
    min-width: 38px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
}
.courier-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.courier-status-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.courier-status-head p { margin: 3px 0 0; color: var(--muted); }
.courier-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.courier-status-card { display: grid; gap: 14px; }
.courier-status-title { display: flex; align-items: center; gap: 12px; }
.courier-status-title h2 { margin: 0; font-size: 18px; }
.courier-status-title small { color: var(--muted); }
.courier-status-rates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.courier-status-rates section {
    min-height: 104px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.courier-status-rates span { color: var(--muted); font-size: 12px; }
.courier-status-rates strong {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle closest-side, #fff 68%, transparent 70%),
        conic-gradient(var(--brand) var(--rate), #eee8ff 0);
}
.courier-status-list { display: grid; gap: 9px; }
.courier-status-list section { display: grid; gap: 6px; }
.courier-status-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.courier-status-list span { color: var(--muted); font-size: 12px; }
.courier-status-list b { font-size: 13px; }
.courier-status-list section > i {
    height: 8px;
    display: block;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #5b21b6);
}
.profile-layout {
    display: grid;
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1fr);
    grid-template-areas:
        "card details"
        "app address";
    align-items: start;
    gap: 18px;
}
.profile-layout .profile-panel { grid-area: card; }
.profile-layout .profile-details-panel { grid-area: details; }
.profile-layout .app-download-card { grid-area: app; }
.profile-layout .profile-address-panel { grid-area: address; }
.profile-panel { max-width: 420px; text-align: center; margin: 0 auto; }
.avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-size: 34px; font-weight: 900; margin-bottom: 12px; }
.muted-copy { color: var(--muted); line-height: 1.6; margin: 0; }
.profile-details-panel {
    display: grid;
    gap: 14px;
}
.profile-bank-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.profile-bank-summary section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #fbf8ff);
}
.profile-bank-summary span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}
.profile-bank-summary strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.app-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    overflow: hidden;
}
.app-download-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.app-download-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 16px 34px rgba(124,58,237,.22);
}
.app-download-icon svg {
    width: 24px;
    height: 24px;
}
.app-download-card .eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.app-download-card h2,
.app-download-card p {
    margin: 0;
}
.app-download-card p {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.45;
}
.app-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.app-download-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--brand);
    background: #f4edff;
    font-size: 11px;
    font-weight: 800;
}
.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.address-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.address-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--card-shadow);
}
.address-card.is-default {
    border-color: rgba(124,58,237,.55);
    background: linear-gradient(180deg, #fff, #fbf8ff);
    box-shadow: var(--card-shadow-hover);
}
.address-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.address-card-head strong { display: block; font-size: 15px; }
.address-card-head span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.address-card-head b {
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
}
.address-card p { margin: 0; color: #3f3a4f; line-height: 1.45; overflow-wrap: anywhere; }
.address-meta { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.address-meta span { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.address-meta svg { width: 14px; height: 14px; color: var(--brand); flex: 0 0 auto; }
.address-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.address-form-actions, .address-icon-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon-button.danger { color: #dc2626; background: #fff1f2; border-color: #fecdd3; }
.return-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, .9fr);
    gap: 12px;
    align-items: stretch;
    margin: 12px 0 14px;
}
.sheet-entry-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) 150px minmax(180px, .9fr) auto;
    gap: 9px;
    align-items: end;
    padding: 12px;
    border: 1px solid #d8c8ff;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #f7f1ff);
    box-shadow: 0 14px 34px rgba(23,20,37,.06);
}
.sheet-entry-form label {
    display: grid;
    gap: 6px;
    margin: 0;
}
.sheet-entry-form label span {
    color: #6d5d86;
    font-size: 11px;
    font-weight: 900;
}
.sheet-entry-form .form-control {
    min-height: 42px;
    border-radius: 9px;
}
.return-scan-field input {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .2px;
    border-color: #c4b5fd;
    background: #fff;
}
.sheet-entry-form .btn {
    min-height: 42px;
    white-space: nowrap;
}
.sheet-bulkbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #fbf8ff);
}
.sheet-bulkbar label { display: flex; align-items: center; gap: 7px; margin: 0; }
.return-email-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 950;
    border: 1px solid transparent;
}
.return-email-status.sent {
    color: #047857;
    background: #dcfce7;
    border-color: #86efac;
}
.return-email-status.pending {
    color: #be123c;
    background: #fff1f2;
    border-color: #fecdd3;
}
.return-email-status.missing {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}
.return-sheet-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.return-sheet-summary section {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 2px 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #fbf9ff);
    box-shadow: 0 10px 22px rgba(23,20,37,.06);
}
.return-sheet-summary svg {
    grid-row: span 2;
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 9px;
    color: var(--brand);
    background: var(--brand-soft);
}
.return-sheet-summary span { color: var(--muted); font-size: 11px; }
.return-sheet-summary strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 950; }
.return-search-card {
    border-color: #d8c8ff;
    background: #fff;
}
.return-sheet-panel {
    position: relative;
    padding-right: 64px;
}
.return-closed-rail {
    position: absolute;
    top: 156px;
    right: 18px;
    bottom: 18px;
    width: 34px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px solid #d8cdf8;
    border-radius: 999px;
    color: var(--brand);
    background: linear-gradient(180deg, #fff, var(--brand-soft));
    box-shadow: 0 14px 30px rgba(124,58,237,.12);
    cursor: pointer;
    user-select: none;
}
.show-closed-returns .return-closed-rail {
    color: #fff;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
    border-color: var(--brand);
}
.return-closed-rail svg {
    width: 18px;
    height: 18px;
}
.return-closed-rail strong {
    font-size: 16px;
    font-weight: 950;
}
.return-closed-rail span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.return-row-closed {
    opacity: .58;
    background: #f8fafc;
}
.return-row-closed td:nth-child(3) strong::after {
    content: " closed";
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #64748b;
    background: #e2e8f0;
    font-size: 10px;
    font-weight: 900;
}
.return-batches-panel { margin-top: 14px; }
.return-batch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.return-batch-card {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 2px 9px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    box-shadow: 0 10px 22px rgba(23,20,37,.06);
    cursor: pointer;
}
.return-batch-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    color: #dc2626;
    background: #fff1f2;
}
.return-batch-delete svg {
    width: 15px !important;
    height: 15px !important;
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
}
.return-batch-card svg {
    grid-row: span 3;
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 9px;
    color: var(--brand);
    background: var(--brand-soft);
}
.return-batch-card span {
    font-weight: 900;
    overflow-wrap: anywhere;
}
.return-batch-card strong,
.return-batch-card small {
    color: var(--muted);
    font-size: 11px;
}
.return-batch-card.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.detail-grid section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}
.detail-grid span, .modal-address span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.detail-grid strong { font-size: 14px; overflow-wrap: anywhere; }
.od-back { display:inline-block; margin-bottom:14px; color:var(--muted); font-size:13px; font-weight:800; text-decoration:none; }
.od-back:hover { color:var(--brand); }
.od-hero,.od-card { border:1px solid var(--line); border-radius:18px; background:var(--panel); }
.od-hero { padding:24px; background:linear-gradient(135deg,var(--panel),rgba(109,40,217,.08)); }
.od-hero-top,.od-actions,.od-status,.od-card header,.od-customer,.od-customer-info div,.od-parcel div,.od-timeline li > div { display:flex; align-items:center; }
.od-hero-top,.od-card header { justify-content:space-between; gap:16px; }.od-actions { flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.od-complaint-button { color:#ffd36b; border-color:rgba(255,195,56,.62); background:rgba(255,195,56,.08); }.od-complaint-button svg { width:16px; height:16px; margin-right:5px; vertical-align:-3px; }
.od-eyebrow { margin:0 0 5px; color:var(--muted); font-size:11px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }.od-hero h1 { margin:0; font-size:25px; }.od-reference { margin:5px 0 0; color:var(--muted); font-size:13px; }.od-reference b { color:var(--brand); }
.od-status { display:grid; grid-template-columns:auto minmax(190px,1fr) auto; gap:12px; margin-top:20px; padding:13px 15px; border:1px solid rgba(74,222,128,.28); border-radius:13px; background:rgba(74,222,128,.07); }.od-status .status-dot { align-self:center; }.od-status strong,.od-status small { display:block; }.od-status small { margin-top:2px; color:var(--muted); font-size:12px; }.od-status-meta { display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)); gap:9px; }.od-status-meta section { min-width:0; padding:8px 11px; border-left:1px solid rgba(74,222,128,.24); }.od-status-meta span,.od-status-meta b { display:block; }.od-status-meta span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }.od-status-meta b { overflow:hidden; margin-top:2px; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.od-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; margin-top:15px; }.od-card { overflow:hidden; }.od-card header { padding:16px 18px 12px; border-bottom:1px solid var(--line); }.od-card header h2 { margin:0; font-size:16px; }.od-card header small,.od-timeline header > span { color:var(--muted); font-size:12px; font-weight:700; }
.od-customer { gap:12px; padding:16px 18px 9px; }.od-avatar { display:grid; flex:none; place-items:center; width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,#6da7ff,#a78bfa); color:#fff; font-weight:900; }.od-customer h3 { margin:0; font-size:16px; }.od-customer p { margin:3px 0 0; color:var(--muted); font-size:12px; }.od-customer-info { margin:0 18px 14px; }.od-customer-info div { align-items:flex-start; gap:10px; padding:6px 0; font-size:13px; font-weight:700; }.od-customer-info svg { width:16px; height:16px; flex:none; margin-top:1px; color:#a78bfa; }
.od-customer-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:0 18px 18px; }.od-customer-actions a { display:grid; min-height:40px; place-items:center; border:1px solid var(--line); border-radius:10px; text-decoration:none; }.od-customer-actions svg { width:19px; height:19px; }.od-whatsapp { background:#14a958; border-color:#23c86a !important; color:#fff; }.od-call { background:rgba(83,160,255,.1); border-color:#579de4 !important; color:#93c5fd; }
.od-parcel { margin:0; padding:7px 18px 15px; }.od-parcel div { justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--line); }.od-parcel div:last-child { border:0; }.od-parcel dt { color:var(--muted); font-size:13px; }.od-parcel dd { margin:0; text-align:right; font-size:13px; font-weight:800; }
.od-timeline { margin-top:15px; }.od-timeline ol { position:relative; margin:0; padding:20px 18px 18px 48px; list-style:none; }.od-timeline ol:before { content:""; position:absolute; top:25px; bottom:24px; left:27px; width:2px; background:var(--line); }.od-timeline li { position:relative; padding-bottom:21px; }.od-timeline li:last-child { padding-bottom:0; }.od-timeline li:before { content:""; position:absolute; z-index:1; left:-27px; top:4px; width:10px; height:10px; border:2px solid var(--panel); border-radius:50%; background:#a78bfa; }.od-timeline li.is-current:before { background:#ffba1a; box-shadow:0 0 0 5px rgba(255,186,26,.14); }.od-timeline li > div { align-items:baseline; justify-content:space-between; gap:12px; }.od-timeline time,.od-timeline li p,.od-note { color:var(--muted); font-size:12px; }.od-timeline li p { margin:3px 0 0; }.od-note { margin:0 18px 18px; padding:11px; border:1px solid rgba(99,164,255,.25); border-radius:10px; background:rgba(99,164,255,.06); }
.od-complaint-panel { width:min(470px,100%); }.od-complaint-panel > p { margin:-6px 0 17px; color:var(--muted); font-size:12px; }.od-complaint-panel form { display:grid; gap:12px; }.od-complaint-panel label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:800; }.od-complaint-panel input,.od-complaint-panel textarea { width:100%; border:1px solid var(--line); border-radius:10px; background:rgba(0,0,0,.12); color:var(--ink); font:inherit; }.od-complaint-panel input { height:40px; padding:0 10px; }.od-complaint-panel textarea { min-height:105px; padding:10px; resize:vertical; }.od-complaint-panel form > small { color:var(--muted); font-size:11px; }.od-complaint-fields { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.order-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(23,20,37,.44);
    z-index: 1200;
}
.order-modal.show { display: grid; }
.confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(23,20,37,.44);
    z-index: 1300;
}
.confirm-modal.show { display: grid; }
.confirm-panel {
    width: min(420px, 100%);
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 24px 70px rgba(23,20,37,.26);
}
.confirm-panel h2 { margin: 0 0 8px; font-size: 18px; font-weight: 900; }
.confirm-panel p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.order-modal-panel {
    position: relative;
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow-y: auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 24px 80px rgba(23,20,37,.28);
}
.order-modal-panel h2 { margin: 0 0 14px; font-size: 18px; font-weight: 900; }
.order-modal-close { position: absolute; top: 12px; right: 12px; }
.order-modal-panel:has(.order-preview-live) { width:min(570px,100%); padding:0; overflow:hidden; color:#211a30; border:1px solid #ded6eb; background:linear-gradient(145deg,#fff,#f7f3fc); box-shadow:0 26px 75px rgba(44,29,75,.22); }
.order-preview-live header { padding:19px 54px 15px 20px; }.order-preview-live header p { margin:0 0 3px; color:var(--muted); font-size:10px; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }.order-preview-live header h2 { margin:0; font-size:22px; }.order-preview-live header small { color:var(--muted); font-size:12px; }
.op-status { display:flex; align-items:center; gap:11px; margin:0 20px 15px; padding:13px; border:1px solid rgba(202,145,8,.38); border-radius:13px; background:#fff9e9; }.op-status > span { width:10px; height:10px; flex:none; border-radius:50%; background:#f3ad13; box-shadow:0 0 0 5px rgba(243,173,19,.15); }.op-status b,.op-status small,.op-customer b,.op-customer small { display:block; }.op-status small,.op-customer small { margin-top:2px; color:var(--muted); font-size:12px; }
.op-customer { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:12px; margin:0 20px; padding:15px 0; border-top:1px solid #e6deef; border-bottom:1px solid #e6deef; }.op-avatar { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,#5d98f8,#aa85ff); color:#fff; font-weight:900; }.op-customer b { font-size:16px; }
.op-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:15px 20px; }.op-grid section { min-width:0; padding:10px; border:1px solid #e6deef; border-radius:10px; background:#fbfaff; }.op-grid span,.op-grid b { display:block; }.op-grid span { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }.op-grid b { overflow:hidden; margin-top:4px; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }.op-open { display:block; margin:0 20px 20px; text-align:center; }
body[data-theme="dark"] .order-modal-panel:has(.order-preview-live) { background:linear-gradient(145deg,#1b1528,#100d19) !important; }
body[data-theme="dark"] .order-preview-live { color:#f8fafc; }
body[data-theme="dark"] .op-status { border-color:rgba(255,195,56,.35); background:rgba(255,195,56,.11); }
body[data-theme="dark"] .op-status b { color:#fff7d6; }
body[data-theme="dark"] .op-customer { border-color:rgba(167,139,250,.25); }
body[data-theme="dark"] .op-grid section { border-color:rgba(167,139,250,.24); background:rgba(255,255,255,.055); }
body[data-theme="dark"] .op-grid b { color:#f8fafc; }
.booking-success-panel {
    width: min(460px, 100%);
    text-align: center;
    border-radius: 12px;
    padding: 24px;
}
.done-panel {
    width: min(520px, calc(100vw - 28px));
    padding: 28px;
}
.done-panel p {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.55;
}
.booking-success-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 16px 34px rgba(124,58,237,.28);
}
.booking-success-icon svg { width: 30px; height: 30px; }
.booking-success-panel h2 { margin-bottom: 6px; }
.booking-success-panel p { margin: 0 0 16px; color: var(--muted); }
.booking-success-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    text-align: left;
}
.booking-success-meta section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #faf8ff;
}
.booking-success-meta span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
}
.booking-success-meta strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.booking-success-actions {
    justify-content: center;
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}
.booking-success-actions .btn {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.2;
}
.return-alert-panel {
    width: min(520px, 100%);
    text-align: center;
}
.return-alert-panel p {
    margin: 0 0 14px;
    color: var(--muted);
}
.return-alert-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    text-align: left;
}
.return-alert-list section {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #faf8ff;
}
.return-alert-list strong,
.return-alert-list span,
.return-alert-list small {
    display: block;
}
.return-alert-list strong {
    color: var(--brand);
    font-size: 15px;
}
.return-alert-list span {
    margin-top: 3px;
    font-weight: 800;
}
.return-alert-list small {
    margin-top: 3px;
    color: var(--muted);
}
.compact-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-address {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}
.modal-address p { margin: 0; }

@media (max-width: 1100px) {
    .dashboard-grid, .two-column, .booking-layout { grid-template-columns: 1fr; }
    .report-layout { grid-template-columns: 1fr; }
    .status-strip { grid-template-columns: repeat(5, 1fr); }
    .courier-panel { position: static; }
    .register-pro-shell {
        grid-template-columns: 1fr;
        width: min(820px, calc(100vw - 28px));
    }
    .register-pro-brand {
        min-height: auto;
        padding: 24px;
    }
    .register-feature-grid {
        margin-top: 18px;
    }
    .register-brand-card {
        display: none;
    }
    .register-card {
        padding: 28px;
    }
    .register-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    input, select, textarea, .form-control, .form-select, .search-box input {
        font-size: 16px;
    }
    .btn, .icon-button, .segmented label, .report-tabs button {
        touch-action: manipulation;
    }
    .portal-shell, .portal-main, .content-wrap, .panel {
        max-width: 100%;
    }
    .auth-body { padding: 14px; }
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 12px;
        box-shadow: 0 18px 46px rgba(49,46,129,.14);
    }
    .auth-brand-panel {
        padding: 22px;
        min-height: 172px;
    }
    .auth-logo { width: 44px; height: 44px; margin-bottom: 12px; }
    .auth-brand-panel h1 { font-size: 23px; }
    .auth-brand-panel p { font-size: 13px; line-height: 1.45; }
    .auth-points {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin-top: 16px;
    }
    .auth-points span { font-size: 11px; padding: 7px 9px; }
    .auth-card { padding: 24px; }
    .auth-head h2 { font-size: 23px; }
    .register-shell {
        width: min(560px, 100%);
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .register-pro-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .register-shell .auth-brand-panel {
        min-height: auto;
        padding: 24px;
    }
    .register-pro-brand {
        min-height: auto;
        padding: 24px;
    }
    .register-logo-card {
        width: 62px;
        height: 62px;
        margin-bottom: 14px;
    }
    .register-logo-card img {
        width: 52px;
        height: 52px;
    }
    .register-pro-brand h1 {
        font-size: 28px;
    }
    .register-feature-grid {
        grid-template-columns: 1fr 1fr;
        margin-top: 18px;
    }
    .register-feature-grid span {
        grid-template-columns: 30px minmax(0, 1fr);
    }
    .register-card {
        padding: 26px;
    }
    .register-card-logo {
        margin-bottom: 16px;
    }
    .register-card .auth-head h2 {
        font-size: 24px;
    }
    .register-brand-card { display: none; }
    .register-step-grid { grid-template-columns: 1fr; }
    .register-actions { grid-template-columns: 1fr; }
    .theme-choice {
        grid-template-columns: 1fr;
    }
    .user-detail-grid { grid-template-columns: 1fr; }
    .auth-options { grid-template-columns: 1fr; }
    .login-shell {
        width: min(560px, 100%);
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 26px;
    }
    .login-brand-panel {
        min-height: 220px;
        padding: 22px;
        border-radius: 0;
    }
    .login-logo-card {
        width: 62px;
        height: 62px;
        border-radius: 18px;
        margin-bottom: 14px;
    }
    .login-logo-card img {
        width: 52px;
        height: 52px;
    }
    .login-eyebrow {
        margin-bottom: 10px;
        padding: 7px 10px;
        font-size: 10px;
    }
    .login-brand-panel h1 {
        font-size: 28px;
    }
    .login-brand-panel p {
        font-size: 13px;
        line-height: 1.5;
    }
    .login-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 18px;
    }
    .login-feature-grid span {
        grid-template-columns: 30px 1fr;
        padding: 9px;
    }
    .login-feature-grid svg {
        width: 28px;
        height: 28px;
        padding: 6px;
    }
    .login-feature-grid b {
        font-size: 11px;
    }
    .login-feature-grid small {
        font-size: 10px;
    }
    .login-card {
        padding: 26px;
        justify-content: flex-start;
    }
    .login-card-logo {
        margin-bottom: 18px;
    }
    .login-card .auth-head h2 {
        font-size: 24px;
    }
    .sidebar {
        width: min(292px, 86vw);
        padding: 12px 10px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 20px 0 44px rgba(23,20,37,.2);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-spacer { height: 4px; }
    .portal-main {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
    .sidebar-toggle { display: inline-grid; }
    .topbar {
        height: auto;
        min-height: 56px;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        box-shadow: 0 8px 22px rgba(49,46,129,.07);
    }
    .topbar h1 { font-size: 16px; }
    .topbar p { display: none; }
    .top-actions { margin-left: auto; gap: 8px; }
    .top-actions .btn-brand {
        width: 38px;
        min-width: 38px;
        padding: 0;
        font-size: 0;
    }
    .top-actions .btn-brand svg { margin: 0; }
    .user-chip { display: none; }
    .content-wrap { padding: 10px; }
    .dashboard-grid { gap: 10px; }
    .report-hero { align-items: flex-start; flex-direction: column; }
    .report-hero .btn { width: 100%; }
    .report-hero .toolbar { width: 100%; }
    .billing-sender-filter { min-width: 100%; width: 100%; }
    .billing-sender-filter { flex-wrap: wrap; }
    .billing-sender-filter .form-select { width: 100%; }
    .courier-status-head { align-items: flex-start; flex-direction: column; }
    .courier-status-head .btn { width: 100%; }
    .courier-status-grid { grid-template-columns: 1fr; gap: 10px; }
    .courier-status-rates section { min-height: 86px; }
    .courier-status-rates strong { width: 48px; height: 48px; font-size: 12px; }
    .report-filter { align-items: stretch; flex-direction: column; }
    .report-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .report-tabs button { min-height: 32px; padding: 6px 4px; font-size: 11px; }
    .report-custom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .report-custom input {
        width: 100%;
        min-width: 0;
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
    }
    .report-custom .btn {
        grid-column: auto;
        min-height: 34px;
        padding: 6px 8px;
        font-size: 11px;
    }
    .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .billing-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .report-summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-metrics .billing-net-card { grid-column: auto; min-height: 66px !important; }
    .report-metrics article { min-height: 66px; padding: 9px; gap: 2px; }
    .billing-metrics article { min-height: 58px; padding: 8px; gap: 2px; }
    .billing-metrics span, .billing-metrics small { font-size: 9px !important; line-height: 1.15; }
    .billing-metrics strong,
    .billing-metrics .billing-net-card strong { font-size: 13px !important; line-height: 1.08; white-space: nowrap; letter-spacing: 0; }
    .report-metrics span, .report-metrics small { font-size: 10px; line-height: 1.2; }
    .report-metrics strong { font-size: 15px; }
    .report-summary-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .report-summary-metrics .billing-net-card {
        grid-column: span 3;
    }
    .report-summary-metrics article {
        min-height: 58px;
        padding: 8px;
    }
    .report-summary-metrics span,
    .report-summary-metrics small {
        font-size: 9px;
        line-height: 1.15;
    }
    .report-summary-metrics strong {
        font-size: 13px;
    }
    .report-chart { min-height: 202px; }
    .report-chart canvas { max-height: 130px; }
    .report-rates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .report-rates h2 { grid-column: 1 / -1; margin-bottom: -2px; }
    .report-rates section { min-height: 86px; gap: 6px; }
    .report-rates strong { width: 48px; height: 48px; font-size: 12px; }
    .report-rates .best-day-card {
        grid-column: auto;
        min-height: 86px;
        padding: 8px;
    }
    .report-rates .best-day-card strong {
        width: 58px;
        height: 58px;
    }
    .report-rates .best-day-card strong b { font-size: 8.5px; max-width: 45px; }
    .report-rates .best-day-card strong em { font-size: 7.5px; max-width: 46px; }
    .report-rates .best-day-card small { font-size: 10px; }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
    .stat-card {
        min-height: 58px;
        padding: 8px;
        display: grid;
        grid-template-columns: 24px 1fr;
        grid-template-areas:
            "icon label"
            "icon value"
            "meta meta";
        align-content: center;
        column-gap: 8px;
    }
    .stat-icon { grid-area: icon; margin: 0; align-self: center; }
    .stat-icon svg { width: 20px; height: 20px; }
    .stat-card span:not(.stat-icon) {
        grid-area: label;
        font-size: 10px;
        line-height: 1.2;
        align-self: end;
    }
    .stat-card strong {
        grid-area: value;
        font-size: 14px;
        line-height: 1.1;
        align-self: start;
    }
    .stat-card small {
        grid-area: meta;
        font-size: 9.5px;
        margin-top: 4px;
    }
    .chart-panel { min-height: 190px; overflow: hidden; }
    .chart-panel canvas { max-height: 145px; }
    .ratio-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ratio-card { min-height: 88px; }
    .ratio-card strong { width: 48px; height: 48px; font-size: 12px; }
    .status-strip {
        display: flex;
        overflow-x: scroll !important;
        gap: 10px;
        padding-bottom: 3px;
        margin: 12px -12px 12px;
        padding-left: 12px;
        scroll-snap-type: none;
    }
    .status-strip .status-card-link,
    .status-strip > article {
        flex: 0 0 128px;
    }
    .status-strip article { min-height: 78px; }
    .two-column, .profile-layout, .form-grid, .report-grid, .settings-code { grid-template-columns: 1fr; }
    .profile-layout {
        grid-template-areas:
            "card"
            "details"
            "app"
            "address";
    }
    .settings-compact-grid { grid-template-columns: 1fr; }
    .settings-compact-grid > label,
    .settings-compact-grid > label.setting-small,
    .settings-compact-grid > label.setting-half,
    .settings-compact-grid > .setting-half,
    .settings-compact-grid > label.wide {
        grid-column: 1 / -1;
    }
    .app-download-card {
        align-items: stretch;
        flex-direction: column;
    }
    .profile-bank-summary {
        grid-template-columns: 1fr;
    }
    .app-download-card .btn {
        width: 100%;
        justify-content: center;
    }
    .two-column,
    .profile-layout,
    .two-column > .panel,
    .profile-layout > .panel,
    .report-layout,
    .report-layout > .panel,
    .dashboard-grid,
    .dashboard-grid > .panel {
        min-width: 0;
        overflow-x: clip;
    }
    .two-column .h-scroll,
    .report-layout .h-scroll,
    .dashboard-grid .h-scroll {
        overflow-x: auto !important;
    }
    .address-grid { grid-template-columns: 1fr; }
    .return-workbench { grid-template-columns: 1fr; gap: 10px; }
    .sheet-entry-form {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 8px;
    }
    .return-scan-field input {
        min-height: 46px;
        font-size: 17px;
    }
    .return-sheet-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sheet-bulkbar {
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 8px;
    }
    .sheet-bulkbar label { flex: 1 1 100%; }
    .sheet-bulkbar .btn {
        flex: 1 1 calc(50% - 8px);
        min-height: 40px;
        padding: 7px 8px;
        font-size: 11px;
    }
    .sheet-bulkbar [data-send-return-emails] {
        flex-basis: 100%;
    }
    .return-sheet-panel { padding-right: 13px; }
    .return-closed-rail {
        position: static;
        width: 100%;
        min-height: 42px;
        margin-top: 12px;
        grid-auto-flow: column;
        writing-mode: horizontal-tb;
        border-radius: 10px;
    }
    .return-closed-rail span { writing-mode: horizontal-tb; }
    .bulk-upload-grid { grid-template-columns: 1fr; }
    .bulk-paste-box { grid-template-columns: 1fr; }
    .bulk-format { grid-template-columns: repeat(10, 96px); }
    .detail-grid, .compact-detail { grid-template-columns: 1fr; }
    .od-hero { padding:17px; border-radius:15px; }.od-hero-top { align-items:flex-start; flex-direction:column; }.od-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); justify-content:flex-start; width:100%; gap:8px; }.od-actions .btn { width:100%; padding:8px; font-size:11px; }.od-status { grid-template-columns:auto 1fr; }.od-status-meta { grid-column:1 / -1; grid-template-columns:1fr 1fr; }.od-status-meta section { border-top:1px solid rgba(74,222,128,.24); border-left:0; padding:9px 0 0; }.od-grid { grid-template-columns:1fr; }.od-card header { padding:14px; }.od-customer { padding:14px 14px 8px; }.od-customer-info,.od-customer-actions { margin-left:14px; margin-right:14px; }.od-parcel { padding-left:14px; padding-right:14px; }.od-timeline ol { padding-left:43px; padding-right:14px; }.od-timeline ol:before { left:24px; }.od-timeline li:before { left:-24px; }.od-timeline li > div { align-items:flex-start; flex-direction:column; gap:2px; }.od-note { margin-left:14px; margin-right:14px; }.od-complaint-fields { grid-template-columns:1fr; }
    .track-summary { grid-template-columns: 1fr; }
    .track-result-grid { grid-template-columns: 1fr; }
    .track-result-side { order: -1; }
    .route-map { min-height: 108px; }
    .timeline div { grid-template-columns: 18px 1fr; }
    .timeline small { grid-column: 2; }
    .panel { padding: 13px; }
    .panel-head { align-items: flex-start; }
    .booking-layout { gap: 12px; }
    .courier-panel { gap: 12px; }
    .segmented { gap: 7px; }
    .segmented label { min-height: 40px; font-size: 12px; }
    .search-box { min-width: 100%; }
    .toolbar { gap: 8px; }
    .toolbar .form-control { width: 100%; }
    .toolbar .btn { flex: 1 1 calc(50% - 8px); }
    .orders-filter {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .orders-filter .search-box { min-width: 0; }
    .orders-search-row {
        grid-column: auto;
        grid-template-columns: minmax(0, 1fr) 40px;
        gap: 7px;
    }
    .orders-filter.has-selected-orders .orders-search-row {
        grid-template-columns: minmax(0, 1fr) 40px;
    }
    .orders-search-row .icon-button {
        width: 40px;
        height: 36px;
    }
    .orders-date-row {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }
    .orders-action-row {
        grid-column: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }
    .orders-action-row .btn,
    .orders-clear-placeholder {
        width: 100%;
        min-height: 36px;
        padding: 7px 8px;
        font-size: 11px;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
    }
    .orders-filter .btn { flex: initial; }
    .orders-selected-actions {
        grid-column: 1 / -1;
        display: flex;
        width: 100%;
        margin-top: -2px;
    }
    .orders-selected-actions span { flex: 1; }
    .orders-selected-actions .icon-button {
        width: 38px;
        height: 36px;
        flex: 0 0 38px;
    }
    .table-responsive {
        margin-inline: -13px;
        padding-inline: 13px;
        padding-right: 54px;
        padding-bottom: 8px;
        width: calc(100% + 26px);
        max-width: calc(100% + 26px);
        display: block;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-x pan-y;
        scroll-snap-type: none;
        overscroll-behavior: auto;
        border-radius: 8px;
    }
    .mobile-scroll-table,
    .mobile-scroll-table-wrap .table-responsive {
        margin-inline: -13px;
        padding-inline: 13px;
        padding-bottom: 8px;
        width: calc(100% + 26px);
        max-width: calc(100% + 26px);
        overflow-x: scroll !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        scrollbar-color: var(--brand) #eee8ff;
        scrollbar-width: thin;
    }
    .mobile-scroll-table table,
    .mobile-scroll-table-wrap .table {
        width: max-content !important;
        min-width: 860px !important;
    }
    .mobile-scroll-table th,
    .mobile-scroll-table td,
    .mobile-scroll-table-wrap .table th,
    .mobile-scroll-table-wrap .table td {
        white-space: nowrap;
    }
    .h-scroll {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 9px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior: auto;
        scrollbar-color: var(--brand) #eee8ff;
        scrollbar-width: thin;
    }
    .h-scroll > table,
    .h-scroll .scroll-table,
    .h-scroll table {
        width: 860px !important;
        min-width: 860px !important;
        max-width: none !important;
        table-layout: auto !important;
    }
    .h-scroll.h-scroll-compact > table,
    .h-scroll.h-scroll-compact .scroll-table,
    .h-scroll.h-scroll-compact table {
        width: 640px !important;
        min-width: 640px !important;
    }
    .h-scroll th,
    .h-scroll td {
        white-space: nowrap !important;
        overflow-wrap: normal !important;
    }
    .h-scroll::-webkit-scrollbar { height: 6px; }
    .h-scroll::-webkit-scrollbar-track { background: #eee8ff; border-radius: 999px; }
    .h-scroll::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
    .table-responsive::-webkit-scrollbar { height: 6px; }
    .table-responsive::-webkit-scrollbar-track { background: #eee8ff; border-radius: 999px; }
    .table-responsive::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
    .table-responsive {
        scrollbar-color: var(--brand) #eee8ff;
        scrollbar-width: thin;
    }
    .table:not(.orders-table) {
        width: max-content;
        min-width: 760px;
        table-layout: auto;
    }
    .table:not(.orders-table) th,
    .table:not(.orders-table) td {
        padding: 8px 7px;
        font-size: 10px;
        white-space: nowrap;
        overflow-wrap: anywhere;
    }
    .table:not(.orders-table) th { font-size: 9px; }
    .table { width: max-content; min-width: 680px; }
    .orders-table { min-width: 880px; }
    .orders-table th, .orders-table td { white-space: nowrap; }
    .orders-table td:nth-child(3), .orders-table td:nth-child(8), .orders-table td:nth-child(9) { white-space: normal; min-width: 112px; }
    .orders-table {
        width: max-content;
        min-width: 900px;
        border-collapse: collapse;
        border-spacing: 0;
    }
    .orders-table thead { display: table-header-group; }
    .orders-table tbody { display: table-row-group; }
    .orders-table tr { display: table-row; }
    .orders-table th,
    .orders-table td {
        display: table-cell;
        width: auto;
        padding: 9px 8px;
        border-color: var(--line);
        white-space: nowrap;
    }
    .orders-table td::before { content: none; }
    .orders-table td:nth-child(3),
    .orders-table td:nth-child(8),
    .orders-table td:nth-child(9) { white-space: normal; min-width: 118px; }
    .orders-table .row-actions { display: flex; flex-wrap: nowrap; }
    .row-actions .icon-button { width: 34px; height: 34px; }
    .orders-pagination {
        justify-content: center;
        gap: 6px;
        padding-top: 10px;
        flex-wrap: wrap;
    }
    .orders-pagination span {
        flex: 0 0 100%;
        text-align: center;
        margin-right: 0;
    }
    .orders-page-nav {
        flex: 0 0 100%;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 4px;
        min-width: 0;
    }
    .orders-mobile-all { display: inline-grid !important; }
    .orders-page-size {
        display: none;
    }
    .orders-pagination a {
        min-width: 27px;
        min-height: 28px;
        padding: 4px 7px;
        font-size: 10px;
    }
    .report-rates {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-items: stretch;
    }
    .report-rates h2 {
        grid-column: 1 / -1 !important;
    }
    .report-rates section,
    .report-rates .best-day-card {
        grid-column: auto !important;
        min-width: 0;
        width: 100%;
    }
    .app-toast {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 14px;
        max-width: none;
    }
}

@media (max-width: 420px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .report-summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .billing-metrics .billing-net-card { grid-column: auto; }
    .billing-metrics article { min-height: 58px; padding: 8px 6px; gap: 2px; }
    .billing-metrics span, .billing-metrics small { font-size: 9px !important; line-height: 1.15; }
    .billing-metrics strong,
    .billing-metrics .billing-net-card strong { font-size: 13px !important; line-height: 1.08; white-space: nowrap; letter-spacing: 0; }
    .report-custom { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .report-custom input {
        width: 100%;
        min-width: 0;
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
    }
    .report-custom .btn {
        grid-column: auto;
        min-height: 32px;
        padding: 6px 6px;
        font-size: 10.5px;
    }
    .content-wrap { padding: 10px; }
    .stat-card {
        min-height: 54px;
        padding: 7px;
        column-gap: 7px;
    }
    .stat-icon svg { width: 19px; height: 19px; }
    .stat-card span:not(.stat-icon) { font-size: 9.5px; }
    .stat-card strong { font-size: 13px; }
    .auth-brand-panel { display: none; }
    .login-shell .auth-brand-panel {
        display: flex;
    }
    .login-shell {
        border-radius: 24px;
        box-shadow: 0 20px 54px rgba(47,31,83,.18);
    }
    .login-brand-panel {
        min-height: 178px;
        padding: 18px;
    }
    .login-brand-panel::before {
        width: 110px;
        height: 110px;
        border-radius: 28px;
        inset: 14px 14px auto auto;
    }
    .login-brand-panel::after {
        width: 150px;
        height: 150px;
        left: auto;
        right: -60px;
        bottom: -70px;
    }
    .login-logo-card {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        margin-bottom: 8px;
    }
    .login-logo-card img {
        width: 42px;
        height: 42px;
    }
    .login-eyebrow {
        padding: 6px 9px;
        font-size: 9px;
        margin-bottom: 8px;
    }
    .login-brand-panel h1 {
        font-size: 22px;
        margin-bottom: 6px;
    }
    .login-brand-panel p {
        max-width: 280px;
        font-size: 11px;
        line-height: 1.35;
    }
    .login-feature-grid {
        display: none;
    }
    .login-card {
        padding: 20px;
    }
    .login-card-logo {
        display: none;
    }
    .login-card .auth-head h2 {
        font-size: 22px;
    }
    .login-card .auth-head p {
        margin-bottom: 16px;
    }
    .register-shell .auth-brand-panel { display: flex; min-height: 156px; }
    .register-shell .auth-points { display: none; }
    .register-pro-brand {
        min-height: auto;
        padding: 18px;
    }
    .register-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 14px;
    }
    .register-feature-grid span {
        grid-template-columns: 28px 1fr;
        padding: 9px;
        border-radius: 12px;
    }
    .register-feature-grid svg {
        width: 26px;
        height: 26px;
        padding: 6px;
    }
    .register-feature-grid b {
        font-size: 11px;
    }
    .register-feature-grid small {
        font-size: 9.5px;
    }
    .register-card {
        padding: 20px;
    }
    .register-card-logo span {
        font-size: 13px;
    }
    .login-body {
        padding: 10px;
    }
    .login-feature-grid {
        grid-template-columns: 1fr 1fr;
    }
    .login-card {
        padding: 22px;
    }
    .login-form-links {
        gap: 8px;
    }
    .login-submit {
        padding-left: 18px;
    }
    .login-card-logo span {
        font-size: 13px;
    }
    .register-steps span {
        min-height: 36px;
        padding: 7px 8px;
        font-size: 11px;
    }
    .register-step-grid { gap: 10px; }
    .auth-card { padding: 22px; }
    .auth-head h2 { font-size: 22px; }
}

body[data-theme="dark"] .report-filter-bar,
body[data-theme="dark"] .billing-filter-bar,
body[data-theme="dark"] .report-periods,
body[data-theme="dark"] .billing-periods,
body[data-theme="dark"] .period-filter,
body[data-theme="dark"] .period-tabs,
body[data-theme="dark"] .date-filter-bar,
body[data-theme="dark"] .filter-strip,
body[data-theme="dark"] .range-filter,
body[data-theme="dark"] .track-result,
body[data-theme="dark"] .track-empty,
body[data-theme="dark"] .empty-state,
body[data-theme="dark"] .report-rates section,
body[data-theme="dark"] .report-rates .best-day-card,
body[data-theme="dark"] .report-metrics article,
body[data-theme="dark"] .billing-metrics article,
body[data-theme="dark"] .report-summary-metrics article,
body[data-theme="dark"] .billing-summary-metrics article,
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .health-card,
body[data-theme="dark"] .ratio-card,
body[data-theme="dark"] .summary-card,
body[data-theme="dark"] .filter-card,
body[data-theme="dark"] .search-panel {
    color: #ecfdf5;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, rgba(20, 16, 31, .96), rgba(10, 8, 17, .98)) !important;
}

body[data-theme="dark"] .report-toolbar,
body[data-theme="dark"] .billing-toolbar,
body[data-theme="dark"] .report-controls,
body[data-theme="dark"] .billing-controls,
body[data-theme="dark"] .report-topbar,
body[data-theme="dark"] .billing-topbar,
body[data-theme="dark"] form[action*="reports"],
body[data-theme="dark"] form[action*="billing"] {
    color: #ecfdf5;
    border-color: rgba(74, 222, 128, .24) !important;
    background: rgba(16, 24, 20, .82) !important;
}

body[data-theme="dark"] .report-metrics article *,
body[data-theme="dark"] .billing-metrics article *,
body[data-theme="dark"] .report-summary-metrics article *,
body[data-theme="dark"] .billing-summary-metrics article *,
body[data-theme="dark"] .report-rates section *,
body[data-theme="dark"] .report-rates .best-day-card *,
body[data-theme="dark"] .track-result *,
body[data-theme="dark"] .track-empty *,
body[data-theme="dark"] .empty-state * {
    color: inherit;
}

body[data-theme="dark"] .report-metrics article span,
body[data-theme="dark"] .billing-metrics article span,
body[data-theme="dark"] .report-summary-metrics article span,
body[data-theme="dark"] .billing-summary-metrics article span,
body[data-theme="dark"] .report-metrics article small,
body[data-theme="dark"] .billing-metrics article small,
body[data-theme="dark"] .report-rates small,
body[data-theme="dark"] .track-empty p,
body[data-theme="dark"] .empty-state p {
    color: #9ca3af !important;
}

body[data-theme="dark"] .report-metrics article strong,
body[data-theme="dark"] .billing-metrics article strong,
body[data-theme="dark"] .report-summary-metrics article strong,
body[data-theme="dark"] .billing-summary-metrics article strong,
body[data-theme="dark"] .billing-net-card strong,
body[data-theme="dark"] .report-net-card strong {
    color: #86efac !important;
    text-shadow: 0 0 18px rgba(74, 222, 128, .34);
}

body[data-theme="dark"] .report-custom,
body[data-theme="dark"] .billing-custom,
body[data-theme="dark"] .search-strip,
body[data-theme="dark"] .table-toolbar,
body[data-theme="dark"] .orders-toolbar {
    border-color: rgba(74, 222, 128, .24) !important;
    background: rgba(16, 24, 20, .72) !important;
}

body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="search"],
body[data-theme="dark"] .search-input,
body[data-theme="dark"] .report-custom input,
body[data-theme="dark"] .billing-custom input {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .26) !important;
    background: #1f172b !important;
}

body[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) hue-rotate(80deg);
}

body[data-theme="dark"] .track-empty,
body[data-theme="dark"] .track-result {
    border-style: solid !important;
}

body[data-theme="dark"] .track-summary section,
body[data-theme="dark"] .booking-success-meta section {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: rgba(31, 23, 43, .92) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .05);
}

body[data-theme="dark"] .track-summary section span,
body[data-theme="dark"] .booking-success-meta section span {
    color: #86efac !important;
}

body[data-theme="dark"] .track-summary section strong,
body[data-theme="dark"] .booking-success-meta section strong {
    color: #f8fafc !important;
}

body[data-theme="dark"] .track-remarks {
    color: #f8fafc !important;
    background: rgba(31, 23, 43, .92) !important;
    border-color: rgba(74, 222, 128, .2) !important;
}

body[data-theme="dark"] .order-modal-panel,
body[data-theme="dark"] .booking-success-panel {
    color: #f8fafc !important;
    border: 1px solid rgba(74, 222, 128, .26);
    background: linear-gradient(180deg, rgba(22, 18, 31, .98), rgba(13, 10, 20, .98)) !important;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .42), 0 0 42px rgba(34, 197, 94, .08);
}

body[data-theme="dark"] .booking-success-panel p {
    color: #cbd5e1 !important;
}

body[data-theme="dark"] .booking-success-icon {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 18px 40px rgba(34, 197, 94, .28);
}

body[data-theme="dark"] .order-modal-close {
    color: #86efac !important;
    border-color: rgba(74, 222, 128, .35) !important;
    background: rgba(22, 33, 27, .88) !important;
}

body[data-theme="dark"] .report-rates section,
body[data-theme="dark"] .report-rates .best-day-card,
body[data-theme="dark"] .health-card,
body[data-theme="dark"] .ratio-card {
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .08), 0 18px 42px rgba(22, 163, 74, .08);
}

body[data-theme="dark"] .report-rates canvas,
body[data-theme="dark"] .health-card canvas,
body[data-theme="dark"] .ratio-card canvas {
    filter: drop-shadow(0 0 12px rgba(74, 222, 128, .28));
}

body[data-theme="dark"] .report-periods .btn:not(.active),
body[data-theme="dark"] .billing-periods .btn:not(.active),
body[data-theme="dark"] .period-tabs .btn:not(.active) {
    color: #bbf7d0 !important;
    border-color: rgba(74, 222, 128, .22) !important;
    background: rgba(16, 24, 20, .86) !important;
}

body[data-theme="dark"] .report-periods .btn.active,
body[data-theme="dark"] .billing-periods .btn.active,
body[data-theme="dark"] .period-tabs .btn.active {
    color: #052e16 !important;
    background: #4ade80 !important;
    box-shadow: 0 12px 30px rgba(74, 222, 128, .24);
}

/* Dark theme polish for reports, billing and tracking pages. */
body[data-theme="dark"] .report-filter,
body[data-theme="dark"] .page-search-card,
body[data-theme="dark"] .track-card,
body[data-theme="dark"] .track-result,
body[data-theme="dark"] .track-empty {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .26) !important;
    background: linear-gradient(180deg, rgba(20, 16, 31, .96), rgba(10, 8, 17, .98)) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(74, 222, 128, .04) !important;
}

body[data-theme="dark"] .report-tabs button,
body[data-theme="dark"] .report-custom .btn,
body[data-theme="dark"] .report-custom button {
    color: #bbf7d0 !important;
    border-color: rgba(74, 222, 128, .22) !important;
    background: rgba(22, 33, 27, .96) !important;
}

body[data-theme="dark"] .report-tabs button.is-active,
body[data-theme="dark"] .report-custom .is-active,
body[data-theme="dark"] .report-custom button.is-active {
    color: #052e16 !important;
    border-color: #86efac !important;
    background: #4ade80 !important;
    box-shadow: 0 12px 30px rgba(74, 222, 128, .24) !important;
}

body[data-theme="dark"] .report-custom input,
body[data-theme="dark"] .page-search-box,
body[data-theme="dark"] .page-search-box input,
body[data-theme="dark"] .billing-sender-filter,
body[data-theme="dark"] .billing-sender-filter select,
body[data-theme="dark"] .track-card input,
body[data-theme="dark"] .track-card select {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .26) !important;
    background: #1f172b !important;
}

body[data-theme="dark"] .page-search-box svg,
body[data-theme="dark"] .page-search-box i,
body[data-theme="dark"] .track-card svg,
body[data-theme="dark"] .track-card i {
    color: #86efac !important;
}

body[data-theme="dark"] .report-metrics article,
body[data-theme="dark"] .billing-metrics article,
body[data-theme="dark"] .report-summary-metrics article,
body[data-theme="dark"] .billing-summary-metrics article,
body[data-theme="dark"] .billing-net-card,
body[data-theme="dark"] .report-net-card,
body[data-theme="dark"] .report-rates section,
body[data-theme="dark"] .report-rates .best-day-card {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .32) !important;
    background: linear-gradient(180deg, rgba(18, 38, 28, .98), rgba(12, 27, 20, .98)) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .08), 0 16px 42px rgba(22, 163, 74, .10) !important;
}

body[data-theme="dark"] .report-metrics article strong,
body[data-theme="dark"] .billing-metrics article strong,
body[data-theme="dark"] .report-summary-metrics article strong,
body[data-theme="dark"] .billing-summary-metrics article strong,
body[data-theme="dark"] .billing-net-card strong,
body[data-theme="dark"] .report-net-card strong {
    color: #4ade80 !important;
    text-shadow: 0 0 20px rgba(74, 222, 128, .38) !important;
}

body[data-theme="dark"] .report-metrics article span,
body[data-theme="dark"] .billing-metrics article span,
body[data-theme="dark"] .report-summary-metrics article span,
body[data-theme="dark"] .billing-summary-metrics article span,
body[data-theme="dark"] .report-metrics article small,
body[data-theme="dark"] .billing-metrics article small,
body[data-theme="dark"] .report-rates span,
body[data-theme="dark"] .report-rates small,
body[data-theme="dark"] .billing-net-card span,
body[data-theme="dark"] .report-net-card span {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .report-chart,
body[data-theme="dark"] .report-layout .panel,
body[data-theme="dark"] .billing-table-card,
body[data-theme="dark"] .delivered-billing-card {
    border-color: rgba(74, 222, 128, .28) !important;
    background: rgba(19, 14, 30, .94) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .05), 0 16px 42px rgba(22, 163, 74, .08) !important;
}

body[data-theme="dark"] .report-rates canvas,
body[data-theme="dark"] .billing-net-card,
body[data-theme="dark"] .report-net-card {
    filter: drop-shadow(0 0 12px rgba(74, 222, 128, .18));
}

/* Notification dropdown readability in dark mode. */
body[data-theme="dark"] .notification-panel {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, rgba(20, 15, 31, .98), rgba(10, 8, 18, .98)) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(74, 222, 128, .06) !important;
}

body[data-theme="dark"] .notification-head strong {
    color: #f8fafc !important;
}

body[data-theme="dark"] .notification-head small,
body[data-theme="dark"] .notification-empty {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .notification-item {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .22) !important;
    background: rgba(16, 24, 20, .92) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 10px 26px rgba(0, 0, 0, .16) !important;
}

body[data-theme="dark"] .notification-item:hover {
    border-color: rgba(74, 222, 128, .46) !important;
    background: rgba(19, 42, 30, .96) !important;
}

body[data-theme="dark"] .notification-item strong,
body[data-theme="dark"] .notification-item b {
    color: #f8fafc !important;
}

body[data-theme="dark"] .notification-item small,
body[data-theme="dark"] .notification-item em,
body[data-theme="dark"] .notification-item time {
    color: #bbf7d0 !important;
}

body[data-theme="dark"] .notification-item.delivered .notification-dot {
    background: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

body[data-theme="dark"] .notification-item.return .notification-dot {
    background: #fb923c !important;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, .14);
}

body[data-theme="dark"] .report-rates strong,
body[data-theme="dark"] .report-rates .best-day-card strong {
    color: #ecfdf5 !important;
    background:
        radial-gradient(circle closest-side, #10261c 61%, transparent 63%),
        conic-gradient(#4ade80 var(--rate), rgba(74, 222, 128, .18) 0) !important;
    box-shadow: 0 0 22px rgba(74, 222, 128, .28), inset 0 0 0 1px rgba(74, 222, 128, .18) !important;
    text-shadow: 0 0 14px rgba(74, 222, 128, .5) !important;
}

body[data-theme="dark"] .report-rates .best-day-card strong b,
body[data-theme="dark"] .report-rates .best-day-card strong em {
    color: #ecfdf5 !important;
}

body[data-theme="dark"] .report-rates .best-day-card small {
    color: #86efac !important;
    text-shadow: 0 0 12px rgba(74, 222, 128, .35) !important;
}

body[data-theme="dark"] .detail-grid section {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, #1c1428, #15101f) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .06), 0 12px 30px rgba(22, 163, 74, .08) !important;
}

body[data-theme="dark"] .detail-grid span {
    color: #86efac !important;
}

body[data-theme="dark"] .detail-grid strong {
    color: #f8fafc !important;
}

body[data-theme="dark"] .city-suggestions {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: #121a16 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(74, 222, 128, .06) !important;
}

body[data-theme="dark"] .city-suggestions button {
    color: #d1fae5 !important;
    background: rgba(16, 24, 20, .92) !important;
}

body[data-theme="dark"] .city-suggestions button:hover,
body[data-theme="dark"] .city-suggestions button:focus {
    color: #052e16 !important;
    background: #4ade80 !important;
}

body[data-theme="dark"] .city-suggestions button:disabled {
    color: #86efac !important;
    background: rgba(22, 33, 27, .78) !important;
}

.announcement-form { display: grid; gap: 14px; }
.announcement-users {
    max-height: 230px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(124, 58, 237, .04);
}
.announcement-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.announcement-user input { width: 16px; height: 16px; accent-color: var(--brand); }
.announcement-user span { min-width: 0; display: grid; gap: 2px; }
.announcement-user strong,
.announcement-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announcement-user small { color: var(--muted); font-size: 11px; }
.announcement-user.is-target {
    border-color: rgba(34, 197, 94, .48);
    background: rgba(34, 197, 94, .08);
}
body[data-theme="dark"] .announcement-users {
    border-color: rgba(74, 222, 128, .22);
    background: rgba(16, 24, 20, .5);
}
body[data-theme="dark"] .announcement-user {
    color: #ecfdf5;
    border-color: rgba(74, 222, 128, .2);
    background: #1c1428;
}
body[data-theme="dark"] .announcement-user small { color: #a7f3d0; }

/* Final dark theme balance: dark surfaces with green borders, not full green fills. */
body[data-theme="dark"] .report-metrics article,
body[data-theme="dark"] .billing-metrics article,
body[data-theme="dark"] .report-summary-metrics article,
body[data-theme="dark"] .billing-summary-metrics article,
body[data-theme="dark"] .billing-net-card,
body[data-theme="dark"] .report-net-card,
body[data-theme="dark"] .report-rates section,
body[data-theme="dark"] .report-rates .best-day-card,
body[data-theme="dark"] .return-sheet-summary section,
body[data-theme="dark"] .sheet-entry-form,
body[data-theme="dark"] .sheet-bulkbar,
body[data-theme="dark"] .return-search-card,
body[data-theme="dark"] .return-batch-card {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .34) !important;
    background: linear-gradient(180deg, #1c1428, #15101f) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .05), 0 14px 34px rgba(22, 163, 74, .08) !important;
}

body[data-theme="dark"] .report-metrics article strong,
body[data-theme="dark"] .billing-metrics article strong,
body[data-theme="dark"] .report-summary-metrics article strong,
body[data-theme="dark"] .billing-summary-metrics article strong,
body[data-theme="dark"] .billing-net-card strong,
body[data-theme="dark"] .report-net-card strong,
body[data-theme="dark"] .return-sheet-summary strong {
    color: #4ade80 !important;
    text-shadow: 0 0 16px rgba(74, 222, 128, .34) !important;
}

body[data-theme="dark"] .report-rates strong,
body[data-theme="dark"] .report-rates .best-day-card strong {
    color: #ecfdf5 !important;
    background:
        radial-gradient(circle closest-side, #1c1428 60%, transparent 62%),
        conic-gradient(#4ade80 var(--rate), rgba(74, 222, 128, .18) 0) !important;
    box-shadow: 0 0 20px rgba(74, 222, 128, .22), inset 0 0 0 1px rgba(74, 222, 128, .16) !important;
}

body[data-theme="dark"] .return-sheet-panel .table,
body[data-theme="dark"] .return-batches-panel,
body[data-theme="dark"] .return-sheet-panel {
    color: #ecfdf5 !important;
}

body[data-theme="dark"] .return-sheet-panel table thead th {
    color: #d1fae5 !important;
    background: rgba(35, 48, 48, .78) !important;
}

body[data-theme="dark"] .return-sheet-panel table tbody td {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .16) !important;
    background: transparent !important;
}

body[data-theme="dark"] .return-sheet-panel small,
body[data-theme="dark"] .return-sheet-summary span,
body[data-theme="dark"] .return-batch-card small,
body[data-theme="dark"] .return-batch-card span {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .return-sheet-panel .form-control,
body[data-theme="dark"] .return-search-card input {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .26) !important;
    background: #1f172b !important;
}

.confirm-panel .btn-cancel {
    color: #be123c !important;
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
}

.confirm-panel .btn-success {
    color: #052e16 !important;
    background: #4ade80 !important;
    border-color: #86efac !important;
    box-shadow: 0 12px 30px rgba(74, 222, 128, .24) !important;
}

body[data-theme="dark"] .confirm-panel .btn-cancel {
    color: #fecdd3 !important;
    background: rgba(127, 29, 29, .28) !important;
    border-color: rgba(248, 113, 113, .5) !important;
}

body[data-theme="dark"] .confirm-panel .btn-success {
    color: #052e16 !important;
    background: #4ade80 !important;
    border-color: #86efac !important;
}

body[data-theme="dark"] .ratio-card {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .34) !important;
    background: linear-gradient(180deg, #1c1428, #15101f) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .05), 0 14px 34px rgba(22, 163, 74, .08) !important;
}

body[data-theme="dark"] .ratio-card span {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .ratio-card strong {
    color: #ecfdf5 !important;
    background:
        radial-gradient(circle closest-side, #1c1428 60%, transparent 62%),
        conic-gradient(#22c55e var(--rate), rgba(74, 222, 128, .18) 0) !important;
    box-shadow: 0 0 20px rgba(74, 222, 128, .22), inset 0 0 0 1px rgba(74, 222, 128, .16) !important;
}

.announcement-alert-panel {
    max-width: 560px;
}

.announcement-alert-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
    text-align: left;
}

.announcement-alert-list section {
    border: 1px solid rgba(124, 58, 237, .18);
    border-radius: 16px;
    background: #faf7ff;
    padding: 14px;
}

.announcement-alert-list strong,
.announcement-alert-list p,
.announcement-alert-list small {
    display: block;
}

.announcement-alert-list p {
    margin: 8px 0;
    color: #334155;
}

.announcement-media-preview {
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, .14);
    background: rgba(15, 23, 42, .04);
    pointer-events: none;
}

.announcement-media-preview img,
.announcement-media-preview video {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(56vh, 420px);
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.announcement-alert-list audio {
    width: 100%;
}

.announcement-attachment-name {
    display: block;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(124, 58, 237, .08);
    color: #4c1d95;
    font-weight: 800;
}

body[data-theme="dark"] .announcement-alert-list section {
    border-color: rgba(74, 222, 128, .32);
    background: linear-gradient(180deg, #1c1428, #15101f);
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .05);
}

body[data-theme="dark"] .announcement-alert-list p,
body[data-theme="dark"] .announcement-alert-list strong {
    color: #ecfdf5;
}

body[data-theme="dark"] .announcement-media-preview {
    border-color: rgba(74, 222, 128, .26);
    background: rgba(2, 6, 23, .4);
}

body[data-theme="dark"] .announcement-attachment-name {
    background: rgba(74, 222, 128, .1);
    color: #bbf7d0;
}

/* Final polish: soft confirm buttons and clear dashboard ratio rings. */
.confirm-panel .btn-cancel,
.confirm-panel .btn-success {
    min-width: 44px;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-weight: 800;
    box-shadow: none !important;
}

.confirm-panel .btn-cancel {
    color: #be123c !important;
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
}

.confirm-panel .btn-success {
    color: #15803d !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

.confirm-panel .btn-success:hover {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

body[data-theme="dark"] .confirm-panel .btn-success {
    color: #86efac !important;
    background: rgba(22, 101, 52, .18) !important;
    border-color: rgba(74, 222, 128, .45) !important;
}

body[data-theme="dark"] .ratio-card strong {
    color: #ecfdf5 !important;
    background:
        radial-gradient(circle closest-side, #1c1428 58%, transparent 60%),
        conic-gradient(#4ade80 var(--ratio), rgba(74, 222, 128, .18) 0) !important;
    box-shadow: 0 0 22px rgba(74, 222, 128, .22), inset 0 0 0 1px rgba(74, 222, 128, .16) !important;
}

body[data-theme="dark"] .ratio-card {
    background: linear-gradient(180deg, #1c1428, #15101f) !important;
}

.check-row {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid rgba(124, 58, 237, .18);
    border-radius: 12px;
    background: rgba(124, 58, 237, .04);
    font-weight: 800;
}

.check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

body[data-theme="dark"] .check-row {
    color: #ecfdf5;
    border-color: rgba(74, 222, 128, .24);
    background: rgba(20, 83, 45, .12);
}

.announcement-live-list {
    display: grid;
    gap: 10px;
}

.announcement-live-list section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(124, 58, 237, .16);
    border-radius: 14px;
    background: rgba(124, 58, 237, .04);
}

.announcement-live-list strong,
.announcement-live-list p,
.announcement-live-list small {
    display: block;
}

.announcement-live-list p {
    margin: 4px 0;
    color: var(--muted);
}

.announcement-live-list small {
    color: var(--muted);
    font-size: 11px;
}

body[data-theme="dark"] .announcement-live-list section {
    color: #ecfdf5;
    border-color: rgba(74, 222, 128, .24);
    background: linear-gradient(180deg, #1c1428, #15101f);
}

body[data-theme="dark"] .announcement-live-list p,
body[data-theme="dark"] .announcement-live-list small {
    color: #a7f3d0;
}

/* Courier status dark theme: dark portal surface with a light green border. */
body[data-theme="dark"] .courier-status-card {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, rgba(20, 16, 31, .96), rgba(10, 8, 17, .98)) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(74, 222, 128, .04) !important;
}

body[data-theme="dark"] .courier-status-title small,
body[data-theme="dark"] .courier-status-list span,
body[data-theme="dark"] .courier-status-rates span {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .courier-status-rates section {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, rgba(20, 16, 31, .96), rgba(10, 8, 17, .98)) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .04), 0 12px 30px rgba(0, 0, 0, .16) !important;
}

body[data-theme="dark"] .courier-status-rates strong {
    color: #f8fafc !important;
    background:
        radial-gradient(circle closest-side, #17111f 67%, transparent 70%),
        conic-gradient(#4ade80 var(--rate), rgba(74, 222, 128, .16) 0) !important;
    box-shadow: 0 0 26px rgba(74, 222, 128, .28) !important;
}

body[data-theme="dark"] .courier-status-list section > i {
    background: linear-gradient(90deg, #22c55e, #86efac) !important;
    box-shadow: 0 0 14px rgba(74, 222, 128, .24);
}

/* Bulk booking dark theme polish. */
body[data-theme="dark"] .bulk-panel,
body[data-theme="dark"] .bulk-preview-panel {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: linear-gradient(180deg, rgba(20, 16, 31, .96), rgba(10, 8, 17, .98)) !important;
}

body[data-theme="dark"] .bulk-format span {
    color: #bbf7d0 !important;
    border: 1px solid rgba(74, 222, 128, .24);
    background: rgba(31, 23, 43, .9) !important;
}

body[data-theme="dark"] .bulk-paste-box {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .26) !important;
    background: rgba(31, 23, 43, .72) !important;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .04);
}

body[data-theme="dark"] .bulk-paste-box strong {
    color: #f8fafc !important;
}

body[data-theme="dark"] .bulk-paste-box small,
body[data-theme="dark"] .bulk-panel p,
body[data-theme="dark"] .bulk-preview-panel p {
    color: #a7f3d0 !important;
}

body[data-theme="dark"] .bulk-paste-box textarea,
body[data-theme="dark"] .bulk-upload-grid .form-select,
body[data-theme="dark"] .bulk-upload-grid .form-control {
    color: #ecfdf5 !important;
    border-color: rgba(74, 222, 128, .28) !important;
    background: #1f172b !important;
}

body[data-theme="dark"] .bulk-paste-box textarea::placeholder,
body[data-theme="dark"] .bulk-upload-grid .form-control::placeholder {
    color: #8fbca2 !important;
}

.terms-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbf8ff;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.terms-check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--brand);
}
.terms-check a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.terms-modal[hidden] { display: none; }
.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
}
.terms-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .58);
    backdrop-filter: blur(5px);
}
.terms-modal-card {
    position: relative;
    width: min(940px, 100%);
    max-height: min(86vh, 820px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, .22);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(35, 20, 75, .28);
}
.terms-modal-card header,
.terms-modal-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
}
.terms-modal-card header span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .86;
}
.terms-modal-card header h2 {
    margin: 2px 0;
    font-size: 22px;
}
.terms-modal-card header p {
    margin: 0;
    opacity: .86;
}
.terms-modal-card header .icon-button {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .26);
    color: #fff;
}
.terms-modal-body {
    overflow: auto;
    padding: 22px;
    color: #111827;
    line-height: 1.65;
}
.terms-modal-body h3 {
    margin: 18px 0 8px;
    font-size: 16px;
    color: #4c1d95;
}
.terms-modal-body h3:first-child { margin-top: 0; }
.terms-modal-body p { margin: 0 0 10px; }
.terms-modal-card footer {
    justify-content: flex-end;
    background: #fbf8ff;
}
.terms-modal-open { overflow: hidden; }
@media (max-width: 640px) {
    .terms-modal { padding: 12px; }
    .terms-modal-card { max-height: 90vh; border-radius: 14px; }
    .terms-modal-card header, .terms-modal-card footer { padding: 14px; }
    .terms-modal-card header h2 { font-size: 18px; }
    .terms-modal-body { padding: 14px; font-size: 13px; }
}
