.boot { min-height: 100dvh; display: grid; place-items: center; }
.login a { color: var(--ink); font-weight: 650; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px);
}
.top-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.top .brand { flex: none; text-decoration: none; }
.top .logo-mark { height: 28px; }
.top .shop { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1.5px solid var(--line); }
.top .shop b { font-weight: 750; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .out { flex: none; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); font-weight: 650; flex: none; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #b9bcc3; }
.live.on i { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 14px calc(110px + var(--safe-b)); display: grid; gap: 16px; }

/* Hello + big button */
.hello { display: grid; gap: 14px; }
.eyebrow { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--red); }
.hello h1 { font-size: 30px; font-weight: 900; font-stretch: 88%; letter-spacing: -0.025em; }
.hello .from { margin: 6px 0 0; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.hello .from svg { width: 15px; height: 15px; flex: none; }
.hello .new { width: 100%; min-height: 58px; font-size: 17px; font-weight: 800; border-radius: 16px; }
.hello .new svg { width: 22px; height: 22px; }

/* Summary tiles */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tile {
  grid-column: span 2; background: var(--card); border: 0; border-radius: var(--r); box-shadow: var(--shadow); text-align: left;
  padding: 12px 12px 11px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: inherit;
  transition: transform .08s, box-shadow .15s;
}
.tile:active { transform: scale(.98); }
.tile.wide { grid-column: span 3; }
.tile .k { font-size: 12px; color: var(--ink-3); font-weight: 650; line-height: 1.25; min-height: 2.5em; }
.tile.wide .k { min-height: 0; }
.tile .v { font-size: 30px; font-weight: 850; font-stretch: 88%; letter-spacing: -0.03em; line-height: 1; margin-top: auto; }
.tile .s { font-size: 12px; font-weight: 650; }
.tile.road { background: var(--ink); color: #fff; }
.tile.road .k { color: #a3a6ad; }
.tile.bad { background: var(--st-failed-bg); color: var(--st-failed); }
.tile.bad .k { color: var(--st-failed); }
.tile.money {
  grid-column: 1 / -1; cursor: default; flex-direction: row; gap: 0; padding: 0; overflow: hidden; position: relative;
  background: var(--red); color: #fff;
}
.tile.money::after {
  content: ''; position: absolute; right: -20px; top: -10px; width: 130px; height: 140px; opacity: .13; pointer-events: none;
  background: repeating-linear-gradient(-18deg, #fff 0 6px, transparent 6px 16px);
}
.tile.money > div { flex: 1; padding: 13px 14px; display: grid; gap: 4px; min-width: 0; }
.tile.money > div + div { border-left: 1px solid rgba(255, 255, 255, .22); }
.tile.money .k { color: rgba(255, 255, 255, .85); min-height: 0; }
.tile.money .v { font-size: 22px; white-space: nowrap; }

/* Orders card */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.orders { overflow: hidden; scroll-margin-top: 70px; }
.filters { display: grid; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line-2); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1; border: 0; background: var(--line-2); padding: 9px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button .n:not(:empty) { margin-left: 6px; font-size: 11.5px; background: rgba(0, 0, 0, .08); padding: 1px 7px; border-radius: 999px; }
.tabs button.on .n:not(:empty) { background: rgba(255, 255, 255, .18); }
.tabs button[data-tab="failed"] .n:not(:empty) { background: var(--st-failed); color: #fff; }
.search { position: relative; display: block; }
.search input { padding-left: 40px; min-height: 44px; border-radius: 999px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }

/* Order rows */
.orow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'r1 r1' 'r2 m' 'f f' 'r3 r3';
  gap: 8px 12px; padding: 14px; border-top: 1px solid var(--line-2);
}
.orow:first-child { border-top: 0; }
.orow .r1 { grid-area: r1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.orow .code { font-weight: 850; font-size: 14px; letter-spacing: .01em; }
.orow .when { margin-left: auto; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.orow .r2 { grid-area: r2; min-width: 0; display: grid; gap: 2px; }
.orow .who { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.orow .who b { font-weight: 750; font-size: 15.5px; }
.orow .who .ph { color: var(--ink-3); font-size: 13px; text-decoration: none; }
.orow .addr { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.orow .pkg { color: var(--ink-3); font-size: 13px; }
.money-col { grid-area: m; display: grid; gap: 3px; justify-items: end; align-content: start; text-align: right; }
.cod { display: grid; justify-items: end; background: var(--bg); border-radius: 10px; padding: 5px 10px; }
.cod small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--ink-3); }
.cod b { font-size: 16px; font-weight: 850; }
.cod.paid b { font-size: 13.5px; color: var(--ink-2); }
.fee { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.fee b { color: var(--ink); font-weight: 750; }
.orow .fail { grid-area: f; background: var(--st-failed-bg); color: #7a2906; border-radius: 10px; padding: 8px 11px; font-size: 13.5px; font-weight: 550; }
.orow .r3 { grid-area: r3; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.orow .rider { font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.orow .rider a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); text-decoration: none; }
.orow .rider svg { width: 14px; height: 14px; }
.orow .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.orow .acts .btn svg { width: 15px; height: 15px; }
.orow .acts .cancel { color: var(--st-failed); }
.orow.st-row-cancelled { opacity: .62; }

/* Zone tags */
.ztag {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 1px 7px; border-radius: 6px;
  font: 800 11.5px/1.45 ui-monospace, 'JetBrains Mono', Consolas, monospace; letter-spacing: .02em; vertical-align: middle; white-space: nowrap;
}
.zpill {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .01em; vertical-align: middle; margin-left: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

/* New delivery form */
.nf { gap: 14px; }
.nf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nf-head .btn svg { width: 18px; height: 18px; }
.nf-scroll { display: grid; gap: 20px; max-height: calc(100dvh - 190px); overflow-y: auto; margin: 0 -22px; padding: 2px 22px 4px; }
.fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs legend { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--red); padding: 0; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; width: 100%; }
.fs legend::after { content: ''; flex: 1; height: 1.5px; background: var(--line-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid2 .full { grid-column: 1 / -1; }
.field > span { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.nf .seg { display: flex; }
.nf .seg label { flex: 1; }
.nf .seg span { text-align: center; padding: 9px 10px; }
.sumbox { display: flex; gap: 0; background: var(--bg); border-radius: 12px; overflow: hidden; }
.sumbox > div { flex: 1; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.sumbox > div + div { border-left: 1.5px solid #fff; }
.sumbox small { font-size: 11.5px; color: var(--ink-3); font-weight: 650; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sumbox b { font-size: 16px; font-weight: 850; }
.sumbox .ztag { min-width: 0; font-size: 10px; padding: 0 5px; }

/* Floating button (phones, after the big button scrolls away) */
.fab {
  position: fixed; right: 16px; bottom: calc(18px + var(--safe-b)); z-index: 40; min-height: 54px; padding: 0 20px; font-size: 15.5px;
  font-weight: 800; box-shadow: 0 12px 30px -8px rgba(229, 17, 43, .7); transform: translateY(120px); transition: transform .22s;
}
.fab.show { transform: none; }

@media (max-width: 560px) {
  .nf-scroll { max-height: calc(92dvh - 170px - var(--safe-b)); }
  .grid2 { grid-template-columns: 1fr; }
  .top .out span { display: none; }
  .top .out { width: 36px; padding: 0; }
  .orow .acts { width: 100%; }
  .orow .acts .btn { flex: 1; }
  .tabs { gap: 3px; }
  .tabs button { padding: 9px 8px; font-size: 13px; }
  .tabs button .n:not(:empty) { margin-left: 4px; padding: 1px 6px; }
}
@media (max-width: 380px) {
  .top .shop b { font-size: 13.5px; }
  .tile .v { font-size: 26px; }
  .tile.money .v { font-size: 19px; }
}

@media (min-width: 760px) {
  .wrap { padding: 28px 24px 60px; gap: 20px; }
  .top-in { padding: 12px 24px; }
  .hello { grid-template-columns: 1fr auto; align-items: end; }
  .hello h1 { font-size: 40px; }
  .hello .new { width: auto; padding: 0 30px; }
  .filters { grid-template-columns: auto 1fr; align-items: center; padding: 14px 16px; }
  .tabs button { flex: none; }
  .orow { padding: 16px 18px; grid-template-columns: minmax(0, 1fr) 200px; }
  .fab { display: none; }
}
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.7fr); gap: 12px; }
  .tile, .tile.wide { grid-column: auto; padding: 14px 16px; }
  .tile .k { min-height: 2.5em; }
  .tile .v { font-size: 34px; }
  .tile.money { grid-column: auto; flex-direction: column; }
  .tile.money > div { padding: 12px 16px; }
  .tile.money > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .22); }
  .tile.money .v { font-size: 21px; }
  .tile.money .k { min-height: 0; }
}
