:root {
  --ink: #152640;
  --muted: #50617a;
  --brand: #1649a2;
  --brand-dark: #102f74;
  --aqua: #e7f1fd;
  --sky: #ecf8ff;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --line: #dce5f0;
  --success: #16704d;
  --warning: #8c5702;
  --danger: #a93643;
  --navy: #13284d;
  --shadow: 0 10px 26px rgba(18, 44, 52, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(27, 82, 168, .30);
  outline-offset: 2px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  background: var(--surface);
}
.login-brand {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(30px, 4vw, 63px);
  min-height: 100vh;
  padding: clamp(32px, 5.6vw, 92px);
  color: white;
  background: radial-gradient(ellipse at 100% 12%, #1956b9 0, #153b80 48%, #10234b 100%);
}
.login-hero-photo { display: block; width: 100%; height: auto; border: 1px solid #779bd4; border-radius: 14px; box-shadow: 0 18px 56px rgba(6, 18, 49, .33); }
.login-hero-photo[hidden], .brand-photo[hidden] { display: none; }
.brand-mark { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 900; letter-spacing: -.045em; }
.drop-logo { position: relative; display: block; flex: 0 0 auto; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; }
.drop-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.drop-logo .brand-photo { position: absolute; inset: 0; }
.drop-logo .brand-photo[hidden] { display: none; }
.login-brand h1 { max-width: 640px; margin: 0 0 14px; font-size: clamp(42px, 5.2vw, 78px); line-height: 1.02; letter-spacing: -.064em; }
.login-brand p { max-width: 480px; margin: 0; color: #e1ebfc; font-size: clamp(16px, 1.65vw, 19px); line-height: 1.5; }
.login-panel { display: grid; place-items: center; padding: clamp(24px, 5vw, 75px); }
.login-card { width: min(412px, 100%); }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.login-card h2 { margin: 0 0 9px; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.05em; }
.login-card .eyebrow { margin-bottom: 8px; }
.login-card > p { margin: 0 0 28px; color: var(--muted); line-height: 1.5; }
.login-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 10px; background: var(--canvas); }
.login-switch button { min-height: 36px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 750; }
.login-switch button[aria-pressed="true"] { border-color: var(--line); color: var(--brand-dark); background: white; }
.login-notice { margin: 0 0 15px; padding: 9px 10px; border-radius: 8px; color: var(--brand-dark); background: var(--aqua); font-size: 14px; }
.staff-login-form, .owner-login-form { display: grid; gap: 15px; }
.staff-login-form .field input, .staff-login-form .password-input input, .staff-login-form .primary-btn, .login-option { min-height: 48px; }
.password-field { display: grid; gap: 7px; }
.password-input { position: relative; }
.password-input button { position: absolute; top: 50%; right: 3px; min-width: 47px; min-height: 40px; transform: translateY(-50%); }
.signup-invite [hidden] { display: none; }
.signup-invite .field { margin-top: 6px; }
.signup-invite .text-btn { min-height: 34px; margin-left: -5px; }
.login-option { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.login-secondary { margin-top: 23px; padding-top: 16px; border-top: 1px solid var(--line); }
.owner-login-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--brand); font-size: 14px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.form-error { margin: 8px 0; color: var(--danger); font-size: 14px; }
.staff-login-form .form-error { margin: -4px 0 0; }
.user-choice { width: 100%; display: flex; align-items: center; gap: 15px; margin: 12px 0; padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: white; transition: .18s ease; }
.user-choice:hover { transform: translateY(-2px); border-color: #a6bde2; box-shadow: var(--shadow); }
.avatar { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: white; background: var(--navy); font-weight: 900; }
.user-choice:nth-of-type(2) .avatar { background: var(--brand); }
.user-choice:nth-of-type(3) .avatar { background: #d58a27; }
.user-choice strong, .user-choice small { display: block; }
.user-choice small { margin-top: 3px; color: var(--muted); }
.choice-arrow { margin-left: auto; color: var(--brand); font-size: 21px; }
.demo-note { margin-top: 24px !important; font-size: 13px; line-height: 1.5; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 222px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: auto; padding: 24px 15px; color: white; background: var(--navy); }
.sidebar .brand-mark { padding: 0 8px 27px; font-size: 24px; }
.sidebar .drop-logo { width: 40px; height: 40px; }
.nav-list { display: grid; gap: 5px; }
.nav-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 10px; color: #d0def3; background: transparent; text-align: left; font-size: 14px; font-weight: 650; }
.nav-btn:hover { color: white; background: rgba(255,255,255,.08); }
.nav-btn.active { color: #f4f8ff; background: #244b88; }
.nav-icon { width: 23px; text-align: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 3px; border-top: 1px solid rgba(255,255,255,.15); }
.signed-in { display: flex; align-items: center; gap: 10px; }
.signed-in .avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--brand); }
.signed-in strong, .signed-in small { display: block; }
.signed-in small { margin-top: 2px; color: #a9c2c7; }
.logout { margin-top: 13px; padding: 0; border: 0; color: #bcd0d4; background: transparent; font-size: 13px; }
.main { width: 100%; max-width: 1660px; min-width: 0; justify-self: center; padding: 27px clamp(20px, 3.6vw, 48px) 50px; }
.workspace-status { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.page-title h1 { margin: 0 0 5px; font-size: clamp(27px, 3vw, 40px); line-height: 1.1; letter-spacing: -.045em; }
.page-title p { margin: 0; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.primary-btn, .secondary-btn, .danger-btn { min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 750; }
.primary-btn { border: 1px solid var(--brand); color: white; background: var(--brand); }
.primary-btn:hover { background: var(--brand-dark); }
.secondary-btn { border: 1px solid var(--line); color: var(--ink); background: white; }
.secondary-btn:hover { border-color: #95b3dd; background: #f8fbff; }
.danger-btn { border: 1px solid #f0cbd0; color: var(--danger); background: #fff7f8; }
.wide-btn { width: 100%; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 22px; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 4px 15px rgba(18,44,52,.035); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--aqua); font-size: 18px; }
.metric strong { display: block; margin-top: 10px; font-size: 29px; letter-spacing: -.04em; }
.metric small { color: var(--muted); }
.metric.warning .metric-icon { color: var(--warning); background: #fff3db; }
.metric.danger .metric-icon { color: var(--danger); background: #ffedef; }
.owner-summary { margin-bottom: 24px; padding: 20px; border: 1px solid #d1e1f4; border-radius: var(--radius); background: #ebf3ff; }
.owner-summary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.owner-summary-head h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.owner-summary-head > span, .owner-metric-note { color: var(--muted); font-size: 13px; }
.owner-summary .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.owner-summary .metric { box-shadow: none; }
.owner-summary .metric strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.owner-summary .metric-top { gap: 8px; }
.owner-summary .metric-icon { flex-shrink: 0; }
.owner-metric-note { margin: 12px 0 0; }
.owner-access { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #c8dbf5; border-radius: var(--radius); background: var(--aqua); }
.owner-access h2 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.015em; }
.owner-access p { margin: 0; color: var(--muted); font-size: 14px; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 20px rgba(18,44,52,.04); overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.rider-totals { margin-bottom: 20px; }
.rider-totals .panel-head { flex-wrap: wrap; }
.text-btn { padding: 5px; border: 0; color: var(--brand); background: transparent; font-size: 13px; font-weight: 800; }
.alert-list { padding: 8px 18px; }
.alert-item { display: flex; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border: 0; }
.alert-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--danger); }
.alert-dot.amber { background: var(--warning); }
.alert-item strong { display: block; font-size: 14px; }
.alert-item p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px; }
.quick-action { min-height: 96px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fbfdfd; text-align: left; font-weight: 800; }
.quick-action span { display: block; margin-bottom: 10px; font-size: 23px; }
.quick-action:hover { border-color: #8dc8c8; background: var(--aqua); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.search { flex: 1; min-width: 180px; height: 46px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; }
.filter-select { height: 46px; padding: 0 36px 0 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; color: var(--muted); background: #f9fbfb; text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 15px 18px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tr.clickable:hover { background: #f7fbfb; cursor: pointer; }
.customer-cell strong, .customer-cell small { display: block; }
.customer-cell small { margin-top: 4px; color: var(--muted); }
.staff-table .staff-mobile-username { display: none; }
.staff-table td:first-child, .staff-desktop-username { overflow-wrap: anywhere; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-list-message { margin: 16px 20px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: #53666a; background: #edf2f2; font-size: 11px; font-weight: 900; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.delivered, .status.paid, .status.ready-for-return { color: var(--success); background: #e7f6ef; }
.status.on-the-way, .status.assigned, .status.accepted, .status.picked-up { color: #16758c; background: #e5f5fa; }
.status.not-delivered, .status.unpaid { color: var(--danger); background: #ffedef; }
.status.new, .status.partially-paid { color: var(--warning); background: #fff3dd; }
.money { font-weight: 800; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.empty-state { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty-state span { display: block; margin-bottom: 10px; font-size: 40px; }

.driver-cards { display: grid; gap: 14px; }
.driver-delivered { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px 16px; border: 1px solid #d0e1f5; border-radius: 12px; color: var(--brand-dark); background: var(--aqua); font-size: 14px; font-weight: 650; }
.driver-delivered strong { font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.driver-order { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 18px rgba(18,44,52,.04); }
.driver-order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.stop-number { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--navy); font-weight: 800; }
.driver-order-main { flex: 1; min-width: 0; }
.driver-order-main h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.driver-order-main p { margin: 4px 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.driver-order-main .stop-address { color: var(--ink); font-weight: 650; }
.driver-order-main a { color: var(--brand-dark); }
.order-quantity { padding: 7px 9px; border-radius: 8px; color: var(--brand-dark); background: var(--aqua); font-size: 13px; font-weight: 800; white-space: nowrap; }
.driver-step { margin: 12px 0; font-size: 14px; }
.driver-notes { margin: 15px 0; padding: 12px; border-radius: 12px; color: #5c532f; background: #fff8df; font-size: 13px; }
.driver-actions { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 9px; margin-top: 16px; }
.driver-actions button { min-height: 48px; }

.inventory-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.inventory-card { position: relative; overflow: hidden; padding: 22px; border-radius: var(--radius); color: white; background: var(--navy); }
.inventory-card:nth-child(2) { background: var(--brand); }
.inventory-card:nth-child(3) { color: var(--ink); background: #f5cb6b; }
.inventory-card p { margin: 0 0 20px; opacity: .77; font-weight: 700; }
.inventory-card strong { font-size: 37px; }
.inventory-card small { display: block; margin-top: 4px; opacity: .75; }
.progress { height: 9px; margin-top: 16px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: white; }
.inventory-card:nth-child(3) .progress { background: rgba(18,44,52,.12); }
.inventory-card:nth-child(3) .progress span { background: var(--ink); }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(6,35,43,.62); backdrop-filter: blur(4px); }
.modal { width: min(650px, 100%); max-height: min(850px, 92vh); overflow-y: auto; border-radius: 23px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.modal.small { width: min(480px, 100%); }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); background: white; }
.modal-head h2 { margin: 0; font-size: 21px; }
.close-btn { width: 36px; height: 36px; border: 0; border-radius: 11px; color: var(--muted); background: #eff4f4; font-size: 20px; }
.modal-body { padding: 21px 22px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.order-options { min-width: 0; border: 0; margin: 0; padding: 0; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field, .field label { color: var(--ink); font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea, .password-input input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; font-size: 16px; font-weight: 450; }
.password-input input { padding-right: 56px; }
.field textarea { min-height: 78px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 21px; }
.owner-login-form p { margin: 0; }
.owner-login-form .modal-actions { margin-top: 4px; }
.modal-actions .login-option { min-height: 44px; }
.credential-details { display: grid; gap: 12px; }
.credential-details p { margin: 0; font-size: 14px; }
.credential-details input { font-family: ui-monospace, "Courier New", monospace; background: #f5f9f8; }
.credential-details .modal-actions { flex-wrap: wrap; margin-top: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.detail-item { padding: 13px; border-radius: 13px; background: #f5f9f9; }
.detail-item small, .detail-item strong { display: block; }
.detail-item small { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.detail-item.full { grid-column: 1/-1; }
.status-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.status-action { min-height: 55px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; font-weight: 850; }
.status-action:hover { border-color: var(--brand); background: var(--aqua); }
.order-section { display: grid; gap: 12px; margin-block: 22px; }
.order-section h3, .order-section p { margin: 0; }
.order-section > .primary-btn { justify-self: start; }
.return-date-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.return-date-form .field { flex: 1; min-width: min(100%, 150px); }
.proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.proof-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.proof-figure { display: grid; gap: 8px; margin: 0; }
.proof-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; font-size: 13px; }
.proof-image { display: block; border-radius: 9px; background: #eef4f4; }
.proof-image img { display: block; width: 100%; max-height: 176px; object-fit: contain; border-radius: 9px; }
.proof-send-controls { display: grid; gap: 8px; margin-top: 10px; }
.proof-send-controls button { white-space: normal; }
.proof-message { margin: 8px 0 0; font-size: 13px; }
.proof-error { color: var(--danger); }
.proof-capture { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.proof-capture legend { padding-inline: 4px; font-weight: 800; }
.proof-capture legend small { font-weight: 600; }
.proof-capture [hidden] { display: none; }
.proof-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.proof-choices button { min-height: 44px; }
.proof-preview { display: block; width: 100%; max-height: 210px; object-fit: contain; border-radius: 9px; background: #eef4f4; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 20px); max-width: calc(100vw - 30px); padding: 12px 17px; border-radius: 12px; color: white; background: var(--navy); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; font-weight: 700; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.mobile-topbar, .bottom-nav { display: none; }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-shell { display: block; }
  .login-brand { min-height: auto; gap: 17px; padding: 19px 23px 23px; }
  .login-brand .brand-mark { font-size: 22px; }
  .login-brand .drop-logo { width: 36px; height: 36px; }
  .login-brand h1 { margin: 0 0 5px; font-size: 35px; letter-spacing: -.045em; }
  .login-brand p { font-size: 14px; }
  .login-hero-photo { width: min(100%, 480px); box-shadow: none; border-radius: 9px; }
  .login-panel { padding: 27px 23px 45px; }
  .login-card > p { margin-bottom: 15px; }
  .login-switch { margin-bottom: 14px; }
  .staff-login-form { gap: 12px; }
  .sidebar { display: none; }
  .app-shell { display: block; }
  .main { padding: 82px 15px 91px; }
  .mobile-topbar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; height: 66px; padding: max(10px, env(safe-area-inset-top)) 16px 8px; color: white; background: var(--navy); }
  .mobile-topbar .brand-mark { font-size: 20px; }
  .mobile-topbar .drop-logo { width: 35px; height: 35px; }
  .mobile-user { display: inline-flex; align-items: center; min-height: 42px; padding-inline: 9px; border: 0; border-radius: 8px; color: white; background: transparent; font-weight: 750; text-decoration: none; }
  .bottom-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--nav-count), minmax(0,1fr)); padding: 7px 5px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
  .bottom-nav .nav-btn { display: grid; justify-items: center; gap: 2px; min-height: 44px; padding: 5px 1px; color: var(--muted); text-align: center; font-size: 10px; }
  .bottom-nav .nav-btn.active { color: var(--brand-dark); background: var(--aqua); }
  .bottom-nav .nav-icon { font-size: 18px; }
  .bottom-nav .nav-label { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { align-items: flex-start; margin-bottom: 20px; }
  .page-title h1 { font-size: 28px; }
  .page-title p { font-size: 13px; }
  .primary-btn .desktop-label { display: none; }
  .metrics { gap: 10px; }
  .metric { padding: 15px; border-radius: 16px; }
  .metric strong { font-size: 25px; }
  .metric-top { font-size: 11px; }
  .metric-icon { width: 31px; height: 31px; font-size: 15px; }
  .toolbar { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .filter-select { flex: 1; min-width: 0; }
  .panel { border-radius: 17px; }
  .table-wrap { margin: 0; }
  th, td { padding: 13px 12px; }
  .hide-mobile { display: none; }
  .staff-table .staff-mobile-username { display: block; }
  .staff-table .staff-desktop-username { display: none; }
  .driver-actions { grid-template-columns: 1fr 1fr; }
  .driver-actions .primary-btn { grid-column: 1/-1; }
  .driver-order { padding: 14px; }
  .inventory-grid { grid-template-columns: 1fr; }
  .form-grid, .detail-grid, .proof-grid { grid-template-columns: 1fr; }
  .field.full, .detail-item.full { grid-column: auto; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal, .modal.small { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; }
  .status-actions { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric small { display: none; }
  .owner-summary { padding: 13px; }
  .owner-summary .metrics { grid-template-columns: 1fr; }
  .owner-summary .metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 11px; }
  .owner-summary .metric strong { margin-top: 0; font-size: 22px; }
  .owner-summary .metric small { display: block; grid-column: 1 / -1; }
  .owner-summary .metric-top { justify-content: flex-start; }
  .owner-summary .metric-icon { display: none; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .driver-order-top { gap: 8px; }
  .driver-order-main h3 { font-size: 17px; }
}
