/* ============ Roberts Finances — donker thema ============ */
:root {
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface2: #222221;
  --surface3: #2a2a29;
  --text: #f2f2ee;
  --text-dim: #a4a49b;
  --text-mute: #898781;
  --border: #2c2c2a;
  --border-strong: #383835;
  --accent: #3987e5;
  --accent-soft: #16283c;
  --green: #0ca30c;
  --green-soft: #12290f;
  --red: #e66767;
  --red-soft: #341615;
  --amber: #ddab54;
  --shadow: 0 1px 3px rgba(0,0,0,.45), 0 4px 14px rgba(0,0,0,.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input, select, textarea { font: inherit; color: var(--text); }
::placeholder { color: var(--text-mute); }

/* ============ LOGIN — exact als Food log ============ */
.login-screen {
  min-height: 100vh;
  background: #111827; /* gray-900 */
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.login-box { width: 100%; max-width: 320px; }
.login-box form { display: flex; flex-direction: column; gap: 16px; }
.login-label {
  display: block; color: #fff; font-size: 14px; font-weight: 500; text-align: center;
}
.login-box input {
  width: 100%;
  background: #1f2937; /* gray-800 */
  border: 1px solid #4b5563; /* gray-600 */
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  font-size: 18px;
  outline: none;
  transition: box-shadow .15s, border-color .15s;
}
.login-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.5);
}
.login-error { color: #f87171; font-size: 14px; text-align: center; }
.login-box button {
  width: 100%;
  background: #2563eb; color: #fff;
  font-weight: 600; font-size: 16px;
  padding: 12px; border-radius: 8px;
  transition: background .15s, opacity .15s;
}
.login-box button:hover:not(:disabled) { background: #1d4ed8; }
.login-box button:disabled { opacity: .4; cursor: not-allowed; }

/* ============ SLOT-SCHERM ============ */
.lock-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--bg);
}
.lock-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 40px 32px; max-width: 420px; text-align: center;
}
.lock-icon { font-size: 44px; margin-bottom: 12px; }
.lock-card h1 { font-size: 22px; margin-bottom: 10px; }
.lock-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.lock-hint { font-size: 13px; margin-top: 14px; margin-bottom: 0 !important; }

/* ============ TOPBAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(26,26,25,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; cursor: pointer; }
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 800;
}
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 13px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  white-space: nowrap; transition: background .15s, color .15s;
}
.tab:hover { background: var(--surface2); color: var(--text); }
.tab.active { background: var(--accent-soft); color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; padding: 9px 14px;
  font-size: 14px; font-weight: 600;
  transition: filter .15s, background .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-danger { background: var(--red); color: #1a0b0a; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--surface3); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--text-dim); padding: 8px 9px; font-size: 15px; }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-ghost.on { background: var(--accent-soft); color: var(--accent); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }

/* ============ LAYOUT ============ */
#main { max-width: 1760px; margin: 0 auto; padding: 10px 16px 20px; }
.view { animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============ START ============ */
.view-start {
  min-height: calc(100vh - 140px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px;
}
.start-title {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800; letter-spacing: -.02em; text-align: center;
  background: linear-gradient(120deg, #fff 30%, #6aa9f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.start-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; width: 100%; max-width: 880px;
}
.start-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  text-align: center; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.start-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.start-card .sc-icon { font-size: 26px; margin-bottom: 8px; }
.start-card .sc-name { font-weight: 700; font-size: 15px; }
.start-card .sc-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

/* ============ MAANDTAB (compact, Excel-achtig: 3 kolommen) ============ */
.month-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 290px;
  gap: 12px; align-items: start;
}
@media (max-width: 1180px) { .month-grid { grid-template-columns: minmax(0, 1fr) 290px; } .month-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 980px) { .month-grid { grid-template-columns: 1fr; } .month-side { order: -1; } }

.month-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.month-head h1 { font-size: 20px; letter-spacing: -.01em; }
.month-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 11px;
}
.search-box input { background: none; border: none; outline: none; width: 160px; font-size: 14px; }
.sort-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 9px; font-size: 13px; color: var(--text-dim);
  outline: none; cursor: pointer;
}

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head .ph-total { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel-body { padding: 5px 7px 8px; }

/* Categorie-groep */
.cat-group { border: 1px solid var(--border); border-radius: 9px; margin: 3px 2px; overflow: hidden; background: var(--surface2); }
.cat-head {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 9px; cursor: pointer; user-select: none;
}
.cat-head:hover { background: var(--surface3); }
.cat-chip { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.cat-name { font-weight: 700; font-size: 12.5px; }
.cat-meta { font-size: 11px; color: var(--text-dim); }
.cat-sum { margin-left: auto; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-caret { color: var(--text-mute); font-size: 12px; transition: transform .15s; }
.cat-group.collapsed .cat-caret { transform: rotate(-90deg); }
.cat-items { border-top: 1px solid var(--border); }
.cat-group.collapsed .cat-items { display: none; }

.sub-group { margin: 3px 6px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.cancelled-toggle {
  display: block; width: 100%; text-align: left;
  padding: 2px 9px; border-top: 1px solid var(--border);
  font-size: 10.5px; font-weight: 600; color: var(--text-mute);
}
.cancelled-toggle:hover { color: var(--text-dim); background: var(--surface3); }
.sub-head {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 8px; cursor: pointer; user-select: none;
  font-size: 11.5px; font-weight: 600; color: var(--text-dim);
}
.sub-head:hover { color: var(--text); }
.sub-sum { margin-left: auto; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.sub-group.collapsed .sub-items { display: none; }

/* Uitgaven in 2 kolommen op brede schermen (zoals de Excel) */
.exp-columns { display: block; }
.exp-col { min-width: 0; }
@media (min-width: 1450px) {
  .month-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) 290px; }
  .exp-columns { display: flex; gap: 4px; align-items: flex-start; }
  .exp-col { flex: 1 1 0; }
}

/* Item-rij */
.item-row {
  display: flex; align-items: center; gap: 5px;
  padding: 0.5px 7px; border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.25;
}
.item-row:first-child { border-top: none; }
.item-row.dragging { opacity: .4; }
.item-row.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.item-row .drag-handle { cursor: grab; color: var(--text-mute); font-size: 13px; flex: none; padding: 2px; }
.item-row .drag-handle:active { cursor: grabbing; }
.item-check {
  flex: none; width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent; transition: all .12s;
  background: var(--surface);
}
.item-check.checked { background: var(--green); border-color: var(--green); color: #fff; }
.item-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: text; border-radius: 6px; padding: 2px 5px;
}
.item-name:hover { background: var(--surface3); }
.item-date { flex: none; font-size: 10.5px; color: var(--text-mute); white-space: nowrap; }
.item-date .today-btn {
  color: var(--accent); font-size: 10px; font-weight: 700; margin-left: 3px;
  padding: 0 4px; border-radius: 5px; background: var(--accent-soft);
}
.item-amount {
  flex: none; width: 80px; text-align: right; font-weight: 600;
  font-variant-numeric: tabular-nums; cursor: text; border-radius: 6px; padding: 1px 4px;
  white-space: nowrap;
}
.item-row.unchecked .item-amount { color: var(--text-mute); }
.item-row.unchecked .item-name { color: var(--text-dim); }
.item-amount:hover { background: var(--surface3); }
.item-actions { flex: none; display: flex; gap: 1px; opacity: 0; transition: opacity .12s; }
.item-row:hover .item-actions { opacity: 1; }
@media (pointer: coarse) { .item-actions { opacity: .8; } }
.icon-btn {
  padding: 3px 6px; border-radius: 6px; font-size: 12.5px; color: var(--text-mute);
}
.icon-btn:hover { background: var(--surface3); color: var(--text); }
.icon-btn.on { color: var(--amber); }
.item-row.cancelled .item-name, .item-row.cancelled .item-amount {
  text-decoration: line-through; color: var(--text-mute);
}
.item-row.cancelled { opacity: .62; }
.item-row.halved-active .item-amount { color: var(--amber); }
.half-badge {
  flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px;
  background: rgba(221,171,84,.15); color: var(--amber);
}
.sim-row { background: rgba(221,171,84,.07); }
.sim-row .item-name { font-style: italic; color: var(--amber); cursor: default; }
.sim-row .item-name:hover { background: none; }
.sim-row .item-amount { color: var(--amber); cursor: default; }

.inline-input {
  font: inherit; background: var(--surface3); color: var(--text);
  border: 1px solid var(--accent); border-radius: 6px; padding: 2px 5px;
  outline: none; width: 100%;
}
.inline-input.amount { text-align: right; width: 92px; }

/* Quick add */
.quick-add {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border-top: 1px dashed var(--border-strong);
}
.quick-add input, .quick-add select {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 8px; font-size: 12px; outline: none;
}
.quick-add input:focus, .quick-add select:focus { border-color: var(--accent); }
.qa-name { flex: 1; min-width: 80px; }
.qa-amount { width: 72px; text-align: right; }
.qa-cat { max-width: 130px; }

/* ============ ZIJPANEEL (totalen, zoals rechts in de Excel) ============ */
.month-side { position: sticky; top: 60px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 980px) { .month-side { position: static; } }
.totals-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px;
}
.totals-card h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin-bottom: 7px; }
.total-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 3px 0; font-size: 12.5px;
}
.total-line .tl-label { color: var(--text-dim); }
.total-line .tl-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-line.big { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-size: 13.5px; }
.total-line.big .tl-label { color: var(--text); font-weight: 700; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.savings-badge {
  margin-top: 8px; padding: 7px 10px; border-radius: 10px;
  background: var(--green-soft); border: 1px solid rgba(12,163,12,.35);
  font-size: 12.5px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
}
.savings-badge .sv-label { color: var(--text-dim); }
.savings-badge .sv-value { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.savings-badge.neg-badge { background: var(--red-soft); border-color: rgba(230,103,103,.35); }
.savings-badge.neg-badge .sv-value { color: var(--red); }

.side-toggles { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: var(--text-dim);
}
.switch {
  position: relative; width: 38px; height: 22px; border-radius: 999px;
  background: var(--surface3); border: 1px solid var(--border-strong);
  transition: background .15s; flex: none;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-mute); transition: transform .15s, background .15s;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { transform: translateX(16px); background: #fff; }
.switch.amber.on { background: var(--amber); border-color: var(--amber); }

.eff-panel {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border); font-size: 13px;
}
.eff-panel .total-line { font-size: 13px; padding: 3px 0; }

/* ============ CHART ============ */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px;
}
.chart-card h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin-bottom: 9px; }
.bar-row { display: grid; grid-template-columns: 106px 1fr; gap: 7px; align-items: center; margin-bottom: 3px; }
.bar-label {
  font-size: 12px; color: var(--text-dim); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-track { position: relative; height: 15px; display: flex; align-items: center; gap: 2px; }
.bar-fill { height: 11px; border-radius: 0 4px 4px 0; min-width: 2px; transition: width .25s ease; }
.bar-value { font-size: 10.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 5px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 9px; border-top: 1px solid var(--border); padding-top: 7px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-dim); padding: 1px 3px; border-radius: 6px;
}
.legend-item:hover { background: var(--surface2); }
.legend-item.off { opacity: .38; text-decoration: line-through; }
.legend-chip { width: 10px; height: 10px; border-radius: 3px; }

/* ============ SAMEN ============ */
.samen-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.samen-table th {
  text-align: right; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-mute); padding: 8px 10px; border-bottom: 1px solid var(--border-strong);
}
.samen-table th:first-child { text-align: left; }
.samen-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.samen-table td:first-child { text-align: left; }
.samen-table .cat-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.samen-table tr.total-row td { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: none; }
.col-gwenny { color: #d55181; }
.col-robert { color: #3987e5; }
.stack-row { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: center; margin-bottom: 4px; }
.stack-track { display: flex; align-items: center; gap: 2px; height: 15px; }
.stack-seg { height: 11px; min-width: 0; }
.stack-seg.first { border-radius: 4px 0 0 4px; }
.stack-seg.last { border-radius: 0 4px 4px 0; }
.stack-seg.only { border-radius: 4px; }

/* ============ BEZIT ============ */
.bezit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .bezit-grid { grid-template-columns: 1fr; } }
.bezit-list { list-style: none; }
.bezit-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--border); font-size: 14.5px;
}
.bezit-item:first-child { border-top: none; }
.bezit-icon { flex: none; opacity: .7; }
.bezit-name { flex: 1; min-width: 0; }

/* ============ EMPTY / MODAL / TOAST ============ */
.empty-state { text-align: center; padding: 26px 14px; color: var(--text-dim); font-size: 13.5px; }
.empty-state.big { padding: 90px 20px; }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state.big h2 { color: var(--text); margin-bottom: 8px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .12s ease;
}
.modal {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; max-height: 86vh; overflow: auto;
  padding: 22px;
}
.modal h2 { font-size: 18px; margin-bottom: 14px; }
.modal .form-row { margin-bottom: 12px; }
.modal label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
.modal input[type=text], .modal input[type=number], .modal input[type=date], .modal select {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 14.5px; outline: none;
}
.modal input:focus, .modal select:focus { border-color: var(--accent); }
.modal input[type=color] {
  width: 46px; height: 34px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface2); padding: 2px; cursor: pointer;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-step { text-align: center; }
.confirm-step .ci { font-size: 40px; margin-bottom: 10px; }
.confirm-step p { color: var(--text-dim); font-size: 14px; margin: 8px 0 4px; }
.confirm-step .cname { font-weight: 700; color: var(--text); }
.confirm-progress { display: flex; justify-content: center; gap: 6px; margin: 14px 0 4px; }
.confirm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface3); }
.confirm-dot.done { background: var(--red); }

.cat-manage-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-top: 1px solid var(--border);
}
.cat-manage-row:first-child { border-top: none; }
.cat-manage-row input[type=text] { flex: 1; }
.sub-manage { margin-left: 26px; }

.toast-root { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface3); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 11px 16px; font-size: 14px; display: flex; align-items: center; gap: 12px;
  animation: toastIn .2s ease; max-width: 92vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast.ok { border-color: rgba(12,163,12,.5); }
.toast .undo-btn { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* Privacy-modus */
body.privacy .money { filter: blur(0); }
.money-masked { letter-spacing: 1px; }

/* Backup lijst */
.backup-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-top: 1px solid var(--border); font-size: 14px;
}
.backup-row:first-child { border-top: none; }
.backup-label { flex: 1; min-width: 0; }
.backup-date { font-size: 12px; color: var(--text-mute); white-space: nowrap; }
.badge-auto { font-size: 10.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 6px; }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand-name { display: none; }
  .item-amount { width: 78px; }
  .bar-row, .stack-row { grid-template-columns: 90px 1fr; }
}
