/* ============================================================
   CatatDuit — style.css
   Craft / Linear Minimalist Design System
   ============================================================ */

/* ─── CSS Variables / Design Tokens ────────────────────────── */
:root {
  --bg:              #f8f9fa;
  --surface:         #ffffff;
  --inset:           #f3f4f6;
  --inset-hover:     #e5e7eb;
  --line:            #e5e7eb;
  --line-subtle:     #f4f4f6;
  --ink:             #09090b;
  --ink-2:           #52525b;
  --ink-3:           #9ca3af;
  --accent:          #18181b;
  --accent-hover:    #27272a;
  
  --red:             #dc2626;
  --red-tint:        rgba(220, 38, 38, 0.08);
  --green:           #16a34a;
  --green-tint:      rgba(22, 163, 74, 0.08);
  --orange:          #ea580c;
  --orange-tint:     rgba(234, 88, 12, 0.08);
  --blue:            #2563eb;
  --purple:          #9333ea;

  --shadow-hairline: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card:     0 1px 3px rgba(0, 0, 0, 0.03), 0 10px 24px -6px rgba(0, 0, 0, 0.05);
  --rounded-card:    14px;
  --radius-sm:       8px;
  
  --nav-h:           60px;
  --fab-size:        48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:              #09090b;
    --surface:         #121215;
    --inset:           #1a1a20;
    --inset-hover:     #25252e;
    --line:            #26262e;
    --line-subtle:     #1a1a22;
    --ink:             #f4f4f6;
    --ink-2:           #a1a1aa;
    --ink-3:           #71717a;
    --accent:          #f4f4f6;
    --accent-hover:    #e4e4e7;

    --red:             #f87171;
    --red-tint:        rgba(239, 68, 68, 0.12);
    --green:           #4ade80;
    --green-tint:      rgba(34, 197, 94, 0.12);
    --orange:          #fb923c;
    --orange-tint:     rgba(249, 115, 22, 0.12);
    --blue:            #60a5fa;
    --purple:          #c084fc;

    --shadow-hairline: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card:     0 2px 8px rgba(0, 0, 0, 0.4), 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  }
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  outline: none;
}

input, textarea {
  font-family: inherit;
  color: inherit;
}

.hidden { display: none !important; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* ─── Dot Indicators ─────────────────────────────────────────── */
.bg-accent   { background-color: var(--accent); }
.bg-ink-3    { background-color: var(--ink-3); }
.bg-orange   { background-color: var(--orange); }
.bg-green    { background-color: var(--green); }
.bg-red      { background-color: var(--red); }
.bg-blue     { background-color: var(--blue); }
.bg-purple   { background-color: var(--purple); }

.size-1\.5 { width: 6px; height: 6px; }
.rounded-full { border-radius: 9999px; }

/* ─── Layout Shell ───────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.topbar {
  padding: 14px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background-color: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid var(--line-subtle);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-sub {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 1px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background-color: var(--inset);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.95);
}

.page-content {
  flex: 1;
  padding: 14px 16px calc(var(--nav-h) + 24px);
  overflow-y: auto;
}

/* ─── Bottom Navigation ─────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-btn {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.15s;
  position: relative;
}

.nav-btn.active {
  color: var(--ink);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.offline-badge {
  position: absolute;
  top: 7px;
  right: calc(50% - 18px);
  background-color: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ─── Floating Action Button (FAB) ──────────────────────────── */
#fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background-color: var(--ink);
  color: var(--surface);
  font-size: 1.5rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  z-index: 15;
  transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.15s;
}

#fab:hover {
  filter: brightness(1.1);
}

#fab:active {
  transform: scale(0.92);
}

/* ─── Card Primitives (Theme matching DiffTable) ────────────── */
.rounded-card {
  border-radius: var(--rounded-card);
}

.bg-surface {
  background-color: var(--surface);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.border-line {
  border: 1px solid var(--line);
}

.primitive-card-bar {
  padding: 11px 15px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.primitive-card-footer {
  padding: 10px 15px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background-color: var(--line-subtle);
  border-radius: 0 0 var(--rounded-card) var(--rounded-card);
}

/* ─── Summary Card ───────────────────────────────────────────── */
.summary-card {
  background-color: var(--surface);
  border-radius: var(--rounded-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.summary-body {
  padding: 18px 16px 16px;
}

.summary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.summary-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kas-awal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  background-color: var(--inset);
  box-shadow: var(--shadow-hairline);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.15s ease;
}

.kas-awal-badge:hover {
  filter: brightness(0.97);
  color: var(--ink);
}

.kas-awal-badge:active {
  transform: scale(0.96);
}

.summary-saldo {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 4px 0 14px;
}

.summary-delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.summary-delta-pill.surplus {
  background-color: var(--green-tint);
  color: var(--green);
}

.summary-delta-pill.defisit {
  background-color: var(--red-tint);
  color: var(--red);
}

.summary-footer-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-label {
  color: var(--ink-3);
  font-weight: 400;
}

.stat-val {
  font-weight: 600;
}

.stat-val.income  { color: var(--green); }
.stat-val.expense { color: var(--red); }

/* ─── Transaction Table / List ───────────────────────────────── */
.tx-table-card {
  background-color: var(--surface);
  border-radius: var(--rounded-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.primitive-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.primitive-table-cell {
  padding: 10px 14px;
  vertical-align: middle;
}

.tx-row {
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}

.tx-row:last-child {
  border-bottom: none;
}

.tx-row:hover {
  filter: brightness(0.985);
  background-color: var(--line-subtle);
}

.tx-row:active {
  background-color: var(--inset);
}

/* Category Pill */
.category-pill {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 5px;
  border-radius: 9999px;
  background-color: var(--inset);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: var(--shadow-hairline);
  white-space: nowrap;
}

.category-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-text {
  color: var(--ink-2);
}

.tx-main-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tx-desc {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tx-amount {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tx-amount.income  { color: var(--green); }
.tx-amount.expense { color: var(--red); }

/* IncludedMark Delete Button */
.included-mark-btn {
  display: flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background-color: var(--inset);
  color: var(--ink-3);
  box-shadow: var(--shadow-hairline);
  transition: all 0.15s ease;
  font-size: 10px;
}

.included-mark-btn:hover {
  background-color: var(--red);
  color: #ffffff;
  transform: scale(1.05);
}

.included-mark-btn:active {
  transform: scale(0.92);
}

/* Date Group Header */
.tx-date-header {
  padding: 6px 14px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.load-more-wrap {
  padding: 10px 14px;
  text-align: center;
  border-top: 1px solid var(--line);
  background-color: var(--line-subtle);
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  background-color: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hairline);
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-load-more:hover {
  background-color: var(--inset);
  color: var(--ink);
}

.btn-load-more:active {
  transform: scale(0.96);
}

/* ─── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--ink-3);
}

.empty-state-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--inset);
  box-shadow: var(--shadow-hairline);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.empty-state-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.empty-state-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 3px;
}

/* ─── Modals (Bottom Sheet) ─────────────────────────────────── */
#modal-overlay, #modal-settings-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(9, 9, 11, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 30;
  transition: opacity 0.2s ease;
}

#modal, #modal-settings {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12);
  z-index: 31;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  max-height: 90dvh;
  overflow-y: auto;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

#modal.open, #modal-settings.open {
  transform: translateX(-50%) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background-color: var(--surface);
  z-index: 2;
}

.modal-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

#modal-close, #modal-settings-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--inset);
  color: var(--ink-3);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

#modal-close:hover, #modal-settings-close:hover {
  color: var(--ink);
  background-color: var(--inset-hover);
}

.modal-body {
  padding: 16px 18px 24px;
}

/* ─── Form Elements ─────────────────────────────────────────── */
.tipe-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--inset);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-hairline);
  gap: 3px;
}

.tipe-btn {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.15s ease;
  text-align: center;
}

.tipe-btn.active {
  background-color: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  background-color: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus {
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.08);
}

#input-jumlah {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 12px;
}

/* Kategori Grid */
#kategori-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.kategori-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.kategori-btn:hover {
  background-color: var(--inset);
}

.kategori-btn.selected {
  border-color: var(--accent);
  background-color: var(--inset);
  box-shadow: 0 0 0 1px var(--accent);
}

.kategori-emoji { font-size: 1.25rem; }
.kategori-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.1;
}

.kategori-btn.selected .kategori-label {
  color: var(--ink);
  font-weight: 600;
}

/* Accent Button (like Button variant="accent") */
.btn-accent {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--ink);
  color: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.15s cubic-bezier(0.23, 1, 0.32, 1);
  margin-top: 14px;
}

.btn-accent:hover {
  filter: brightness(1.15);
}

.btn-accent:active {
  transform: scale(0.985);
}

.btn-accent:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#btn-simpan, #btn-simpan-settings {
  composes: btn-accent;
}

/* ─── Laporan Page ───────────────────────────────────────────── */
.month-filter-wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: none;
}
.month-filter-wrap::-webkit-scrollbar { display: none; }

.month-btn {
  flex-shrink: 0;
  height: 26px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  background-color: var(--surface);
  box-shadow: var(--shadow-hairline);
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.month-btn.active {
  background-color: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  font-weight: 600;
}

.report-total-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.report-total-card {
  background-color: var(--surface);
  border-radius: var(--rounded-card);
  padding: 12px 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.report-total-card p:first-child {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.report-total-card p:last-child {
  font-size: 14px;
  font-weight: 600;
}

.report-total-card.income p:last-child  { color: var(--green); }
.report-total-card.expense p:last-child { color: var(--red); }

/* Chart Card */
.chart-card {
  background-color: var(--surface);
  border-radius: var(--rounded-card);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.chart-wrapper {
  display: flex;
  gap: 16px;
  align-items: center;
}

.chart-wrapper svg { flex-shrink: 0; }

.donut-center-label {
  font-size: 9px;
  font-weight: 500;
  fill: var(--ink-3);
}

.donut-center-value {
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--ink);
}

.legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.chart-empty {
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 16px;
}

/* Filter Segmented Control */
.filter-tipe-row {
  display: flex;
  background-color: var(--inset);
  padding: 2px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow-hairline);
  gap: 2px;
}

.filter-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.15s ease;
  text-align: center;
}

.filter-btn.active {
  background-color: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ─── Banners & Indicators ───────────────────────────────────── */
.offline-banner {
  background-color: var(--orange-tint);
  border: 1px solid rgba(234, 88, 12, 0.2);
  border-radius: var(--radius-sm);
  color: var(--orange);
  font-size: 11.5px;
  font-weight: 500;
  padding: 7px 12px;
  margin-bottom: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.error-banner {
  background-color: var(--red-tint);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 11.5px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.setup-banner {
  background-color: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 11.5px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.45;
}

/* ─── Toast Notification ─────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 68px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background-color: var(--ink);
  color: var(--surface);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { background-color: #15803d; color: #fff; }
#toast.error   { background-color: #b91c1c; color: #fff; }
#toast.info    { background-color: #1f2937; color: #fff; }

/* ─── Skeleton Loading ────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-card, .skeleton-item {
  background: linear-gradient(90deg, var(--surface) 25%, var(--inset) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--rounded-card);
  margin-bottom: 10px;
  border: 1px solid var(--line);
}
.skeleton-card { height: 130px; }
.skeleton-item { height: 48px; border-radius: var(--radius-sm); }
.skeleton-item.short { width: 60%; }

/* ─── Desktop Preview Container ──────────────────────────────── */
@media (min-width: 480px) {
  body {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
  }
}
