/* acum. web — Soft Mint design system, ported from CursVal/Theme/AppTheme.swift.
   Desktop web app: sticky top nav, a centred max-width content area, the
   Currency page (rates grid + sticky converter panel) and the Fuel page
   (hero chart + stat-card row). Light-only, standard SF Pro, tabular numerals. */

:root {
  --ink: #1E2A22; --ink2: #3B4D42; --ink3: #6F7F73; --ink4: #A8B3AA;
  --card: #FFFFFF; --card-tint: #F6FBF2; --hair: rgba(30, 42, 34, 0.08);
  --accent: #2D6B4E; --accent-soft: #E4F1DC; --accent-glow: rgba(45, 107, 78, 0.30);
  --positive: #2D6B4E; --negative: #B95B43; --live: #E5484D;
  --bg-top: #F4F9F0; --bg-mid: #E6F2DE; --bg-bottom: #D9EAD0;
  --fuel-a95: #D97D1C; --fuel-diesel: #1F6F87;
  --r-card: 22px; --r-tile: 14px; --r-pill: 999px;
  --container: 1200px;
  --nav-h: 64px;
  --card-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 24px rgba(30,42,34,.07), 0 2px 6px rgba(30,42,34,.04);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--bg-mid);
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1 { font-weight: 700; }
.tnum, .cur-rate, .tile-val, .price-big, .stat-val, .conv-amount, .day-num, .delta, .fuel-delta {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}

/* ---- Background ---- */
#bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(168deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
}
.blob { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .65; z-index: 0; }
.blob-warm { width: 520px; height: 520px; top: -160px; right: -120px; background: #FFE8B4; }
.blob-green { width: 560px; height: 560px; bottom: -200px; left: -160px; background: #C8EAB4; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ---- Top navigation ---- */
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 249, 240, 0.72);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--hair);
}
.topnav-inner { display: flex; align-items: center; gap: 20px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-logo { display: inline-flex; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.navlink { padding: 8px 18px; border-radius: var(--r-pill); font-size: 16px; font-weight: 600; color: var(--ink3); transition: .15s; }
.navlink:hover { color: var(--ink2); background: rgba(30,42,34,.04); }
.navlink.active { color: var(--accent); background: var(--accent-soft); }
.topnav-right { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink3); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.45);} 70% { box-shadow: 0 0 0 6px rgba(229,72,77,0);} 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0);} }

/* ---- Screens / page ---- */
.screen { display: none; }
.screen.active { display: block; position: relative; z-index: 1; }
.page { padding: 36px 0 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-title { font-size: 32px; letter-spacing: -.6px; }
.page-sub { font-size: 16px; color: var(--ink3); margin-top: 4px; }

/* ---- Card surface ---- */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 0.5px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--r-card);
  box-shadow: var(--card-shadow);
  padding: 18px;
}

/* ---- Controls (chips + week strip) ---- */
.money-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--hair);
  font-size: 15px; font-weight: 500; color: var(--ink2); transition: .15s;
}
.chip:hover { border-color: rgba(45,107,78,.3); }
.chip.active { background: var(--accent); color: #fff; font-weight: 600; border-color: transparent; box-shadow: 0 4px 10px var(--accent-glow); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink4); }

.week-strip {
  margin-left: auto; display: flex; align-items: center; gap: 2px; height: 52px; padding: 0 4px; max-width: 460px;
  background: rgba(255,255,255,.6); backdrop-filter: blur(14px);
  border: 1px solid var(--hair); border-radius: 14px;
}
.week-cells { display: flex; gap: 2px; }
.day { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 11px; color: var(--ink); transition: .12s; }
.day:not(.future):not(.selected):hover { background: rgba(45,107,78,.08); }
.day-dow { font-size: 10px; font-weight: 600; letter-spacing: .4px; opacity: .7; }
.day-num { font-size: 17px; font-weight: 600; }
.day.selected { background: var(--accent); color: #fff; box-shadow: 0 3px 8px var(--accent-glow); }
.day.future { color: var(--ink4); opacity: .5; cursor: default; }
.week-nav { width: 24px; height: 36px; font-size: 20px; color: var(--ink3); border-radius: 9px; }
.week-nav:hover:not(.disabled) { background: rgba(45,107,78,.08); }
.week-nav.disabled { opacity: .3; cursor: default; }

/* ---- Money grid: rates + converter ---- */
.money-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, 1fr); gap: 24px; align-items: start; }
.rates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.converter-col { position: sticky; top: calc(var(--nav-h) + 24px); }
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -.2px; margin: 0 2px 12px; }

/* ---- Currency card ---- */
.cur-card { display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.cur-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 16px 30px rgba(30,42,34,.10), 0 3px 8px rgba(30,42,34,.05); }
.cur-top { display: flex; align-items: center; gap: 13px; }
.flag-tile {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; text-shadow: 0 1px 1px rgba(0,0,0,.4);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.25);
}
.cur-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cur-code { font-size: 19px; font-weight: 600; letter-spacing: -.3px; }
.cur-name { font-size: 14px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cur-rate-wrap { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cur-rate { font-size: 26px; font-weight: 600; letter-spacing: -.6px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; }
.delta .tri { font-size: 8px; font-style: normal; }
.delta.up { color: var(--positive); background: rgba(45,107,78,.13); }
.delta.down { color: var(--negative); background: rgba(185,91,67,.13); }

.tiles { display: flex; gap: 10px; }
.tile { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 11px 13px; border-radius: var(--r-tile); background: var(--accent-soft); border: 1px solid rgba(45,107,78,.12); }
.tile-title { font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--ink3); }
.tile-val { font-size: 21px; font-weight: 600; letter-spacing: -.4px; color: var(--ink); }
.tile-bank { font-size: 14px; font-weight: 500; color: var(--ink2); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-dir { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile-dir:hover { text-decoration: underline; }
.tile-dir-arrow { font-size: 12px; }

/* ---- Base pill ---- */
.base-pill { display: flex; align-items: center; gap: 7px; padding: 7px 15px 7px 7px; border-radius: var(--r-pill); background: var(--accent); color: #fff; box-shadow: 0 5px 12px var(--accent-glow); transition: .15s; }
.base-pill:hover { filter: brightness(1.06); }
.base-pill-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.base-pill-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .4px; opacity: .8; }
.base-pill-code { font-size: 17px; font-weight: 600; }

/* ---- Converter ---- */
.converter { display: flex; flex-direction: column; gap: 12px; }
.conv-card { background: rgba(255,255,255,.82); backdrop-filter: blur(20px); border: 0.5px solid rgba(255,255,255,.65); border-radius: 18px; box-shadow: var(--card-shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.conv-head { display: flex; align-items: center; justify-content: space-between; }
.conv-label { font-size: 12px; font-weight: 600; letter-spacing: .5px; color: var(--ink3); text-transform: uppercase; }
.conv-cur { display: inline-flex; align-items: center; gap: 8px; }
.conv-select { font-size: 16px; font-weight: 600; color: var(--ink); background: var(--card-tint); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 6px 12px; appearance: none; cursor: pointer; }
.conv-amount { width: 100%; text-align: right; font-size: 38px; font-weight: 600; letter-spacing: -.8px; color: var(--ink); border: none; background: none; outline: none; }
.conv-amount.readonly { color: var(--accent); }
.swap { align-self: center; width: 44px; height: 44px; margin: -24px 0; z-index: 2; border-radius: 50%; background: var(--accent); color: #fff; font-size: 20px; box-shadow: 0 5px 14px var(--accent-glow); transition: .15s; }
.swap:hover { transform: rotate(180deg); }
.conv-info { text-align: center; padding: 4px; }
.conv-rateline { font-size: 14px; font-weight: 500; color: var(--ink3); }

/* ---- Fuel ---- */
.fuel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.range-selector { display: flex; padding: 3px; border-radius: var(--r-pill); background: rgba(255,255,255,.55); border: 0.5px solid rgba(255,255,255,.65); backdrop-filter: blur(14px); }
.range-pill { padding: 8px 18px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--ink2); transition: .15s; }
.range-pill:hover:not(.active) { color: var(--ink); }
.range-pill.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 4px 10px var(--accent-glow); }

.fuel-body { display: flex; flex-direction: column; gap: 16px; }
.fuel-chart-card { padding: 22px 24px; }
.fuel-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.split { display: flex; }
.split.mt { margin-top: 14px; }
.col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.v-divider { width: 1px; background: var(--hair); margin: 0 16px; align-self: stretch; }
.hair { height: 1px; background: var(--hair); }
.col-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.col-head span { font-size: 14px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.card-head { font-size: 16px; font-weight: 600; }
.card-head-row { display: flex; align-items: baseline; justify-content: space-between; }
.card-head-aux { font-size: 14px; color: var(--ink3); }
.price-line { display: flex; align-items: baseline; gap: 3px; margin-top: 4px; }
.price-big { font-size: 28px; font-weight: 600; letter-spacing: -.6px; }
.price-unit { font-size: 16px; color: var(--ink3); }
.fuel-delta { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 15px; font-weight: 500; }
.fuel-delta .tri { font-size: 9px; font-style: normal; }
.fuel-delta.up { color: var(--positive); }
.fuel-delta.down { color: var(--negative); }
.fuel-delta .dotsep { color: var(--ink4); }
.fuel-delta-empty { height: 21px; margin-top: 6px; }
.stat-row { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0; }
.stat-label { font-size: 15px; color: var(--ink3); }
.stat-label.strong { font-weight: 500; color: var(--ink2); }
.stat-val { font-size: 18px; font-weight: 500; }

/* ---- Chart ---- */
.chart { position: relative; display: flex; flex-direction: column; }
.chart-legend { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--ink); }
.chart-legend .sw { width: 18px; height: 3px; border-radius: 2px; }
.chart-legend .lg-unit { margin-left: auto; font-size: 13px; font-weight: 700; letter-spacing: .8px; color: var(--ink3); }
.chart-svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart-axis { font-size: 13px; fill: var(--ink3); font-family: inherit; }
.chart-empty { width: 100%; height: 300px; }
.chart-tip {
  position: absolute; top: 28px; transform: translateX(-50%); pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 13px;
  box-shadow: 0 10px 22px rgba(0,0,0,.22); transition: opacity .12s; white-space: nowrap;
}
.chart-tip-date { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: rgba(255,255,255,.65); margin-bottom: 3px; }
.chart-tip-row { display: flex; gap: 14px; font-size: 15px; font-weight: 600; }
.chart-tip-row span { display: inline-flex; align-items: center; gap: 5px; }
.chart-tip-row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- Empty / error / skeleton ---- */
.empty-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 18px; }
.empty-icon { font-size: 40px; }
.empty-title { font-size: 20px; font-weight: 600; }
.empty-desc { font-size: 15px; color: var(--ink3); max-width: 360px; }
.retry { margin-top: 8px; padding: 10px 22px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; }
.skeleton { border-radius: var(--r-card); background: rgba(255,255,255,.7); position: relative; overflow: hidden; box-shadow: var(--card-shadow); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.7) 50%, transparent 80%); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---- Base sheet (modal) ---- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(20,30,24,0); display: flex; align-items: center; justify-content: center; padding: 24px; transition: background .25s; }
.overlay.open { background: rgba(20,30,24,.32); }
.overlay.closing { background: rgba(20,30,24,0); }
.sheet { width: 100%; max-width: 460px; background: var(--card-tint); border-radius: 24px; padding: 22px; max-height: 80vh; overflow-y: auto; transform: scale(.96); opacity: 0; transition: transform .22s, opacity .22s; box-shadow: 0 30px 70px rgba(30,42,34,.3); }
.overlay.open .sheet { transform: scale(1); opacity: 1; }
.sheet-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: 0 2px 8px rgba(30,42,34,.05); transition: .12s; }
.sheet-row:hover { transform: translateX(2px); }
.sheet-row.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sheet-id { display: flex; flex-direction: column; align-items: flex-start; }
.sheet-code { font-size: 17px; font-weight: 600; }
.sheet-name { font-size: 14px; color: var(--ink3); }
.sheet-mark { margin-left: auto; font-size: 18px; color: var(--accent); }

/* ---- Preloader ---- */
#preloader { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; background: linear-gradient(168deg, var(--bg-top), var(--bg-bottom)); transition: opacity .5s; }
#preloader.hide { opacity: 0; pointer-events: none; }
.pulse { position: relative; width: 90px; height: 90px; }
.pulse .ring { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border: 3px solid var(--accent); border-radius: 50%; opacity: 0; animation: ringPulse 2s ease-out infinite; }
.pulse .ring:nth-child(2) { animation-delay: .55s; }
.pulse .ring:nth-child(3) { animation-delay: 1.1s; }
.pulse .core { position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
@keyframes ringPulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(3.4); opacity: 0; } }
.wordmark { font-size: 30px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .money-grid { grid-template-columns: 1fr; }
  .converter-col { position: static; max-width: 520px; }
  .fuel-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .page { padding: 24px 0 64px; }
  .page-title { font-size: 27px; }
  .week-strip { margin-left: 0; width: 100%; max-width: none; }
  .week-cells { flex: 1; justify-content: space-between; }
  .day { width: auto; flex: 1; }
  .topnav-right { display: none; }
  .nav { margin-left: 0; }
}

/* ===================================================================
   Calculator page
   =================================================================== */
.calc-grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 24px; align-items: start; }
.calc-main { display: flex; flex-direction: column; min-width: 0; }

.calc-readout { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-height: 132px; justify-content: center; overflow: hidden; }
.calc-expr-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 3px; min-height: 38px; flex-wrap: wrap; }
.calc-expr { font-size: clamp(21px, 2.6vw, 29px); font-weight: 600; letter-spacing: -.5px; color: var(--ink); text-align: right; word-break: break-word; }
.calc-caret { width: 2px; height: 28px; background: var(--accent); border-radius: 1px; flex: none; animation: caretBlink 1.05s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.calc-result { text-align: right; font-size: 17px; color: var(--ink3); font-weight: 500; }
.calc-result-val { color: var(--accent); font-weight: 700; font-size: 25px; letter-spacing: -.4px; }
.calc-result-cur { color: var(--accent); font-weight: 600; font-size: 17px; }

.calc-pills { display: flex; gap: 8px; overflow-x: auto; padding: 16px 2px 8px; scrollbar-width: none; }
.calc-pills::-webkit-scrollbar { display: none; }
.calc-pill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 8px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--hair); font-size: 15px; font-weight: 600; color: var(--ink2); transition: .15s; }
.calc-pill:hover { border-color: rgba(45,107,78,.3); }
.calc-pill.active { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 4px 10px var(--accent-glow); }

.calc-pad { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-key {
  height: 62px; border-radius: 16px; font-size: 23px; font-weight: 600; color: var(--ink);
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: .5px solid rgba(255,255,255,.6); box-shadow: var(--card-shadow);
  transition: transform .1s, filter .12s; font-variant-numeric: tabular-nums;
}
.calc-key:hover { filter: brightness(1.04); }
.calc-key:active { transform: scale(.95); }
.calc-key.op { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.calc-key.ac { color: var(--negative); font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.calc-key.del { color: var(--negative); font-size: 21px; }
.calc-key.wide { grid-column: 1 / -1; height: 54px; }

.calc-side { position: sticky; top: calc(var(--nav-h) + 24px); }
.calc-bd { display: flex; flex-direction: column; }
.calc-bd-title { font-size: 18px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 12px; }
.calc-bd-note { font-size: 15px; color: var(--ink3); line-height: 1.45; }
.calc-bd-note.warn { color: var(--negative); }
.calc-bd-list { display: flex; flex-direction: column; gap: 2px; }
.calc-bd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.calc-bd-row + .calc-bd-row { box-shadow: inset 0 .5px 0 var(--hair); }
.calc-bd-term { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--ink2); font-variant-numeric: tabular-nums; }
.calc-bd-base { font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-bd-rate { font-size: 14px; font-weight: 500; color: var(--ink3); }
.calc-bd-src { color: var(--ink4); }

@media (max-width: 880px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-side { position: static; }
  .calc-main { max-width: 520px; }
}

/* ===================================================================
   Stations page
   =================================================================== */
.st-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 18px; }
.st-search {
  position: relative; flex: 1 1 280px; min-width: 220px; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 44px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hair); transition: border-color .15s, box-shadow .15s;
}
.st-search:focus-within { border-color: rgba(45,107,78,.4); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-search-icon { font-size: 18px; color: var(--ink3); flex: none; line-height: 1; }
.st-search-input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 16px; font-weight: 500; color: var(--ink); }
.st-search-input::placeholder { color: var(--ink4); }
.st-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.st-search-clear { flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink3); background: rgba(30,42,34,.06); transition: .12s; }
.st-search-clear:hover { background: rgba(30,42,34,.12); color: var(--ink2); }
.st-nearme {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--hair);
  font-size: 15px; font-weight: 600; color: var(--ink2); transition: .15s;
}
.st-nearme:hover { border-color: rgba(45,107,78,.3); }
.st-nearme.active { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 4px 10px var(--accent-glow); }
.st-nearme:disabled { opacity: .6; cursor: default; }
.st-nearme-glyph { font-size: 16px; line-height: 1; }
.st-count { font-size: 14px; font-weight: 500; color: var(--ink3); margin: 0 2px 16px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.st-card { display: flex; flex-direction: column; gap: 12px; transition: transform .15s, box-shadow .15s; }
.st-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 16px 30px rgba(30,42,34,.10), 0 3px 8px rgba(30,42,34,.05); }
.st-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.st-id { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.st-name { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); }
.st-cheap { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .2px; }
.st-aside { flex: none; display: flex; align-items: center; gap: 10px; }
.st-dist { font-size: 14px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-dir {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; text-decoration: none;
  background: var(--accent); color: #fff; font-size: 18px; line-height: 1;
  box-shadow: 0 4px 10px var(--accent-glow); transition: .15s;
}
.st-dir:hover { filter: brightness(1.07); transform: translateY(-1px); }
.st-addr { font-size: 14px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-prices { display: flex; gap: 10px; }
.st-price { flex: 1; display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--r-tile); background: var(--card-tint); border: 1px solid var(--hair); }
.st-price-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.st-price-label { font-size: 13px; font-weight: 600; color: var(--ink3); }
.st-price-val { margin-left: auto; font-size: 18px; font-weight: 600; letter-spacing: -.3px; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-price-unit { font-size: 13px; color: var(--ink3); }
.st-showall-wrap { display: flex; justify-content: center; margin-top: 20px; }
.st-showall { padding: 11px 26px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--hair); font-size: 15px; font-weight: 600; color: var(--accent); transition: .15s; }
.st-showall:hover { border-color: rgba(45,107,78,.3); background: var(--accent-soft); }
@media (max-width: 560px) {
  .st-nearme { padding: 8px 14px; }
  .st-search { flex-basis: 100%; max-width: none; }
}

/* ===================================================================
   Settings page
   =================================================================== */
.set-col { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.set-section { display: flex; flex-direction: column; gap: 10px; }
.set-section-label { font-size: 13px; font-weight: 700; letter-spacing: .8px; color: var(--ink3); margin-left: 6px; }
.set-card { padding: 4px 6px; }
.set-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 15px 12px; text-align: left; text-decoration: none; color: inherit;
  border-radius: var(--r-tile); transition: background .12s;
}
.set-row + .set-row { box-shadow: inset 0 0.5px 0 var(--hair); }
.set-row-button:hover, .set-row-link:hover { background: rgba(45,107,78,.06); }
.set-row-static { cursor: default; }
.set-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.set-title { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.set-sub { font-size: 14px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-trailing { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.set-value { font-size: 16px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; }
.set-chevron { font-size: 19px; font-weight: 600; color: var(--ink4); line-height: 1; }
.set-row-static .set-value { margin-left: auto; }
.set-row-link { justify-content: space-between; }
.set-row-link .set-chevron { font-size: 16px; }
.set-glyph-tile {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(45,107,78,.14);
}
.set-tag {
  margin-left: auto; flex: none; padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; border: 1px solid rgba(45,107,78,.14);
}
.set-footer { max-width: 760px; margin: 40px auto 0; text-align: center; }
.set-wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--ink2); }
.set-version { font-size: 13px; color: var(--ink4); margin-top: 4px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .set-col { gap: 22px; }
  .set-sub { white-space: normal; }
}

/* ===================================================================
   Fuel — Today → Tomorrow hero
   =================================================================== */
.fuel-hero { padding: 18px 22px; }
.fh-grid { display: flex; margin-top: 14px; }
.fh-fuel { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fh-flow { display: flex; align-items: center; gap: 16px; }
.fh-side { display: flex; flex-direction: column; gap: 3px; }
.fh-label { font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--ink4); }
.fh-price { font-size: 30px; font-weight: 600; letter-spacing: -.8px; color: var(--ink); display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.fh-price.muted { color: var(--ink4); }
.fh-unit { font-size: 15px; font-weight: 500; color: var(--ink3); }
.fh-arrow { font-size: 26px; font-weight: 400; color: var(--ink4); flex: none; }
.fh-arrow.up { color: var(--negative); }
.fh-arrow.down { color: var(--positive); }
.fh-arrow.pending { color: var(--ink4); opacity: .5; }
.fh-await { font-size: 14px; color: var(--ink3); }
.fh-flat { font-size: 15px; font-weight: 500; color: var(--ink3); }

@media (max-width: 620px) {
  .fh-grid { flex-direction: column; gap: 18px; }
  .fh-grid .v-divider { width: auto; height: 1px; margin: 0; }
}

/* ===================================================================
   Fuel calculator (Fill-up / Usage)
   =================================================================== */
.fuel-head-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fuel-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; align-items: start; }
.fc-card { display: flex; flex-direction: column; gap: 18px; padding: 20px 22px; }
.fc-tabs { align-self: flex-start; }

.fc-fuels { display: flex; gap: 10px; }
.fc-fuel { flex: 1; display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-radius: var(--r-tile); background: var(--card); border: 1px solid var(--hair); transition: .15s; }
.fc-fuel:hover { border-color: rgba(45,107,78,.3); }
.fc-fuel.active { background: var(--accent-soft); border-color: rgba(45,107,78,.35); box-shadow: inset 0 0 0 1px rgba(45,107,78,.25); }
.fc-fuel .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fc-fuel-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.fc-fuel-price { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; }

.fc-body { display: flex; flex-direction: column; gap: 16px; }
.fc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fc-fields.three { grid-template-columns: 1fr 1fr 1fr; }
.fc-field { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r-tile); background: var(--card-tint); border: 1px solid var(--hair); min-width: 0; }
.fc-field-label { font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--ink3); text-transform: uppercase; }
.fc-field-row { display: flex; align-items: baseline; gap: 6px; }
.fc-input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 26px; font-weight: 600; letter-spacing: -.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fc-input::placeholder { color: var(--ink4); }
.fc-field-unit { flex: none; font-size: 15px; font-weight: 500; color: var(--ink3); }

.fc-presets { display: flex; gap: 8px; }
.fc-preset { padding: 8px 16px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--hair); font-size: 14px; font-weight: 600; color: var(--ink2); transition: .15s; }
.fc-preset:hover { border-color: rgba(45,107,78,.3); background: var(--accent-soft); color: var(--accent); }

.fc-nudge { font-size: 15px; font-weight: 500; color: var(--ink2); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-tile); background: var(--card-tint); border: 1px solid var(--hair); }
.fc-nudge .dotsep { color: var(--ink4); }
.fc-nudge strong { font-weight: 700; }
.fc-nudge.muted { color: var(--ink3); }
.fc-nudge.up { color: var(--negative); background: rgba(185,91,67,.08); border-color: rgba(185,91,67,.2); }
.fc-nudge.down { color: var(--positive); background: var(--accent-soft); border-color: rgba(45,107,78,.2); }

.fc-usage-out { display: flex; flex-direction: column; gap: 14px; }
.fc-usage-hero { display: flex; align-items: baseline; gap: 8px; padding: 6px 2px; }
.fc-usage-big { font-size: 44px; font-weight: 700; letter-spacing: -1.2px; color: var(--accent); font-variant-numeric: tabular-nums; }
.fc-usage-unit { font-size: 17px; font-weight: 500; color: var(--ink3); }
.fc-usage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fc-usage-stat { padding: 12px 14px; border-radius: var(--r-tile); background: var(--card-tint); border: 1px solid var(--hair); }
.fc-usage-stat-label { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--ink3); text-transform: uppercase; }
.fc-usage-stat-val { font-size: 18px; font-weight: 600; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }

.fc-side { position: sticky; top: calc(var(--nav-h) + 24px); }
.fc-info { display: flex; flex-direction: column; }
.fc-info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.fc-info-row + .fc-info-row { box-shadow: inset 0 .5px 0 var(--hair); }
.fc-info-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

@media (max-width: 880px) {
  .fuel-calc { grid-template-columns: 1fr; }
  .fc-side { position: static; }
}
@media (max-width: 520px) {
  .fc-fields, .fc-fields.three, .fc-usage-stats { grid-template-columns: 1fr; }
  .fc-fuels { flex-direction: column; }
}

/* ---- Nav: keep 5 items tidy on mid widths ---- */
@media (max-width: 720px) {
  .nav { gap: 2px; margin-left: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .navlink { padding: 8px 12px; font-size: 15px; }
}
