/* Silver Coffee prototype. Values come from the Silver Coffee screens in pen/silver-coffee-v1/silver-coffee-v1.pen. */

:root {
  --bg: #cecfd6;
  --ink: #1b1b1d;
  --accent: #f2ff3b;
  --card: #f6f6f6;
  --card-soft: rgba(246, 246, 246, 0.66);
  --tile: rgba(182, 188, 194, 0.5);
  --pill: #c2c5cc;
  --muted: #6e6e72;
  --axis: #8a8a90;
  --line: rgba(27, 27, 29, 0.08);
  --line-strong: rgba(27, 27, 29, 0.15);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --font: "Inter Tight", system-ui, sans-serif;
  --dot: "Doto", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #e4e5ea;
  font-family: var(--font);
  color: var(--ink);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; text-align: inherit; -webkit-user-select: none; user-select: none;
}
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
input { font: inherit; color: inherit; }
svg.i { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- Device ---------- */

#device {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
@media (min-width: 520px) {
  body { display: grid; place-items: center; }
  #device { width: 390px; height: min(861px, 100vh - 48px); border-radius: 44px; box-shadow: 0 30px 80px rgba(27, 27, 29, 0.25); }
}

#stack { position: absolute; inset: 0; }
#overlays { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
#overlays > * { pointer-events: auto; }

/* ---------- Status bar ---------- */

#status {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  pointer-events: none; color: var(--ink);
  transition: color 200ms ease;
}
#status.is-light { color: #fff; }
#status .time { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
#status .glyphs { display: flex; align-items: center; gap: 7.33px; }
#status .glyphs svg { display: block; height: 9px; }
#status .glyphs path { fill: currentColor; }

/* ---------- Screens ---------- */

.screen {
  position: absolute; inset: 0;
  background: var(--bg);
  padding-top: 56px;
  overflow: hidden;
  will-change: transform;
}
.screen.is-dark { background: var(--ink); color: #fff; }
.screen.is-under { visibility: hidden; }
.screen > .dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; }
.scroll {
  height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-padding: 56px 0 112px; /* focus and scroll-into-view stop clear of the header and the dock */
}
.scroll::-webkit-scrollbar { display: none; }

.hdr {
  position: sticky; top: 0; z-index: 3;
  height: 56px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.screen.is-scrolled .hdr {
  background: rgba(206, 207, 214, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.hdr-title {
  font-family: var(--dot); font-size: 24px; font-weight: 700; letter-spacing: 2px;
  position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap;
  pointer-events: none;
}
.hdr-title.brand { line-height: 0.9; text-align: center; }
.icon-btn {
  width: 24px; height: 24px; display: grid; place-items: center; position: relative;
  border-radius: 12px;
  transition: transform 160ms var(--ease-out);
}
.icon-btn::before { content: ""; position: absolute; inset: -10px; } /* bigger hit area */
.icon-btn:active { transform: scale(0.88); }

.mark { width: 24px; height: 24px; position: relative; }
.mark img { position: absolute; left: 0; top: -10px; width: 29px; height: 43px; object-fit: cover; pointer-events: none; }
.burger { width: 24px; height: 24px; position: relative; }
.burger svg { position: absolute; inset: 0; }

.content { padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- Press feedback ---------- */

.press { transition: transform 160ms var(--ease-out); }
.press:active { transform: scale(0.97); }
.press-soft { transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.press-soft:active { transform: scale(0.985); }

/* ---------- Type ---------- */

.doto-xl {
  font-family: var(--dot); font-size: 88px; font-weight: 700; letter-spacing: 4px; line-height: 0.8;
  height: 70px; display: flex; align-items: center; white-space: nowrap;
}
.doto-xl .dcolon, .doto-xl .ddot { position: relative; width: 7px; height: 70px; flex-shrink: 0; }
.doto-xl .dcolon { margin: 0 16.5px 0 5.5px; }
.doto-xl .ddot { margin: 0 16.5px 0 3px; }
.doto-xl .dcolon i, .doto-xl .ddot i { position: absolute; left: 0; width: 7px; height: 7px; background: currentColor; }
.doto-xl .dcolon i:first-child { top: 23px; }
.doto-xl .dcolon i:last-child { top: 40px; }
.doto-xl .ddot i { top: 59px; }

.cap { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; line-height: 15px; }
.meta { font-size: 12px; font-weight: 300; color: var(--muted); line-height: 15px; }
.name { font-size: 15px; font-weight: 500; line-height: 18px; }
.sub { font-size: 13px; font-weight: 300; color: var(--muted); line-height: 16px; }
.sub.ink { color: var(--ink); opacity: 0.7; }
.v { font-weight: 300; line-height: 1; }
.u { font-size: 12px; font-weight: 600; line-height: 1.4; }
.vu { display: flex; align-items: flex-end; gap: 4px; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.v20 { font-size: 20px; } .v24 { font-size: 24px; } .v28 { font-size: 28px; } .v32 { font-size: 32px; } .v34 { font-size: 34px; }

/* ---------- Tabs (clip-path indicator) ---------- */

.tabs { position: relative; display: flex; gap: 8px; width: max-content; }
.tabs-layer { display: flex; gap: inherit; }
.tabs-active {
  position: absolute; inset: 0; pointer-events: none;
  transition: clip-path 250ms var(--ease-in-out);
}
.tab {
  padding: 7px 14px; border-radius: 20px; background: var(--tile);
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px; line-height: 13px; white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.tab:active { transform: scale(0.95); }
.tabs-active .tab { background: var(--ink); color: #fff; }
.tabs.home .tab { padding: 7px 16px; background: var(--pill); letter-spacing: 0.5px; }
.tabs.home .tabs-layer:not(.tabs-active) .tab span { opacity: 0.5; }
.tabs.home .tabs-active .tab { background: var(--ink); }

.tabs-scroller { margin: 0 -24px; padding: 0 24px; overflow-x: auto; scrollbar-width: none; position: relative; }
.tabs-scroller::-webkit-scrollbar { display: none; }
.tabs-wrap { position: relative; }
.tabs-wrap::after {
  content: ""; position: absolute; right: -24px; top: -28px; width: 51px; height: 77px; pointer-events: none;
  background: linear-gradient(90deg, rgba(206, 207, 214, 0), var(--bg));
}

/* Day strip uses the same indicator */
.days { position: relative; display: flex; gap: 6px; }
.days .tabs-layer { gap: 6px; width: 100%; }
.day {
  flex: 1; height: 58px; padding: 10px 0; border-radius: 16px; background: var(--tile);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 160ms var(--ease-out);
}
.day:active { transform: scale(0.95); }
.day .d { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; line-height: 13px; opacity: 0.5; }
.day .n { font-size: 17px; font-weight: 300; line-height: 21px; }
.days .tabs-active .day { background: var(--ink); color: #fff; }
.days .tabs-active .day .d { opacity: 1; }

/* ---------- Hero ---------- */

.hero { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 0; min-height: 112px; }
.hero-l { display: flex; flex-direction: column; gap: 6px; }
.readouts { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.readout { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.readout .l { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; opacity: 0.5; line-height: 13px; }

.donut { position: relative; width: 65px; height: 65px; flex-shrink: 0; }
.donut svg { position: absolute; left: -2px; top: -2px; width: 70px; height: 70px; overflow: visible; }
.donut .arc { transition: stroke-dashoffset 500ms var(--ease-in-out); }

/* ---------- Sections, cards, rows ---------- */

.sec { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; }
.card { background: var(--card-soft); border-radius: 24px; }
.card-y { background: var(--accent); border-radius: 24px; }
.card-g { background: var(--tile); border-radius: 24px; }
.list { padding: 4px 20px; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; width: 100%;
  box-shadow: inset 0 -1px 0 var(--line); position: relative;
}
.row:last-child { box-shadow: none; }
.row.tap::before {
  content: ""; position: absolute; inset: 0 -20px; background: rgba(27, 27, 29, 0.04);
  opacity: 0; transition: opacity 160ms ease; pointer-events: none;
}
.row.tap:active::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .row.tap:hover::before { opacity: 0.6; }
}
.names { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.no-dot { font-family: var(--dot); font-size: 24px; font-weight: 700; line-height: 1; opacity: 0.35; width: 29px; flex-shrink: 0; }

.tiles { display: flex; gap: 12px; }
.tile {
  flex: 1; min-width: 0; padding: 10px; border-radius: 12px; background: var(--tile);
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.tile .tu { font-size: 12px; line-height: 1.4; opacity: 0.5; white-space: nowrap; }

.btn-primary {
  height: 56px; border-radius: 28px; background: var(--ink); color: #fff; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.2px;
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
  position: relative; overflow: hidden;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary[disabled] { opacity: 0.35; pointer-events: none; }
.btn-primary .hint { font-weight: 300; letter-spacing: 0; color: var(--accent); }
.btn-round {
  width: 56px; height: 56px; border-radius: 28px; background: var(--tile); flex-shrink: 0;
  display: grid; place-items: center; transition: transform 160ms var(--ease-out);
}
.btn-round:active { transform: scale(0.94); }
.actions { display: flex; gap: 12px; }
/* The main action of a subpage stays pinned to the bottom while the page scrolls and comes to rest
   where the design puts it. The fade lets content slide under it. */
.dock {
  position: sticky; bottom: 0; z-index: 2;
  margin: -20px -24px -32px; padding: 20px 24px 32px;
  background: linear-gradient(rgba(206, 207, 214, 0), var(--bg) 20px);
}
.btn-small {
  padding: 9px 16px; border-radius: 20px; background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px; line-height: 13px; white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.btn-small:active { transform: scale(0.95); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px;
  background: var(--tile); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; line-height: 13px; white-space: nowrap;
}
.pill.dark { background: var(--ink); color: #fff; }
.pill .dot6 { width: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.live-dot { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.chev { transition: transform 250ms var(--ease-out); }
.is-open .chev { transform: rotate(180deg); }
.collapse { overflow: hidden; }

/* ---------- Home ---------- */

.home-hero { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; width: 100%; }
.home-hero .stack { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.home-hero .capx { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; }
.home-hero .ring { padding-top: 3px; height: 86px; }
.home-hero.roast-hero .ring { height: 68px; }
.metric { flex: 1; min-width: 0; padding: 10px; border-radius: 12px; background: var(--tile); display: flex; flex-direction: column; gap: 2px; text-align: left; }
.metric .mu { font-size: 10px; font-weight: 500; letter-spacing: 0.5px; line-height: 1.4; opacity: 0.5; white-space: nowrap; }
.metrics { display: flex; gap: 12px; align-items: flex-start; }
.cards { display: flex; gap: 12px; }
.cards.more { margin-top: -12px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hcard {
  padding: 20px; border-radius: 24px; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; width: 100%;
  transition: transform 200ms var(--ease-out);
}
.hcard:active { transform: scale(0.97); }
.hcard .head { display: flex; justify-content: space-between; align-items: flex-start; }
.hcard .t { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; line-height: 12px; }
.hcard .s { font-size: 13px; font-weight: 300; opacity: 0.7; line-height: 16px; margin-top: 2px; }
.hcard .lbl { display: flex; align-items: flex-end; gap: 4px; }
.hcard .lbl .s2 { font-size: 12px; font-weight: 300; color: var(--muted); }
.hcard .vals { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Menu ---------- */

#menu { position: absolute; inset: 0; background: var(--bg); color: var(--ink); padding-top: 56px; display: flex; flex-direction: column; }
#menu .hdr { background: transparent; position: relative; }
#menu .content { flex: 1; justify-content: space-between; gap: 40px; }
.nav-row {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 0; width: 100%;
  box-shadow: inset 0 -1px 0 rgba(27, 27, 29, 0.12);
  transition: transform 160ms var(--ease-out);
}
.nav-row:active { transform: scale(0.98); }
.nav-row .lab { font-family: var(--dot); font-size: 36px; font-weight: 700; letter-spacing: 2px; line-height: 36px; transition: color 150ms ease; }
.nav-row .cnt { font-size: 13px; font-weight: 300; color: rgba(27, 27, 29, 0.55); transition: color 150ms ease; }
.nav-row.is-current { background: var(--accent); border-radius: 12px; padding: 16px 12px; margin: 0 -12px; width: calc(100% + 24px); box-shadow: none; }
.nav-row.is-current .cnt { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .nav-row:not(.is-current):hover .cnt { color: rgba(27, 27, 29, 0.85); }
}
.profile {
  display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.2); width: 100%;
  transition: transform 160ms var(--ease-out);
}
.profile:active { transform: scale(0.98); }
.avatar {
  width: 40px; height: 40px; border-radius: 20px; background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: 1px; flex-shrink: 0;
}

/* ---------- Roast curve ---------- */

.curve-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.legend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.legend button { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--muted); transition: opacity 150ms ease; }
.legend button.is-off { opacity: 0.35; }
.legend .sw { width: 14px; height: 2px; background: var(--ink); }
.plot { position: relative; height: 150px; touch-action: pan-y; cursor: crosshair; }
.plot svg { position: absolute; inset: 0; overflow: visible; }
.plot .lbl-y { font: 500 10px var(--font); fill: var(--axis); }
.plot .lbl-1c { font: 600 10px var(--font); letter-spacing: 0.6px; fill: var(--ink); }
.plot .ref, .plot .live { fill: none; stroke-linejoin: round; stroke-linecap: round; transition: opacity 200ms ease; }
.plot .band { transition: opacity 200ms ease; }
.plot .scrub { opacity: 0; transition: opacity 120ms ease; pointer-events: none; }
.plot.is-scrubbing .scrub { opacity: 1; }
.scrub-chip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.6px;
  padding: 5px 9px; border-radius: 10px; white-space: nowrap; opacity: 0; transition: opacity 120ms ease;
  font-variant-numeric: tabular-nums;
}
.plot.is-scrubbing .scrub-chip { opacity: 1; }
.xaxis { position: relative; height: 14px; }
.xaxis span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; font-weight: 500; color: var(--axis); }
.phase-bar { display: flex; gap: 3px; height: 6px; }
.phase-bar > * { border-radius: 3px; height: 6px; transition: opacity 200ms ease; }
.phase-tile { transition: transform 160ms var(--ease-out), box-shadow 200ms ease; }
.phase-tile:active { transform: scale(0.97); }
.phase-tile.is-on { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Bars (revenue) ---------- */

.bars { display: flex; gap: 10px; height: 168px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.bar-col .bv { font-size: 11px; line-height: 13px; transition: color 150ms ease; font-variant-numeric: tabular-nums; }
.bar-col .bar { width: 100%; border-radius: 8px; transition: height 300ms var(--ease-in-out), background-color 200ms ease, box-shadow 200ms ease; }
.bar-col .bd { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; line-height: 13px; opacity: 0.5; }
.bar-col.is-sel .bv, .bar-col.is-today .bv { font-weight: 600; }
.bar-col.is-today .bd { opacity: 1; }
.bar-col.is-sel .bar { box-shadow: inset 0 0 0 1.5px var(--ink); }
.legend-row { display: flex; gap: 16px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.legend-row span { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--muted); }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.split { display: flex; gap: 3px; height: 10px; }
.split > * { border-radius: 5px; height: 10px; transition: opacity 200ms ease, flex-grow 300ms var(--ease-in-out); }

/* ---------- Map ---------- */

.map-card {
  height: 184px; padding: 14px; border-radius: 24px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; width: 100%; text-align: left;
  background: url(images/sf-map.jpg) center / cover;
  transition: transform 200ms var(--ease-out);
}
.map-card:active { transform: scale(0.98); }
.van { position: absolute; width: 32px; height: 32px; }
.van .halo { position: absolute; inset: 0; border-radius: 50%; background: rgba(242, 255, 59, 0.35); }
.van .halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(242, 255, 59, 0.9); animation: halo 2s var(--ease-out) infinite; }
.van .core { position: absolute; left: 9px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2.5px var(--ink); }
@keyframes halo { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.map-full { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.map-full .canvas { position: absolute; left: 0; top: 0; width: 1500px; height: 1000px; background: url(images/sf-map.jpg) 0 0 / 100% 100%; will-change: transform; }
.map-full.is-dragging { cursor: grabbing; }
.stop-pin {
  position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 12px;
  background: #fff; box-shadow: 0 0 0 2px var(--ink); display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}
.stop-pin.done { background: var(--ink); color: #fff; }

/* ---------- Timeline (deliveries) ---------- */

.timeline { padding: 20px 20px 4px; }
.stop { display: flex; gap: 14px; width: 100%; text-align: left; position: relative; }
.stop .rail { width: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 3px; flex-shrink: 0; }
.stop .dot { width: 12px; height: 12px; border-radius: 6px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); flex-shrink: 0; }
.stop .dot.now { background: var(--accent); box-shadow: inset 0 0 0 2px var(--ink); }
.stop .dot.done { background: var(--ink); }
.stop .ln { width: 2px; flex: 1; background: var(--line-strong); }
.stop .body { flex: 1; padding-bottom: 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stop .rowx { display: flex; justify-content: space-between; }

/* ---------- Orders ---------- */

.order { padding: 20px; display: flex; flex-direction: column; gap: 16px; text-align: left; width: 100%; transition: transform 200ms var(--ease-out); }
.order:active { transform: scale(0.98); }
.order .head { display: flex; justify-content: space-between; align-items: flex-start; }
.order .cafe { font-size: 17px; font-weight: 500; line-height: 21px; }
.order .due {
  padding: 6px 12px; border-radius: 20px; background: var(--tile);
  font-size: 12px; font-weight: 600; letter-spacing: 0.6px; line-height: 15px;
}
.order.card-y .due { background: var(--ink); color: #fff; }
.order .items { padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); display: flex; flex-direction: column; gap: 8px; }
.order.card-y .items { box-shadow: inset 0 1px 0 var(--line-strong); }
.order .item { display: flex; justify-content: space-between; font-size: 14px; font-weight: 300; line-height: 17px; }
.order .item b { font-weight: 500; }
.order .foot { display: flex; justify-content: space-between; align-items: center; }
.order .route { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 300; }
.order .route span { opacity: 0.7; }

/* ---------- Accounts ---------- */

.rank { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.rank-row { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; transition: transform 160ms var(--ease-out); }
.rank-row:active { transform: scale(0.98); }
.rank-row .r1 { display: flex; justify-content: space-between; align-items: flex-end; }
.rank-row .nm { display: flex; align-items: flex-end; gap: 8px; }
.track { height: 6px; border-radius: 3px; background: rgba(27, 27, 29, 0.06); position: relative; overflow: hidden; }
.track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: rgba(27, 27, 29, 0.6); transform-origin: 0 50%; }
.risk { padding: 4px 20px; }
.risk .row { box-shadow: inset 0 -1px 0 var(--line-strong); padding: 16px 0; gap: 12px; }
.risk .row:last-child { box-shadow: none; }
.ava36 {
  width: 36px; height: 36px; border-radius: 18px; background: var(--ink); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: 0.6px; flex-shrink: 0;
}

/* ---------- Sheets ---------- */

.sheet-layer { position: absolute; inset: 0; z-index: 30; }
.scrim { position: absolute; inset: 0; background: rgba(14, 14, 15, 0.42); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 64px);
  background: var(--bg); border-radius: 28px 28px 0 0; display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12); will-change: transform; touch-action: none;
}
.grab { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; flex-shrink: 0; }
.grab i { width: 36px; height: 5px; border-radius: 3px; background: rgba(27, 27, 29, 0.2); display: block; }
.sheet-body { overflow-y: auto; padding: 8px 24px 28px; display: flex; flex-direction: column; gap: 20px; scrollbar-width: none; touch-action: pan-y; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-title { font-family: var(--dot); font-size: 24px; font-weight: 600; letter-spacing: 2px; line-height: 29px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kv { display: flex; flex-direction: column; }
.kv .row { padding: 12px 0; justify-content: space-between; }
.kv .row span:first-child { font-size: 14px; font-weight: 300; color: var(--muted); }
.kv .row span:last-child { font-size: 14px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 20px; background: var(--tile); font-size: 13px; font-weight: 500;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.chip:active { transform: scale(0.95); }
.chip.is-on { background: var(--ink); color: #fff; }
.field-label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; opacity: 0.5; margin-bottom: -8px; }
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 20px; border-radius: 24px; background: var(--card); }
.stepper .ctr { display: flex; gap: 8px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 20px; background: var(--tile); display: grid; place-items: center;
  transition: transform 160ms var(--ease-out);
}
.stepper button:active { transform: scale(0.9); }
.text-field {
  width: 100%; height: 52px; border-radius: 16px; border: 0; background: var(--card); padding: 0 16px;
  font-size: 15px; font-weight: 400; outline: none; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 150ms ease;
}
.text-field:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }

.switch { width: 44px; height: 26px; border-radius: 13px; background: rgba(27, 27, 29, 0.18); position: relative; flex-shrink: 0; transition: background-color 200ms ease; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 200ms var(--ease-out); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.alerts .switch[aria-checked="true"] { background: var(--accent); }
.alerts .switch[aria-checked="true"]::after { background: var(--ink); }

.check { width: 26px; height: 26px; border-radius: 9px; box-shadow: inset 0 0 0 1.5px var(--ink); display: grid; place-items: center; flex-shrink: 0; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.check svg path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 200ms var(--ease-out); }
.is-checked .check { background: var(--ink); color: var(--accent); }
.is-checked .check svg path { stroke-dashoffset: 0; }
.pack-row { width: 100%; text-align: left; }
.pack-row:active .check { transform: scale(0.9); }
.is-checked .pack-name { opacity: 0.45; }
.pack-name { transition: opacity 200ms ease; }

/* Hold to confirm */
.hold { position: relative; overflow: hidden; touch-action: none; }
.hold .fill {
  position: absolute; inset: 0; background: var(--accent); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 200ms var(--ease-out);
}
.hold.is-holding .fill { clip-path: inset(0 0 0 0); transition: clip-path 1.6s linear; }
.hold.is-holding { transform: scale(0.97); }

/* Popover */
.popover {
  position: absolute; z-index: 40; min-width: 200px; padding: 6px; border-radius: 18px;
  background: var(--card); box-shadow: 0 12px 40px rgba(27, 27, 29, 0.18), 0 0 0 1px rgba(27, 27, 29, 0.04);
  transform-origin: top right;
}
.popover button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; font-size: 15px; font-weight: 400; transition: background-color 120ms ease; }
.popover button:active { background: rgba(27, 27, 29, 0.06); }
@media (hover: hover) and (pointer: fine) { .popover button:hover { background: rgba(27, 27, 29, 0.05); } }
.popover .danger { color: #b3261e; }
.pop-catch { position: absolute; inset: 0; z-index: 39; }

/* Toast */
.toast {
  position: absolute; left: 12px; right: 12px; top: 6px; z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 20px;
  background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-size: 14px; font-weight: 400; line-height: 18px;
  transform: translateY(-140%); opacity: 0;
  transition: transform 400ms ease, opacity 400ms ease;
}
.toast.is-in { transform: translateY(0); opacity: 1; }
.toast .ti { color: var(--accent); }
.toast .msg { flex: 1; min-width: 0; }
.toast .act { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; color: var(--accent); padding: 6px 4px; }

/* Full screen dark overlays (call, scanner) */
.full {
  position: absolute; inset: 0; z-index: 35; background: var(--ink); color: #fff;
  display: flex; flex-direction: column; align-items: center; padding: 120px 24px 48px;
}
.call-ava { width: 112px; height: 112px; border-radius: 56px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 34px; font-weight: 500; position: relative; }
.call-ava .ripple { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(242, 255, 59, 0.5); animation: ripple 1.8s var(--ease-out) infinite; }
.call-ava .ripple:nth-child(2) { animation-delay: 0.6s; }
.is-connected .call-ava .ripple { animation: none; opacity: 0; }
@keyframes ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.call-btns { display: flex; gap: 24px; margin-top: auto; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.call-btn > span:first-child {
  width: 64px; height: 64px; border-radius: 32px; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.call-btn:active > span:first-child { transform: scale(0.92); }
.call-btn[aria-pressed="true"] > span:first-child { background: #fff; color: var(--ink); }
.call-btn.end > span:first-child { background: var(--accent); color: var(--ink); }

.viewfinder { width: 240px; height: 240px; position: relative; margin-top: 40px; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 100% at 50% 30%, #3a3a3e, #19191b); }
.viewfinder .corner { position: absolute; width: 36px; height: 36px; border: 3px solid #fff; transition: border-color 200ms ease, transform 300ms var(--ease-out); }
.viewfinder .c1 { left: 16px; top: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.viewfinder .c2 { right: 16px; top: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.viewfinder .c3 { left: 16px; bottom: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.viewfinder .c4 { right: 16px; bottom: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.viewfinder .scanline { position: absolute; left: 24px; right: 24px; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scan 1.6s linear infinite alternate; }
.viewfinder .sack { position: absolute; left: 70px; top: 78px; width: 100px; height: 84px; border-radius: 14px; background: #d7c9a7; opacity: 0.85; display: grid; place-items: center; color: #3b3326; font: 700 13px var(--dot); letter-spacing: 1px; }
.is-found .viewfinder .corner { border-color: var(--accent); }
.is-found .viewfinder .scanline { animation-play-state: paused; opacity: 0; transition: opacity 150ms ease; }
@keyframes scan { from { transform: translateY(24px); } to { transform: translateY(214px); } }

/* Search in header */
.search-bar {
  position: absolute; left: 60px; right: 24px; top: 8px; height: 40px; border-radius: 20px; background: var(--card);
  display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px;
  clip-path: inset(0 0 0 100% round 20px); opacity: 0;
  transition: clip-path 250ms var(--ease-out), opacity 150ms ease;
}
.search-bar input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; min-width: 0; }
.hdr.is-searching .search-bar { clip-path: inset(0 0 0 0 round 20px); opacity: 1; }
.hdr.is-searching .hdr-title, .hdr.is-searching .hdr-action { opacity: 0; pointer-events: none; }
.hdr-title, .hdr-action { transition: opacity 150ms ease; }
.empty { padding: 18px 0; font-size: 14px; font-weight: 300; color: var(--muted); text-align: center; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; opacity: 0.5; text-align: center; padding-bottom: 4px; }
.cal button, .cal .x {
  height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 15px; font-weight: 300;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.cal button { background: var(--tile); }
.cal button:active { transform: scale(0.92); }
.cal button.is-on { background: var(--ink); color: #fff; }
.cal .x { opacity: 0.3; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 20px; }
.bubble.them { background: var(--card); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.me { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble .tm { display: block; font-size: 11px; opacity: 0.5; margin-top: 2px; }
.typing { display: flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 3px; background: var(--muted); animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-3px); opacity: 1; } }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Reduced motion: fades stay, movement goes ---------- */

@media (prefers-reduced-motion: reduce) {
  .press:active, .press-soft:active, .hcard:active, .order:active, .tab:active, .day:active,
  .btn-primary:active, .btn-round:active, .icon-btn:active, .nav-row:active, .profile:active { transform: none; }
  .tabs-active { transition-duration: 0ms; }
  .toast { transform: none; transition: opacity 200ms ease; }
  .van .halo::after, .call-ava .ripple, .viewfinder .scanline, .typing i { animation: none; }
  .bar-col .bar { transition: background-color 200ms ease; }
}

.ent-name { font-size: 22px; font-weight: 500; line-height: 27px; }
.card-y.press-soft:active, .card-g.press-soft:active { transform: scale(0.98); }
