:root {
  --ink: #17211b;
  --green: #153c2e;
  --green-2: #235943;
  --paper: #f3f2ed;
  --white: #fff;
  --orange: #ef6c38;
  --muted: #6e7772;
  --line: #e1e4e1;
  --red: #b5452f;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft JhengHei", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; padding: 27px 20px; display: flex; flex-direction: column; background: #102b21; color: white; z-index: 40; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-brand > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); font: 800 23px Georgia, serif; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { letter-spacing: .08em; }
.admin-brand small { margin-top: 3px; color: rgba(255,255,255,.45); font-size: 8px; letter-spacing: .17em; }
.sidebar nav { display: grid; gap: 4px; margin: 22px 0; }
.sidebar nav a { display: flex; align-items: center; gap: 13px; padding: 10px 14px; border-radius: 4px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 700; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.08); }
.sidebar nav b { width: 22px; color: #80aa96; text-align: center; font-size: 17px; }
.sidebar-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.dev-dot { width: 9px; height: 9px; border-radius: 50%; background: #f5ac56; box-shadow: 0 0 0 5px rgba(245,172,86,.12); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 11px; }
.sidebar-foot small { color: rgba(255,255,255,.42); font-size: 9px; margin-top: 3px; }
.admin-main { grid-column: 2; min-width: 0; }
.topbar { height: 74px; display: flex; align-items: center; gap: 18px; padding: 0 36px; background: white; border-bottom: 1px solid var(--line); }
.topbar div { line-height: 1.15; }
.topbar small, .topbar strong { display: block; }
.topbar small { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.topbar strong { margin-top: 4px; font-size: 14px; }
.view-site { margin-left: auto; color: var(--green-2); font-size: 12px; font-weight: 800; }
.admin-identity { text-align: right; font-size: 11px; font-weight: 800; }
.admin-identity small { display: block; color: var(--muted); margin-top: 3px; font-size: 8px; }
.logout-button { border: 1px solid var(--line); background: white; padding: 7px 10px; border-radius: 3px; font-size: 10px; font-weight: 800; }
.sidebar-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.admin-content { padding: 38px; max-width: 1500px; margin: 0 auto; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.page-title span, .panel-heading span { color: var(--orange); font-size: 9px; letter-spacing: .2em; font-weight: 900; }
.page-title h1 { margin: 7px 0 6px; font: 700 33px Georgia, "Microsoft JhengHei", serif; }
.page-title p { margin: 0; color: var(--muted); font-size: 13px; }
.primary-action, .danger-action { min-height: 44px; padding: 0 18px; border: 0; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; color: white; font-size: 13px; font-weight: 900; }
.primary-action { background: var(--green); }
.primary-action:hover { background: var(--green-2); color: white; }
.danger-action { background: var(--red); }
.full { width: 100%; }
.text-action { color: var(--green-2); font-size: 12px; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 26px; }
.metric-card { min-height: 150px; padding: 23px; background: white; border-top: 3px solid transparent; transition: .18s; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16,43,33,.08); }
.metric-card.urgent { border-top-color: var(--orange); }
.metric-card small, .metric-card strong, .metric-card span { display: block; }
.metric-card small { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { margin: 13px 0 15px; font: 700 38px Georgia, serif; }
.metric-card.urgent strong { color: var(--orange); }
.metric-card span { padding-top: 12px; border-top: 1px solid var(--line); color: #929994; font-size: 10px; }
.panel { background: white; border: 1px solid var(--line); margin-bottom: 22px; }
.panel-heading { min-height: 77px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 5px 0 0; font-size: 18px; }
.panel-heading > a { color: var(--green-2); font-size: 12px; font-weight: 800; }
.panel-heading small { color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { padding: 13px 18px; text-align: left; background: #f8f8f5; color: var(--muted); font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.admin-table td { padding: 17px 18px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table td small { display: block; color: var(--muted); margin-top: 4px; font-size: 9px; }
.admin-table tbody tr:hover { background: #fbfcfa; }
.admin-table.compact td { padding-block: 13px; }
.deadline { color: var(--orange); font-weight: 900; }
.row-action { color: var(--green-2); font-weight: 900; }
.empty-state { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 35px; color: var(--muted); }
.empty-state b { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #e9f1ec; color: var(--green-2); font-size: 22px; }
.empty-state h3 { margin: 15px 0 5px; color: var(--ink); font-size: 17px; }
.empty-state p { margin: 0; font-size: 11px; }
.two-column { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-form { display: grid; gap: 17px; padding: 24px; }
.admin-form label, .reject-form label { display: grid; gap: 7px; font-size: 11px; font-weight: 800; }
.admin-form input, .admin-form select, .reject-form textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #d8dcd9; border-radius: 3px; background: #fbfcfa; outline: 0; }
.admin-form textarea, .settings-form textarea { width: 100%; min-height: 100px; padding: 10px 11px; border: 1px solid #d8dcd9; border-radius: 3px; background: #fbfcfa; resize: vertical; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-label { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; }
.check-label input { width: 17px !important; min-height: 17px !important; }
.inline-form { display: inline; margin-left: 9px; }
.link-danger { border: 0; padding: 0; background: transparent; color: var(--red); font-size: 11px; }
.small-empty { min-height: 160px; }
.hours-form { padding: 24px; }
.review-minutes { display: grid; grid-template-columns: 1fr 100px; align-items: center; gap: 15px; padding-bottom: 18px; font-size: 12px; font-weight: 800; }
.review-minutes input, .hour-row input { min-height: 38px; padding: 7px 9px; border: 1px solid #d8dcd9; border-radius: 3px; }
.hour-row { display: grid; grid-template-columns: 1fr 105px 20px 105px; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.hour-row > span { color: var(--muted); font-size: 10px; text-align: center; }
.hours-form > button { margin-top: 20px; }
.settings-panel { max-width: 900px; }
.settings-form { display: grid; gap: 0; padding: 5px 25px 28px; }
.setting-field { display: grid; grid-template-columns: 260px 1fr; gap: 25px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.setting-field label { font-size: 12px; font-weight: 800; }
.setting-field label small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 400; }
.setting-field input, .setting-field select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d8dcd9; background: #fbfcfa; }
.setting-field p { grid-column: 2; margin: -15px 0 0; color: var(--muted); font-size: 9px; }
.settings-form > button { margin-top: 22px; width: fit-content; }
.secret-status, .connection-banner { margin: 20px 24px 5px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; background: #fff5e8; border: 1px solid #efd8b8; }
.configuration-note { margin: 10px 24px 5px; padding: 13px 16px; border-left: 3px solid var(--orange); background: #f7f7f3; }
.configuration-note strong { font-size: 11px; }
.configuration-note p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.secret-status strong, .secret-status small, .connection-banner strong, .connection-banner small { display: block; }
.secret-status small, .connection-banner small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dev-dot.configured { background: #4da46c; }
.connection-banner { margin: 0 0 20px; }
.connection-banner.ready { background: #e6f3ea; border-color: #c8e3d1; }
.connection-banner > b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--green-2); }
.connection-banner > form { margin-left: auto; display: flex; gap: 8px; }
.connection-banner input { min-width: 220px; padding: 8px 10px; border: 1px solid #d5d9d6; }
.email-grid { grid-template-columns: 360px minmax(0, 1fr); }
.template-list { display: grid; }
.template-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.template-list a.active { background: #f0f5f1; border-left: 3px solid var(--orange); }
.template-list strong { font-size: 12px; }
.template-list small { color: var(--muted); font-size: 9px; }
.template-list .status-pill { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.code-area { min-height: 260px !important; font: 12px/1.6 Consolas, monospace; }
.error-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.audit-search { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.audit-search input { width: min(430px, 100%); min-height: 44px; padding: 9px 12px; border: 1px solid #d8dcd9; background: white; }
.audit-search > a { color: var(--green-2); font-size: 11px; font-weight: 800; }
.audit-table code { display: block; max-width: 430px; max-height: 90px; overflow: auto; padding: 7px; background: #f4f6f3; color: #405049; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 9px; }
.content-editor { padding-bottom: 75px; }
.distance-admin-grid { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 18px; align-items: start; }
.price-preview { display: grid; gap: 5px; padding: 14px; border-left: 3px solid var(--orange); background: #f4f7f3; }
.price-preview span { color: var(--muted); font-size: 10px; }
.price-preview strong { color: var(--green); font: 700 24px Georgia, serif; }
.distance-page-title { align-items: end; }
.pricing-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.pricing-metric-grid > div { position: relative; min-height: 122px; padding: 20px; overflow: hidden; border: 1px solid var(--line); background: white; }
.pricing-metric-grid > div::after { content: ""; position: absolute; right: -14px; bottom: -22px; width: 76px; height: 76px; border-radius: 50%; background: #f0f4f0; }
.pricing-metric-grid small, .pricing-metric-grid strong, .pricing-metric-grid span { position: relative; z-index: 1; display: block; }
.pricing-metric-grid small { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.pricing-metric-grid strong { margin: 7px 0 4px; color: var(--green); font: 700 29px Georgia, serif; }
.pricing-metric-grid span { color: var(--muted); font-size: 9px; }
.pricing-metric-grid .warning { border-top: 3px solid var(--red); }
.pricing-metric-grid .warning strong { color: var(--red); }
.pricing-metric-grid .ready { border-top: 3px solid #4d8a62; }
.optimized-distance-grid { grid-template-columns: minmax(320px, .72fr) minmax(480px, 1.28fr); }
.tier-editor-panel { overflow: hidden; }
.admin-tool-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 20px 18px; }
.admin-tool-tabs button { min-height: 39px; border: 1px solid var(--line); background: #f4f6f3; color: var(--muted); font-size: 10px; font-weight: 900; }
.admin-tool-tabs button.active { border-color: var(--green); background: var(--green); color: white; }
.pricing-tool-panel { display: none; }
.pricing-tool-panel.active { display: block; animation: adminToolReveal .18s ease-out; }
@keyframes adminToolReveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.tool-intro { display: flex; align-items: center; gap: 11px; padding: 13px; background: #f2f6f2; }
.tool-intro > b { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; }
.tool-intro strong, .tool-intro small { display: block; }
.tool-intro strong { font-size: 11px; }
.tool-intro small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.coverage-panel { margin-bottom: 20px; }
.coverage-panel > .panel-heading { align-items: end; }
.coverage-filters { display: flex; gap: 7px; }
.coverage-filters select { min-height: 36px; padding: 6px 28px 6px 9px; border: 1px solid var(--line); background: white; color: var(--green); font-size: 10px; }
.coverage-groups { display: grid; gap: 13px; padding: 0 20px 21px; }
.coverage-group { padding: 16px; border: 1px solid var(--line); background: #fbfcfa; }
.coverage-group.has-gap { border-left: 3px solid var(--red); }
.coverage-group > header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.coverage-group > header strong, .coverage-group > header span { display: block; }
.coverage-group > header strong { color: var(--green); font-size: 12px; }
.coverage-group > header div > span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.coverage-track { min-height: 67px; display: flex; gap: 3px; padding: 6px; overflow-x: auto; border: 1px solid #d9e0da; background: #eef2ee; }
.coverage-track a { min-width: 96px; display: grid; align-content: center; gap: 5px; padding: 9px; border-radius: 2px; background: var(--green); color: white; transition: transform .15s, background .15s; }
.coverage-track a:nth-child(even) { background: #2b654d; }
.coverage-track a:hover { transform: translateY(-2px); background: var(--orange); }
.coverage-track small { color: rgba(255,255,255,.68); font-size: 8px; }
.coverage-track strong { font: 700 13px Georgia, serif; }
.gap-warning { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 8px 10px; background: #fbe9e5; color: #963f2e; font-size: 9px; }
.gap-warning b { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: #b54b35; color: white; }
.content-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; padding: 24px; }
.content-fields label:last-child:nth-child(4) { grid-column: 1 / -1; }
.content-editor label, .repeater-card label { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 800; }
.content-editor input, .content-editor textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d8dcd9; background: #fbfcfa; }
.content-editor textarea { min-height: 92px; resize: vertical; }
.repeater-grid, .faq-editor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; padding: 24px; }
.repeater-grid.three, .faq-editor { grid-template-columns: repeat(3, 1fr); }
.repeater-card { position: relative; display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); background: #f8f9f6; }
.repeater-card > b { position: absolute; top: -9px; left: 13px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font-size: 9px; }
.sticky-save { position: sticky; bottom: 15px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border: 1px solid #bdd3c5; background: rgba(239,247,241,.96); box-shadow: 0 14px 35px rgba(16,43,33,.15); backdrop-filter: blur(8px); }
.sticky-save span { color: var(--green-2); font-size: 11px; font-weight: 800; }
.dispatch-board { display: grid; gap: 17px; }
.dispatch-card { background: white; border: 1px solid var(--line); border-left: 4px solid var(--orange); }
.dispatch-card > header { display: grid; grid-template-columns: 95px 1fr auto; align-items: center; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dispatch-card > header div:first-child span, .dispatch-card > header div:first-child strong, .dispatch-card > header div:nth-child(2) b, .dispatch-card > header div:nth-child(2) small { display: block; }
.dispatch-card > header div:first-child span { color: var(--muted); font-size: 9px; }
.dispatch-card > header div:first-child strong { margin-top: 3px; font: 700 24px Georgia, serif; color: var(--green); }
.dispatch-card > header div:nth-child(2) small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.dispatch-route { margin: 0; padding: 16px 24px; background: #f8f9f6; color: var(--muted); font-size: 11px; }
.dispatch-route-metrics { display: flex; justify-content: space-between; gap: 15px; padding: 14px 24px; background: #eef4ef; color: var(--green); font-size: 11px; }
.dispatch-route-list, .admin-route-list { margin: 0; padding: 8px 24px 18px; list-style: none; background: #f8f9f6; }
.dispatch-route-list li { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.dispatch-route-list li:last-child { border-bottom: 0; }
.dispatch-route-list b, .admin-route-list > li > b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 9px; }
.assign-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding: 18px 24px 24px; }
.assign-form label { display: grid; gap: 6px; font-size: 10px; font-weight: 800; }
.assign-form select { min-height: 41px; padding: 8px; border: 1px solid #d8dcd9; }
.assignment-info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 18px 24px; }
.assignment-info div { padding: 13px; background: #f5f7f4; }
.assignment-info small, .assignment-info strong, .assignment-info span { display: block; }
.assignment-info small, .assignment-info span { color: var(--muted); font-size: 9px; }
.assignment-info strong { margin: 5px 0; font-size: 13px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 24px 24px; }
.status-actions button { border: 1px solid var(--green); background: white; color: var(--green); padding: 8px 12px; font-size: 10px; font-weight: 800; }
.status-actions button.complete { background: var(--green); color: white; }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: #102b21; }
.auth-card { width: min(430px, 100%); padding: 38px; background: white; border-top: 4px solid var(--orange); box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.wide-auth { width: min(520px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-brand > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: white; font: 800 24px Georgia, serif; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand small { color: var(--muted); font-size: 8px; letter-spacing: .16em; margin-top: 3px; }
.auth-heading { margin: 30px 0 22px; }
.auth-heading > span { color: var(--orange); font-size: 9px; letter-spacing: .18em; font-weight: 900; }
.auth-heading h1 { margin: 7px 0; font: 700 29px Georgia, "Microsoft JhengHei", serif; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; font-size: 11px; font-weight: 800; }
.auth-form input:not([type="checkbox"]) { width: 100%; min-height: 45px; padding: 9px 11px; border: 1px solid #d7dbd8; }
.auth-form label small { color: var(--muted); font-size: 9px; font-weight: 400; }
.auth-form button { min-height: 47px; border: 0; background: var(--orange); color: white; font-weight: 900; }
.auth-foot { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 9px; }
.admin-form input:focus, .admin-form select:focus, .reject-form textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(35,89,67,.09); }
.form-help { margin: -2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 900; }
.status-pill.green { background: #e2f1e7; color: #287044; }
.status-pill.orange { background: #fff0e8; color: #bb5126; }
.status-pill.red { background: #fbe8e4; color: #9e3d2a; }
.status-pill.gray { background: #eff1ef; color: #717975; }
.filter-tabs { display: flex; gap: 5px; margin-bottom: 15px; overflow-x: auto; }
.filter-tabs a { padding: 9px 15px; border-radius: 3px; background: white; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.filter-tabs a.active { background: var(--green); color: white; }
.order-state-bar { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; background: var(--green); color: white; }
.order-state-bar > div { min-height: 85px; padding: 20px 24px; border-right: 1px solid rgba(255,255,255,.13); }
.order-state-bar small, .order-state-bar strong { display: block; }
.order-state-bar small { color: rgba(255,255,255,.55); font-size: 9px; }
.order-state-bar strong { margin-top: 9px; font-size: 14px; }
.order-detail-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.detail-panel { margin-bottom: 20px; }
.detail-list { margin: 0; padding: 8px 24px 22px; }
.detail-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.admin-route-list { padding-top: 0; background: white; }
.admin-route-list > li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-route-list strong, .admin-route-list span, .admin-route-list small { display: block; }
.admin-route-list span { margin-top: 4px; font-size: 11px; }
.admin-route-list small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.admin-route-list em { padding: 4px 7px; border-radius: 20px; background: #e6f0e8; color: var(--green); font-size: 9px; font-style: normal; font-weight: 900; }
.decision-panel { border-top: 3px solid var(--orange); }
.decision-panel > form, .decision-note, .closed-decision, .reject-form { margin-inline: 24px; }
.order-total { margin: 20px 24px; padding: 18px; display: flex; align-items: end; justify-content: space-between; background: #f3f6f3; }
.order-total small { color: var(--muted); font-size: 10px; }
.order-total strong { color: var(--green); font: 700 25px Georgia, serif; }
.decision-note { color: var(--muted); font-size: 11px; line-height: 1.7; }
.decision-panel hr { margin: 23px 24px; border-color: var(--line); }
.reject-form { display: grid; gap: 13px; margin-bottom: 24px; }
.reject-form textarea { min-height: 88px; resize: vertical; }
.closed-decision { margin-bottom: 24px; padding: 15px; color: var(--muted); background: #f4f5f3; font-size: 11px; }
.event-list { list-style: none; padding: 5px 24px 22px; margin: 0; }
.event-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.event-list b, .event-list span { display: block; }
.event-list b { font-size: 11px; }
.event-list span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.muted { color: var(--muted); font-size: 11px; padding: 0 24px 20px; }
.alert { padding: 13px 16px; margin-bottom: 20px; border-radius: 3px; font-size: 12px; }
.success-alert { color: #225e3a; background: #e3f2e8; border: 1px solid #c5e3cf; }
.error-alert { color: #8f3423; background: #fbe8e4; border: 1px solid #eec7bd; }
.validation-summary-errors, .field-validation-error { color: var(--red); font-size: 10px; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column, .order-detail-grid { grid-template-columns: 1fr; }
  .distance-admin-grid { grid-template-columns: 1fr 1fr; }
  .optimized-distance-grid { grid-template-columns: 1fr; }
  .pricing-metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .admin-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 30px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { width: 100%; }
  .sidebar-toggle { display: block; }
  .topbar { padding: 0 18px; }
  .admin-content { padding: 25px 15px; }
  .page-title { display: grid; align-items: start; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 18px; min-height: 135px; }
  .order-state-bar { grid-template-columns: 1fr 1fr; }
  .inline-fields, .setting-field, .assignment-info { grid-template-columns: 1fr; }
  .setting-field p { grid-column: 1; margin: 0; }
  .hour-row { grid-template-columns: 1fr 90px 15px 90px; }
  .connection-banner { align-items: flex-start; flex-wrap: wrap; }
  .connection-banner > form { width: 100%; margin-left: 0; display: grid; }
  .assign-form { grid-template-columns: 1fr; }
  .audit-search { align-items: stretch; flex-wrap: wrap; }
  .audit-search input { flex-basis: 100%; }
  .content-fields, .repeater-grid, .repeater-grid.three, .faq-editor { grid-template-columns: 1fr; }
  .distance-admin-grid { grid-template-columns: 1fr; }
  .pricing-metric-grid { grid-template-columns: 1fr 1fr; }
  .admin-tool-tabs { grid-template-columns: 1fr 1fr; }
  .coverage-panel > .panel-heading, .coverage-group > header { align-items: stretch; flex-direction: column; }
  .coverage-filters { width: 100%; }
  .coverage-filters select { min-width: 0; flex: 1; }
  .content-fields label:last-child:nth-child(4) { grid-column: 1; }
  .sticky-save { align-items: stretch; flex-direction: column; }
  .detail-list > div { grid-template-columns: 90px 1fr; }
}

/* 2026 operations UI system */
:root {
  --ink: #14231c;
  --green: #123c2d;
  --green-2: #28604a;
  --paper: #f5f5f1;
  --orange: #e96e43;
  --muted: #68756f;
  --line: #dde3df;
  --red: #b5452f;
  --soft-shadow: 0 10px 30px rgba(18,60,45,.07);
}
*, *::before, *::after { box-sizing: border-box; }
body { font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(233,110,67,.38); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 999; top: 10px; left: 10px; padding: 10px 14px; border-radius: 8px; background: var(--orange); color: white; transform: translateY(-150%); transition: transform .18s; }
.skip-link:focus { transform: translateY(0); }
.admin-shell { grid-template-columns: 276px 1fr; }
.sidebar { width: 276px; padding: 25px 17px 20px; background: linear-gradient(180deg, #0e3024, #0c271e); box-shadow: 10px 0 35px rgba(7,29,21,.08); }
.admin-brand { margin-inline: 5px; padding: 0 10px 25px; }
.admin-brand > span { width: 44px; height: 44px; border-radius: 14px 14px 14px 5px; box-shadow: 0 9px 20px rgba(233,110,67,.23); }
.admin-brand strong { font-size: 16px; }
.admin-brand small { font-size: 8px; letter-spacing: .2em; }
.sidebar nav { gap: 3px; margin: 18px 0 25px; }
.sidebar-label { display: block; margin: 17px 14px 6px; color: rgba(255,255,255,.33); font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.sidebar-label:first-child { margin-top: 0; }
.sidebar nav a { position: relative; min-height: 43px; gap: 12px; padding: 10px 13px; border-radius: 10px; color: rgba(255,255,255,.68); font-size: 13px; transition: background .16s, color .16s, transform .16s; }
.sidebar nav a:hover { transform: translateX(2px); background: rgba(255,255,255,.075); }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: white; box-shadow: 0 7px 18px rgba(0,0,0,.11); }
.sidebar nav a.active::before { content: ""; position: absolute; top: 11px; bottom: 11px; left: -4px; width: 3px; border-radius: 3px; background: var(--orange); }
.sidebar nav b { width: 24px; color: #87b59f; font-size: 16px; }
.sidebar nav a.active b { color: #f49a79; }
.sidebar-foot { margin-inline: 7px; padding: 17px 7px 0; }
.sidebar-backdrop { display: none; }
.admin-main { grid-column: 2; }
.topbar { position: sticky; z-index: 30; top: 0; height: 82px; padding: 0 38px; border-color: var(--line); background: rgba(255,255,255,.93); box-shadow: 0 4px 20px rgba(18,60,45,.025); backdrop-filter: blur(14px); }
.topbar small { font-size: 9px; }
.topbar strong { font-size: 15px; }
.admin-identity { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 11px; }
.admin-identity > b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #e7f0ea; color: var(--green); font: 700 13px Georgia, serif; }
.admin-identity > span, .admin-identity small { display: block; }
.view-site { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; transition: .16s; }
.view-site:hover { border-color: #acc2b6; background: #f3f8f4; }
.logout-button { min-height: 36px; padding-inline: 13px; border-radius: 9px; }
.logout-button:hover { border-color: #e5c3b7; background: #fff3ef; color: var(--red); }
.admin-content { max-width: 1540px; padding: 44px 42px 70px; }
.page-title { margin-bottom: 30px; }
.page-title span, .panel-heading span { font-size: 10px; }
.page-title h1 { margin-top: 8px; font-size: clamp(30px, 3vw, 38px); letter-spacing: -.025em; }
.page-title p { max-width: 720px; font-size: 13px; line-height: 1.7; }
.primary-action, .danger-action { min-height: 46px; border-radius: 10px; padding-inline: 19px; font-size: 12px; box-shadow: 0 9px 21px rgba(18,60,45,.12); transition: transform .16s, background .16s; }
.primary-action:hover, .danger-action:hover { transform: translateY(-1px); }
.metric-grid { gap: 17px; }
.metric-card { min-height: 157px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 1px 0 white inset; }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(18,60,45,.03); }
.metric-card { position: relative; }
.metric-card small { font-size: 11px; }
.metric-card span { font-size: 10px; }
.panel { overflow: hidden; border-radius: 15px; box-shadow: 0 1px 0 white inset; }
.panel-heading { min-height: 81px; padding: 21px 25px; }
.panel-heading h2 { font-size: 19px; }
.panel-heading small { font-size: 10px; line-height: 1.5; }
.table-wrap { scrollbar-color: #b9c7c0 transparent; }
.admin-table { font-size: 13px; }
.admin-table th { position: sticky; z-index: 2; top: 0; padding: 14px 18px; background: #f5f7f4; font-size: 10px; letter-spacing: .06em; }
.admin-table td { padding: 17px 18px; }
.admin-table td small { font-size: 10px; }
.admin-table tbody tr { transition: background .14s; }
.admin-table tbody tr:hover { background: #f5f9f6; }
.row-action, .text-action { min-height: 32px; display: inline-flex; align-items: center; }
.two-column { grid-template-columns: 390px minmax(0, 1fr); gap: 23px; }
.admin-form { gap: 18px; padding: 25px; }
.admin-form label, .reject-form label { gap: 8px; font-size: 12px; }
.admin-form input, .admin-form select, .reject-form textarea, .setting-field input, .setting-field select, .content-editor input, .content-editor textarea { min-height: 46px; border-color: #d6ddd8; border-radius: 9px; background: #fbfcfa; transition: border .16s, box-shadow .16s, background .16s; }
.admin-form input:hover, .admin-form select:hover, .setting-field input:hover, .setting-field select:hover { border-color: #aebdb5; background: white; }
.admin-form input:focus, .admin-form select:focus, .reject-form textarea:focus, .setting-field input:focus, .setting-field select:focus, .content-editor input:focus, .content-editor textarea:focus { border-color: var(--green-2); background: white; box-shadow: 0 0 0 4px rgba(40,96,74,.09); outline: 0; }
.form-help { font-size: 10px; }
.status-pill { padding: 6px 9px; font-size: 10px; }
.filter-tabs { gap: 7px; margin-bottom: 18px; }
.filter-tabs a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; }
.filter-tabs a.active { border-color: var(--green); box-shadow: 0 8px 18px rgba(18,60,45,.12); }
.empty-state { min-height: 270px; }
.empty-state b { width: 56px; height: 56px; border-radius: 18px 18px 18px 6px; }
.empty-state h3 { font-size: 18px; }
.empty-state p { font-size: 11px; line-height: 1.7; }
.alert { position: relative; padding: 15px 18px; border-radius: 11px; box-shadow: var(--soft-shadow); font-size: 12px; animation: noticeReveal .2s ease-out; }
@keyframes noticeReveal { from { opacity: 0; transform: translateY(-5px); } }
.settings-panel { max-width: 980px; }
.setting-field { grid-template-columns: 280px 1fr; padding: 20px 0; }
.setting-field label { font-size: 12px; }
.setting-field label small, .setting-field p { font-size: 9px; line-height: 1.6; }
.connection-banner, .secret-status, .configuration-note { border-radius: 11px; }
.sticky-save { bottom: 18px; border-radius: 13px; }

.pricing-metric-grid { gap: 14px; }
.pricing-metric-grid > div { min-height: 130px; border-radius: 14px; }
.pricing-metric-grid small { font-size: 10px; }
.pricing-metric-grid span { font-size: 10px; }
.optimized-distance-grid { grid-template-columns: minmax(340px, .76fr) minmax(520px, 1.24fr); gap: 22px; }
.admin-tool-tabs { gap: 7px; }
.admin-tool-tabs button { min-height: 43px; border-radius: 9px; font-size: 10px; transition: .16s; }
.admin-tool-tabs button:not(.active):hover { border-color: #abc0b5; background: #eaf1ec; color: var(--green); }
.tool-intro, .price-preview { border-radius: 10px; }
.coverage-groups { gap: 15px; }
.coverage-group { border-radius: 12px; }
.coverage-track { border-radius: 10px; }
.coverage-track a { border-radius: 7px; }
.gap-warning { border-radius: 8px; }
.repeater-card { border-radius: 11px; }
.dispatch-card { overflow: hidden; border-radius: 14px; box-shadow: var(--soft-shadow); }
.status-actions button { min-height: 37px; border-radius: 8px; }
.order-state-bar { overflow: hidden; border-radius: 14px; box-shadow: var(--soft-shadow); }
.detail-list dt { font-size: 11px; }
.detail-list dd { font-size: 13px; }
.auth-body { background: radial-gradient(circle at 70% 20%, #245542, #0d2b20 55%); }
.auth-card { border: 0; border-radius: 20px; box-shadow: 0 35px 90px rgba(0,0,0,.28); }
.auth-card::before { content: ""; display: block; height: 4px; margin: -38px -38px 34px; border-radius: 20px 20px 0 0; background: linear-gradient(90deg, var(--orange), #f2a386 42%, var(--green) 42%); }
.auth-brand > span { border-radius: 14px 14px 14px 5px; }
.auth-form label { font-size: 12px; }
.auth-form input:not([type="checkbox"]) { min-height: 49px; border-radius: 9px; }
.auth-form button { min-height: 50px; border-radius: 10px; box-shadow: 0 11px 25px rgba(233,110,67,.23); }

@media (max-width: 1120px) {
  .optimized-distance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: min(286px, 86vw); }
  .sidebar-backdrop { position: fixed; z-index: 35; inset: 0; border: 0; background: rgba(8,25,19,.48); opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(2px); }
  .sidebar-backdrop.open { display: block; opacity: 1; pointer-events: auto; }
  .topbar { height: 72px; padding: 0 14px; gap: 11px; }
  .topbar > div { min-width: 0; }
  .topbar > div strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-identity { margin-left: auto; }
  .admin-identity > span { display: none; }
  .view-site { display: none; }
  .logout-button { padding-inline: 10px; }
  .admin-content { padding: 29px 14px 60px; }
  .page-title { gap: 17px; }
  .page-title h1 { font-size: 29px; }
  .metric-grid, .pricing-metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card, .pricing-metric-grid > div { min-height: 130px; padding: 17px; }
  .metric-card strong { font-size: 31px; }
  .panel { border-radius: 12px; }
  .panel-heading { align-items: flex-start; min-height: 72px; padding: 18px; }
  .two-column { grid-template-columns: 1fr; }
  .admin-form { padding: 19px; }
  .admin-table th, .admin-table td { padding-inline: 14px; }
  .setting-field { grid-template-columns: 1fr; gap: 10px; }
  .setting-field p { grid-column: 1; margin: 0; }
  .auth-card { padding: 30px 22px; }
  .auth-card::before { margin: -30px -22px 28px; }
}
@media (max-width: 430px) {
  .metric-grid, .pricing-metric-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Google Routes configuration workspace */
.routing-settings-panel { max-width: 1180px; }
.routing-setup { padding: 0 24px 28px; }
.routing-readiness { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 2px 0 16px; padding: 22px 24px; border: 1px solid #efd8b8; border-radius: 14px; background: linear-gradient(135deg, #fff8ef, #fffdf9); }
.routing-readiness.ready { border-color: #bad9c5; background: linear-gradient(135deg, #e9f5ed, #f7fbf8); }
.routing-readiness span, .routing-section-heading > span, .routing-actions section > span { display: block; color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.routing-readiness strong { display: block; margin-top: 5px; color: var(--green); font: 700 22px Georgia, "Microsoft JhengHei", serif; }
.routing-readiness p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.routing-readiness > b { min-width: 76px; padding: 10px 12px; border-radius: 999px; background: #fff0df; color: #b35e35; text-align: center; font-size: 9px; letter-spacing: .08em; }
.routing-readiness.ready > b { background: #d9ecdf; color: #276a42; }
.routing-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.routing-status-grid article { position: relative; min-height: 116px; padding: 18px 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.routing-status-grid article::after { content: ""; position: absolute; right: -20px; bottom: -27px; width: 78px; height: 78px; border-radius: 50%; background: #ecefec; }
.routing-status-grid article.complete { border-top: 3px solid #4d8a62; background: #f5faf6; }
.routing-status-grid span, .routing-status-grid strong, .routing-status-grid small { position: relative; z-index: 1; display: block; }
.routing-status-grid span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.routing-status-grid strong { margin: 8px 0 4px; color: var(--green); font: 700 25px Georgia, "Microsoft JhengHei", serif; }
.routing-status-grid small { color: var(--muted); font-size: 9px; }
.routing-content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.routing-guide, .routing-actions section { border: 1px solid var(--line); border-radius: 14px; background: white; }
.routing-guide { padding: 24px; }
.routing-section-heading h3, .routing-actions h3 { margin: 6px 0 7px; color: var(--ink); font: 700 18px Georgia, "Microsoft JhengHei", serif; }
.routing-section-heading p, .routing-actions p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.setup-steps { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: none; }
.setup-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 13px; padding: 17px 0; border-top: 1px solid var(--line); }
.setup-steps li > b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: white; font: 700 14px Georgia, serif; }
.setup-steps strong { display: block; color: var(--ink); font-size: 11px; }
.setup-steps p { margin: 5px 0 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.setup-steps a, .official-docs-link a { color: var(--green-2); font-size: 10px; font-weight: 900; text-decoration: underline; text-decoration-color: #b9cbbf; text-underline-offset: 3px; }
.step-links { display: flex; gap: 13px; }
.official-docs-link { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 5px; padding: 14px 16px; border-radius: 10px; background: #eef4ef; }
.official-docs-link span { color: var(--muted); font-size: 9px; font-weight: 900; }
.routing-actions { display: grid; gap: 14px; }
.routing-actions section { padding: 20px; }
.routing-actions section > span { color: var(--green-2); }
.routing-actions code { display: block; margin: 12px 0 10px; padding: 13px; overflow-wrap: anywhere; border: 1px solid #d5dfd8; border-radius: 9px; background: #102d22; color: #d9f3e3; font-size: 10px; line-height: 1.6; }
.routing-actions section > small { display: block; color: var(--muted); font-size: 9px; line-height: 1.7; }
.routing-link { display: block; width: 100%; margin-top: 14px; text-align: center; }
.routing-test-card form { display: grid; gap: 11px; margin-top: 14px; }
.routing-test-card label { display: grid; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 900; }
.routing-test-card input { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #d6dcd8; border-radius: 8px; background: #fbfcfb; font-size: 11px; outline: 0; }
.routing-test-card input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(35,89,67,.09); }
.routing-test-card button { width: 100%; margin-top: 2px; }
.routing-test-card button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .58; }

@media (max-width: 980px) {
  .routing-content-grid { grid-template-columns: 1fr; }
  .routing-actions { grid-template-columns: 1fr 1fr; }
  .routing-test-card { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .routing-setup { padding: 0 15px 20px; }
  .routing-readiness { align-items: flex-start; padding: 18px; }
  .routing-readiness > b { min-width: 64px; }
  .routing-status-grid, .routing-actions { grid-template-columns: 1fr; }
  .routing-test-card { grid-column: auto; }
  .routing-guide { padding: 18px; }
  .official-docs-link { align-items: flex-start; flex-direction: column; }
}
