/* ------------------------------------------------------------------
   MoneyFlow — web app styles
   Mobile first, light and dark, no external dependencies.
------------------------------------------------------------------- */

:root {
  --bg:        #f4f6f8;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --border:    #e2e8f0;
  --text:      #0f172a;
  --text-dim:  #64748b;
  --primary:   #0f766e;
  --primary-d: #115e59;
  --primary-l: #ccfbf1;
  --in:        #16a34a;
  --out:       #dc2626;
  --warn:      #d97706;
  --info:      #2563eb;
  --shadow:    0 1px 2px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.06);
  --radius:    14px;
  --radius-sm: 10px;
  --sidebar:   248px;

  /* Chart colours — a fixed, colour-blind-checked order, never cycled.
     Light steps. */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  --pos: #008300;
  --neg: #e34948;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b1220;
    --surface:   #111a2b;
    --surface-2: #16203350;
    --border:    #24324a;
    --text:      #e6edf7;
    --text-dim:  #94a3b8;
    --primary:   #2dd4bf;
    --primary-d: #14b8a6;
    --primary-l: #134e4a;
    --in:        #4ade80;
    --out:       #f87171;
    --warn:      #fbbf24;
    --info:      #60a5fa;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);

    /* Same eight hues, stepped for the dark surface. */
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --pos: #4ade80;
    --neg: #e66767;
  }
}

:root[data-theme="dark"] {
  --bg:        #0b1220;
  --surface:   #111a2b;
  --surface-2: #16203350;
  --border:    #24324a;
  --text:      #e6edf7;
  --text-dim:  #94a3b8;
  --primary:   #2dd4bf;
  --primary-d: #14b8a6;
  --primary-l: #134e4a;
  --in:        #4ade80;
  --out:       #f87171;
  --warn:      #fbbf24;
  --info:      #60a5fa;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;
  --pos: #4ade80;
  --neg: #e66767;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 .75rem; }
a  { color: var(--primary); text-decoration: none; }
small { font-size: .82rem; }

/* ---------------- layout ---------------- */

#app { min-height: 100vh; }

.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1rem .75rem;
  display: none;
  flex-direction: column;
  gap: .15rem;
  z-index: 40;
}

.brand {
  display: flex; align-items: center; gap: .6rem; flex-wrap: nowrap;
}
.sidebar .brand {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem .6rem 1.1rem;
  font-weight: 700; font-size: 1.05rem;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  display: grid; place-items: center;
  color: #fff; font-size: .95rem; font-weight: 700;
}

.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 550; cursor: pointer;
  border: 0; background: none; width: 100%; text-align: left;
  font-size: .95rem;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-l); color: var(--primary-d); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-item.active { color: var(--primary); }
}
:root[data-theme="dark"] .nav-item.active { color: var(--primary); }
.nav-item .ic { width: 20px; text-align: center; font-size: 1rem; }
.nav-spacer { flex: 1; }

.main {
  flex: 1; min-width: 0;
  padding: 1rem 1rem 5.5rem;
}

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .main { margin-left: var(--sidebar); padding: 1.5rem 2rem 3rem; }
}

/* bottom bar on phones */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; border: 0; background: none; color: var(--text-dim);
  position: relative;
  padding: .55rem 0 .5rem; font-size: .68rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  cursor: pointer;
}
.tabbar button .ic { font-size: 1.15rem; }
.tabbar button.active { color: var(--primary); }
@media (min-width: 900px) { .tabbar { display: none; } }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.topbar .sub { color: var(--text-dim); font-size: .85rem; }

/* ---------------- cards & grid ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: .85rem;
}
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px)  { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  { .grid.side { grid-template-columns: 1.6fr 1fr; } }

/* ---------------- stat tiles ---------------- */

.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .label { color: var(--text-dim); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.stat .value.in  { color: var(--in); }
.stat .value.out { color: var(--out); }
.stat .foot { color: var(--text-dim); font-size: .8rem; }

.delta { font-size: .78rem; font-weight: 650; }
.delta.up   { color: var(--in); }
.delta.down { color: var(--out); }

/* ---------------- lists ---------------- */

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; }
.row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text-dim); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { color: var(--text-dim); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 650; white-space: nowrap; }
.row .amt.in  { color: var(--in); }
.row .amt.out { color: var(--out); }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--surface-2); }

.avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: .95rem;
  background: var(--surface-2); border: 1px solid var(--border);
}

/* ---------------- progress ---------------- */

.bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .35s ease; }
.bar.ok    > span { background: var(--in); }
.bar.tight > span { background: var(--warn); }
.bar.over  > span { background: var(--out); }

/* ---------------- buttons & forms ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: .9rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); }
.btn.danger { color: var(--out); border-color: var(--out); background: transparent; }
.btn.danger:hover { background: rgba(220,38,38,.08); }
.btn.small { padding: .35rem .6rem; font-size: .8rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.fab {
  position: fixed; right: 1rem; bottom: 4.6rem;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 0;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 20px rgba(15,118,110,.45); z-index: 35;
}
@media (min-width: 900px) { .fab { bottom: 1.5rem; right: 1.5rem; } }

label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-dim); margin-bottom: .25rem; }
input, select, textarea {
  width: 100%; padding: .6rem .7rem; font-size: .95rem; font-family: inherit;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary);
}
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: .8rem; }
.field-row { display: grid; gap: .8rem; }
@media (min-width: 560px) { .field-row.two { grid-template-columns: 1fr 1fr; } }

.seg { display: flex; gap: .3rem; background: var(--surface-2); padding: .25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.seg button {
  flex: 1; border: 0; background: none; color: var(--text-dim);
  padding: .4rem .5rem; border-radius: 8px; font-size: .85rem; font-weight: 650; cursor: pointer; font-family: inherit;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button.active.in  { color: var(--in); }
.seg button.active.out { color: var(--out); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  padding: .3rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.tag {
  display: inline-block; padding: .12rem .5rem; border-radius: 99px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}
.tag.ok    { color: var(--in);   border-color: var(--in); }
.tag.tight { color: var(--warn); border-color: var(--warn); }
.tag.over  { color: var(--out);  border-color: var(--out); }
.tag.info  { color: var(--info); border-color: var(--info); }

/* Unseen-alert count on the Monitor item in the sidebar and the tab bar. */
.badge {
  margin-left: auto;
  min-width: 18px;
  padding: .05rem .35rem;
  border-radius: 99px;
  background: var(--out);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}
.tabbar .badge { margin: 0; position: absolute; top: .25rem; right: 50%; transform: translateX(150%); }

/* Used outside .row, e.g. under a watch heading. */
.meta { color: var(--text-dim); font-size: .8rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: .05rem .3rem;
}

/* ---------------- modal ---------------- */

.modal-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: grid; place-items: end center; z-index: 60; padding: 0;
  animation: fade .15s ease;
}
@media (min-width: 640px) { .modal-bg { place-items: center; padding: 1rem; } }
.modal {
  background: var(--surface); width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0; padding: 1.1rem;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow);
  animation: rise .2s ease;
}
@media (min-width: 640px) { .modal { border-radius: var(--radius); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.modal-head h2 { margin: 0; }
.x { border: 0; background: none; font-size: 1.3rem; color: var(--text-dim); cursor: pointer; line-height: 1; }
.modal-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.modal-actions .btn { flex: 1; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { transform: translateY(14px); opacity: .6 } to { transform: none; opacity: 1 } }

/* ---------------- toast ---------------- */

.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.5rem; z-index: 80; display: flex; flex-direction: column; gap: .5rem; }
@media (min-width: 900px) { .toast-wrap { bottom: 1.5rem; } }
.toast {
  background: var(--text); color: var(--bg);
  padding: .6rem .9rem; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow); animation: rise .2s ease; max-width: 88vw;
}
.toast.bad { background: var(--out); color: #fff; }
.toast.good { background: var(--in); color: #04220f; }

/* ---------------- charts ---------------- */

.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--text-dim); font-size: 10px; font-family: inherit; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .6rem; }
.legend .li { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--text-dim); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }

.empty { text-align: center; color: var(--text-dim); padding: 1.6rem .8rem; }
.empty .big { font-size: 1.8rem; margin-bottom: .4rem; }

.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 37%, var(--border) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { from { background-position: 100% 0 } to { background-position: 0 0 } }

/* ---------------- tables ---------------- */

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-dim); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.total td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* ---------------- auth screen ---------------- */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: .4rem; }
.auth-tagline { text-align: center; color: var(--text-dim); margin-bottom: 1.2rem; font-size: .9rem; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: .88rem; color: var(--text-dim); }
.auth-switch button { border: 0; background: none; color: var(--primary); font-weight: 650; cursor: pointer; font-size: .88rem; font-family: inherit; }

.muted { color: var(--text-dim); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem }
.mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem }
.flex { display: flex; gap: .6rem; align-items: center; }
.flex.between { justify-content: space-between; }
.flex.wrap { flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.print-only { display: none; }

@media print {
  .sidebar, .tabbar, .fab, .topbar .btn, .no-print { display: none !important; }
  .main { margin: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .print-only { display: block; }
  body { background: #fff; }
}

/* ---------------- working offline ---------------- */

.offline-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem 1rem;
  background: var(--warn);
  color: #fff;
  font-size: .82rem; font-weight: 600;
  padding-bottom: calc(.55rem + env(safe-area-inset-bottom));
}
.offline-bar.syncing { background: var(--info); }
.offline-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  animation: mf-pulse 1.6s ease-in-out infinite;
}
@keyframes mf-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .offline-bar .dot { animation: none; } }

/* The tab bar sits at the bottom on phones; lift the banner above it. */
.offline-bar { bottom: 58px; }
@media (min-width: 900px) { .offline-bar { bottom: 0; } }

/* A row for something added offline and not yet sent. */
.row.pending { opacity: .72; }
.tag.pending { color: var(--warn); border-color: var(--warn); }

/* ---------------- calculator & converter ---------------- */

/* The second floating button sits just above the "+" one. */
.fab-tools {
  bottom: calc(4.6rem + 64px);
  width: 46px; height: 46px; right: calc(1rem + 4px);
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab-tools.active { background: var(--primary); color: #fff; border-color: var(--primary); }
@media (min-width: 900px) { .fab-tools { bottom: calc(1.5rem + 64px); right: calc(1.5rem + 4px); } }

.calc-display {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  text-align: right;
  min-height: 84px;
  display: flex; flex-direction: column; justify-content: flex-end;
  margin-bottom: .8rem;
  overflow: hidden;
}
.calc-expr { color: var(--text-dim); font-size: .95rem; min-height: 1.4em; word-break: break-all; }
.calc-result { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; word-break: break-all; }

.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.calc-key {
  height: 54px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1.25rem; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
.calc-key:hover  { background: var(--surface-2); }
.calc-key:active { transform: scale(.97); }
.calc-key.op { color: var(--primary); background: var(--primary-l); border-color: transparent; }
.calc-key.fn { color: var(--text-dim); }
.calc-key.eq { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .calc-key.op { color: var(--primary); }
}

.conv-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: end; }
.conv-pair .field { margin-bottom: .8rem; min-width: 0; }
.conv-pair select { width: 100%; }
.conv-swap { margin-bottom: .8rem; height: 42px; padding: 0 .75rem; font-size: 1.1rem; }

.conv-result {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .9rem 1rem; margin-top: .2rem;
}
.conv-big { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; margin: .15rem 0; word-break: break-word; }
.mb-1 { margin-bottom: .4rem; }

@media print { .fab-tools { display: none !important; } }
@media (min-width: 900px) { .grid.side.tools-grid { grid-template-columns: minmax(300px, 400px) 1fr; } }

/* The logo is the app icon itself. */
img.brand-mark { display: block; background: none; border-radius: 8px; }

/* ‹ Oct 2026 › on the Budget screen */
.month-nav { display: flex; align-items: center; gap: .3rem; }
.month-nav input { width: auto; }
.month-nav .btn { padding: .45rem .7rem; font-size: 1.05rem; line-height: 1; }

/* ---------------- teal top and bottom bars (phones) ----------------
   A fixed teal in light and dark mode alike: --primary lightens in dark
   mode, and white on the lighter teal would be hard to read. */
:root { --bar: #0f766e; --bar-text: #ffffff; --bar-dim: rgba(255,255,255,.72); }

.mobile-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 1rem 0;
  background: var(--bar); color: var(--bar-text);
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
}
.mobile-bar .brand { font-weight: 700; font-size: 1.05rem; color: var(--bar-text); }
.mobile-bar .avatar {
  width: 32px; height: 32px; border: 2px solid rgba(255,255,255,.85);
  background: #fff; color: var(--bar); font-weight: 700; font-size: .8rem; cursor: pointer; padding: 0;
}
.main { padding-top: calc(52px + 1rem + env(safe-area-inset-top)); }
@media (min-width: 900px) {
  .mobile-bar { display: none; }
  .main { padding-top: 1.5rem; }
}

.tabbar { background: var(--bar); border-top: 0; box-shadow: 0 -1px 6px rgba(0,0,0,.18); }
.tabbar button { color: var(--bar-dim); }
.tabbar button.active { color: var(--bar-text); }
.tabbar button.active .ic {
  background: rgba(255,255,255,.22); border-radius: 99px; padding: 0 .9rem;
}
.tabbar .badge { background: #fff; color: var(--bar); }
