:root {
  --ink: #0d1b2a;
  --ink-soft: #23364d;
  --muted: #64748b;
  --paper: #f4f6f8;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-soft: #ccfbf1;
  --orange: #f97316;
  --orange-soft: #ffedd5;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --green: #15803d;
  --green-soft: #dcfce7;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --shadow: 0 1px 2px rgba(13, 27, 42, 0.05), 0 12px 32px -18px rgba(13, 27, 42, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans", "Noto Sans Tamil", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
}

[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono {
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 0.93em;
  letter-spacing: 0.01em;
}
.small { font-size: 0.85em; }
.muted { color: var(--muted); display: block; }
.hint { color: var(--muted); font-size: 0.86rem; margin: 0.35rem 0 0; }
.label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; display: block; }

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
  padding: 0.7rem clamp(1rem, 4vw, 2.75rem);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  border-bottom: 3px solid var(--orange);
}
.brand-text { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 1.05rem; }
.tag {
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: var(--orange-soft);
  color: #9a3412;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}
.topbar-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.topbar select {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 0.38rem 0.55rem;
  color: var(--ink-soft);
}
.server-clock {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 0.2rem 0.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
}
.user-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}
.user-chip strong { font-size: 0.82rem; }
.user-chip span { font-size: 0.7rem; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.app {
  width: min(1180px, 100% - 2rem);
  margin: 0 auto;
  padding: 1.6rem 0 4rem;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.page-head h1 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); letter-spacing: -0.02em; margin: 0; }
.page-head p { margin: 0.3rem 0 0; color: var(--muted); max-width: 60ch; }
.head-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.2vw, 1.5rem);
}
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr); gap: 1rem; align-items: start; }
.result-split { grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.85fr); }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.15rem 0 0.8rem;
  flex-wrap: wrap;
}
.section-head.tight { margin: 1.2rem 0 0.5rem; align-items: baseline; }
.section-head h2, .section-head h3 { margin: 0; font-size: 1.02rem; letter-spacing: -0.01em; }
.section-head h3 { font-size: 0.95rem; }
.button-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.62rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: #f8fafc; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.secondary { background: var(--teal-soft); border-color: #99f6e4; color: var(--teal-dark); }
.btn.secondary:hover { background: #99f6e4; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { background: #166534; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #991b1b; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn.ghost:hover { background: #fff; }
.btn.small { padding: 0.38rem 0.7rem; font-size: 0.8rem; border-radius: 8px; }
.btn.block { width: 100%; margin-top: 0.5rem; }
.btn.busy { opacity: 0.55; cursor: progress; }
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 0.9rem;
}
.icon-button:hover { color: var(--ink); background: #f8fafc; }

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.8fr);
  gap: 1.4rem;
  min-height: calc(100vh - 160px);
  align-items: center;
  padding: 1.5rem 0;
}
.login-copy {
  position: relative;
  background: radial-gradient(circle at 15% 15%, #21445e 0%, var(--ink) 55%, #07121e 100%);
  color: #f8fafc;
  border-radius: 28px;
  padding: clamp(1.6rem, 4vw, 3rem);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-copy::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35), transparent 70%);
}
.eyebrow { margin: 0 0 0.8rem; font-size: 0.7rem; letter-spacing: 0.16em; color: #fdba74; font-weight: 700; }
.login-copy h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.06; letter-spacing: -0.035em; margin: 0 0 1rem; max-width: 14ch; }
.login-copy .lede { color: #cbd5e1; font-size: 1.02rem; max-width: 46ch; margin: 0 0 2rem; }
.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  max-width: 52ch;
}
.demo-note p { margin: 0; color: #cbd5e1; font-size: 0.82rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18); flex: none; margin-top: 0.4rem; }
.login-card { padding: 1.6rem; }
.login-card h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.account-list { display: flex; flex-direction: column; gap: 0.55rem; }
.account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.account:hover { border-color: var(--teal); box-shadow: 0 8px 20px -16px rgba(15, 118, 110, 0.5); }
.account-main { display: flex; flex-direction: column; line-height: 1.3; }
.account-main strong { font-size: 0.92rem; }
.account-main span { color: var(--muted); font-size: 0.78rem; }
.login-card .hint { margin-top: 1rem; }

/* ------------------------------------------------------------------ */
/* Stepper                                                             */
/* ------------------------------------------------------------------ */
.stepper {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0 0 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
}
.stepper li.active { background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }
.stepper li.done { color: var(--green); }
.step-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.72rem;
  flex: none;
}
.stepper li.active .step-number { background: var(--teal); border-color: var(--teal); color: #fff; }
.stepper li.done .step-number { background: var(--green-soft); border-color: #86efac; color: var(--green); }
.step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Draft                                                               */
/* ------------------------------------------------------------------ */
.pickup-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  border: 1px dashed var(--line-strong);
  background: #f8fafc;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.pickup-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--orange-soft);
  color: #9a3412;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex: none;
}
.pickup-card strong { display: block; font-size: 0.95rem; }
.line-list { display: flex; flex-direction: column; gap: 0.8rem; }
.line-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem 1rem;
  background: #fff;
  transition: border-color 0.15s;
}
.line-card:focus-within { border-color: #94a3b8; }
.line-card.invalid { border-color: #fca5a5; background: #fffafa; }
.line-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.7rem; }
.line-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.check input { accent-color: var(--teal); width: 16px; height: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem 0.7rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field > span { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.field.wide { grid-column: span 3; }
.place-field { position: relative; }
.pickup-search-field { margin-block: 1rem; }
.place-search-hint { margin-top: -0.05rem; }
.place-suggestions { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 0.3rem; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 28px rgba(15,23,42,0.16); overflow: hidden; }
.place-suggestion { display: flex; flex-direction: column; gap: 0.1rem; width: 100%; padding: 0.65rem 0.8rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.place-suggestion:last-child { border-bottom: 0; }
.place-suggestion:hover, .place-suggestion:focus { background: #eff6ff; }
.place-suggestion strong { font-size: 0.86rem; }
.place-suggestion span { color: var(--muted); font-size: 0.76rem; }
.place-empty { margin: 0; padding: 0.7rem 0.8rem; color: var(--muted); font-size: 0.8rem; }
.place-pin-preview { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.5rem; padding: 0.55rem 0.65rem; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; }
.place-pin-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2458ff; color: #fff; font-size: 0.7rem; box-shadow: 0 3px 8px rgba(36,88,255,0.35); }
.place-pin-preview div { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.place-pin-preview strong { font-size: 0.8rem; }
.draft-map-panel { min-width: 0; margin-top: 1rem; }
.draft-map-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.draft-map-toolbar h3 { margin: 0; }
.draft-map-actions:not([hidden]) { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.draft-map-actions button { min-height: 44px; }
.draft-map { height: clamp(320px, 52vh, 480px); border: 1px solid var(--line); border-radius: 12px; }
.draft-map-panel[data-expanded] .draft-map { height: max(360px, 76vh); }
@media (min-width: 1000px) {
  .draft-location-layout:has(.draft-map-panel:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.25rem;
    align-items: start;
  }
  .draft-map-panel { position: sticky; top: 5.5rem; }
  .draft-location-layout:has(.draft-map-panel[data-expanded]:not([hidden])) { grid-template-columns: 1fr; }
  .draft-map-panel[data-expanded] { position: static; grid-row: 1; }
}
.place-pin-preview span { color: var(--muted); font-size: 0.72rem; }
.field.full { grid-column: 1 / -1; }
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0.5rem 0.6rem;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-size: 0.88rem;
}
.field input:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.field input:disabled, .field select:disabled { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.icon-button:disabled { opacity: 0.4; cursor: not-allowed; }
.reason-list { margin: 0.65rem 0 0; padding-left: 1.1rem; color: var(--red); font-size: 0.82rem; }
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.selection-summary { color: var(--muted); font-size: 0.86rem; }

/* ------------------------------------------------------------------ */
/* Pills and banners                                                   */
/* ------------------------------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill.ok, .status-confirmed, .status-paid, .status-refunded, .status-succeeded, .status-consumed {
  background: var(--green-soft); color: var(--green); border-color: #bbf7d0;
}
.pill.warn, .status-pending_payment, .status-replacement_required, .status-refund_pending,
.status-processing, .status-refund_processing, .status-active, .status-review {
  background: var(--amber-soft); color: var(--amber); border-color: #fde68a;
}
.pill.danger, .status-payment_failed, .status-failed, .status-expired {
  background: var(--red-soft); color: var(--red); border-color: #fecaca;
}
.pill.info, .status-pending { background: var(--blue-soft); color: var(--blue); border-color: #bfdbfe; }
.status-released { background: #f1f5f9; color: var(--muted); border-color: var(--line); }
.pill.role-owner { background: var(--ink); color: #fff; }
.pill.role-staff { background: #f1f5f9; color: var(--ink-soft); }
.badge.test { background: var(--orange-soft); color: #9a3412; border-radius: 6px; padding: 0.05rem 0.35rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; }

.banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: #fff;
}
.banner h2 { margin: 0; font-size: 1.05rem; }
.banner p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.88rem; max-width: 90ch; }
.banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.banner-ok { background: var(--green-soft); border-color: #bbf7d0; }
.banner-ok .banner-icon { background: var(--green); color: #fff; }
.banner-warn { background: var(--amber-soft); border-color: #fde68a; }
.banner-warn .banner-icon { background: var(--amber); color: #fff; }
.banner-danger { background: var(--red-soft); border-color: #fecaca; }
.banner-danger .banner-icon { background: var(--red); color: #fff; }
.banner-info { background: var(--blue-soft); border-color: #bfdbfe; }
.banner-info .banner-icon { background: var(--blue); color: #fff; }

/* ------------------------------------------------------------------ */
/* Slots                                                               */
/* ------------------------------------------------------------------ */
.slot-list { display: flex; flex-direction: column; gap: 0.6rem; }
.slot-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.slot-card:hover:not(.disabled) { border-color: #94a3b8; }
.slot-card.selected { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.slot-card.disabled { opacity: 0.55; cursor: not-allowed; background: #f8fafc; }
.slot-date { display: flex; flex-direction: column; min-width: 0; }
.slot-date strong { font-size: 0.95rem; }
.slot-date span { color: var(--muted); font-size: 0.76rem; }
.slot-capacity { width: min(260px, 45%); display: flex; flex-direction: column; gap: 0.35rem; }
.capacity-head { display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }
.capacity-head strong { color: var(--ink); }
.meter { height: 5px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.quote-card { position: sticky; top: 84px; }
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.quote-head h2 { margin: 0; font-size: 1.05rem; }
.quote-slot { margin-top: 0.8rem; padding: 0.75rem 0.85rem; background: #f8fafc; border-radius: 11px; display: flex; flex-direction: column; }
.quote-lines { display: flex; flex-direction: column; margin-top: 0.6rem; }
.quote-line { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); font-size: 0.85rem; }
.quote-line:last-child { border-bottom: 0; }
.quote-line strong { display: block; font-size: 0.87rem; }
.quote-breakdown { display: block; font-size: 0.7rem; color: var(--muted); }
.totals { margin: 0.4rem 0 0; }
.totals > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.28rem 0; font-size: 0.82rem; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 0.35rem; padding-top: 0.55rem; font-size: 1rem; }
.totals .grand dt { color: var(--ink); font-weight: 700; }
.totals .grand dd { font-size: 1.25rem; color: var(--teal-dark); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.countdown.expired { color: var(--red); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.quote-actions { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; }

/* ------------------------------------------------------------------ */
/* Result                                                              */
/* ------------------------------------------------------------------ */
.reference-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.copy-row { display: flex; align-items: center; gap: 0.45rem; }
.copy-row strong { font-size: 1.1rem; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.8rem 0; }
.status-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.slot-summary { display: flex; flex-direction: column; padding: 0.75rem 0.85rem; background: #f8fafc; border-radius: 11px; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); font-size: 0.86rem; }
.item-list li:last-child { border-bottom: 0; }
.item-list strong { display: block; }
.delivery-block { margin-top: 1rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.delivery-meta { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.delivery-meta > div { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; align-items: center; }
.tracking-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }
.delivery-setup { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px dashed var(--line); }
.delivery-setup .field { flex: 1 1 180px; }
.delivery-setup:has(#delivery-cod-enabled:checked) .prepaid-terms { display: none; }
.reconciliation-search { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.reconciliation-search input { flex: 1; max-width: 320px; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.reconciliation-result { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.reconciliation-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.reconciliation-head > div { display: flex; flex-direction: column; gap: 0.15rem; }
.reconciliation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.7rem; margin: 0.75rem 0; }
.reconciliation-grid > div { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.55rem; border: 1px solid var(--line); border-radius: 8px; }
.reconciliation-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.reconciliation-columns h4 { margin: 0.25rem 0 0.4rem; font-size: 0.85rem; }
.reconciliation-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.reconciliation-table th, .reconciliation-table td { text-align: left; padding: 0.35rem 0.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.reconciliation-table th { color: var(--muted); font-weight: 600; }
.reconciliation-table .mono { display: block; }
.refund19-box { margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.refund19-box h4 { margin: 0; font-size: 0.85rem; }
.refund19-box .field-row { display: block; margin: 0.5rem 0; }
.refund19-box .field-row input { width: 100%; }
.liability-box { margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; }
.liability-box h4 { margin: 0; font-size: 0.85rem; }
.liability-box .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.liability-box textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid var(--line); border-radius: 8px; }
.liability-block { margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.liability-block h4 { margin: 0; font-size: 0.85rem; }
.refund19-block { margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.refund19-block h4 { margin: 0; font-size: 0.85rem; }
.balance-block { margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; }
.balance-block h4 { margin: 0; font-size: 0.85rem; }
.balance-block .btn { margin-top: 0.5rem; }
.cod-box { margin-top: 0.75rem; padding: 0.7rem 0.75rem; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.cod-box h4 { margin: 0; font-size: 0.85rem; }
.cod-result { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; margin-top: 0.45rem; padding-top: 0.4rem; border-top: 1px dashed #bfdbfe; font-size: 0.8rem; }
.cod-result .muted { margin-left: auto; }
.cod-ledger { margin-top: 0.45rem; font-size: 0.78rem; }
.cod-ledger summary { cursor: pointer; color: var(--muted); }
.cod-ledger ul { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.cod-ledger li { display: flex; gap: 0.6rem; padding: 0.15rem 0; border-bottom: 1px dashed #dbeafe; }
.cod-ledger li span:last-child { margin-left: auto; }
.cod-toggle { flex: 0 1 auto !important; }
.cod-quote { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem 0.8rem; padding: 0.5rem 0.6rem; border-radius: 9px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: 0.78rem; }
.cod-quote > div { display: flex; justify-content: space-between; gap: 0.4rem; }
.cod-quote .cod-max { grid-column: 1 / -1; padding-top: 0.3rem; border-top: 1px dashed #bfdbfe; }
.delivery-failure { margin-top: 0.7rem; padding: 0.65rem 0.75rem; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 0.8rem; }
.delivery-failure > div { display: flex; justify-content: space-between; gap: 0.7rem; }
.delivery-failure .hint { margin: 0.35rem 0 0; }
.delivery-fees { margin-top: 0.65rem; padding-top: 0.55rem; border-top: 1px dashed var(--line); }
.delivery-fees h4 { margin: 0; font-size: 0.8rem; }
.delivery-fees ul { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.delivery-fees li { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 0.15rem 0; }
.payment-meta { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.payment-meta > div { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; font-size: 0.8rem; }
.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.82rem; }
.ledger-list li:last-child { border-bottom: 0; }
.ledger-list .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-list li { display: flex; flex-direction: column; padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.83rem; }
.notification-list li:last-child { border-bottom: 0; }
.timeline { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.timeline summary { cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); }
.timeline ol { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.timeline li { display: flex; gap: 0.6rem; font-size: 0.78rem; }
.timeline time { color: var(--muted); min-width: 150px; font-variant-numeric: tabular-nums; }
.action-card { position: sticky; top: 84px; }
.action-body { display: flex; flex-direction: column; }
.action-body h2 { margin: 0.2rem 0 0.4rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.action-body .muted { margin-bottom: 0.5rem; }
.countdown-block { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 0.9rem; border-radius: 12px; background: var(--blue-soft); margin-bottom: 0.7rem; }
.countdown-block strong { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.countdown-block.expired { background: var(--red-soft); }
.countdown-block strong.expired { color: var(--red); }
.deadline-block { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.8rem 0.9rem; border-radius: 12px; background: var(--amber-soft); margin-bottom: 0.7rem; }
.deadline-block strong { font-size: 1.8rem; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--amber); }
.amount-line { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.amount-line strong { font-size: 1.05rem; }
.sim-panel { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 0.8rem; margin: 0.8rem 0; background: #f8fafc; display: flex; flex-direction: column; gap: 0.4rem; }
.sim-panel .btn { margin-top: 0; }
.sim-panel .hint { margin-top: 0.25rem; }
.notice { border-radius: 10px; padding: 0.6rem 0.75rem; font-size: 0.82rem; margin: 0.7rem 0; }
.notice.warn { background: var(--amber-soft); color: #92400e; border: 1px solid #fde68a; }
.notice.info { background: var(--blue-soft); color: #1e40af; border: 1px solid #bfdbfe; }
.demo-box { margin-top: 0.9rem; border: 1px dashed #fbbf24; background: #fffbeb; border-radius: 12px; padding: 0.65rem 0.75rem; }
.demo-box summary { cursor: pointer; font-weight: 700; font-size: 0.82rem; color: #92400e; display: flex; align-items: center; gap: 0.4rem; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.demo-box .hint { color: #92400e; }
.replacement-options { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.6rem 0; }
.replacement-slot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.7rem; flex-wrap: wrap; }
.replacement-slot strong { display: block; font-size: 0.88rem; }
.refund-box { display: flex; flex-direction: column; gap: 0.45rem; border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.85rem; background: #f8fafc; margin: 0.5rem 0; }
.refund-box > div { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.big-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; margin-bottom: 0.4rem; }
.big-icon.ok { background: var(--green-soft); color: var(--green); }
.big-icon.danger { background: var(--red-soft); color: var(--red); }

/* ------------------------------------------------------------------ */
/* Lists and empty states                                              */
/* ------------------------------------------------------------------ */
.booking-list { display: flex; flex-direction: column; }
.booking-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.booking-row:last-child { border-bottom: 0; }
.booking-row:hover { background: #f8fafc; text-decoration: none; }
.booking-row strong { display: block; }
.booking-row .muted { font-size: 0.76rem; }
.booking-status { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.chevron { font-size: 1.3rem; color: var(--muted); }
.empty { text-align: center; padding: 2.2rem 1rem; }
.empty h2 { font-size: 1.05rem; margin: 0.5rem 0; }
.empty-icon { font-size: 1.8rem; color: var(--muted); }
.fatal { max-width: 520px; margin: 4rem auto; text-align: center; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(640px, calc(100vw - 2rem));
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 0.86rem;
  box-shadow: 0 18px 40px -18px rgba(13, 27, 42, 0.6);
  text-align: center;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
.toast.info { background: var(--ink); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-copy h1 { max-width: none; }
  .split, .result-split { grid-template-columns: 1fr; }
  .quote-card, .action-card { position: static; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.wide { grid-column: span 2; }
  .booking-row { grid-template-columns: 1fr auto; }
  .booking-row .booking-status { grid-column: 1 / -1; }
  .booking-row > strong { grid-column: 2; grid-row: 1; }
  .chevron { display: none; }
}
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; }
  .server-clock { display: none; }
  .user-chip { display: none; }
  .stepper { border-radius: 14px; }
  .step-label { display: none; }
  .stepper li { justify-content: center; }
  .slot-card { flex-direction: column; }
  .slot-capacity { width: 100%; }
  .capacity-head { justify-content: flex-start; }
  .profile-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field.wide { grid-column: span 2; }
  .status-grid { grid-template-columns: 1fr; }
  .ledger-list li { grid-template-columns: auto 1fr; }
  .ledger-list li strong { grid-column: 2; }
  .page-head { align-items: flex-start; }
}
