/* admin.css — Terma admin: money tracker + coffee shop (30 Oct 2026). Phone first; a side rail on desktop. */

:root {
  --bg: #14100c; --bg-2: #1b1510; --surface: #211a14; --surface-2: #2a2119; --surface-3: #33281e;
  --border: #3a2e23; --text: #f5efe7; --muted: #b0a596; --faint: #7d7266;
  --accent: #c99a53; --accent-2: #e0b56b;
  --in: #3ddc84; --out: #ff8a6b; --move: #6bb5ff; --warn: #ffc857; --bad: #ff6b6b;
  --radius: 16px; --tabs-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); line-height: 1.45;
  background: radial-gradient(120% 60% at 50% -10%, #3b2718 0%, #1d130c 55%, var(--bg) 100%) fixed var(--bg);
  min-height: 100vh; overscroll-behavior-y: contain;
}

a { color: var(--accent); text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; }

a, button, input, select, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

svg.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.num { font-variant-numeric: tabular-nums; }

.c-in { color: var(--in); }
 .c-out { color: var(--out); }
 .c-move { color: var(--move); }
 .c-muted { color: var(--muted); }
/* ---------- lock screen ---------- */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }

.gate-card {
  width: 100%; max-width: 400px; background: rgba(30, 24, 19, .94); border: 1px solid var(--border);
  border-radius: 22px; padding: 30px 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); text-align: center;
}

.glow {
  display: inline-block; font-size: clamp(2.4rem, 12vw, 3.6rem); font-weight: 800; letter-spacing: 6px; text-transform: uppercase;
  background: linear-gradient(180deg, #fbe7be, #c99a53); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: glowpulse 2.6s ease-in-out infinite;
}

@keyframes glowpulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(201,154,83,.55)) drop-shadow(0 0 18px rgba(201,154,83,.35)); }
  50% { filter: drop-shadow(0 0 12px rgba(224,181,107,.9)) drop-shadow(0 0 34px rgba(224,181,107,.55)); }
}

.gate-card h2 { font-size: 1.15rem; margin: 6px 0 4px; }

.gate-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.gate-card .field { text-align: left; }

.gate-card .btn { width: 100%; margin-top: 6px; }

.gate-card .small-link { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); padding: 8px; }

.shield { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: rgba(61,220,132,.07); border: 1px solid rgba(61,220,132,.25); border-radius: 12px; padding: 12px; font-size: 13px; color: #cfe9d9; margin: 14px 0; }

.warnbox { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: rgba(255,200,87,.08); border: 1px solid rgba(255,200,87,.35); border-radius: 12px; padding: 12px; font-size: 13px; color: #f3e3bd; margin: 14px 0; }

.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px; margin: 10px 0 4px; cursor: pointer; }

.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: none; }

.err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin-top: 8px; }

.meter { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin: -4px 0 12px; }

.meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
/* ---------- inputs & buttons ---------- */

.field { display: block; margin-bottom: 14px; }

.lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; letter-spacing: .2px; }

.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); outline: none; font-size: 16px; transition: border-color .15s;
}

.input:focus { border-color: var(--accent); }

textarea.input { min-height: 70px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 13px; font-weight: 700; font-size: 15.5px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a120b;
}

.btn:disabled { opacity: .55; cursor: wait; }

.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

.btn.danger { background: rgba(255,107,107,.12); color: var(--bad); border: 1px solid rgba(255,107,107,.35); }

.btn.sm { min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }

.btn-row { display: flex; gap: 10px; }

.btn-row > * { flex: 1; }


.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }

.chips.scroll::-webkit-scrollbar { display: none; }

.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}

.chip.on { background: rgba(201,154,83,.16); border-color: var(--accent); color: var(--accent-2); }

.chip .sw { width: 10px; height: 10px; border-radius: 50%; }

.seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 4px; gap: 4px; }

.seg button { flex: 1; min-height: 42px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }

.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.3); }

.seg.kind button.on[data-k="in"] { color: var(--in); }
 .seg.kind button.on[data-k="out"] { color: var(--out); }
 .seg.kind button.on[data-k="move"] { color: var(--move); }
/* ---------- app frame ---------- */

.app { min-height: 100vh; }

.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(20,16,12,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(58,46,35,.7);
}

.bar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }

.bar-logo { width: 38px; height: 38px; border-radius: 10px; display: block; flex: none; }
/* Orbit logo on the lock screen (30 Oct) */

.gate-logo { width: 84px; height: 84px; border-radius: 20px; display: block; margin: 0 auto 10px; box-shadow: 0 10px 30px rgba(224,173,92,.25); }

.bar-title b { display: block; font-size: 1.08rem; }

.bar-title small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar-actions { display: flex; gap: 4px; }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }

.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.sync .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--in); box-shadow: 0 0 0 4px rgba(61,220,132,.16); }

.sync.wait .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(255,200,87,.16); }

.sync.bad .dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255,107,107,.18); }

.sync.busy .dot { animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: .3; } }


.view { padding: 16px 16px calc(var(--tabs-h) + 30px + var(--safe-b)); max-width: 1180px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: stretch; justify-content: space-around;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(20,16,12,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
}

.tabs a, .tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; }

.tabs a.on { color: var(--accent-2); }

.tabs .tab-add i { width: 50px; height: 50px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a120b; box-shadow: 0 8px 24px rgba(201,154,83,.45); }

.tabs .tab-add i svg { width: 26px; height: 26px; stroke-width: 2.6; }

.tabs .tab-add { color: var(--accent-2); }


.tabs [data-tab="home"] { order: 1; }

.tabs [data-tab="coffee"] { order: 4; }
 .tabs .tab-add { order: 8; }
/* ---------- cards ---------- */

.card { background: rgba(33,26,20,.92); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }

.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.card-h h3 { font-size: 15px; letter-spacing: .2px; }

.card-h a, .card-h button.link { font-size: 13px; color: var(--accent); font-weight: 600; padding: 6px 0; }

.section-t { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--faint); font-weight: 700; margin: 22px 2px 10px; }


.hero {
  background: linear-gradient(145deg, #3a2716, #241810 60%, #1d140d); border: 1px solid #4a3622; border-radius: 22px;
  padding: 20px 18px; margin-bottom: 14px; position: relative; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.35);
}

.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(224,181,107,.22), transparent 70%); }

.hero .k { font-size: 13px; color: #d9c6a8; }

.hero .v { font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: -.5px; margin: 2px 0 12px; }

.hero .accs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }

.hero .accs::-webkit-scrollbar { display: none; }

.acc-pill { flex: none; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 12px; font-size: 12px; color: #d9c6a8; }

.acc-pill b { display: block; font-size: 14px; color: var(--text); }


.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }

.tile { background: rgba(33,26,20,.92); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-width: 0; }

.tile .t { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }

.tile .r { display: flex; justify-content: space-between; gap: 4px; font-size: 12.5px; font-weight: 700; }

.tile .r + .r { margin-top: 3px; }

.tile .net { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 13px; font-weight: 800; }


.biz { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(58,46,35,.7); cursor: pointer; }

.biz:first-of-type { border-top: 0; padding-top: 2px; }

.biz .av { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #160f09; flex: none; }

.biz .mid { flex: 1; min-width: 0; }

.biz .mid b { display: block; font-size: 14.5px; }

.biz .mid small { color: var(--muted); font-size: 12px; }

.biz .amt { text-align: right; font-weight: 800; font-size: 14.5px; }

.biz .amt small { display: block; font-weight: 600; color: var(--muted); font-size: 11.5px; }

.share { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: rgba(201,154,83,.16); color: var(--accent-2); margin-left: 6px; vertical-align: 1px; }


.split { display: flex; height: 12px; border-radius: 9px; overflow: hidden; background: var(--surface-3); margin: 8px 0 10px; }

.split i { display: block; height: 100%; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }

.legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
/* transactions */

.tx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(58,46,35,.6); cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 63px; }

.tx:first-child { border-top: 0; }

.tx .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); flex: none; }

.tx .mid { flex: 1; min-width: 0; }

.tx .mid b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tx .mid small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tx .amt { font-weight: 800; font-size: 15px; text-align: right; white-space: nowrap; }

.tx .amt small { display: block; color: var(--faint); font-weight: 600; font-size: 11px; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 1px; }

.tag.want { background: rgba(255,107,107,.14); color: #ff9c9c; }

.tag.auto { background: rgba(107,181,255,.14); color: #9ccbff; }

.day-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); font-weight: 700; margin: 18px 4px 6px; }

.day-h:first-child { margin-top: 4px; }

.empty { text-align: center; color: var(--muted); padding: 36px 12px; font-size: 14px; }

.empty .e { font-size: 34px; margin-bottom: 6px; }
/* period navigator */

.period { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.period .lbl-p { flex: 1; text-align: center; font-weight: 800; font-size: 15px; }

.period .icon-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

.period .icon-btn:disabled { opacity: .35; }

.sumrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }

.sumrow div { background: rgba(33,26,20,.92); border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; }

.sumrow small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }

.sumrow b { font-size: 14.5px; }

.search { position: relative; margin-bottom: 10px; }

.search svg { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; color: var(--faint); }

.search .input { padding-left: 42px; }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }

.select { appearance: none; -webkit-appearance: none; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b0a596' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 34px; }
/* charts */

.chart { width: 100%; height: auto; display: block; }

.chart text { fill: var(--faint); font-size: 10px; font-family: inherit; }

.chart .g { stroke: rgba(255,255,255,.06); stroke-width: 1; }

.chart .bi { fill: var(--in); }
 .chart .bo { fill: var(--out); }


.pr-chart { max-width: 300px; margin: 0 auto 6px; }

.pr-chart .chart { max-height: 130px; }

.pr-chart .legend { justify-content: center; font-size: 12px; }

.hbar { margin: 10px 0; }

.hbar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 5px; }

.hbar .top span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hbar .top b { white-space: nowrap; }

.hbar .tr { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }

.hbar .tr i { display: block; height: 100%; border-radius: 9px; }

.delta { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }

.delta.up { background: rgba(61,220,132,.13); color: var(--in); }

.delta.down { background: rgba(255,107,107,.13); color: var(--bad); }

table.months { width: 100%; border-collapse: collapse; font-size: 13px; }

table.months th { text-align: right; color: var(--faint); font-weight: 700; font-size: 11.5px; padding: 6px 4px; }

table.months th:first-child, table.months td:first-child { text-align: left; }

table.months td { text-align: right; padding: 9px 4px; border-top: 1px solid rgba(58,46,35,.6); font-weight: 700; }
/* coffee: orders + stock */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }

.stat { background: rgba(33,26,20,.92); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px; }

.stat .label { color: var(--muted); font-size: 12.5px; }

.stat .value { font-size: 1.35rem; font-weight: 800; margin-top: 2px; }

.stat.green { border-left-color: var(--in); }
 .stat.green .value { color: var(--in); }

.order { background: rgba(33,26,20,.92); border: 1px solid var(--border); border-radius: 14px; padding: 15px; margin-bottom: 12px; }

.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }

.order-head h4 { font-size: 15px; }

.order .meta { color: var(--muted); font-size: 13px; margin-top: 3px; word-break: break-word; }

.order .meta a { color: inherit; text-decoration: underline; text-decoration-color: rgba(201,154,83,.5); }

.badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

.b-pending { background: rgba(201,154,83,.18); color: var(--accent); }
 .b-confirmed { background: rgba(74,168,255,.18); color: #6bb5ff; }

.b-packed { background: rgba(167,139,250,.2); color: #c4b5fd; }
 .b-on_the_way { background: rgba(224,181,107,.22); color: var(--accent-2); }

.b-picked_up { background: rgba(45,212,191,.16); color: #5eead4; }
 .b-at_warehouse { background: rgba(251,146,60,.18); color: #fdba74; }

.b-delivered { background: rgba(61,220,132,.16); color: var(--in); }
 .b-cancelled { background: rgba(255,107,107,.16); color: #ff9c9c; }

.items { font-size: 13px; color: #ddd; margin-bottom: 10px; }
 .items div { padding: 2px 0; }

.order-foot { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 11px; }

.total { font-weight: 800; color: var(--accent); }

.order-act { display: flex; gap: 8px; }

.order-act .btn { flex: none; }

.order-act select { flex: 1; min-height: 40px; }


.oc { padding: 16px 18px; }

.oc-top { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.oc .order-head { margin-bottom: 14px; align-items: center; }

.oc-who { min-width: 0; }

.oc-name { font-size: 21px !important; font-weight: 800; line-height: 1.2; word-break: break-word; }

.oc-phone { display: inline-block; margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--accent); text-decoration: none; letter-spacing: .02em; }

.oc .badge { font-size: 12px; padding: 6px 12px; }

.oc-grid { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--border); margin-bottom: 12px; }

.oc-k { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }

.oc-v { font-size: 14px; color: var(--text); line-height: 1.45; word-break: break-word; }

.oc-track { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(201,154,83,.14); color: var(--accent); font-size: 12.5px; font-weight: 700; }

.oc-items { border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; margin-bottom: 12px; }

.oc-items div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }

.oc-items div + div { border-top: 1px dashed var(--border); }

.oc-steps { margin-bottom: 12px; }

.oc-dots { display: flex; gap: 5px; margin-bottom: 7px; }

.oc-dots span { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }

.oc-dots span.done { background: rgba(201,154,83,.55); }

.oc-dots span.now { background: var(--accent); }

.oc-step-txt { font-size: 13px; color: var(--text); }

.order-act { flex-wrap: wrap; }

.order-act .oc-next { flex: 1 1 auto; font-weight: 800; }

@media (max-width: 899px) {

  .order-act { gap: 6px; }
  .order-act .oc-next { order: -1; flex-basis: 100%; min-height: 46px; }
  .order-act > .btn:not(.oc-next) { flex: 1 1 auto; min-width: 0; padding: 0 8px; }
}

.oc-total { display: flex; flex-direction: column; }

.oc-total small { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.oc-total span { font-size: 24px; font-weight: 800; color: var(--accent); line-height: 1.2; }

.stock-p { margin-bottom: 14px; }

.stock-p h4 { font-size: 14.5px; margin-bottom: 8px; }

.srow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(58,46,35,.6); }

.srow:first-of-type { border-top: 0; }

.srow .mid { flex: 1; min-width: 0; }

.srow .mid b { display: block; font-size: 14px; }

.srow .mid small { color: var(--muted); font-size: 12px; }

.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

.pill.ok { background: rgba(61,220,132,.14); color: var(--in); }

.pill.low { background: rgba(255,200,87,.16); color: var(--warn); }

.pill.none { background: rgba(255,107,107,.16); color: #ff9c9c; }

.pill.free { background: var(--surface-3); color: var(--muted); }

.note-line { font-size: 12.5px; color: var(--muted); margin: -4px 2px 12px; }
/* settings lists */

.row-link { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid rgba(58,46,35,.6); width: 100%; text-align: left; }

.row-link:first-of-type { border-top: 0; }

.row-link .mid { flex: 1; min-width: 0; }

.row-link .mid b { display: block; font-size: 14.5px; }

.row-link .mid small { color: var(--muted); font-size: 12.5px; }

.row-link .go { color: var(--faint); }

.toggle { position: relative; width: 50px; height: 30px; flex: none; }

.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .2s; pointer-events: none; }

.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }

.toggle input:checked + span { background: var(--accent); }

.toggle input:checked + span::after { transform: translateX(20px); }

.colors { display: flex; flex-wrap: wrap; gap: 10px; }

.colors button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; }

.colors button.on { border-color: #fff; }
/* ---------- bottom sheet ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }

.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); animation: up .22s cubic-bezier(.2,.9,.3,1); overscroll-behavior: contain;
}

.sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 4px auto 10px; }

.sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.sheet-h h3 { font-size: 1.1rem; }

@keyframes up { from { transform: translateY(40px); opacity: .4; } }

@keyframes fade { from { opacity: 0; } }

.amt-in { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 6px 16px; margin: 14px 0; }

.amt-in span { font-size: 1.2rem; font-weight: 800; color: var(--muted); }

.amt-in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 2.1rem; font-weight: 800; padding: 6px 0; }

.amt-in:focus-within { border-color: var(--accent); }

.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }

.hint b { color: var(--in); }


.toasts { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 18px + var(--safe-b)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); }

.toast { background: #2e241b; border: 1px solid var(--border); color: var(--text); padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: up .2s; max-width: 420px; text-align: center; }

.toast.err { border-color: rgba(255,107,107,.5); color: #ffb3b3; }
/* ---------- desktop ---------- */

@media (min-width: 900px) {

  .app { padding-left: 92px; }
  .tabs {
    top: 0; right: auto; width: 92px; height: auto; flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: 86px 0 20px; border-top: 0; border-right: 1px solid var(--border);
  }
  .tabs a, .tabs button { flex: none; height: 66px; font-size: 11.5px; }
  .tabs a:hover { color: var(--text); }
  .tabs [data-tab] { order: 0; }
  .tabs .tab-add { order: -1; margin-bottom: 10px; }
  .tabs .tab-add i { margin-top: 0; }
  .bar { padding-left: 24px; padding-right: 24px; }
  .view { padding: 24px 28px 40px; max-width: none; }
  .grid2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
  .tiles { gap: 14px; }
  .tile { padding: 16px; }
  .tile .r { font-size: 14px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .order-foot { flex-direction: row; justify-content: space-between; align-items: center; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; border-bottom: 1px solid var(--border); max-height: 88vh; }
  .toasts { bottom: 28px; }
}

@media (max-width: 380px) {

  .tiles { gap: 6px; } .tile { padding: 10px 8px; } .tile .r { font-size: 11.5px; }
}


@media (prefers-reduced-motion: reduce) {
 *:not(.orbit-ring), *::before, *::after { animation: none !important; transition: none !important; }
}
/* Windows contrast themes repaint colours: show the chosen chip / tab with an outline instead */

@media (forced-colors: active) {

  .chip.on, .seg button.on, .colors button.on { outline: 3px solid Highlight; outline-offset: 1px; }
  .tabs a.on { outline: 2px solid Highlight; outline-offset: -6px; }
}
/* Records (30 Oct): All / Income / Expenses tabs + the big total of the open list */

.rec-tabs { margin-bottom: 10px; }

.rec-tabs button { min-height: 48px; font-size: 15px; }

.rec-tabs button.on[data-t="in"] { color: var(--in); }

.rec-tabs button.on[data-t="out"] { color: var(--out); }

.rec-total { border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--border); display: grid; gap: 2px; }

.rec-total small { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.rec-total b { font-size: 1.7rem; letter-spacing: -.3px; }

.rec-total span { font-size: 12.5px; color: var(--muted); }

.rec-total.in { background: rgba(61,220,132,.08); border-color: rgba(61,220,132,.3); }
 .rec-total.in b { color: var(--in); }

.rec-total.out { background: rgba(255,138,107,.08); border-color: rgba(255,138,107,.3); }
 .rec-total.out b { color: var(--out); }
/* To collect (30 Oct): money people still have to give */

.c-warn { color: var(--warn); }

.rec-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 56px; font-size: 12.5px; line-height: 1.15; padding: 4px 2px; }

.rec-tabs button span { font-size: 17px; }

.rec-tabs button.on[data-t="due"] { color: var(--warn); }

.rec-total.owe { background: rgba(255,200,87,.08); border-color: rgba(255,200,87,.32); }
 .rec-total.owe b { color: var(--warn); }

.due { padding: 12px 0; border-top: 1px solid rgba(58,46,35,.6); cursor: pointer; }

.card > .due:first-child, .due-sum + .due { border-top: 0; }

.due-top { display: flex; align-items: center; gap: 12px; }

.due-top .mid { flex: 1; min-width: 0; }

.due-top .mid b { display: block; font-size: 15px; }

.due-top .mid small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.due-top .amt { text-align: right; font-weight: 800; font-size: 15.5px; white-space: nowrap; }

.due-top .amt small { display: block; color: var(--faint); font-weight: 600; font-size: 11px; }

.due .tr { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin: 8px 0 0; }

.due .tr i { display: block; height: 100%; background: var(--in); border-radius: 9px; }

.due-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); margin-top: 6px; }

.due.done { opacity: .72; }

.due-sum { display: flex; align-items: baseline; gap: 8px; margin: -2px 0 6px; }

.due-sum b { font-size: 1.5rem; }

.due-sum span { color: var(--muted); font-size: 13px; }
/* Coffee (30 Oct): − / + stock steppers, order form */

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; flex: none; }

.stepper button { width: 42px; height: 40px; border-radius: 9px; font-size: 22px; font-weight: 800; color: var(--text); background: var(--surface-3); }

.stepper button:disabled { opacity: .35; cursor: not-allowed; }

.stepper b { min-width: 40px; text-align: center; font-size: 1.15rem; }

.srow-acts { display: flex; gap: 18px; padding: 0 0 10px; margin-top: -4px; }

.srow-acts .link { font-size: 12.5px; color: var(--accent); font-weight: 600; padding: 4px 0; }

.chip:disabled { opacity: .4; cursor: not-allowed; }

.order-act .btn.danger { padding: 0 12px; }
/* Stock per roast (30 Oct) */

.roast-h { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 2px; padding: 8px 12px; border-radius: 10px; font-weight: 800; font-size: 13.5px; }

.roast-h span { font-weight: 700; font-size: 12px; color: var(--muted); }

.roast-h.medium { background: rgba(201,154,83,.12); color: var(--accent-2); }

.roast-h.dark { background: rgba(255,255,255,.05); color: #e8dccb; }

.stock-p h4 + .roast-h { margin-top: 4px; }


.roast-part { border-radius: 20px; padding: 14px; margin-bottom: 16px; border: 1px solid var(--border); }

.roast-part.medium { background: linear-gradient(160deg, rgba(201,154,83,.16), rgba(33,26,20,.94) 55%); border-color: rgba(201,154,83,.45); }

.roast-part.dark { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(20,16,12,.96) 55%); border-color: #4a4038; }

.roast-top { display: flex; align-items: baseline; gap: 10px; padding: 2px 4px 10px; }

.roast-top .dot { width: 16px; height: 16px; border-radius: 50%; align-self: center; flex: none; }

.roast-part.medium .dot { background: #a0673a; box-shadow: 0 0 0 4px rgba(160,103,58,.25); }

.roast-part.dark .dot { background: #2a1a12; border: 2px solid #6b5444; }

.roast-top h3 { flex: 1; font-size: 1.25rem; letter-spacing: .3px; text-transform: uppercase; }

.roast-part.medium .roast-top h3 { color: var(--accent-2); }

.roast-top b { font-size: 1.5rem; }

.roast-top small { color: var(--muted); font-size: 12.5px; }


.roast-kind { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .8px; color: var(--text); font-weight: 800; margin: 16px 4px 10px; }

.pack-box { display: flex; align-items: center; gap: 12px; background: rgba(20,16,12,.55); border: 1px solid var(--border); border-radius: 16px; padding: 10px; margin-bottom: 10px; }

.pack-box.is-out { border-color: rgba(255,107,107,.45); }

.pack-img { width: 74px; height: 100px; object-fit: cover; border-radius: 12px; flex: none; background: var(--surface-3); }

.pack-box.is-out .pack-img { filter: grayscale(.8) brightness(.7); }

.pack-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.pack-mid b { font-size: 1.3rem; line-height: 1.1; }

.pack-mid small { color: var(--muted); font-size: 12px; }

.pack-acts { display: flex; gap: 14px; margin-top: 2px; }

.pack-acts .link { font-size: 12.5px; color: var(--accent); font-weight: 700; padding: 4px 0; }

.pack-count { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }

.pack-count button { width: 50px; height: 42px; border-radius: 12px; font-size: 24px; font-weight: 800; background: var(--surface-3); color: var(--text); border: 1px solid var(--border); }

.pack-count button[data-step="1"] { background: rgba(61,220,132,.14); color: var(--in); border-color: rgba(61,220,132,.35); }

.pack-count button[data-step="-1"] { background: rgba(255,138,107,.12); color: var(--out); border-color: rgba(255,138,107,.35); }

.pack-count button:disabled { opacity: .35; cursor: not-allowed; }

.pack-count b { font-size: 1.5rem; min-width: 50px; text-align: center; }

@media (min-width: 900px) {

  .roast-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}


.oc-copy { color: var(--accent-2); border-color: rgba(201,154,83,.45); }

.oc-paid { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: rgba(61,220,132,.14); color: var(--in); font-size: 12.5px; font-weight: 700; }

.hc { display: flex; flex-direction: column; gap: 8px; }

.hc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

.hc-row .mid { flex: 1; min-width: 0; }

.hc-row small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }

.hc-row b { display: block; font-size: 15.5px; word-break: break-word; }

.hc-row .btn { flex: none; min-width: 78px; }

.hp-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(58,46,35,.6); cursor: pointer; }

.hp-row:first-child { border-top: 0; }

.hp-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

.hp-row .mid { flex: 1; min-width: 0; }

.hp-row .mid b { display: block; font-size: 14.5px; }

.hp-row .mid small { color: var(--muted); font-size: 12px; }

.hp-row > .num { font-weight: 700; }

.hp-sum { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

.hp-sum div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--muted); }

.hp-sum div b { color: var(--text); }

.hp-sum .t { border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 8px; font-size: 16px; color: var(--text); font-weight: 700; }

.hp-sum .t b { font-size: 1.3rem; }

.cu { padding: 16px 18px; }

.cu-top { display: flex; align-items: flex-start; gap: 12px; }

.cu-top .mid { flex: 1; min-width: 0; }

.cu-name { display: block; font-size: 18px; }

.cu-phone { display: inline-block; margin-top: 2px; font-size: 15.5px; font-weight: 700; color: var(--accent-2); }

.cu-num { text-align: center; flex: none; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

.cu-num b { display: block; font-size: 1.35rem; line-height: 1.1; }

.cu-num small { color: var(--muted); font-size: 11px; }

.cu-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }

.cu-meta b { color: var(--text); }

.cu-addr { flex-basis: 100%; }

.cu-orders { margin-top: 10px; border-top: 1px solid rgba(58,46,35,.6); }

.cu-orders > button { width: 100%; display: grid; grid-template-columns: 1fr auto 90px; align-items: center; gap: 10px; padding: 10px 0; font-size: 13.5px; text-align: left; border-bottom: 1px solid rgba(58,46,35,.4); }

.cu-orders > button b { text-align: right; }
/* ---------- 1 Nov: small order boxes, medium box at the top, Terma bank top box ---------- */

.hero .accs.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; position: relative; z-index: 1; }

.hero .accs.wrap .acc-pill { flex: 1 1 40%; min-width: 0; }

.stats.mini { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }

.stats.mini .stat { padding: 8px 8px; border-left-width: 3px; border-radius: 10px; min-width: 0; }

.stats.mini .label { font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats.mini .value { font-size: 13.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.o-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.o-tools .btn { flex: 1 1 auto; min-height: 36px; padding: 0 10px; font-size: 12.5px; }

.o-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.o-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 11px; text-align: left; background: rgba(33,26,20,.92); border: 1px solid var(--border); border-radius: 12px; color: var(--text); }

.o-tile:hover { border-color: var(--accent); }

.o-tile > b { max-width: 100%; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.o-t-phone { font-size: 12.5px; font-weight: 700; color: var(--accent); }

.o-t-note { max-width: 100%; font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.o-tile .badge { margin-top: 5px; font-size: 10.5px; padding: 3px 8px; }

.o-off { display: block; margin: 12px auto 0; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }

.o-found { margin: 0 2px 8px; font-size: 12.5px; color: var(--muted); }

.low-bar { display: block; width: 100%; margin-bottom: 10px; padding: 9px 12px; text-align: left; border-radius: 12px; border: 1px solid rgba(255,200,87,.45); background: rgba(255,200,87,.1); color: var(--text); }

.low-bar > b { display: block; font-size: 13px; color: var(--warn, #ffc857); }

.low-list { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 4px; font-size: 12px; color: var(--muted); }

.low-list .out { color: var(--out); font-weight: 700; }

.ro { padding: 12px 14px; }

.ro .card-h { margin-bottom: 6px; }

.ro-row { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-top: 1px solid rgba(58,46,35,.6); }

.ro-who { flex: 1; min-width: 0; text-align: left; color: var(--text); }

.ro-who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ro-who small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ro-row .btn { flex: none; min-height: 34px; padding: 0 10px; font-size: 12.5px; }

.ro-row .icon-btn { flex: none; }

.sheet-wrap.top-box { align-items: flex-start; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px; }

.sheet-wrap.top-box .sheet { max-width: 520px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-bottom: 1px solid var(--border); border-radius: 18px; padding: 12px 14px 14px; }

.sheet-wrap.top-box .sheet::before { display: none; }

.sheet-wrap.top-box .sheet-h { margin-bottom: 6px; }

.sheet-wrap.top-box .oc { padding: 0; }

.sheet-wrap.top-box .oc-name { display: none; }

.sheet-wrap.top-box .oc .order-head { margin-bottom: 8px; }

.sheet-wrap.top-box .oc-phone { margin-top: 0; font-size: 16px; }

.sheet-wrap.top-box .oc-grid { padding: 10px 0 0; margin-bottom: 10px; }

.sheet-wrap.top-box .oc-total span { font-size: 20px; }

.sheet-wrap.top-box .order-foot { flex-direction: column; align-items: stretch; }

.sheet-wrap.top-box .order-act { gap: 5px; }

.sheet-wrap.top-box .order-act .btn:not(.oc-next) { min-height: 38px; padding: 0 8px; font-size: 12.5px; }

.sheet-wrap.top-box .order-act .btn.danger { flex: 0 0 auto; }

@media (min-width: 900px) {

  .hero .accs.wrap .acc-pill { flex-basis: 20%; }
  .o-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

.pr-table { margin-top: 12px; font-size: 14px; }

.pr-table > div { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(58,46,35,.6); }

.pr-table > div > *:not(:first-child) { text-align: right; }

.pr-table .pr-h { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-top: 0; }

.pr-cat { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; align-items: center; gap: 12px; padding: 6px 0; font-size: 13.5px; }

.pr-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }

.pr-bar i { display: block; height: 100%; border-radius: 99px; background: var(--out); }

.bk-card { border-color: rgba(201,154,83,.45); }

@media (max-width: 520px) {

  #cSeg button { font-size: 12.5px; padding: 0 2px; }
  .pr-cat { grid-template-columns: 1fr auto; }
  .pr-cat .pr-bar { display: none; }
}


html.low-theme {
  --bg: #190a0a; --bg-2: #220e0e; --surface: #2a1212; --surface-2: #351717; --surface-3: #472020;
  --border: #5a2626; --text: #fdf0ee; --muted: #d6acA6; --faint: #a87d78;
  --accent: #ff6b5e; --accent-2: #ff9a8b; --warn: #ffc27a; --out: #ff8b80;
}

html.low-theme body { background: radial-gradient(90% 55% at 85% -8%, #6b1414 0%, transparent 60%), radial-gradient(80% 50% at 0% 0%, #3f0d0d 0%, transparent 55%), var(--bg); background-attachment: fixed; }

html.low-theme .bar { background: rgba(25,10,10,.84); border-bottom-color: rgba(90,38,38,.8); }

html.low-theme .tabs { background: rgba(25,10,10,.95); }

html.low-theme .tabs .tab-add i { box-shadow: 0 8px 24px rgba(255,107,94,.35); color: #2a0a08; }

html.low-theme .card { background: rgba(42,18,18,.9); }

html.low-theme .toast { background: #351717; }

html.low-theme .btn:not(.ghost):not(.danger) { color: #2a0a08; }

html.low-theme .roast-part.medium { background: linear-gradient(160deg, rgba(255,107,94,.2), rgba(42,18,18,.94) 55%); border-color: rgba(255,107,94,.5); }

html.low-theme .roast-part.dark { background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(25,10,10,.96) 55%); border-color: #5a2626; }

html.low-theme .roast-part.medium .roast-top h3 { color: var(--accent-2); }

html.low-theme .pack-box { background: rgba(25,10,10,.6); }

html.low-theme .pack-box.is-out { border-color: rgba(255,107,94,.7); }

html.low-theme .pack-box.is-out .pack-img { filter: none; }
/* the coffee photo must still show which roast it is */

html.low-theme .pack-img { border: 1px solid var(--border); }

.low-back { margin-bottom: 12px; }

.low-total { background: rgba(255,107,94,.12) !important; border-color: rgba(255,107,94,.45) !important; margin-top: 0; }

.low-total b { color: var(--accent-2) !important; }



@media (max-width: 899px) {

}


.tabs a { position: relative; }

.tab-badge { position: absolute; top: 5px; left: 50%; margin-left: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ff6a4d; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

@media (max-width: 620px) {

}
/* (the Windows contrast theme would wipe these colours, and the bars and step dots would disappear with them) */


.orbit-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); pointer-events: none; }

.orbit-ring.o1 { width: 170px; height: 170px; right: -70px; top: -80px; }

.orbit-ring.o2 { width: 100px; height: 100px; right: -35px; top: -45px; }

.orbit-ring.o1::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #5eeaf5; box-shadow: 0 0 14px #5eeaf5; left: 11%; top: 81%; }

.orbit-ring.o2::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #c4b5fd; box-shadow: 0 0 12px #c4b5fd; left: 3%; top: 26%; }

.orbit-ring { animation: ringSpin 26s linear infinite; }
 .orbit-ring.o2 { animation-duration: 15s; animation-direction: reverse; }
/* so you can see where Tab is */

#app :focus-visible, #sheet :focus-visible, #gate :focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }


html, body { overscroll-behavior-x: none; }

#swipeBack { position: fixed; left: 0; top: 50%; z-index: 90; width: 560px; height: 380px; margin-top: -190px; pointer-events: none; view-transition-name: swipe-fire; }


.bar { view-transition-name: orbit-bar; }

.tabs { view-transition-name: orbit-tabs; }

::view-transition { pointer-events: none; background: #14100c; }

::view-transition-old(root) { animation: backOut .24s cubic-bezier(.4, 0, .9, .6) both; }

::view-transition-new(root) { animation: backIn .42s cubic-bezier(.16, 1, .3, 1) both; }

::view-transition-group(orbit-bar), ::view-transition-group(orbit-tabs) { animation-duration: .28s; }

::view-transition-old(orbit-bar), ::view-transition-new(orbit-bar), ::view-transition-old(orbit-tabs), ::view-transition-new(orbit-tabs) { animation-duration: .28s; }

::view-transition-group(swipe-fire), ::view-transition-new(swipe-fire) { animation: none; }

::view-transition-old(swipe-fire) { display: none; }

@keyframes backOut { to { transform: translateX(150px); opacity: 0; } }

@keyframes backIn { from { transform: translateX(-54px); opacity: 0; } }
/* the shortcut list button is for computers only: a phone has no keys */

@media (max-width: 899px) {
 #keysBtn { display: none; }
}


#cSeg button { min-width: 0; padding: 0 2px; }


#swipePeek { position: fixed; left: 0; right: 0; bottom: 0; overflow: hidden; z-index: 1; pointer-events: none; max-width: none; margin: 0; }

@media (max-width: 899px) {

  .view { touch-action: pan-y pinch-zoom; }
  .app { overflow-x: clip; }
  
  .roast-part { padding: 12px 10px; }
  .roast-kind { font-size: .8rem; letter-spacing: .6px; margin: 12px 2px 8px; color: var(--muted); }
  .pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pack-box { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; margin: 0; border-radius: 12px; min-width: 0; }
  .pack-img { width: 100%; height: 76px; border-radius: 8px; }
  .pack-mid { align-items: center; text-align: center; gap: 3px; }
  .pack-mid b { font-size: .98rem; }
  .pack-mid small { font-size: 10.5px; }
  .pack-mid .pill { font-size: 10px; padding: 2px 6px; white-space: nowrap; }
  .pk-t { display: none; }
  .pack-acts { gap: 14px; margin: 0; }
  .pack-acts .link { font-size: 15px; padding: 2px 4px; }
  .pack-count { flex-direction: row-reverse; justify-content: space-between; gap: 2px; }
  .pack-count button { width: 30px; height: 32px; font-size: 18px; border-radius: 9px; }
  .pack-count b { font-size: 1.05rem; min-width: 0; flex: 1; }
  .pack-box > .btn.sm { width: 100%; padding: 0 4px; font-size: 11px; }
}

@media (max-width: 480px) {
 #cSeg { gap: 2px; padding: 3px; } #cSeg button { font-size: 11.5px; letter-spacing: -.2px; }
}

.pr-table.tp3 > div { grid-template-columns: 1fr 1fr 1fr; }

.tp-open { width: 100%; text-align: left; color: inherit; }

button.srow { display: flex; width: 100%; text-align: left; color: inherit; }

.srow .mid small { display: block; }

.tp-sum { font-size: 11.5px; }

.tp-pack { padding: 12px; margin-bottom: 10px; }

.tp-qty { display: flex; align-items: flex-end; gap: 14px; }
 .tp-qty .field { flex: 1; margin-bottom: 0; }

.tp-qty .link { color: var(--out); font-size: 13px; font-weight: 600; padding: 12px 0; }


.hero > .k, .hero > .v, .hero > .accs { position: relative; z-index: 1; }

.hero .orbit-ring.o1::after { background: #e0b56b; box-shadow: 0 0 14px #e0b56b; }

.hero .orbit-ring.o2::after { background: #f3d9a4; box-shadow: 0 0 12px #f3d9a4; }

.vg-t { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
 .vg-t b { font-weight: 700; }

.vg-b { display: block; height: 7px; margin-top: 6px; border-radius: 9px; background: rgba(255,255,255,.16); overflow: hidden; }

.vg-b i { display: block; height: 100%; border-radius: 9px; background: #5eeaf5; }

.d-track { stroke: rgba(170,180,220,.14); }

.d-big { font-size: 25px; font-weight: 800; fill: var(--text); }
 .d-big.sm { font-size: 20px; }

.d-sub { font-size: 11.5px; fill: var(--muted); }

.r-track { stroke: rgba(170,180,220,.13); stroke-width: 13; }


.r-hit { stroke: transparent; stroke-width: 26; pointer-events: stroke; }

.r-lab { font-size: 12px; font-weight: 700; fill: var(--muted); }

.b-grid { stroke: rgba(170,180,220,.14); stroke-width: 1; }

.b-axis { font-size: 10.5px; fill: var(--muted); }
 .b-hit { fill: transparent; }


.vt-h, .vt-r { display: grid; grid-template-columns: 1.25fr .55fr 1fr 1fr; gap: 8px; padding: 9px 8px; width: 100%; text-align: right; }

.vt-h > :first-child, .vt-r > :first-child { text-align: left; }

.vt-h { color: var(--muted); font-size: 12px; font-weight: 700; }

.vt-r { border-top: 1px solid rgba(45,58,120,.6); border-radius: 8px; }
 .vt-r.on { background: rgba(167,139,250,.14); font-weight: 700; }

@media (min-width: 900px) {

  .orbit-ring.o1 { width: 260px; height: 260px; right: -70px; top: -100px; }
  .orbit-ring.o2 { width: 150px; height: 150px; right: -20px; top: -45px; }
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
