@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

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

:root {
  --bg:           #F3F0EA;
  --surface:      #FFFFFF;
  --surface-2:    #F9F7F4;
  --sidebar:      #1C1917;
  --sidebar-h:    #292524;
  --sidebar-text: #D6D3D1;
  --sidebar-muted:#78716C;
  --border:       #E7E5E0;
  --border-strong:#D6D3D1;
  --text:         #1C1917;
  --text-2:       #44403C;
  --muted:        #78716C;
  --accent:       #B45309;
  --accent-bg:    #FEF3C7;
  --accent-light: #FFFBEB;
  --green:        #15803D;
  --green-bg:     #DCFCE7;
  --red:          #B91C1C;
  --red-bg:       #FEE2E2;
  --blue:         #1D4ED8;
  --blue-bg:      #DBEAFE;
  --purple-bg:    #EDE9FE;
  --purple:       #6D28D9;
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.06);
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 10px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --r:            10px;
  --r-sm:         7px;
  --sidebar-w:    232px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.35s ease;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.login-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  line-height: 1.2;
}

.login-brand-name span {
  display: block;
  font-size: 0.72rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.login-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 6px; }
.login-sub   { color: var(--muted); font-size: 0.88rem; margin-bottom: 28px; }

.form-group  { margin-bottom: 16px; }
label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.input, .select, .textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180,83,9,0.08);
  background: var(--surface);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

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

.err-msg { color: var(--red); font-size: 0.78rem; margin-top: 5px; display: none; }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-brand-icon {
  width: 32px; height: 32px;
  background: rgba(180,83,9,0.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.sidebar-brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  color: #F5F5F4;
  line-height: 1.2;
}
.sidebar-brand-text small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--sidebar-muted);
  letter-spacing: 0.04em;
}

.sidebar-user {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-sm);
}
.sidebar-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 0.65rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user-name  { font-size: 0.8rem; color: var(--sidebar-text); font-weight: 500; }
.sidebar-user-role  { font-size: 0.65rem; color: var(--sidebar-muted); }

.sidebar-nav { padding: 0 8px; flex: 1; }

.nav-section {
  margin-bottom: 4px;
}
.nav-section-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--sidebar-muted);
  font-size: 0.86rem;
  font-weight: 400;
  transition: all 0.12s;
  margin-bottom: 1px;
  user-select: none;
}
.nav-item:hover   { background: var(--sidebar-h); color: var(--sidebar-text); }
.nav-item.active  { background: var(--sidebar-h); color: #FFFFFF; }
.nav-item.active .nav-icon { color: #D97706; }

.nav-icon { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: rgba(180,83,9,0.3);
  color: #FCD34D;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ─────────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
}

.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; line-height: 1; }
.page-sub   { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.page-body { padding: 28px 32px; }

/* Section visibility */
.section { display: none; }
.section.active { display: block; }

/* ─────────────────────────────────────────────
   CARDS
───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-pad { padding: 22px; }
.card-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title-left { display: flex; align-items: center; gap: 7px; }

/* ─────────────────────────────────────────────
   BALANCE HERO
───────────────────────────────────────────── */
.balance-hero {
  background: var(--sidebar);
  border-radius: var(--r);
  padding: 28px 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.balance-hero::before {
  content: '🥃';
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.07;
  pointer-events: none;
}
.balance-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.balance-amount {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}
.balance-sub { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.balance-stats {
  display: flex; gap: 24px; margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.balance-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-bottom: 3px; }
.balance-stat-val   { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.balance-stat-val.green { color: #6EE7B7; }
.balance-stat-val.red   { color: #FCA5A5; }

/* ─────────────────────────────────────────────
   STATS GRID
───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 1.6rem; line-height: 1; }
.stat-sub   { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.c-accent  { color: var(--accent); }
.c-green   { color: var(--green); }
.c-red     { color: var(--red); }
.c-muted   { color: var(--muted); }

/* ─────────────────────────────────────────────
   MEMBER GRID (this month)
───────────────────────────────────────────── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.member-tile {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.member-tile.paid    { border-color: #86EFAC; background: #F0FDF4; }
.member-tile.unpaid  { border-color: var(--border); }
.member-tile.specta  { border-color: var(--border); opacity: 0.6; }
.m-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 9px;
}
.m-name   { font-size: 0.84rem; font-weight: 500; margin-bottom: 3px; }
.m-status { font-size: 0.7rem; color: var(--muted); }
.m-status.paid   { color: var(--green); font-weight: 500; }
.m-status.unpaid { color: var(--red); }
.m-date   { font-size: 0.67rem; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   GOALS
───────────────────────────────────────────── */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.goal-card:hover { box-shadow: var(--shadow-md); }
.goal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.goal-name   { font-weight: 600; font-size: 0.95rem; }
.goal-reason { font-size: 0.78rem; color: var(--muted); margin-bottom: 16px; }
.prog-bar    { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; margin-bottom: 6px; }
.prog-fill   { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--accent), #D97706); transition: width 0.8s ease; }
.prog-labels { display: flex; justify-content: space-between; font-size: 0.72rem; }
.prog-pct    { color: var(--accent); font-weight: 600; }
.prog-target { color: var(--muted); }
.goal-date   { font-size: 0.7rem; color: var(--muted); margin-top: 6px; }
.goal-actions { display: flex; gap: 4px; }

/* ─────────────────────────────────────────────
   TABLES
───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 12px;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 11px 12px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
.td-name { font-weight: 500; color: var(--text); }

/* ─────────────────────────────────────────────
   TAGS / BADGES
───────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
  letter-spacing: 0.02em;
}
.tag-paid     { background: var(--green-bg);  color: var(--green); }
.tag-unpaid   { background: var(--red-bg);    color: var(--red); }
.tag-deducted { background: var(--red-bg);    color: var(--red); }
.tag-logged   { background: var(--accent-bg); color: var(--accent); }
.tag-cat      { background: var(--blue-bg);   color: var(--blue); font-weight: 500; }
.tag-spectator{ background: var(--purple-bg); color: var(--purple); }

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 0.84rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--r-sm);
  cursor: pointer; border: none; transition: all 0.12s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #92400E; }
.btn-outline { background: var(--surface); color: var(--text-2); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-ghost  { background: transparent; color: var(--muted); border: none; padding: 6px 10px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1.5px solid #FECACA; }
.btn-danger:hover { background: #FEE2E2; }
.btn-green  { background: var(--green-bg); color: var(--green); border: 1.5px solid #86EFAC; }
.btn-green:hover { background: #DCFCE7; }
.btn-wa     { background: #DCFCE7; color: #15803D; border: 1.5px solid #86EFAC; font-size: 0.78rem; padding: 6px 12px; }
.btn-wa:hover { background: #BBF7D0; }
.btn-sm     { padding: 5px 12px; font-size: 0.78rem; }
.btn-icon   {
  padding: 6px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border);
  cursor: pointer; color: var(--muted); font-size: 0.85rem;
  transition: all 0.12s; display: inline-flex; align-items: center;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }

/* ─────────────────────────────────────────────
   CHARTS
───────────────────────────────────────────── */
.chart-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.chart-wrap canvas { max-height: 220px; }

/* ─────────────────────────────────────────────
   ACTIVITY FEED
───────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; margin-top: 1px;
}
.activity-body { flex: 1; }
.activity-desc { font-size: 0.88rem; color: var(--text-2); }
.activity-desc strong { color: var(--text); }
.activity-time { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   CHAT
───────────────────────────────────────────── */
.chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 200px); min-height: 400px;
}
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.chat-msg { display: flex; gap: 9px; max-width: 75%; }
.chat-msg.own { flex-direction: row-reverse; align-self: flex-end; }
.chat-av {
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 0.65rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 12px;
}
.chat-msg.own .chat-bubble { background: var(--accent-bg); border-color: #FDE68A; }
.chat-sender { font-size: 0.67rem; color: var(--muted); margin-bottom: 2px; font-weight: 500; }
.chat-text   { font-size: 0.88rem; color: var(--text-2); }
.chat-time   { font-size: 0.63rem; color: var(--muted); margin-top: 2px; }
.chat-input-row {
  display: flex; gap: 9px; padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ─────────────────────────────────────────────
   ANNOUNCEMENTS
───────────────────────────────────────────── */
.ann-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.ann-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.ann-body { flex: 1; }
.ann-text { font-size: 0.9rem; color: var(--text-2); }
.ann-time { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* ─────────────────────────────────────────────
   MISSED MONTHS
───────────────────────────────────────────── */
.missed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.missed-cell {
  padding: 10px; border-radius: var(--r-sm); text-align: center; font-size: 0.78rem;
}
.missed-cell.paid    { background: var(--green-bg); color: var(--green); font-weight: 500; }
.missed-cell.missed  { background: var(--red-bg);   color: var(--red); font-weight: 500; }
.missed-cell.current { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.missed-cell .cell-month { font-size: 0.65rem; color: inherit; opacity: 0.7; }

/* ─────────────────────────────────────────────
   ADMIN — PAYMENT ROWS
───────────────────────────────────────────── */
.pay-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.pay-row:last-child { border-bottom: none; }
.pay-row:hover { background: var(--surface-2); }
.pay-row-left  { display: flex; align-items: center; gap: 11px; }
.pay-row-right { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pay-row-name  { font-weight: 500; font-size: 0.9rem; }
.pay-row-sub   { font-size: 0.74rem; color: var(--muted); }

/* ─────────────────────────────────────────────
   SUMMARY SCROLL
───────────────────────────────────────────── */
.sum-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sum-card {
  min-width: 130px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 13px 14px; box-shadow: var(--shadow-sm);
}
.sum-card.current { border-color: var(--accent); background: var(--accent-light); }
.sum-month  { font-size: 0.7rem; color: var(--muted); margin-bottom: 4px; }
.sum-amount { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--text); }
.sum-count  { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   MODALS
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,25,23,0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  animation: slideUp 0.2s ease;
}
.modal-sm { max-width: 360px; }
.modal-title  { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: 6px; }
.modal-body   { font-size: 0.9rem; color: var(--text-2); margin-bottom: 20px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.toggle-lbl { font-size: 0.88rem; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border-strong); border-radius: 100px; transition: 0.2s;
}
.switch-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px; transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .switch-slider { background: var(--accent); }
input:checked + .switch-slider::before { transform: translateX(16px); }

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--sidebar);
  color: #F5F5F4;
  border-radius: var(--r-sm);
  padding: 12px 18px;
  font-size: 0.86rem;
  box-shadow: var(--shadow-lg);
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  animation: slideUp 0.2s ease;
}
#toast.show { display: flex; }
#toast.success::before { content: '✓'; color: #6EE7B7; font-weight: 700; }
#toast.error::before   { content: '✕'; color: #FCA5A5; font-weight: 700; }
#toast.info::before    { content: 'i'; font-style: italic; color: #93C5FD; font-weight: 700; }

/* ─────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state-icon { font-size: 2rem; margin-bottom: 8px; }
.empty-state-text { font-size: 0.88rem; }

/* ─────────────────────────────────────────────
   MISC UTILITIES
───────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; }
.section-gap { margin-bottom: 20px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-gap     { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--muted); }
.text-sm    { font-size: 0.82rem; }
.font-mono  { font-variant-numeric: tabular-nums; }
.loading { opacity: 0.5; pointer-events: none; }

/* ─────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate { animation: slideUp 0.3s ease both; }

/* ─────────────────────────────────────────────
   MOBILE SIDEBAR TOGGLE
───────────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 60;
  background: var(--sidebar); color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; font-size: 1rem;
}

@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .page-body { padding: 20px 16px; }
  .page-header { padding: 56px 16px 16px; }
  .hamburger { display: flex; align-items: center; }
  .chart-grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .balance-amount { font-size: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
