@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600&family=Noto+Serif+JP:wght@400;600&display=swap');

/* ══════════════════════════════
   DESIGN TOKENS
══════════════════════════════ */
:root {
  --sage:     #4A7C59;
  --sage-lt:  #6FA882;
  --sage-dk:  #2F5239;
  --sage-bg:  #EEF5F1;
  --mist:     #E8F0EC;
  --stone:    #F5F2ED;
  --ink:      #1C2B22;
  --gold:     #B8973E;
  --gold-bg:  #FBF5E6;
  --warm:     #FAF7F2;
  --mid:      #7A9485;
  --mid-lt:   #B0C4BB;
  --red:      #B83232;
  --red-bg:   #FBF0F0;
  --border:   #E4DDD4;
  --white:    #ffffff;
  --radius:   14px;
  --sidebar-w: 220px;
  --topbar-h:  54px;
  --nav-h:     60px;
}

/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--stone);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

svg {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}

/* ══════════════════════════════
   LOADING
══════════════════════════════ */
#loading {
  position: fixed;
  inset: 0;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}
#loading.hide { opacity: 0; pointer-events: none; display: none; }

.loading-logo svg {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

/* ══════════════════════════════
   LOGIN
══════════════════════════════ */
.screen { width: 100%; min-height: 100vh; }

#screen-login {
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  text-align: center;
  padding: 40px 24px;
  max-width: 360px;
  width: 100%;
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.login-logo-mark {
  width: 48px; height: 48px;
  background: var(--sage);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.login-logo-text span { color: var(--sage-lt); }
.login-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.btn-google:hover { background: rgba(255,255,255,0.13); }
.btn-google svg { flex-shrink: 0; fill: unset; stroke: none; }

/* ══════════════════════════════
   APP LAYOUT
══════════════════════════════ */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */
#sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.logo-mark {
  width: 28px; height: 28px;
  background: var(--sage);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.logo-text span { color: var(--sage-lt); }

.sidebar-nav {
  flex: 1;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.13s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75); }
.nav-item.active { background: var(--sage); color: #fff; font-weight: 500; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}
.user-row:hover { background: rgba(255,255,255,0.06); cursor: pointer; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.user-info { min-width: 0; }
.user-name { font-size: 12.5px; color: rgba(255,255,255,0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-team { font-size: 11px; color: rgba(255,255,255,0.25); }

/* MAIN */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* TOPBAR */
#topbar {
  height: var(--topbar-h);
  background: rgba(245,242,237,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.topbar-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  font-weight: 600;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 12px;
  font-size: 13px;
}
.mnav-btn {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.mnav-btn:hover { background: var(--mist); color: var(--sage); }
.mnav-btn svg { stroke-width: 2.5; }

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.13s;
}
.btn-add:hover { background: var(--sage-dk); }
.btn-add svg { stroke-width: 2.5; }

/* PAGE CONTENT */
#page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 48px;
  -webkit-overflow-scrolling: touch;
}

/* MOBILE HEADER */
#mobile-header {
  display: none;
  background: var(--ink);
  padding: 14px 18px 12px;
  flex-shrink: 0;
}
.mh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mobile-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.mobile-logo span { color: var(--sage-lt); }
.mh-month-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#mobile-month-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
}

/* BOTTOM NAV */
#bottom-nav {
  display: none;
  background: var(--ink);
  height: var(--nav-h);
  border-top: 1px solid rgba(255,255,255,0.06);
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  flex-shrink: 0;
}
.b-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  min-width: 52px;
}
.b-tab.active { background: rgba(255,255,255,0.07); }
.b-icon { width: 20px; height: 20px; color: rgba(255,255,255,0.35); }
.b-tab.active .b-icon { color: var(--sage-lt); }
.b-tab span { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.35); }
.b-tab.active span { color: var(--sage-lt); }
.b-tab-plus {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(74,124,89,0.45);
  margin-bottom: 2px;
}
.b-tab-plus svg { color: #fff; stroke-width: 2.5; }

/* ══════════════════════════════
   MODAL (記録追加)
══════════════════════════════ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,43,34,0.5);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}
@media (min-width: 769px) {
  #modal-overlay { align-items: center; }
  #modal-add-record {
    max-width: 480px;
    border-radius: var(--radius) !important;
    max-height: 90vh;
  }
  .modal-handle { display: none !important; }
}
#modal-add-record {
  background: var(--stone);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  max-height: 92vh;
  overflow-y: auto;
  padding-bottom: 32px;
  -webkit-overflow-scrolling: touch;
}
.modal-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 0;
}

/* ══════════════════════════════
   PANEL / CARD COMPONENTS
══════════════════════════════ */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 13px; font-weight: 600; }
.panel-link {
  font-size: 12px;
  color: var(--sage);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
.panel-link:hover { text-decoration: underline; }
.panel-link svg { width: 12px; height: 12px; }

/* SUMMARY CARDS */
.summary-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.s-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  position: relative;
  overflow: hidden;
}
.s-card.total { background: var(--ink); border-color: transparent; }
.s-card-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--mid-lt);
  margin-bottom: 10px;
}
.s-card.total .s-card-label { color: rgba(255,255,255,0.35); }
.s-amount { display: flex; align-items: baseline; gap: 3px; margin-bottom: 8px; line-height: 1; }
.s-currency { font-size: 14px; font-weight: 300; color: var(--mid); }
.s-card.total .s-currency { color: rgba(255,255,255,0.4); }
.income-card .s-currency { color: var(--sage-lt); }
.expense-card .s-currency { color: #c06060; }
.s-number {
  font-family: 'Noto Serif JP', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.s-card.total .s-number { color: #fff; font-size: 34px; }
.income-card .s-number { color: var(--sage); }
.expense-card .s-number { color: var(--red); }
.s-sub { font-size: 11.5px; color: var(--mid-lt); }
.s-card.total .s-sub { color: rgba(255,255,255,0.3); }
.badge-up   { color: var(--sage-lt); font-weight: 500; }
.badge-down { color: #c06060; font-weight: 500; }
.s-accent-line { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.income-card  .s-accent-line { background: var(--sage); }
.expense-card .s-accent-line { background: var(--red); }

/* FORM ROWS */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.form-row {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  gap: 13px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 52px;
}
.form-row:last-child { border-bottom: none; }
.form-row:hover { background: var(--warm); }
.form-row.no-tap { cursor: default; }
.form-row.no-tap:hover { background: none; }
.row-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.row-icon svg { width: 15px; height: 15px; }
.row-label { font-size: 11.5px; color: var(--mid); margin-bottom: 2px; }
.row-value { font-size: 14px; font-weight: 500; }
.row-value.ph { color: var(--mid-lt); font-weight: 400; }
.row-body { flex: 1; min-width: 0; }
.row-chevron { color: var(--mid-lt); }
.row-chevron svg { width: 14px; height: 14px; }

/* TYPE SELECTOR */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.type-btn {
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  color: var(--mid);
  transition: all 0.15s;
  font-family: 'Noto Sans JP', sans-serif;
}
.type-btn svg { width: 13px; height: 13px; }
.type-btn:hover { background: var(--warm); color: var(--ink); }
.type-btn.active-expense { background: var(--red-bg); color: var(--red); }
.type-btn.active-income  { background: var(--sage-bg); color: var(--sage); }
.type-btn.active-transfer { background: var(--gold-bg); color: var(--gold); }

/* AMOUNT CARD */
.amount-card {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  margin-bottom: 14px;
}
.amount-card.income   { background: var(--sage-dk); }
.amount-card.transfer { background: #3a2e12; }
.amount-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: rgba(255,255,255,0.3); margin-bottom: 8px; }
.amount-row { display: flex; align-items: baseline; gap: 6px; }
.amount-currency { font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.4); }
.amount-input {
  font-family: 'Noto Serif JP', serif;
  font-size: 44px;
  font-weight: 600;
  color: #fff;
  background: none;
  border: none;
  outline: none;
  width: 100%;
  letter-spacing: -0.02em;
  caret-color: var(--sage-lt);
}
.amount-input::placeholder { color: rgba(255,255,255,0.12); }
.amount-hint { font-size: 11px; color: rgba(255,255,255,0.2); margin-top: 6px; }

/* TAGS */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 18px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  border: 1.5px solid transparent;
}
.tag-chip.on  { background: var(--sage-bg); color: var(--sage-dk); border-color: var(--sage-lt); }
.tag-chip.off { background: var(--warm); color: var(--mid); border-color: var(--border); }
.tag-chip.off:hover { background: var(--mist); color: var(--ink); }
.tag-chip.new { border-style: dashed; }

/* TOGGLE */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.toggle-wrap:last-child { border-bottom: none; }
.toggle-left { display: flex; align-items: center; gap: 13px; }
.toggle-title { font-size: 14px; font-weight: 500; }
.toggle-sub { font-size: 11.5px; color: var(--mid); margin-top: 2px; }
.toggle {
  width: 42px; height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.18s;
  flex-shrink: 0;
}
.toggle.on { background: var(--sage); }
.toggle-knob {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px; left: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: left 0.18s;
}
.toggle.on .toggle-knob { left: 21px; }

/* TEXT INPUTS */
.text-input {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: none;
  border: none;
  outline: none;
  width: 100%;
  caret-color: var(--sage);
}
.text-input::placeholder { color: var(--mid-lt); }
.date-input {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  caret-color: var(--sage);
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius);
  border: none;
  background: var(--sage);
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: var(--sage-dk); }
.btn-primary svg { width: 16px; height: 16px; stroke-width: 2.5; }

.btn-secondary {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--mid);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  margin-top: 8px;
}
.btn-secondary:hover { background: var(--warm); color: var(--ink); }

/* TRANSACTION LIST */
.tx-date-label {
  padding: 12px 18px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--mid);
}
.tx-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 18px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-item:hover { background: var(--warm); }
.tx-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tx-icon svg { width: 17px; height: 17px; }
.tx-body { flex: 1; min-width: 0; }
.tx-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.tx-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tx-acct { font-size: 11px; color: var(--mid); }
.tx-tag { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 500; padding: 2px 7px; border-radius: 5px; }
.tx-tag-muted  { background: #F0EDE8; color: #6b6258; }
.tx-tag-sage   { background: var(--sage-bg); color: var(--sage-dk); }
.tx-tag-red    { background: var(--red-bg); color: var(--red); }
.tx-tag-gold   { background: var(--gold-bg); color: var(--gold); }
.unsettled-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-amount { font-family: 'Noto Serif JP', serif; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; }
.tx-currency { font-size: 11px; font-weight: 300; margin-right: 1px; }
.tx-amount.income   { color: var(--sage); }
.tx-amount.expense  { color: var(--red); }
.tx-amount.transfer { color: var(--mid); }
.tx-account-name { font-size: 11px; color: var(--mid-lt); margin-top: 3px; }

/* ACCOUNT LIST */
.acct-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; cursor: pointer; transition: background 0.12s; gap: 12px; }
.acct-item:hover { background: var(--warm); }
.acct-left { display: flex; align-items: center; gap: 11px; }
.acct-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acct-icon svg { width: 16px; height: 16px; }
.acct-name { font-size: 13.5px; font-weight: 500; }
.acct-type-label { font-size: 11px; color: var(--mid); margin-top: 1px; }
.acct-balance { font-family: 'Noto Serif JP', serif; font-size: 15px; font-weight: 600; white-space: nowrap; }
.acct-balance-cur { font-size: 11px; font-weight: 300; color: var(--mid); margin-right: 1px; }
.acct-divider { height: 1px; background: var(--border); margin: 0 18px; }
.acct-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--mist); }
.acct-total-label { font-size: 12px; font-weight: 500; color: var(--mid); }
.acct-total-amount { font-family: 'Noto Serif JP', serif; font-size: 17px; font-weight: 600; color: var(--sage-dk); }

/* MAIN GRID */
.main-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }

/* TRANSFER SECTION */
.transfer-row { display: flex; align-items: center; padding: 13px 18px; gap: 10px; border-bottom: 1px solid var(--border); }
.transfer-acct { flex: 1; background: var(--warm); border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.12s; }
.transfer-acct:hover { background: var(--mist); }
.transfer-acct-label { font-size: 11px; color: var(--mid); margin-bottom: 3px; }
.transfer-acct-name { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.transfer-acct-name svg { width: 13px; height: 13px; }
.transfer-arrow { width: 28px; height: 28px; border-radius: 50%; background: var(--gold-bg); border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold); }
.transfer-arrow svg { width: 13px; height: 13px; }

/* EMPTY STATE */
.empty-state { padding: 48px 24px; text-align: center; color: var(--mid); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 14px; opacity: 0.4; }
.empty-state-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9000;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* SPINNER */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--mist);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1060px) {
  .main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #sidebar       { display: none; }
  #topbar        { display: none; }
  #mobile-header { display: block; }
  #bottom-nav    { display: flex; }
  #app           { flex-direction: column; }
  #main          { height: 100dvh; }
  #page-content  { padding: 14px 14px 20px; }

  .summary-row { grid-template-columns: 1fr; gap: 10px; }
  .s-number { font-size: 26px; }
  .s-card.total .s-number { font-size: 30px; }
  .main-grid { grid-template-columns: 1fr; gap: 12px; }
}
