/* Flow Fuel — account dashboard */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-700: #1d4ed8; --blue-600: #2563eb; --blue-500: #3b82f6; --blue-400: #60a5fa;
  --blue-50: #eff6ff; --silver-50: #f8fafc; --silver-200: #e2e8f0; --silver-300: #cbd5e1;
  --silver-400: #94a3b8; --silver-500: #64748b; --ink: #0f172a; --ink-2: #475569;
}

body { font-family: 'Inter', system-ui, sans-serif; background: var(--silver-50); color: var(--ink); line-height: 1.6; }
html, body { max-width: 100%; overflow-x: hidden; }

/* Top nav */
.acct-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--silver-200);
  position: sticky; top: 0; z-index: 10;
}
.acct-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.acct-logo img { height: 42px; display: block; }
.acct-logo-text { font-size: 1.15rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.acct-nav-right { display: flex; align-items: center; gap: 16px; }
.acct-hi { font-weight: 600; color: var(--ink-2); font-size: 0.95rem; }
.acct-admin-link { color: var(--blue-600); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.acct-admin-link:hover { text-decoration: underline; }
.acct-signout {
  background: var(--silver-50); border: 1px solid var(--silver-300); color: var(--ink-2);
  border-radius: 8px; padding: 8px 16px; min-height: 44px; font-family: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.acct-signout:hover { background: var(--silver-200); }

/* Layout */
.acct-main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }

.acct-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
/* Grid/flex children refuse to shrink below their content width unless told —
   without this, long addresses in dropdowns push panels off-screen on mobile */
.acct-layout > *, .acct-sidebar > *, .acct-content > *, .panel { min-width: 0; }
.acct-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }
.acct-content { display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
  .acct-layout { grid-template-columns: 1fr; }
  .acct-sidebar { position: static; }
  .acct-content { order: -1; }
}

.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 4px; }
.sidebar-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem;
}
.sidebar-user-info { min-width: 0; }
.sidebar-name { font-weight: 800; font-size: 1rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-email { font-size: 0.8rem; color: var(--silver-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel { background: #fff; border: 1px solid var(--silver-200); border-radius: 18px; padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.panel--primary { border: 2px solid var(--blue-500); box-shadow: 0 8px 32px rgba(37,99,235,.12); }
.panel h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.panel-sub { color: var(--silver-500); font-size: 0.9rem; margin-bottom: 20px; }
.panel-sub a { color: var(--blue-700); font-weight: 600; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.72rem; font-weight: 600; color: var(--silver-500); text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea {
  background: #fff; border: 1.5px solid var(--silver-300); border-radius: 8px; padding: 11px 13px;
  font-family: inherit; font-size: 1rem; color: var(--ink); outline: none; transition: border .2s; width: 100%;
  min-width: 0; max-width: 100%;
}
.field select { text-overflow: ellipsis; }
.field { min-width: 0; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-500); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.field legend {
  padding: 0; margin-bottom: 6px; font-size: 0.72rem; font-weight: 600; color: var(--silver-500);
  text-transform: uppercase; letter-spacing: .05em;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Buttons */
.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); color: #fff;
  border: none; border-radius: 10px; padding: 14px; font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 8px 24px rgba(29,78,216,.3); transition: all .2s; margin-top: 4px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(29,78,216,.4); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-outline {
  background: #fff; border: 1.5px solid var(--blue-500); color: var(--blue-700); border-radius: 9px;
  padding: 10px 18px; font-family: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all .2s;
}
.btn-outline:hover { background: var(--blue-50); }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; background: #fff; }

.note { font-size: 0.8rem; color: var(--silver-500); text-align: center; margin-top: 12px; }
.hint { font-size: 0.78rem; color: var(--silver-500); }

/* Item lists (addresses, vehicles) */
.item-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 13px 16px; background: var(--silver-50); border: 1px solid var(--silver-200); border-radius: 10px;
}
.item-info { min-width: 0; }
.item-title { font-weight: 700; font-size: 0.92rem; }
.item-desc { color: var(--silver-500); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Declined requests carry a reason + phone the customer must be able to read in full */
.item-desc--wrap { white-space: normal; overflow-wrap: anywhere; }
.item-tag {
  display: inline-block; margin-top: 6px; font-size: 0.68rem; font-weight: 700;
  background: var(--blue-50); color: var(--blue-700); padding: 2px 9px; border-radius: 100px;
}
.item-notes { margin-top: 5px; font-size: 0.78rem; color: var(--silver-500); font-style: italic; line-height: 1.4; overflow-wrap: break-word; }
.item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.item-remove {
  min-height: 44px; min-width: 44px;
  background: none; border: none; color: #b91c1c; cursor: pointer; font-weight: 600; font-size: 0.82rem;
  padding: 6px 10px; border-radius: 6px; flex-shrink: 0;
}
.item-remove:hover { background: rgba(239,68,68,.08); }
.item-edit {
  min-height: 44px; min-width: 44px;
  background: none; border: none; color: var(--blue-600); cursor: pointer; font-weight: 600; font-size: 0.82rem;
  padding: 6px 10px; border-radius: 6px; flex-shrink: 0;
}
.item-edit:hover { background: var(--blue-50); }
.btn-cancel-edit {
  min-height: 44px;
  background: none; border: none; color: var(--silver-500); cursor: pointer; font-weight: 600;
  font-size: 0.85rem; padding: 10px 14px; margin-left: 6px; font-family: inherit;
}
.btn-cancel-edit:hover { color: var(--ink); text-decoration: underline; }

/* Invoices */
.item-total { font-weight: 800; font-size: 0.95rem; color: var(--blue-700); margin-top: 4px; }
.invoice-chip {
  font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; white-space: nowrap;
}
.invoice-chip--unpaid { background: var(--blue-50); color: var(--blue-700); border: 1px solid #bfdbfe; }
.invoice-chip--paid { background: var(--blue-600); color: #fff; font-weight: 800; }
/* Request we couldn't fulfill — neutral grey so it doesn't read as a payment problem */
.invoice-chip--declined-order { background: #f1f5f9; color: #334155; border: 1px solid var(--silver-300); }
.btn-pay {
  background: var(--blue-600); color: #fff; border: none; border-radius: 8px;
  padding: 7px 14px; font-family: inherit; font-weight: 700; font-size: 0.8rem; cursor: pointer;
}
.btn-pay:hover { background: var(--blue-700); }
.empty { color: var(--silver-500); font-size: 0.9rem; font-style: italic; padding: 4px 0 16px; }

.add-form { border-top: 1px dashed var(--silver-300); padding-top: 18px; }

/* Order form — asset checklist (batch fueling).
   Rules are scoped under .asset-checklist so they outrank the generic
   `.field input`/`.field select` styling (this list lives inside a .field). */
.asset-checklist { display: flex; flex-direction: column; gap: 8px; }
.asset-checklist .asset-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1.5px solid var(--silver-200); border-radius: 10px;
  background: var(--silver-50); transition: border .15s, background .15s;
}
.asset-checklist .asset-pick.on { border-color: var(--blue-500); background: var(--blue-50); }
.asset-checklist .asset-main {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 0.9rem; color: var(--ink);
}
.asset-checklist .asset-check {
  width: 18px; height: 18px; flex: 0 0 auto; margin: 0; padding: 0;
  accent-color: var(--blue-600); cursor: pointer;
}
.asset-checklist .asset-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-checklist .asset-tank { font-weight: 600; font-size: 0.72rem; color: var(--ink-2); }
.asset-checklist .asset-fuel {
  flex: 0 0 auto; width: auto; max-width: 46%; background: #fff; border: 1.4px solid var(--silver-300);
  border-radius: 8px; padding: 8px 9px; font-family: inherit; font-size: 1rem; color: var(--ink);
  outline: none; min-width: 0; min-height: 40px;
}
.asset-checklist .asset-fuel:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.asset-checklist .asset-pick { min-height: 52px; }
.asset-checklist .asset-fuel:focus { border-color: var(--blue-500); }
.asset-count { margin-top: 8px; font-weight: 700; color: var(--blue-700); }
.asset-count-tier { display: block; margin-top: 2px; font-weight: 500; color: var(--ink-2); }

/* Fuel-amount tier picker — four selectable range cards on the request form;
   wraps to 2×2 on narrow screens so the ranges don't get squeezed. */
.fuel-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .fuel-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fuel-tier {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px; border: 1.5px solid var(--silver-200); border-radius: 12px;
  background: var(--silver-50); cursor: pointer; font-family: inherit;
  transition: border .15s, background .15s, box-shadow .15s;
}
.fuel-tier:hover { border-color: var(--blue-400); }
.fuel-tier.is-active {
  border-color: var(--blue-500); background: var(--blue-50);
  box-shadow: 0 2px 10px rgba(37,99,235,.12);
}
.fuel-tier-amt { font-weight: 800; font-size: 1.05rem; color: var(--ink); line-height: 1.1; }
.fuel-tier.is-active .fuel-tier-amt { color: var(--blue-700); }
.fuel-tier-unit { font-size: 0.72rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }

/* Card on file (request form). The Stripe Payment Element renders in its own
   iframe inside #cardElement. */
.card-on-file {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--silver-200); border-radius: 12px;
  background: var(--silver-50);
}
.card-on-file-text { min-width: 0; font-weight: 600; font-size: 0.9rem; color: var(--ink); overflow-wrap: anywhere; }
.card-on-file-text.missing { color: #b91c1c; }
.card-on-file-btn { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 14px; font-size: 0.85rem; }
.card-setup { margin-top: 12px; }
.card-setup #cardElement { min-height: 44px; }
.card-auth { margin: 10px 0 12px; line-height: 1.5; }
.card-setup-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-setup-actions .btn-primary { width: auto; margin-top: 0; padding: 10px 22px; }
.invoice-chip--declined { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-weight: 700; }

/* ASAP fee disclaimer on the request form — toggled by account.js. */
.asap-note {
  background: #fffbeb; border: 1px solid #fcd34d; color: #78350f;
  border-radius: 10px; padding: 12px 14px; font-size: 0.84rem; line-height: 1.5;
  margin: -4px 0 16px;
}
.asap-note.hidden { display: none; }

/* Messages */
.msg { border-radius: 10px; padding: 12px 15px; font-size: 0.88rem; margin-bottom: 16px; display: none; }
.msg.error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.msg.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.msg.info    { background: var(--blue-50); border: 1px solid #bfdbfe; color: var(--blue-700); }

/* Text-style button (e.g. "Use my current location") */
.btn-link {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  min-height: 44px; padding: 0 2px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.88rem; color: var(--blue-700);
}
.btn-link:hover { text-decoration: underline; }
.btn-link:disabled { opacity: .6; cursor: wait; }

/* Loading state shown while the profile loads (acctMain is hidden until then) */
.acct-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 64px 24px; color: var(--silver-500); font-weight: 600; font-size: 0.95rem;
}
.spinner {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: ff-spin .8s linear infinite;
}
@keyframes ff-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
body.is-native-tabs .acct-loading { color: #fff; }

/* First-run checklist */
.setup-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.setup-step {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1.5px solid var(--silver-200); border-radius: 12px; background: var(--silver-50);
}
.setup-mark {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--silver-300); background: #fff;
}
.setup-text { flex: 1; min-width: 0; font-weight: 600; font-size: 0.92rem; }
.setup-btn { min-height: 40px; padding: 8px 16px; flex-shrink: 0; }
.setup-step.done .setup-mark {
  border-color: var(--blue-600);
  background: var(--blue-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.setup-step.done .setup-text { color: var(--silver-500); text-decoration: line-through; }
.setup-step.done .setup-btn { display: none; }

/* Active (not yet invoiced) requests */
.invoice-chip--active { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.item--request { display: block; }
.req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* Received · Confirmed · On the way · Delivered */
.req-steps {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 12px 0 10px; padding: 0;
}
.req-steps li {
  min-width: 0; padding-top: 8px; border-top: 4px solid var(--silver-200);
  font-size: 0.7rem; font-weight: 600; color: var(--silver-500); line-height: 1.25; overflow-wrap: anywhere;
}
.req-steps li.is-done { border-top-color: var(--blue-600); color: var(--blue-700); }
.req-steps li.is-current { font-weight: 800; color: var(--ink); }
.req-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.req-actions.hidden { display: none; }
.req-actions .btn-outline, .req-actions .btn-danger { min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
.req-actions .btn-primary { width: auto; margin-top: 0; padding: 10px 18px; font-size: 0.9rem; box-shadow: none; }
.req-actions .btn-cancel-edit { margin-left: 0; }
.req-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--silver-200); }
.req-form .msg { margin: 10px 0 0; }
.req-form-text { font-size: 0.9rem; color: var(--ink); }
.req-fee { color: var(--ink-2); font-weight: 600; }
#activeMsg { margin-bottom: 0; }

/* Estimated total on the request form */
.order-estimate {
  background: var(--blue-50); border: 1px solid #bfdbfe; color: var(--ink-2);
  border-radius: 10px; padding: 12px 14px; margin: -4px 0 16px; font-size: 0.82rem; line-height: 1.5;
}
.order-estimate.hidden { display: none; }
.order-estimate strong { display: block; font-size: 0.95rem; color: var(--blue-700); }
.order-estimate span { display: block; }

/* Receipt lines under an invoice — a full-width row below the summary */
.item--invoice { flex-wrap: wrap; }
.item--invoice .item-info { flex: 1 1 0; }
.receipt { flex: 0 0 100%; margin-top: -4px; }
.receipt summary {
  display: inline-block; cursor: pointer; padding: 6px 0; font-size: 0.82rem; font-weight: 600; color: var(--blue-700);
}
.receipt summary:hover { text-decoration: underline; }
.receipt-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.receipt-table td { padding: 6px 0; border-top: 1px solid var(--silver-200); vertical-align: top; }
.receipt-table td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-weight: 600; }
.receipt-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.receipt-sub { display: block; color: var(--silver-500); font-size: 0.76rem; }
.receipt-total td { font-weight: 800; color: var(--ink); }

/* Undo toast */
.toast {
  /* left/right 0 + auto margins centres it without the left:50% shrink-to-fit
     squeeze that wrapped short messages onto two lines */
  position: fixed; left: 0; right: 0; margin: 0 auto; z-index: 70;
  width: max-content; max-width: calc(100% - 32px);
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 6px 6px 6px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 0.9rem; font-weight: 600;
}
.toast.hidden { display: none; }
.toast-btn {
  min-height: 44px; padding: 0 14px; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: #93c5fd; font-family: inherit; font-weight: 800; font-size: 0.9rem;
}
.toast-btn:hover { background: rgba(255,255,255,.1); }
body.is-native-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Two-step send confirmation on the invoice forms */
.send-confirm {
  background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; border-radius: 10px;
  padding: 12px 14px; font-size: 0.88rem; line-height: 1.5; margin-bottom: 10px;
}

.save-flash { color: #15803d; font-weight: 600; font-size: 0.85rem; margin-left: 12px; }
.hidden { display: none !important; }

/* Settings rows. This replaced a small grey link on the blue app backdrop that
   measured 1.06:1 — it was the only route to account deletion and was, in
   practice, invisible. Everything here sits inside a white .panel instead. */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--silver-200);
}
.setting-row:last-of-type { border-bottom: none; }
.setting-label { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.setting-value {
  font-size: 0.9rem; color: var(--ink); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.setting-link { font-size: 0.9rem; font-weight: 600; color: var(--blue-700); text-decoration: none; }
.setting-link:hover { text-decoration: underline; }

/* Anchor styled as a button (the Delete Account control is a link to
   privacy-data.html, not a form control). */
.btn-block {
  display: block; width: 100%; text-align: center; text-decoration: none;
  margin-top: 4px;
}

/* Rows that only make sense inside the native app (push permission, build
   number). Hidden on the website, revealed by the is-native-tabs class. */
.app-only { display: none; }
body.is-native-tabs .app-only { display: flex; }
/* Same idea for whole blocks, where flex would be the wrong display type. */
.app-only-block { display: none; }
body.is-native-tabs .app-only-block { display: block; }

/* Privacy & Data panel (privacy-data.html) */
.privacy-clear-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.privacy-check {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
}
.privacy-check input { width: 17px; height: 17px; accent-color: var(--blue-600); cursor: pointer; margin: 0; }

.btn-danger {
  background: #fff; border: 1.5px solid #b91c1c; color: #b91c1c; border-radius: 9px;
  padding: 10px 18px; font-family: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all .2s;
}
.btn-danger:hover { background: #fef2f2; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.danger-zone { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--silver-300); }
.danger-zone h3 { font-size: 0.95rem; font-weight: 800; color: #b91c1c; margin-bottom: 4px; }
.danger-zone .panel-sub { margin-bottom: 14px; }

/* Modal (delete-account confirmation) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  background: #fff; border-radius: 20px; padding: 32px; max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-card h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.modal-card .panel-sub { margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.modal-actions .btn-danger { flex-shrink: 0; }

/* Mandatory phone gate */
.phone-gate {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.phone-gate-card {
  background: #fff; border-radius: 20px; padding: 36px; max-width: 420px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.phone-gate-card h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.phone-gate-card .panel-sub { margin-bottom: 22px; }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .acct-main { padding: 20px 14px 60px; }
  .acct-layout { gap: 16px; }
  .acct-sidebar { gap: 16px; }
  .acct-content { gap: 16px; }
  .panel { padding: 20px 16px; border-radius: 14px; }
}

/* Narrow phones: the top bar can't fit logo + wordmark + greeting + sign-out.
   The greeting is redundant (name is in the sidebar), so drop it first. */
@media (max-width: 560px) {
  .acct-nav { padding: 12px 16px; }
  .acct-hi { display: none; }
  .acct-logo-text { font-size: 1.05rem; }
}

/* =====================================================================
   Native app only: bottom tab bar (account.html as the Capacitor shell).
   Every rule below is scoped under body.is-native-tabs, a class only
   mobile/tabs.js ever adds — the website (no such class) is unaffected.
   ===================================================================== */

/* On the website the wrappers must be layout-invisible: the sidebar/content
   columns space their children via flex gap, which only reaches direct
   children — display:contents keeps the original layout byte-for-byte. */
.tab-view { display: contents; }
body.is-native-tabs .tab-view { display: none; }
body.is-native-tabs .tab-view.tab-view--active { display: flex; flex-direction: column; gap: 20px; }

body.is-native-tabs .acct-layout { display: block; }
body.is-native-tabs .acct-sidebar { position: static; }
/* Clear the fixed tab bar. Sub-pages that use the app theme but have no tab
   bar (privacy-data.html) set --ff-no-tabbar, zeroing the 84px allowance. */
body.is-native-tabs .acct-main {
  padding-bottom: calc(84px * (1 - var(--ff-no-tabbar, 0)) + env(safe-area-inset-bottom));
}
/* Hide only the two links that point at web-only pages. This used to hide the
   whole .acct-admin-link class, which also matched privacy-data.html's
   "Back to My Account" link — that page has no tab bar, so in the app the
   deletion screen became a dead end with no way out but signing out. */
body.is-native-tabs #ordersLink,
body.is-native-tabs #invoiceLink { display: none !important; }
/* --blue-600 on the nav's blue gradient is ~1:1 — unreadable in the app. */
body.is-native-tabs .acct-admin-link { color: #fff; }
/* The Privacy & Data link stays visible in the app on purpose: App Store
   guideline 5.1.1(v) requires in-app account deletion, so privacy-data.html
   is bundled (see mobile/build.mjs) and must remain reachable. */

/* App-only brand-blue backdrop (the approved mockup): gradient behind
   everything, white cards on top. Painted on a fixed pseudo-element because
   background-attachment:fixed is unreliable in mobile WebViews. */
body.is-native-tabs { background: #1d4ed8; padding-top: 0; }
body.is-native-tabs::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(160deg, #1d4ed8 0%, #2563eb 55%, #2f6fd0 100%);
}
/* Compact header in the app. The website keeps the roomier one; in the app the
   bar sits under the notch inset as well, which made it unnecessarily tall,
   and Sign Out has moved to Settings so there is less to fit. */
body.is-native-tabs .acct-nav {
  background: linear-gradient(160deg, #1d4ed8, #2563eb);
  border-bottom: 1px solid rgba(255,255,255,.18);
  /* Must carry the notch inset itself: this selector outranks the
     `.acct-nav { padding-top: calc(14px + inset) }` rule capacitor-shim.js
     injects, so a plain `padding: 8px 16px` here would silently drop the
     inset and slide the header under the status bar. */
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
}
body.is-native-tabs .acct-logo img { height: 30px; }
body.is-native-tabs .acct-logo-text { font-size: 1rem; }
body.is-native-tabs .acct-nav-right { gap: 10px; }
body.is-native-tabs #signoutBtn { display: none; }
body.is-native-tabs .acct-logo-text { color: #fff; }
body.is-native-tabs .acct-hi { color: rgba(255,255,255,.85); }
body.is-native-tabs .acct-signout {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff;
}
body.is-native-tabs .sidebar-avatar { background: #fff; color: var(--blue-700); }
body.is-native-tabs .sidebar-name { color: #fff; }
body.is-native-tabs .sidebar-email { color: rgba(255,255,255,.92); }
/* Text that sits directly on the blue backdrop (not inside a white card) */
body.is-native-tabs .sort-wrap label { color: #fff; }
body.is-native-tabs .orders-empty,
body.is-native-tabs .orders-loading { color: #fff; }

body.is-native-tabs .tab-bar {
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--silver-200);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.tab-btn {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: var(--silver-500); font-family: inherit;
  font-size: 0.72rem; font-weight: 700; padding: 5px 2px; cursor: pointer;
}
.tab-icon { width: 24px; height: 24px; padding: 2px 14px; box-sizing: content-box; border-radius: 100px; transition: background .15s; }
.tab-btn > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-btn.active { color: var(--blue-700); }
.tab-btn.active .tab-icon { background: var(--blue-50); stroke-width: 2.3; }

/* Orders tab (ported from orders.html) */
.orders-main { max-width: 900px; margin: 0 auto; padding: 8px 4px 0; }
.orders-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.status-tab {
  min-height: 44px;
  background: #fff; border: 1.5px solid var(--silver-300); color: var(--ink-2);
  border-radius: 100px; padding: 7px 16px; font-family: inherit; font-weight: 600;
  font-size: 0.85rem; cursor: pointer; transition: all .15s;
}
.status-tab:hover { border-color: var(--blue-400); }
.status-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
/* Wraps and lets the select shrink: at 375px the label + select + Refresh
   row was 12px wider than the screen — the source of the sideways scroll on
   the admin Orders tab (masked by overflow-x:hidden on html/body). */
.sort-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.sort-wrap select { flex: 1 1 140px; min-width: 0; }
.orders-controls > * { min-width: 0; max-width: 100%; }
.order-actions .btn-outline, .order-actions .btn-primary, .prices-card .btn-primary { min-height: 44px; }
.acct-admin-link { display: inline-flex; align-items: center; min-height: 44px; }
/* Admin web headers carry extra links; drop the wordmark before they wrap */
@media (max-width: 420px) {
  body:not(.is-native-tabs) .acct-nav .acct-logo-text { display: none; }
}
.sort-wrap label { font-size: 0.78rem; font-weight: 600; color: var(--silver-500); text-transform: uppercase; letter-spacing: .05em; }
.sort-wrap select {
  min-height: 44px;
  background: #fff; border: 1.5px solid var(--silver-300); border-radius: 8px;
  padding: 8px 12px; font-family: inherit; font-size: 1rem; color: var(--ink);
}

.order-card { margin-bottom: 14px; padding: 20px 22px; }
/* App Orders tab: List | Calendar */
.orders-mode { margin-bottom: 16px; }
body.is-native-tabs #ordersCalendarView { padding: 18px 14px; }
/* The order the calendar's "Show in list" pointed at */
.order-card.order-card--focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.order-who { min-width: 0; }
.order-name { font-weight: 800; font-size: 1.02rem; }
.order-contact { font-size: 0.82rem; color: var(--silver-500); overflow-wrap: break-word; }
.order-contact a { color: var(--blue-600); text-decoration: none; }
.order-contact a:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 100px;
  padding: 4px 13px; font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.chip-new       { background: var(--blue-50);  color: var(--blue-700); border: 1px solid #bfdbfe; }
.chip-confirmed { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.chip-enroute   { background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc; font-weight: 700; }
.chip-completed { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.chip-invoiced  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.chip-declined  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-weight: 700; }
.chip-paid      { background: var(--blue-600); color: #fff; border: 1px solid var(--blue-700); font-weight: 800; }
.chip-declined-order { background: #f1f5f9; color: #334155; border: 1px solid var(--silver-300); }
/* An invoice an admin built by hand rather than a customer's request */
.chip-manual { background: #fff; color: var(--ink-2); border: 1px dashed var(--silver-400); }
.link-decline { color: #b91c1c; }
.decline-form { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; }
.decline-form select, .decline-form input { font-family: inherit; font-size: 1rem; padding: 9px 12px; border: 1.5px solid var(--silver-300); border-radius: 8px; background: #fff; width: 100%; }
.decline-form .btn-danger { background: #b91c1c; color: #fff; border: none; border-radius: 10px; padding: 10px 20px; font-family: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.decline-callout { width: 100%; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.decline-callout a { color: var(--blue-600); }
.decline-meta { font-size: 0.82rem; color: var(--silver-500); }

.order-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 10px 20px; margin: 14px 0;
  padding: 14px 16px; background: var(--silver-50); border: 1px solid var(--silver-200); border-radius: 10px;
}
.order-field-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.order-field-value { font-size: 0.9rem; font-weight: 600; overflow-wrap: break-word; }
.order-field-value.urgent { color: #b91c1c; }
.order-moved { font-size: 0.76rem; font-weight: 600; color: #92400e; margin-top: 2px; }
/* "Fuel & bill" is a link styled as a button (it opens the checklist page) */
.order-link-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; }
/* On-site fueling checklist (invoice builder, order mode) */
.ib .ib-row--skipped .asset-name { color: var(--silver-500); text-decoration: line-through; }
.ib .ib-list .ib-fields.ib-fields--skip { grid-template-columns: minmax(0, 1fr); }
.ib .ib-tally { margin-top: 10px; font-size: 0.9rem; font-weight: 700; color: var(--blue-700); }
.ib .ib-hint.ib-hint--warn { color: #b45309; font-weight: 600; }
/* Units we couldn't fuel, on the customer's receipt */
.receipt-skipped { margin-top: 8px; font-size: 0.8rem; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.order-notes { font-size: 0.82rem; color: var(--silver-500); font-style: italic; margin-top: -6px; margin-bottom: 12px; overflow-wrap: break-word; }

.order-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-actions .btn-primary { width: auto; padding: 10px 20px; font-size: 0.9rem; margin-top: 0; }
.link-action {
  min-height: 44px;
  background: none; border: none; color: var(--silver-500); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.85rem; padding: 6px 8px;
}
.link-action:hover { color: var(--ink); text-decoration: underline; }
.invoice-ref { font-size: 0.82rem; color: var(--silver-500); font-family: monospace; }

.orders-empty { text-align: center; color: var(--ink-2); padding: 48px 0; font-style: italic; }
.orders-loading { text-align: center; color: var(--silver-500); padding: 48px 0; }
.refresh-btn { margin-left: 8px; min-height: 44px; }

/* Send Invoice tab: total preview (light theme, re-themed from invoice.html) */
.total-preview {
  background: var(--blue-50); border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.total-preview span { font-size: 0.85rem; color: var(--blue-700); }
.total-preview strong { font-size: 1.25rem; color: var(--blue-700); font-weight: 800; }

/* Invoice builder (invoice-builder.js) — invoice.html and the app's Send
   Invoice tab. It always sits inside a white .panel, so none of this text is
   ever on the app's blue backdrop. Scoped under .ib so these rules outrank
   the generic `.field label` / `.field input` styling. */
.ib .ib-label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--silver-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.ib .ib-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ib .ib-label-row .ib-label { margin-bottom: 0; }
.ib .ib-hint { margin-top: -2px; color: var(--ink-2); }
.ib .ib-hint--top { margin: -2px 0 8px; }
.ib .ib-note { display: block; }
.ib .ib-search-field { margin-bottom: 10px; }
.ib .ib-results { display: flex; flex-direction: column; gap: 6px; }
.ib .ib-result {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-width: 0;
  min-height: 48px; padding: 9px 12px; text-align: left; font-family: inherit; cursor: pointer;
  background: var(--silver-50); border: 1.5px solid var(--silver-200); border-radius: 10px;
}
.ib .ib-result:hover { border-color: var(--blue-500); background: var(--blue-50); }
.ib .ib-result:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.ib .ib-result:disabled { cursor: not-allowed; opacity: .6; }
.ib .ib-result-name, .ib .ib-result-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib .ib-result-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.ib .ib-result-sub { font-size: 0.8rem; color: var(--ink-2); }
.ib .ib-empty { font-size: 0.85rem; color: var(--ink-2); padding: 4px 2px; }
.ib .ib-account {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px;
  padding: 12px 14px; background: var(--blue-50); border: 1.5px solid var(--blue-500); border-radius: 12px;
}
.ib .ib-account-main { min-width: 0; }
.ib .ib-account-name { font-weight: 800; font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
.ib .ib-account-sub { font-size: 0.82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.ib .ib-account .btn-link { flex: 0 0 auto; min-height: 36px; }
.ib .ib-inline { display: flex; gap: 8px; min-width: 0; }
.ib .ib-inline input { flex: 1 1 auto; }
.ib .ib-inline .btn-outline { flex: 0 0 auto; min-height: 44px; }
.ib .ib-saved { font-size: 0.82rem; font-weight: 600; color: #15803d; }
.ib .ib-saved--err { color: #b91c1c; }
.ib .ib-seg {
  display: grid; grid-template-columns: 1fr 1fr; padding: 3px;
  background: var(--silver-50); border: 1.5px solid var(--silver-300); border-radius: 10px;
}
.ib .ib-seg-btn {
  min-height: 40px; border: none; border-radius: 8px; background: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 0.9rem; color: var(--ink-2);
}
.ib .ib-seg-btn.on { background: #fff; color: var(--blue-700); box-shadow: 0 1px 3px rgba(15,23,42,.14); }
.ib .ib-seg-btn:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.ib .ib-list .ib-row { flex-wrap: wrap; row-gap: 8px; }
.ib .ib-list .asset-main { flex: 1 1 160px; }
.ib .ib-kind { flex: 0 0 auto; font-size: 0.72rem; font-weight: 600; color: var(--ink-2); }
.ib .ib-fields { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; min-width: 0; }
.ib .ib-fields--gal { grid-template-columns: 110px; justify-content: end; }
.ib .ib-fields--wide { flex: 1 1 0; }
.ib .ib-list select, .ib .ib-list input[type="number"], .ib .ib-list input[type="text"] {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 9px; outline: none;
  background: #fff; border: 1.4px solid var(--silver-300); border-radius: 8px;
  font-family: inherit; font-size: 1rem; color: var(--ink); text-overflow: ellipsis;
}
.ib .ib-list select:focus, .ib .ib-list input:focus { border-color: var(--blue-500); }
.ib .ib-list select:focus-visible, .ib .ib-list input:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.ib .ib-list .ib-name { flex: 1 1 100%; }
.ib .ib-row-foot { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ib .ib-save, .ib .ib-check-row {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  text-transform: none; letter-spacing: 0;
}
.ib .ib-save { min-height: 40px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.ib .ib-check-row { display: flex; min-height: 44px; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.ib .ib-save input, .ib .ib-check-row input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--blue-600); }
.ib .ib-charge-hint { margin: -6px 0 14px; }
.ib .ib-remove { min-height: 36px; color: #b91c1c; }
.ib .ib-actions { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px; }
.ib .ib-inline-link { display: inline; min-height: 0; padding: 0; font-size: inherit; }

/* Admin fuel-prices card: collapsed by default so the orders stay on screen */
.prices-card > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  min-height: 44px; font-weight: 800; font-size: 1rem;
}
.prices-card > summary::-webkit-details-marker { display: none; }
.prices-card > summary::after {
  content: ''; margin-left: auto; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--silver-500); border-bottom: 2px solid var(--silver-500);
  transform: rotate(45deg); transition: transform .15s;
}
.prices-card[open] > summary::after { transform: rotate(-135deg); }
.prices-card .pc-summary { font-weight: 600; font-size: 0.85rem; color: var(--ink-2); }
.prices-card[open] > summary { margin-bottom: 8px; }
.prices-card .pc-offered {
  display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 2px 0 0;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.prices-card .pc-offered input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue-600); }
.prices-card .pc-off > label:first-child, .prices-card .pc-off input[type="number"] { opacity: 0.5; }

/* ---------- Fleet setup: saved sets, checklist tools, bulk add ---------- */
.site-notes { margin-top: 6px; overflow-wrap: break-word; }
.set-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.set-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px;
  padding: 8px 12px; border: 1.5px solid var(--silver-300); border-radius: 999px; background: #fff;
  font-family: inherit; font-size: 0.88rem; font-weight: 700; color: var(--ink); cursor: pointer;
}
.set-chip:hover { border-color: var(--blue-400); }
.set-chip:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.set-chip.is-active { border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-700); }
.set-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-chip-n {
  flex: 0 0 auto; min-width: 24px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--silver-200); color: var(--ink-2); font-size: 0.75rem; font-weight: 700;
}
.set-chip.is-active .set-chip-n { background: var(--blue-600); color: #fff; }
.field .asset-tools { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.field .asset-tools input[type="search"] { flex: 1 1 160px; width: auto; min-width: 0; min-height: 44px; }
.field .asset-tools .btn-link { flex: 0 0 auto; min-height: 44px; margin-top: 0; }
.asset-checklist.asset-checklist--long {
  max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px;
  border-top: 1px solid var(--silver-200); border-bottom: 1px solid var(--silver-200); padding-top: 8px; padding-bottom: 8px;
}
.asset-checklist .asset-pick.is-filtered { display: none; }
.asset-count-over { color: #b91c1c; font-weight: 700; }
.set-save { margin-top: 4px; }
.set-save .btn-link { min-height: 44px; margin-top: 0; }
.field .set-save-form { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 8px; }
.field .set-save-form input[type="text"] { flex: 1 1 180px; width: auto; min-width: 0; }
.field .set-save-form .btn-outline { flex: 0 0 auto; width: auto; margin-top: 0; }
.field .set-save-form .btn-cancel-edit { margin-left: 0; }
.bulk-toggle { margin-top: 12px; min-height: 44px; }
.bulk-form { margin-top: 14px; }
.bulk-preview { margin-bottom: 12px; color: var(--ink-2); font-weight: 600; }
.bulk-preview:empty { display: none; }
/* Order cards: a long unit list folds away; site notes stand out for the driver */
.order-units > summary { cursor: pointer; }
.order-units > .order-field-value { margin-top: 6px; }
.order-site-notes { font-size: 0.86rem; color: var(--ink); background: var(--blue-50); border-left: 3px solid var(--blue-500); padding: 8px 10px; border-radius: 6px; margin-bottom: 12px; overflow-wrap: break-word; }

/* ---------- Standing orders ---------- */
.item.item--standing { flex-wrap: wrap; }
.item--standing .item-info { flex: 1 1 220px; }
.item--standing.is-paused .item-title, .item--standing.is-paused .item-desc { color: var(--silver-500); }
.item--standing .standing-state { color: var(--blue-700); font-weight: 600; }
.item--standing.is-paused .standing-state { color: var(--silver-500); }
.standing-form { margin-top: 16px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.day-pick {
  flex: 1 0 44px; min-height: 44px; padding: 6px 4px; border: 1.5px solid var(--silver-300); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.day-pick:hover { border-color: var(--blue-400); }
.day-pick:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.day-pick.is-on { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.standing-next { margin-bottom: 12px; color: var(--ink-2); font-weight: 600; }
.standing-next:empty { display: none; }
.chip-standing { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-400); }
.item--standing .item-actions { flex: 1 0 100%; flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px 10px; flex-wrap: wrap; }

/* ---------- Account type (individual / business) ---------- */
.type-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#typePanel .type-picks { margin-bottom: 16px; }
.type-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--silver-300); border-radius: 12px;
  background: #fff; font-family: inherit; color: var(--ink-2); cursor: pointer;
}
.type-pick strong { font-size: 0.95rem; font-weight: 800; }
.type-pick span { font-size: 0.8rem; color: var(--silver-500); }
.type-pick:hover { border-color: var(--blue-400); }
.type-pick:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.type-pick.is-on { border-color: var(--blue-600); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-600); }

/* Individual accounts: no fleet tools (account.js applyFleetVisibility). */
body.acct-individual #bulkToggle,
body.acct-individual #bulkForm,
body.acct-individual.acct-no-sets #setSaveOpen,
body.acct-individual.acct-no-sets #setSaveForm,
body.acct-individual.acct-no-standing #standingPanel { display: none !important; }

/* ---------- Business accounts: quote first, no posted fees ---------- */
.biz-only { display: none; }
body.acct-business .biz-only { display: block; }
body.acct-business .indiv-only,
body.acct-business #asapNote { display: none !important; }
#quotePanel { display: none; }
body.acct-quote-needed #quotePanel { display: block; }
body.acct-quote-needed #requestPanel,
body.acct-quote-needed #setupPanel,
body.acct-quote-needed #standingPanel { display: none !important; }
.quote-call { display: inline-block; text-decoration: none; margin-bottom: 18px; }
.quote-sent { background: var(--blue-50); border: 1px solid var(--blue-400); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.quote-sent p { color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.quote-fuels { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.quote-fuels label { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 0.95rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-2); cursor: pointer; }
.quote-fuels input { width: 18px; height: 18px; }
.invoice-chip--processing { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ---------- Statements ---------- */
.stmt-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stmt-stat { background: var(--silver-50); border: 1px solid var(--silver-200); border-radius: 12px; padding: 10px 12px; }
.stmt-stat span { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--silver-500); }
.stmt-stat strong { font-size: 1.05rem; font-weight: 800; color: var(--ink-2); }
.stmt-scroll { overflow-x: auto; margin-bottom: 16px; }
.stmt-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.stmt-table caption { text-align: left; font-weight: 800; color: var(--ink-2); padding: 4px 0 8px; }
.stmt-table th, .stmt-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--silver-200); vertical-align: top; }
.stmt-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--silver-500); white-space: nowrap; }
.stmt-table .num { text-align: right; white-space: nowrap; }
.stmt-table th:last-child, .stmt-table td:last-child { padding-right: 0; }
.stmt-table tfoot td { font-weight: 800; border-bottom: 0; }
.stmt-actions { display: flex; flex-wrap: wrap; gap: 10px; }
body.is-native-tabs .stmt-actions { display: none; }
@media print {
  body.printing-statement * { visibility: hidden !important; }
  body.printing-statement #statementPanel, body.printing-statement #statementPanel * { visibility: visible !important; }
  body.printing-statement #statementPanel { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; }
  body.printing-statement .stmt-actions, body.printing-statement #statementPanel .field, body.printing-statement #statementPanel .hint { display: none !important; }
  body.printing-statement .stmt-scroll { overflow: visible; }
}

/* ---------- Invoice form: business pricing ---------- */
.ib .ib-biz { border: 1.5px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ib .ib-biz--ok { border-color: #bbf7d0; background: #f0fdf4; }
.ib .ib-biz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ib .ib-biz-state { font-size: 0.78rem; font-weight: 800; color: #92400e; }
.ib .ib-biz--ok .ib-biz-state { color: #15803d; }
.ib .ib-biz-quote { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 12px; overflow-wrap: anywhere; }
.ib .ib-biz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.ib .ib-biz textarea { width: 100%; }
.ib .ib-result-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 0.7rem; font-weight: 800; vertical-align: middle; }
.chip-processing { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* =====================================================================
   UX pass, Nov 14 2026
   ===================================================================== */

/* Phone-width website: links to the four sections of one long page. */
.jump-nav { display: none; }
@media (max-width: 900px) {
  body:not(.is-native-tabs) .jump-nav {
    display: flex; gap: 6px; position: sticky; top: 70px; z-index: 9;
    padding: 8px 14px; background: rgba(248, 250, 252, .97); border-bottom: 1px solid var(--silver-200);
    overflow-x: auto; scrollbar-width: none;
  }
  .jump-nav a {
    flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
    padding: 6px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--silver-300);
    color: var(--ink-2); font-weight: 700; font-size: 0.85rem; text-decoration: none;
  }
  .jump-nav a:hover, .jump-nav a:focus-visible { border-color: var(--blue-500); color: var(--blue-700); }
  #deliveryTop, #invoicesPanel, #garageTop, #contactPanel { scroll-margin-top: 136px; }
}
@media (max-width: 560px) { body:not(.is-native-tabs) .jump-nav { top: 66px; } }

/* A new account sees the setup steps on their own, not an empty order form. */
body.acct-not-ready #requestPanel,
body.acct-not-ready #standingPanel { display: none !important; }

/* Active requests beyond the first few fold away. */
.active-more { align-self: flex-start; min-height: 44px; }

/* Saved lists stay a manageable height however big the fleet is. */
#addressList, #vehicleList, #equipmentList, #setsList {
  max-height: 440px; overflow-y: auto; overscroll-behavior: contain;
}

@media (max-width: 560px) {
  /* Request form: a unit's fuel menu shows once it is checked, on its own
     line, so names aren't cut short by fourteen dropdowns. */
  /* flex-shrink: the long list is a fixed-height flex column, which would
     otherwise squash a row that grows to two lines. */
  #assetChecklist .asset-pick { flex-wrap: wrap; flex-shrink: 0; }
  #assetChecklist .asset-pick:not(.on) .asset-fuel { display: none; }
  #assetChecklist .asset-pick.on .asset-fuel { flex: 1 0 100%; max-width: none; }
  #assetChecklist .asset-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; }

  /* Driver's order card: short facts sit two across; the address gets a full row. */
  .order-card { padding: 16px; }
  .order-grid { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .order-grid > div:first-child { grid-column: 1 / -1; }

  /* Admin headers carry several links: keep each on one line. */
  .acct-nav-right { gap: 12px; }
  .acct-admin-link { font-size: 0.84rem; white-space: nowrap; }
  .acct-signout { padding: 8px 12px; white-space: nowrap; }

  .stmt-table { font-size: 0.8rem; }
  .stmt-table th, .stmt-table td { padding-right: 8px; }
}

/* =====================================================================
   Business pricing + Accounts screen, Nov 14 2026
   ===================================================================== */

/* Admin pages: one row of links under the top bar (website only). */
.admin-nav {
  display: flex; justify-content: center; gap: 6px; position: sticky; top: 70px; z-index: 9;
  padding: 8px 10px; background: rgba(248, 250, 252, .97); border-bottom: 1px solid var(--silver-200);
  overflow-x: auto; scrollbar-width: none;
}
.admin-nav a {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--silver-300);
  color: var(--ink-2); font-weight: 700; font-size: 0.85rem; text-decoration: none; white-space: nowrap;
}
.admin-nav a:hover, .admin-nav a:focus-visible { border-color: var(--blue-500); color: var(--blue-700); }
.admin-nav a[aria-current="page"] { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
body.is-native-tabs .admin-nav { display: none; }
@media (max-width: 560px) {
  .admin-nav { top: 66px; justify-content: flex-start; }
  .admin-nav { gap: 5px; padding: 8px; }
  .admin-nav a { padding: 6px 8px; font-size: 0.8rem; }
}
/* Six links (Calendar was added) have to fit a 375px phone without scrolling. */
@media (max-width: 420px) {
  .admin-nav { gap: 3px; padding: 8px 5px; }
  .admin-nav a { padding: 6px 5px; font-size: 0.75rem; }
}

/* A price or fee box: "$" inside the left edge. */
.ib .ib-price { position: relative; display: block; min-width: 0; margin: 0; }
.ib .ib-price > span {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--silver-500); font-weight: 600; font-size: 0.9rem; text-transform: none; letter-spacing: 0;
}
.ib .ib-price input { width: 100%; padding-left: 22px !important; }
/* Business invoices: fuel · price · gallons on each line. */
.ib.ib--priced .ib-fields { grid-template-columns: minmax(0, 1fr) 86px 78px; }
.ib.ib--priced .ib-fields.ib-fields--gal { grid-template-columns: 86px 86px; }

.ib .ib-biz--compact { padding: 12px 14px; }
.ib .ib-biz--compact .ib-biz-quote { margin-bottom: 6px; }
.ib .ib-biz--plain { border-color: var(--silver-200); background: var(--silver-50); }
.ib .ib-biz--plain .ib-biz-state { color: var(--ink-2); }
.ib .ib-biz-link { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }

/* Accounts screen */
.aa .aa-waiting { display: block; margin-bottom: 16px; }
.aa .aa-back { min-height: 44px; margin-bottom: 6px; }
.aa .aa-bill { display: inline-flex; align-items: center; text-decoration: none; }
.aa .aa-tag--ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.aa .aa-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(15, 23, 42, .08); }
.aa .aa-row:last-child { border-bottom: 0; }
.aa .aa-row-name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 0.9rem; overflow-wrap: anywhere; }
.aa .aa-row-name small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--silver-500); }
.aa .aa-row .ib-price { flex: 0 0 112px; }
.aa .ib-biz .btn-primary.aa-save { width: auto; margin-top: 0; padding: 10px 20px; font-size: 0.9rem; }
.aa .ib-account { align-items: flex-start; }
.aa .ib-account-sub a { color: var(--blue-600); text-decoration: none; }

/* A business's own pricing, shown to the customer. */
.biz-pricing { background: var(--blue-50); border: 1px solid #bfdbfe; border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: 0.9rem; color: var(--ink-2); }
.biz-pricing strong { display: block; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.biz-pricing ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 4px; }
.biz-pricing li { font-weight: 700; }
.biz-pricing span { display: block; font-size: 0.82rem; color: var(--silver-500); }
.item-fee { font-weight: 700; color: var(--blue-700); white-space: normal; }
.item-fee--pending { color: #92400e; }

/* App tab bar: a count on a tab (new orders, quote requests waiting). */
.tab-btn { position: relative; }
.tab-badge {
  position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.68rem; font-weight: 800;
  line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* ---------- Calendar (schedule-admin.js: calendar.html + the app's Orders tab) ----------
   Always sits inside a white .panel, so nothing here lands on the app's blue backdrop. */
.sc { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.sc-nav { display: flex; align-items: center; gap: 6px; }
.sc-arrow {
  width: 44px; height: 44px; border: 1.5px solid var(--silver-300); border-radius: 10px; background: #fff;
  font-family: inherit; font-size: 1.5rem; line-height: 1; color: var(--ink-2); cursor: pointer;
}
.sc-arrow:hover { border-color: var(--blue-400); color: var(--blue-700); }
.sc-arrow:focus-visible, .sc-ev-head:focus-visible, .sc-pill:focus-visible, .sc-cell:focus-visible,
.sc-strip-day:focus-visible, .sc-col-head:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.sc .sc-today { min-height: 44px; }
.sc .sc-seg { grid-template-columns: repeat(3, 1fr); flex: 0 1 260px; min-width: 200px; }
.sc-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.sc-tools { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.sc-tools .btn-outline, .sc-bar > .btn-outline { min-height: 44px; }
.sc-totals { font-size: 0.9rem; font-weight: 700; color: var(--blue-700); }
.sc-key { display: inline-block; width: 18px; height: 10px; margin-right: 4px; vertical-align: middle; border: 1.5px dashed var(--blue-500); border-radius: 3px; }

/* Day view: the week across the top, then the day's stops in time order */
.sc-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sc-strip-day {
  display: flex; flex-direction: column; align-items: center; min-height: 62px; padding: 6px 2px;
  border: 1.5px solid var(--silver-200); border-radius: 10px; background: #fff; cursor: pointer;
  font-family: inherit; color: var(--ink-2);
}
.sc-strip-day span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.sc-strip-day strong { font-size: 1rem; line-height: 1.3; color: var(--ink); }
.sc-strip-day em { min-height: 1.1em; font-style: normal; font-size: 0.7rem; font-weight: 800; color: var(--blue-700); }
.sc-strip-day.is-today { border-color: var(--blue-500); }
.sc-strip-day.on { background: var(--blue-600); border-color: var(--blue-600); }
.sc-strip-day.on span, .sc-strip-day.on strong, .sc-strip-day.on em { color: #fff; }

.sc-list { display: flex; flex-direction: column; gap: 8px; }
.sc-ev { border: 1.5px solid var(--silver-200); border-left: 4px solid var(--blue-600); border-radius: 12px; background: #fff; min-width: 0; }
.sc-ev--repeat { border-style: dashed; border-color: var(--blue-400); border-left-style: dashed; background: var(--silver-50); }
.sc-ev--done { border-left-color: var(--silver-400); }
.sc-ev--clash { border-left-color: #d97706; }
.sc-ev--skipped { border-color: var(--silver-300); }
.sc-ev--skipped .sc-ev-who { text-decoration: line-through; color: var(--silver-500); }
.sc-ev-head {
  display: flex; align-items: flex-start; gap: 6px 12px; width: 100%; min-height: 56px; padding: 10px 12px;
  background: none; border: none; text-align: left; cursor: pointer; font-family: inherit; color: inherit; border-radius: 10px;
}
.sc-ev-time { flex: 0 0 76px; font-weight: 800; font-size: 0.9rem; color: var(--ink); }
.sc-ev-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.sc-ev-who { font-weight: 700; font-size: 0.92rem; color: var(--ink); overflow-wrap: anywhere; }
.sc-ev-where, .sc-ev-meta { font-size: 0.82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.sc-ev--clash .sc-ev-meta { color: #b45309; font-weight: 600; }
.sc-ev .chip { flex: 0 0 auto; }
.sc-detail { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px 100px; font-size: 0.88rem; color: var(--ink); min-width: 0; }
.sc-detail-line { overflow-wrap: anywhere; }
.sc-detail-line.hint { color: var(--ink-2); }
.sc-detail a:not(.btn-outline):not(.link-action) { color: var(--blue-700); font-weight: 600; }
.sc-units { color: var(--ink-2); }
.sc-actions { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 4px; }
.sc-actions .btn-primary { width: auto; min-height: 44px; margin-top: 0; padding: 10px 18px; font-size: 0.9rem; }
.sc-actions .btn-outline { min-height: 44px; }
.sc-link-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.sc-move { border-top: 1px solid var(--silver-200); padding-top: 10px; }
.sc-move-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.sc .sc-warn { min-height: 1.2em; margin: 0 0 6px; color: #b45309; font-weight: 600; }

/* Week view: a column a day; stacked into a list on a phone */
.sc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: start; }
.sc-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 130px; padding: 6px; border: 1px solid var(--silver-200); border-radius: 10px; background: var(--silver-50); }
.sc-col.is-today { border-color: var(--blue-500); background: var(--blue-50); }
.sc-col-head {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 44px; padding: 2px 4px;
  background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; border-radius: 6px;
}
.sc-col-head span { font-weight: 800; font-size: 0.85rem; color: var(--ink); }
.sc-col-head em { font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--ink-2); }
.sc-pill {
  display: flex; flex-direction: column; width: 100%; min-width: 0; min-height: 44px; padding: 5px 7px; text-align: left;
  border: 1.5px solid #bfdbfe; border-left: 3px solid var(--blue-600); border-radius: 8px; background: #fff;
  cursor: pointer; font-family: inherit;
}
.sc-pill--repeat { border-style: dashed; border-color: var(--blue-400); }
.sc-pill--done { border-color: var(--silver-200); border-left-color: var(--silver-400); }
.sc-pill--clash { border-left-color: #d97706; }
.sc-pill--skipped .sc-pill-who { text-decoration: line-through; color: var(--silver-500); }
.sc-pill-time { font-size: 0.72rem; font-weight: 800; color: var(--blue-700); }
.sc-pill-who { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; font-weight: 600; color: var(--ink); }
.sc-pill-meta { font-size: 0.7rem; color: var(--ink-2); }
.sc-none { padding: 2px 4px; font-size: 0.8rem; color: var(--silver-500); }

/* Month view: a count per day; tap a day to open it */
.sc-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sc-month-head { padding: 2px 0; text-align: center; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.sc-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; min-height: 78px; padding: 6px; overflow: hidden;
  border: 1px solid var(--silver-200); border-radius: 8px; background: #fff; cursor: pointer; font-family: inherit; text-align: left;
}
.sc-cell:hover, .sc-strip-day:hover, .sc-pill:hover { border-color: var(--blue-500); }
.sc-cell.is-out { background: var(--silver-50); }
.sc-cell.is-out .sc-cell-num { color: var(--silver-500); font-weight: 500; }
.sc-cell.is-today { border: 2px solid var(--blue-500); }
.sc-cell-num { font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.sc-cell-count { font-size: 0.95rem; font-weight: 800; color: var(--blue-700); }
.sc-cell-count small { font-size: 0.7rem; font-weight: 600; }
.sc-cell.has-clash .sc-cell-count { color: #b45309; }
.sc-cell-sub { font-size: 0.68rem; font-weight: 600; color: var(--ink-2); }

/* Repeating list and the "+ Schedule" form */
.sc-group { margin-bottom: 6px; }
.sc-group-name { margin-bottom: 6px; font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.sc-group .item { margin-bottom: 8px; }
.sc .standing-state.sc-broken { color: #b91c1c; }
.sc-ask { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.sc-picks { max-height: 260px; overflow: auto; padding: 2px 10px; border: 1.5px solid var(--silver-300); border-radius: 10px; }
.sc .field > input + select, .sc .field > select + input { margin-top: 2px; }

@media (max-width: 760px) {
  .sc-week { grid-template-columns: minmax(0, 1fr); }
  .sc-col { min-height: 0; }
  .sc-col-head { flex-direction: row; align-items: baseline; gap: 8px; }
  .sc-pill { flex-direction: row; align-items: center; gap: 8px; }
  .sc-pill-who { flex: 1 1 0; }
}
@media (max-width: 560px) {
  .sc .sc-seg { flex: 1 1 100%; }
  .sc-ev-head { flex-wrap: wrap; }
  .sc-ev-time { flex: 0 0 auto; order: 1; }
  .sc-ev .chip { order: 2; margin-left: auto; }
  .sc-ev-main { order: 3; flex: 1 1 100%; }
  .sc-detail { padding-left: 12px; }
  .sc-cell { align-items: center; min-height: 58px; padding: 4px 2px; }
  .sc-cell-count small, .sc-cell-sub { display: none; }
}

/* Account type once chosen: read-only, only an admin can change it. */
.type-locked { margin: 0; font-size: 0.9rem; color: var(--silver-500); }
.type-locked strong { display: block; font-size: 0.95rem; font-weight: 800; color: var(--ink); }
.aa .aa-type-change { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--silver-300); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.aa .aa-type-change .hint { flex-basis: 100%; margin: 0; }
