:root {
    --admin-ink: #172033;
    --admin-muted: #6b7280;
    --admin-line: #e7eaf0;
    --admin-bg: #f5f7fb;
    --admin-orange: #f28a19;
    --admin-navy: #14213d;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
body { margin: 0; background: var(--admin-bg); color: var(--admin-ink); font-family: Figtree, Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.admin-sidebar { background: var(--admin-navy); color: #fff; padding: 26px 16px; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 30px; text-decoration: none; }
.admin-brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #ffae38, #f15c32); font-weight: 800; }
.admin-brand strong { display: block; font-size: 15px; letter-spacing: .04em; }
.admin-brand small { color: #aab4ca; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav-label { margin: 14px 12px 8px; color: #929db5; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav button, .admin-nav a { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 11px 12px; background: transparent; color: #c4cce0; text-align: left; text-decoration: none; cursor: pointer; font-size: 14px; }
.admin-nav button:hover, .admin-nav a:hover, .admin-nav button.active { background: #263552; color: #fff; }
.admin-nav button.active { box-shadow: inset 3px 0 #f99a30; }
.admin-nav .nav-icon { width: 19px; text-align: center; color: #aab4ca; }
.sidebar-bottom { margin: 26px 12px 0; padding-top: 18px; border-top: 1px solid #34415b; color: #aab4ca; font-size: 12px; line-height: 1.6; }
.admin-main { min-width: 0; }
.admin-topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--admin-line); }
.admin-topbar .top-label { color: var(--admin-muted); font-size: 13px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.admin-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff0dd; color: #a95406; }
.admin-content { width: min(1440px, 100%); margin: 0 auto; padding: 30px 34px 50px; }
.admin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.admin-heading p { margin: 7px 0 0; color: var(--admin-muted); font-size: 14px; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.notice { margin-bottom: 22px; border: 1px solid #f1d49c; border-radius: 10px; background: #fff9e9; padding: 12px 15px; color: #795414; font-size: 13px; line-height: 1.5; }
.notice strong { color: #5e400b; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.admin-card, .stat-card { border: 1px solid var(--admin-line); border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(20,33,61,.03); }
.stat-card { padding: 18px; }
.stat-card .stat-label { color: var(--admin-muted); font-size: 12px; }
.stat-card strong { display: block; margin-top: 9px; font-size: 26px; letter-spacing: -.03em; }
.stat-card small { display: block; margin-top: 5px; color: #8790a0; font-size: 11px; }
.admin-card { padding: 20px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-heading h2, .admin-card h2 { margin: 0; font-size: 17px; }
.card-heading p { margin: 5px 0 0; color: var(--admin-muted); font-size: 12px; }
.admin-grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 18px; }
.admin-grid-2.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 11px 12px; color: #7a8495; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--admin-line); }
.admin-table td { padding: 13px 12px; border-bottom: 1px solid #eff1f5; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .primary-cell { font-weight: 700; color: #27334a; }
.admin-table .secondary-cell { display: block; margin-top: 3px; color: #8992a1; font-size: 11px; font-weight: 400; }
.badge { display: inline-flex; border-radius: 99px; padding: 5px 9px; background: #eef2ff; color: #4a5b99; font-size: 11px; font-weight: 700; }
.badge.paid, .badge.delivered { background: #e5f7ed; color: #28784d; }
.badge.pending, .badge.pending-verification, .badge.in-transit { background: #fff3dc; color: #93610a; }
.badge.overdue { background: #ffebeb; color: #a73535; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 10px 14px; background: var(--admin-orange); color: white; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; }
.button:hover { background: #dc7510; }
.button.secondary { border: 1px solid #dfe3eb; background: #fff; color: #364157; }
.button.secondary:hover { background: #f7f8fb; }
.button.small { padding: 7px 10px; font-size: 12px; }
.button:disabled { opacity: .6; cursor: not-allowed; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #3e485a; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid #dce1e9; border-radius: 8px; padding: 10px 11px; background: #fff; color: #243047; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ef9b36; box-shadow: 0 0 0 3px rgba(242,138,25,.13); }
.field textarea { min-height: 120px; resize: vertical; }
.field-hint { color: #8790a0; font-size: 11px; line-height: 1.45; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.form-status { min-height: 18px; color: #28784d; font-size: 12px; }
.empty-state { padding: 26px 10px; color: #828b99; text-align: center; font-size: 13px; }
.admin-login { width: min(520px, 100%); margin: 70px auto; }
.admin-login h1 { margin: 0; font-size: 25px; }
.login-description { margin: 7px 0 22px; color: var(--admin-muted); font-size: 13px; }
.login-form { display: grid; gap: 15px; }
.login-form .form-actions { margin-top: 0; }
.payment-method-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.payment-method-settings .admin-card { box-shadow: none; }
.claim-review { display: grid; min-width: 190px; gap: 7px; }
.claim-review input { width: 100%; border: 1px solid #dce1e9; border-radius: 7px; padding: 8px; }
.claim-review-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.method-enabled { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #3e485a; font-size: 12px; font-weight: 700; }
.button.danger { background: #a73535; }
.button.danger:hover { background: #882929; }
.route-controls { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(240px, 1fr); align-items: end; gap: 18px; margin-bottom: 18px; }
.range-wrap { display: grid; gap: 11px; }
.range-wrap input[type=range] { width: 100%; accent-color: var(--admin-orange); }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e7ebf2; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f4ae43, #ed711d); transition: width .2s ease; }
.route-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.route-metric { border-radius: 9px; background: #f7f8fb; padding: 12px; }
.route-metric small { display: block; color: #7d8798; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.route-metric strong { display: block; margin-top: 6px; font-size: 17px; }
#admin-route-map { height: 360px; border-radius: 10px; background: #e8edf2; }
.quick-list { display: grid; gap: 13px; }
.quick-item { display: flex; align-items: flex-start; gap: 12px; }
.quick-item .quick-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #fff3e4; color: #c46a0d; }
.quick-item strong { display: block; font-size: 13px; }
.quick-item span { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 12px; }
.mobile-nav-toggle { display: none; border: 0; background: transparent; color: var(--admin-ink); font-size: 20px; cursor: pointer; }

@media (max-width: 1000px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid-2, .admin-grid-2.equal { grid-template-columns: 1fr; }
    .payment-method-settings { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 260px; overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 15px 0 35px rgba(12,21,39,.2); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-topbar { height: 64px; padding: 0 16px; }
    .admin-content { padding: 22px 16px 38px; }
    .mobile-nav-toggle { display: inline-flex; }
    .topbar-title { display: none; }
    .admin-heading { align-items: center; }
    .stat-grid { gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 22px; }
    .field-grid, .route-controls { grid-template-columns: 1fr; }
    .route-metrics { gap: 7px; }
    .route-metric { padding: 9px; }
    .route-metric strong { font-size: 14px; }
    .admin-card { padding: 16px; }
}
