/* ═══════════════════════════════════════════════════════════════════════════
   MoodoFamily 2.0 — Design System
   Font: Inter | Style: Aurora Glass Dark
═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ──────────────────────────────────────────────────── */
:root {
  --bg:            #0d0d1a;
  --glass:         rgba(255, 255, 255, 0.04);
  --glass-hover:   rgba(255, 255, 255, 0.07);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-strong:  rgba(255, 255, 255, 0.10);
  --surface:       rgba(20, 20, 38, 0.85);
  --surface2:      rgba(30, 30, 55, 0.80);

  --text:          #f0f0ff;
  --text2:         rgba(240, 240, 255, 0.55);
  --text3:         rgba(240, 240, 255, 0.28);

  --v1:            #7c5cfc;  /* violet */
  --v2:            #fc5c9c;  /* pink */
  --v3:            #5cf8d0;  /* mint */
  --v4:            #fcb85c;  /* amber */
  --v5:            #5cbbfc;  /* sky */

  --gv1:           rgba(124, 92, 252, 0.40);
  --gv2:           rgba(252, 92, 156, 0.40);
  --gv3:           rgba(92, 248, 208, 0.30);
  --gv4:           rgba(252, 184, 92, 0.35);
  --gv5:           rgba(92, 187, 252, 0.30);

  --r:             18px;
  --r-sm:          12px;
  --r-xs:          8px;
  --r-pill:        999px;

  --nav-h:         76px;
  --topbar-h:      56px;
  --safe-b:        env(safe-area-inset-bottom, 0px);
  --safe-t:        env(safe-area-inset-top, 0px);

  --transition:    cubic-bezier(0.4, 0, 0.2, 1);
  --spring:        cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; color-scheme: dark; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }
input, textarea, select { font: inherit; color: inherit; background: none; border: none; outline: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ─── Aurora Background ──────────────────────────────────────────────────── */
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(80px);
  animation: aurora-drift 20s ease-in-out infinite alternate;
  opacity: 0.35;
}
.aurora-blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--v1) 0%, transparent 70%);
  top: -200px; left: -150px;
  animation-duration: 22s;
}
.aurora-blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--v2) 0%, transparent 70%);
  top: 20%; right: -200px;
  animation-duration: 18s; animation-delay: -8s;
}
.aurora-blob-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--v3) 0%, transparent 70%);
  bottom: 10%; left: 30%;
  animation-duration: 25s; animation-delay: -4s;
}
@keyframes aurora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -60px) scale(1.1); }
  66%  { transform: translate(-30px, 40px) scale(0.95); }
  100% { transform: translate(60px, 20px) scale(1.05); }
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ─── Glass Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.2s var(--transition), transform 0.2s var(--spring);
}
.card:active { transform: scale(0.99); }
.card-hover:hover { background: var(--glass-hover); }

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding-top: var(--safe-t);
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 20px; padding-right: 16px;
  background: rgba(13, 13, 26, 0.70);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo {
  font-size: 20px; color: var(--v1);
  filter: drop-shadow(0 0 8px var(--gv1));
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px var(--gv1)); }
  50%       { opacity: 0.8; filter: drop-shadow(0 0 16px var(--gv1)); }
}
.topbar-title {
  font-size: 17px; font-weight: 600; letter-spacing: -0.3px;
}
.topbar-btn {
  height: 36px; padding: 0 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500;
  transition: background 0.15s, transform 0.1s var(--spring);
}
.topbar-btn:active { transform: scale(0.95); }

/* ─── Bottom Nav ─────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; align-items: flex-start;
  padding-top: 8px;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--glass-border);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 0;
  color: var(--text3);
  transition: color 0.2s var(--transition);
  position: relative;
}
.nav-btn.active { color: var(--v1); }
.nav-btn.active .nav-icon::after {
  content: '';
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--v1);
  box-shadow: 0 0 8px var(--gv1);
}
.nav-icon {
  width: 24px; height: 24px; position: relative;
  transition: transform 0.2s var(--spring);
}
.nav-btn.active .nav-icon { transform: translateY(-2px); }
.nav-icon svg { width: 100%; height: 100%; }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.2px; }

/* ─── Main Content ───────────────────────────────────────────────────────── */
.app {
  position: relative; z-index: 1; min-height: 100dvh;
}
.main-content {
  padding-top: calc(var(--topbar-h) + var(--safe-t) + 16px);
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 80px);
  min-height: 100dvh;
}

/* ─── Page transitions ───────────────────────────────────────────────────── */
.page-enter {
  animation: page-in 0.3s var(--spring) forwards;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Page Loading ───────────────────────────────────────────────────────── */
.page-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 40vh;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--glass-border);
  border-top-color: var(--v1);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FAB ────────────────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  right: 20px; z-index: 99;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v1), var(--v2));
  box-shadow: 0 8px 24px var(--gv1), 0 4px 12px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
}
.fab:active {
  transform: scale(0.92);
  box-shadow: 0 4px 12px var(--gv1);
}
.fab svg { width: 24px; height: 24px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600;
  transition: transform 0.15s var(--spring), box-shadow 0.15s;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--v1), var(--v2));
  color: #fff;
  box-shadow: 0 4px 20px var(--gv1);
}
.btn-primary:hover { box-shadow: 0 6px 28px var(--gv1); }
.btn-glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.btn-ghost { color: var(--text2); }
.btn-danger { background: rgba(252, 80, 80, 0.15); color: #fc5050; border: 1px solid rgba(252,80,80,0.25); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--r-xs); }
.btn-full { width: 100%; }
.btn-icon {
  width: 38px; height: 38px; padding: 0;
  border-radius: var(--r-xs);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
}
.btn-icon svg { width: 18px; height: 18px; }

/* ─── Form Inputs ────────────────────────────────────────────────────────── */
.input-wrap { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 12px; font-weight: 500; color: var(--text2); letter-spacing: 0.5px; text-transform: uppercase; }
.input-field {
  width: 100%;
  padding: 13px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus {
  border-color: var(--v1);
  box-shadow: 0 0 0 3px var(--gv1);
  background: var(--glass-hover);
}
.input-field::placeholder { color: var(--text3); }
textarea.input-field { resize: vertical; min-height: 80px; }
select.input-field { appearance: none; cursor: pointer; }

/* ─── Section Headers ────────────────────────────────────────────────────── */
.page-header { padding: 24px 20px 8px; }
.page-title {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text), var(--text2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-title-accent {
  background: linear-gradient(135deg, var(--v1), var(--v2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-subtitle { font-size: 14px; color: var(--text2); margin-top: 4px; font-weight: 400; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text3); margin-bottom: 10px;
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  padding-bottom: var(--safe-b);
  animation: overlay-in 0.2s ease forwards;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  width: 100%; max-width: 600px; margin: 0 auto;
  background: rgba(20, 20, 40, 0.96);
  border: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px 32px;
  max-height: 90dvh;
  overflow-y: auto;
  animation: sheet-in 0.35s var(--spring) forwards;
  backdrop-filter: blur(24px);
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--glass-strong);
  border-radius: 2px;
  margin: 8px auto 20px;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* ─── Auth Screen ────────────────────────────────────────────────────────── */
.auth-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-container {
  width: 100%; max-width: 400px;
  animation: page-in 0.5s var(--spring) forwards;
}
.auth-logo { text-align: center; margin-bottom: 40px; }
.auth-logo-icon {
  font-size: 56px;
  filter: drop-shadow(0 0 24px var(--gv1));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.auth-title {
  font-size: 28px; font-weight: 800; margin-top: 16px;
  background: linear-gradient(135deg, var(--v1), var(--v2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle { font-size: 14px; color: var(--text2); margin-top: 4px; }
.auth-panel { animation: page-in 0.3s var(--spring) forwards; }
.auth-panel h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.auth-hint { font-size: 14px; color: var(--text2); text-align: center; margin-bottom: 20px; }
.auth-error {
  font-size: 13px; color: #fc5050; text-align: center;
  min-height: 18px; margin-top: 12px;
}
.auth-noaccess-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }

/* Emoji invite grid */
.auth-selected-emojis {
  display: flex; justify-content: center; gap: 12px;
  margin-bottom: 20px;
}
.auth-selected-emojis span {
  width: 52px; height: 52px;
  background: var(--glass);
  border: 2px solid var(--glass-border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-selected-emojis span.filled {
  border-color: var(--v1);
  box-shadow: 0 0 12px var(--gv1);
}
.auth-emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 8px; margin-bottom: 20px;
}
.emoji-btn {
  aspect-ratio: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xs);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.15s var(--spring), box-shadow 0.15s;
  cursor: pointer;
}
.emoji-btn:active { transform: scale(0.9); }
.emoji-btn.selected {
  background: rgba(124, 92, 252, 0.2);
  border-color: var(--v1);
  box-shadow: 0 0 10px var(--gv1);
  transform: scale(1.08);
}

/* Constellation grid */
.constellation-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.star-btn {
  aspect-ratio: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring), box-shadow 0.15s;
}
.star-btn::after {
  content: '✦';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text3);
  transition: color 0.15s;
}
.star-btn.active {
  background: rgba(124, 92, 252, 0.25);
  border-color: var(--v1);
  box-shadow: 0 0 16px var(--gv1), inset 0 0 8px rgba(124,92,252,0.1);
}
.star-btn.active::after { color: var(--v1); }
.star-btn:active { transform: scale(0.88); }
.star-order {
  position: absolute; top: 2px; right: 4px;
  font-size: 9px; font-weight: 700; color: var(--v1);
  pointer-events: none;
}
.constellation-counter {
  font-size: 13px; color: var(--text2); text-align: center; margin-bottom: 16px;
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: min(360px, 90vw);
}
.toast {
  padding: 12px 18px;
  background: rgba(30, 30, 55, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.3s var(--spring) forwards;
  display: flex; align-items: center; gap: 10px;
}
.toast.toast-success { border-color: rgba(92, 248, 208, 0.3); }
.toast.toast-error   { border-color: rgba(252, 80, 80, 0.3); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ─── Chips / Tabs ───────────────────────────────────────────────────────── */
.chip-tabs {
  display: flex; gap: 8px;
  padding: 0 20px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.chip-tabs::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--text2);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.chip.active {
  background: rgba(124, 92, 252, 0.18);
  border-color: var(--v1);
  color: var(--v1);
  box-shadow: 0 0 12px var(--gv1);
}

/* ─── Dashboard Bento Grid ───────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
}
.bento-card {
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
  transition: transform 0.2s var(--spring);
}
.bento-card:active { transform: scale(0.98); }
.bento-card-full  { grid-column: 1 / -1; }
.bento-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--v1), var(--v2));
  opacity: 0.6;
}
.bento-val {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text), var(--text2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bento-label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.bento-icon {
  font-size: 28px; margin-bottom: 10px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.2));
}

/* ─── Quick Actions ──────────────────────────────────────────────────────── */
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 0 16px 16px;
}
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  backdrop-filter: blur(12px);
  transition: background 0.15s, transform 0.15s var(--spring);
}
.qa-btn:active { transform: scale(0.94); background: var(--glass-hover); }
.qa-icon { font-size: 26px; }
.qa-label { font-size: 11px; color: var(--text2); text-align: center; line-height: 1.3; }

/* ─── Event List Items ───────────────────────────────────────────────────── */
.event-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.event-item:active { transform: scale(0.99); background: var(--glass-hover); }
.event-date-badge {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--glass-strong);
  border-radius: var(--r-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.event-date-badge::before {
  content: '';
  position: absolute; inset: 0; border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--v1), var(--v2)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}
.event-day { font-size: 16px; font-weight: 800; line-height: 1; }
.event-mon { font-size: 9px; font-weight: 600; color: var(--text2); letter-spacing: 0.5px; }
.event-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* ─── Calendar Grid ──────────────────────────────────────────────────────── */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 16px;
}
.cal-month { font-size: 20px; font-weight: 700; }
.cal-nav-btn {
  width: 36px; height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background 0.15s, transform 0.1s var(--spring);
}
.cal-nav-btn:active { transform: scale(0.9); background: var(--glass-hover); }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; padding: 0 16px;
}
.cal-weekday {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text3); padding: 4px 0 8px;
  letter-spacing: 0.5px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--text2);
  position: relative;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.cal-day:active { transform: scale(0.9); }
.cal-day.today {
  background: rgba(124, 92, 252, 0.2);
  border: 1px solid var(--v1);
  color: var(--v1); font-weight: 700;
  box-shadow: 0 0 12px var(--gv1);
}
.cal-day.selected {
  background: linear-gradient(135deg, var(--v1), var(--v2));
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 16px var(--gv1);
}
.cal-day.other-month { color: var(--text3); }
.cal-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--v2);
  position: absolute; bottom: 3px;
  box-shadow: 0 0 4px var(--gv2);
}
.cal-events-section { padding: 20px 16px 0; }

/* ─── Shopping ───────────────────────────────────────────────────────────── */
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  transition: opacity 0.2s, transform 0.2s;
}
.shop-item.checked { opacity: 0.45; }
.shop-checkbox {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  background: var(--glass);
  border: 2px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s var(--spring);
}
.shop-item.checked .shop-checkbox {
  background: rgba(92, 248, 208, 0.2);
  border-color: var(--v3);
  color: var(--v3);
}
.shop-name { flex: 1; font-size: 15px; font-weight: 500; }
.shop-item.checked .shop-name { text-decoration: line-through; color: var(--text3); }
.shop-qty { font-size: 12px; color: var(--text2); flex-shrink: 0; }
.shop-cat-badge {
  font-size: 11px; padding: 2px 8px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  color: var(--text3);
}

/* ─── Meal Plan ──────────────────────────────────────────────────────────── */
.meal-week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px; padding: 0 16px 16px;
}
.meal-day-col {
  display: flex; flex-direction: column; gap: 4px;
}
.meal-day-label {
  text-align: center; font-size: 10px; font-weight: 700;
  color: var(--text3); letter-spacing: 0.5px; padding-bottom: 4px;
}
.meal-day-label.today { color: var(--v1); }
.meal-slot {
  aspect-ratio: 1;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xs);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring), box-shadow 0.15s;
  position: relative; overflow: hidden;
}
.meal-slot:active { transform: scale(0.92); }
.meal-slot.filled {
  border-color: rgba(124, 92, 252, 0.4);
  background: rgba(124, 92, 252, 0.1);
}
.meal-slot-emoji { font-size: 20px; }
.meal-slot-type { font-size: 8px; color: var(--text3); }
.recipe-card {
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.recipe-card:active { transform: scale(0.99); }
.recipe-emoji { font-size: 36px; }
.recipe-name { font-size: 16px; font-weight: 600; margin: 8px 0 4px; }
.recipe-meta { font-size: 12px; color: var(--text2); }

/* ─── Finance ────────────────────────────────────────────────────────────── */
.fin-summary-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 0 16px 16px;
}
.fin-summary-card {
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  position: relative; overflow: hidden;
}
.fin-amount {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
}
.fin-amount.income { color: var(--v3); }
.fin-amount.expense { color: var(--v2); }
.fin-label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.fin-balance-card {
  margin: 0 16px 16px;
  padding: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  text-align: center;
}
.fin-balance-amount {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
}
.txn-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.txn-item:active { transform: scale(0.99); background: var(--glass-hover); }
.txn-emoji {
  width: 40px; height: 40px;
  background: var(--glass);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.txn-amount { font-size: 16px; font-weight: 700; }
.txn-amount.income { color: var(--v3); }
.txn-amount.expense { color: var(--v2); }
.budget-bar-wrap {
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}
.budget-bar-track {
  height: 6px;
  background: var(--glass-strong);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.budget-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--v1), var(--v2));
  transition: width 0.6s var(--spring);
}
.budget-bar-fill.over { background: linear-gradient(90deg, #fc5050, #fc5c9c); }
.saving-card {
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  margin-bottom: 10px;
}
.saving-progress {
  height: 8px;
  background: var(--glass-strong);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.saving-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s var(--spring);
}

/* ─── Family ─────────────────────────────────────────────────────────────── */
.member-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.member-card:active { transform: scale(0.99); }
.member-avatar {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  position: relative;
}
.member-avatar::after {
  content: '';
  position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(var(--avatar-color, var(--v1)), var(--v2), var(--avatar-color, var(--v1)));
  z-index: -1;
  animation: spin 4s linear infinite;
}
.member-name { font-size: 16px; font-weight: 600; }
.member-role { font-size: 12px; color: var(--text2); margin-top: 2px; }
.note-card {
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--note-color, var(--v1));
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--spring);
}
.note-card:active { transform: scale(0.99); }
.note-title { font-size: 15px; font-weight: 600; }
.note-content { font-size: 13px; color: var(--text2); margin-top: 4px; }
.note-pin-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--v4); margin-bottom: 4px;
}

/* ─── Empty State ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 48px; opacity: 0.5; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text2); }
.empty-desc { font-size: 14px; color: var(--text3); }

/* ─── Color Picker ───────────────────────────────────────────────────────── */
.color-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: transform 0.15s var(--spring), border-color 0.15s;
}
.color-swatch.active { border-color: white; transform: scale(1.2); }

/* ─── Responsive (small) ─────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .auth-emoji-grid { grid-template-columns: repeat(7, 1fr); }
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .bento-val { font-size: 26px; }
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-strong); border-radius: 2px; }
