/* ===================== Theme tokens ===================== */
:root {
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --display: 'Segoe UI Variable Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --good: #1fae6b;
  --bad: #e5484d;
  --warn: #e8a317;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body,
body[data-theme='classic'] {
  --bg-1: #f6f7fc; --bg-2: #e6ebfb; --bg-3: #f3e9fb;
  --surface: rgba(255, 255, 255, .78); --surface-2: rgba(240, 243, 252, .9); --surface-solid: #ffffff;
  --border: rgba(30, 40, 90, .1); --text: #1b2033; --muted: #687089;
  --accent: #5b6cff; --accent-2: #b15bff; --accent-text: #fff; --accent-soft: rgba(91, 108, 255, .12);
  --shadow: 0 10px 30px -12px rgba(30, 40, 90, .25);
  --confetti: #5b6cff, #b15bff, #22c3a6, #ffb020, #ff6b8b;
  color-scheme: light;
}
body[data-theme='midnight'] {
  --bg-1: #0b0f1f; --bg-2: #151a36; --bg-3: #24163a;
  --surface: rgba(24, 29, 56, .72); --surface-2: rgba(36, 42, 78, .75); --surface-solid: #181d38;
  --border: rgba(160, 175, 255, .14); --text: #e9ecff; --muted: #9aa2c7;
  --accent: #8b9cff; --accent-2: #d08bff; --accent-text: #0b0f1f; --accent-soft: rgba(139, 156, 255, .16);
  --shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
  --confetti: #8b9cff, #d08bff, #5ff0c9, #ffd166;
  color-scheme: dark;
}
body[data-theme='christmas'] {
  --bg-1: #0b2a1e; --bg-2: #103b2a; --bg-3: #4a0f17;
  --surface: rgba(14, 42, 31, .72); --surface-2: rgba(24, 58, 44, .8); --surface-solid: #10352a;
  --border: rgba(244, 201, 93, .2); --text: #fff7ec; --muted: #c9d8cc;
  --accent: #e63946; --accent-2: #f4c95d; --accent-text: #fff; --accent-soft: rgba(230, 57, 70, .18);
  --good: #3ccf7f;
  --shadow: 0 14px 40px -14px rgba(0, 0, 0, .65);
  --confetti: #e63946, #f4c95d, #3ccf7f, #ffffff;
  color-scheme: dark;
}
body[data-theme='thanksgiving'] {
  --bg-1: #fff6ea; --bg-2: #f8dcb6; --bg-3: #f2c79a;
  --surface: rgba(255, 250, 243, .82); --surface-2: rgba(252, 236, 214, .9); --surface-solid: #fffaf3;
  --border: rgba(122, 64, 20, .15); --text: #3b2412; --muted: #85613f;
  --accent: #c4561d; --accent-2: #8a5a2b; --accent-text: #fff; --accent-soft: rgba(196, 86, 29, .12);
  --shadow: 0 12px 30px -14px rgba(122, 64, 20, .35);
  --confetti: #c4561d, #e8a33d, #8a4b22, #b8401c, #f2d16b;
  color-scheme: light;
}
body[data-theme='winter'] {
  --bg-1: #0c223d; --bg-2: #1d4a75; --bg-3: #6b9ac4;
  --surface: rgba(15, 40, 70, .62); --surface-2: rgba(30, 64, 104, .7); --surface-solid: #133152;
  --border: rgba(200, 230, 255, .2); --text: #eef7ff; --muted: #b6cde4;
  --accent: #7cc6ff; --accent-2: #c3e6ff; --accent-text: #08213b; --accent-soft: rgba(124, 198, 255, .18);
  --shadow: 0 14px 40px -14px rgba(0, 10, 30, .6);
  --confetti: #7cc6ff, #ffffff, #c3e6ff, #a0b4ff;
  color-scheme: dark;
}
body[data-theme='spring'] {
  --bg-1: #f2fff5; --bg-2: #e3f8e9; --bg-3: #ffe6f0;
  --surface: rgba(255, 255, 255, .78); --surface-2: rgba(244, 252, 246, .92); --surface-solid: #ffffff;
  --border: rgba(40, 90, 60, .12); --text: #20302a; --muted: #62786c;
  --accent: #e2558d; --accent-2: #3fae6c; --accent-text: #fff; --accent-soft: rgba(226, 85, 141, .12);
  --shadow: 0 12px 30px -14px rgba(40, 90, 60, .3);
  --confetti: #e2558d, #3fae6c, #ffd166, #9ad1ff, #c49bff;
  color-scheme: light;
}
body[data-theme='summer'] {
  --bg-1: #dff6ff; --bg-2: #bfeaff; --bg-3: #fff0c2;
  --surface: rgba(255, 255, 255, .8); --surface-2: rgba(240, 251, 255, .92); --surface-solid: #ffffff;
  --border: rgba(0, 90, 130, .13); --text: #0f2f3f; --muted: #4d7286;
  --accent: #ff7f11; --accent-2: #00a5c9; --accent-text: #fff; --accent-soft: rgba(255, 127, 17, .13);
  --shadow: 0 12px 30px -14px rgba(0, 90, 130, .3);
  --confetti: #ff7f11, #00a5c9, #ffd23f, #ff5d8f, #3bd16f;
  color-scheme: light;
}
body[data-theme='fall'] {
  --bg-1: #24150e; --bg-2: #3d2216; --bg-3: #5c2a14;
  --surface: rgba(52, 31, 21, .72); --surface-2: rgba(72, 44, 30, .78); --surface-solid: #3a2318;
  --border: rgba(240, 160, 80, .18); --text: #fdf1e4; --muted: #d4b499;
  --accent: #f08a24; --accent-2: #d64a2a; --accent-text: #24150e; --accent-soft: rgba(240, 138, 36, .16);
  --shadow: 0 14px 40px -14px rgba(0, 0, 0, .6);
  --confetti: #f08a24, #d64a2a, #f2b134, #9c5a2b;
  color-scheme: dark;
}

/* ===================== Base ===================== */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% -10%, var(--bg-3), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  transition: background .6s var(--ease), color .4s;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
body[data-theme='summer']::before {
  background: radial-gradient(420px 420px at 92% -6%, rgba(255, 214, 80, .75), rgba(255, 190, 60, .25) 45%, transparent 70%);
  animation: sunpulse 7s ease-in-out infinite;
}
body[data-theme='winter']::before {
  background: linear-gradient(115deg, transparent 20%, rgba(120, 255, 210, .12) 35%, rgba(130, 160, 255, .14) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: aurora 18s ease-in-out infinite alternate;
}
body[data-theme='christmas']::before {
  background: radial-gradient(800px 400px at 50% 120%, rgba(244, 201, 93, .12), transparent 70%);
}
body[data-theme='spring']::before {
  background: radial-gradient(500px 300px at 85% 10%, rgba(255, 190, 215, .45), transparent 70%), radial-gradient(500px 300px at 5% 90%, rgba(170, 230, 180, .4), transparent 70%);
}
body[data-anim='off']::before { animation: none; }
@keyframes sunpulse { 50% { transform: scale(1.06); opacity: .85; } }
@keyframes aurora { to { background-position: 100% 0; } }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#decor { position: fixed; top: 0; left: 0; right: 0; z-index: 30; pointer-events: none; }
#app { position: relative; z-index: 2; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.right { text-align: right; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ===================== Shell ===================== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-family: var(--display); font-weight: 750; font-size: 19px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow);
}
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text);
  text-decoration: none; font-weight: 550; transition: background .2s, transform .2s var(--ease);
}
.nav a .ico { width: 22px; text-align: center; font-size: 17px; }
.nav a:hover { background: var(--accent-soft); transform: translateX(2px); }
.nav a.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-text); box-shadow: var(--shadow); }
.nav .sep { height: 1px; background: var(--border); margin: 10px 6px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface-2); }

.main { padding: 26px 34px 90px; max-width: 1280px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.topbar h1 { flex: 1; }
.topbar .sub { color: var(--muted); font-size: 14px; margin-top: 2px; font-weight: 500; }
.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 14px 100px; }
  h1 { font-size: 23px; }
  .tabbar {
    display: flex; position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 40; justify-content: space-around;
    padding: 6px; border-radius: 22px; background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a .ico { font-size: 20px; }
  .tabbar a.active { color: var(--accent-text); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
  .grid.two { grid-template-columns: 1fr; }
}

/* ===================== Components ===================== */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: var(--shadow);
  animation: rise .45s var(--ease) both;
}
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card > header h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card.tight { padding: 12px 14px; }
.grid > .card:nth-child(2) { animation-delay: .05s; }
.grid > .card:nth-child(3) { animation-delay: .1s; }
.grid > .card:nth-child(4) { animation-delay: .15s; }
.grid > .card:nth-child(5) { animation-delay: .2s; }
.grid > .card:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.99); } }
body[data-anim='off'] .card { animation: none; }

.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-family: var(--display); font-size: 26px; font-weight: 750; margin-top: 4px; letter-spacing: -.02em; }
.stat .hint { color: var(--muted); font-size: 13px; margin-top: 2px; }

.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600;
  padding: 9px 15px; border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, opacity .2s; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.good { background: var(--good); color: #fff; border-color: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--text); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; display: inline-grid; place-items: center; position: relative; transition: background .2s; }
.icon-btn:hover { background: var(--accent-soft); }
.badge-dot { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 9px; cursor: pointer; transition: all .2s; }
.seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .25); }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 11px; padding: 9px 11px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--accent); }
input[type='color'] { padding: 2px; height: 38px; }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; color: var(--text); cursor: pointer; }
.form { display: grid; gap: 12px; }
.form .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .cols3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form .cols, .form .cols3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.form-error { background: rgba(229, 72, 77, .12); color: var(--bad); padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.hint-box { background: var(--accent-soft); padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }

.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); animation: rise .35s var(--ease) both; }
.item:last-child { border-bottom: 0; }
.item .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; flex: none; }
.item .title { font-weight: 600; }
.item .meta { color: var(--muted); font-size: 13px; }
.item.done .title { text-decoration: line-through; opacity: .6; }
.item.clickable { cursor: pointer; border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.item.clickable:hover { background: var(--accent-soft); }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.pill.good { background: rgba(31, 174, 107, .14); color: var(--good); border-color: transparent; }
.pill.bad { background: rgba(229, 72, 77, .14); color: var(--bad); border-color: transparent; }
.pill.warn { background: rgba(232, 163, 23, .16); color: var(--warn); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 18px; flex: none; background: var(--surface-2); box-shadow: 0 0 0 2px var(--c, var(--accent)); }
.avatar.lg { width: 54px; height: 54px; font-size: 28px; }
.avatar.sm { width: 24px; height: 24px; font-size: 13px; box-shadow: 0 0 0 1.5px var(--c, var(--accent)); }
.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.tickbox {
  width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--border); background: var(--surface-solid); cursor: pointer;
  display: grid; place-items: center; flex: none; transition: all .2s var(--ease); font-size: 15px; color: transparent;
}
.tickbox:hover { border-color: var(--accent); }
.tickbox.on { background: var(--good); border-color: var(--good); color: #fff; animation: pop .35s var(--ease); }
.tickbox.wait { background: var(--warn); border-color: var(--warn); color: #fff; }

.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty-icon { font-size: 38px; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* ===================== Modal / toast ===================== */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 20, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.modal-wrap.open { opacity: 1; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); transform: translateY(14px) scale(.98); transition: transform .25s var(--ease); }
.modal.wide { width: min(760px, 100%); }
.modal-wrap.open .modal { transform: none; }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; position: sticky; top: 0; background: var(--surface-solid); z-index: 1; }
.modal-body { padding: 10px 20px 20px; }

#toasts { position: fixed; z-index: 200; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--surface-solid); color: var(--text); border: 1px solid var(--border); padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 600; animation: rise .3s var(--ease); transition: opacity .4s, transform .4s; }
.toast.error { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

.confetti { position: fixed; z-index: 300; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; animation: burst 1s var(--ease) forwards; }
@keyframes burst { to { transform: translate(var(--dx), calc(var(--dy) + 120px)) rotate(var(--r)); opacity: 0; } }

/* notifications panel */
.notif-panel { position: fixed; z-index: 90; top: 70px; right: 20px; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); padding: 8px; animation: rise .25s var(--ease); }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; }
.notif:hover { background: var(--accent-soft); }
.notif.unread { background: var(--accent-soft); }
.notif .t { font-weight: 600; font-size: 14px; }

/* ===================== Decorations ===================== */
.lights { display: flex; justify-content: space-between; padding: 0 6px; height: 26px; border-top: 2px solid rgba(30, 60, 30, .9); }
.lights i { width: 10px; height: 15px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; margin-top: 4px; position: relative; animation: twinkle 2.2s ease-in-out infinite; }
.lights i::before { content: ''; position: absolute; top: -5px; left: 2px; width: 6px; height: 5px; background: #2b3b2b; border-radius: 2px; }
.lights i:nth-child(4n + 1) { background: #ff3b3b; color: #ff3b3b; }
.lights i:nth-child(4n + 2) { background: #ffd23b; color: #ffd23b; }
.lights i:nth-child(4n + 3) { background: #3bff7a; color: #3bff7a; }
.lights i:nth-child(4n + 4) { background: #3bb4ff; color: #3bb4ff; }
.lights i:nth-child(odd) { margin-top: 8px; }
@keyframes twinkle { 0%, 100% { box-shadow: 0 0 12px 3px currentColor; opacity: 1; } 50% { box-shadow: 0 0 2px 0 currentColor; opacity: .45; } }
body[data-anim='calm'] .lights i { animation-duration: 5s; }
.garland { display: flex; justify-content: space-between; padding: 0 8px; font-size: 20px; height: 30px; border-top: 2px solid rgba(120, 70, 30, .5); }
.garland span { display: inline-block; transform-origin: top center; animation: swing 3s ease-in-out infinite; }
.garland span:nth-child(odd) { margin-top: 5px; }
@keyframes swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
body:has(#decor .lights) .main, body:has(#decor .garland) .main { padding-top: 40px; }

/* ===================== Login ===================== */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: min(420px, 100%); padding: 30px; }
.auth .brand { justify-content: center; font-size: 24px; padding-bottom: 6px; }
.auth .brand-mark { width: 54px; height: 54px; font-size: 28px; border-radius: 16px; }

/* ===================== Dashboard ===================== */
.hero { position: relative; overflow: hidden; padding: 24px; }
.hero h1 { font-size: 30px; }
.hero .emoji { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 70px; opacity: .9; animation: bob 4s ease-in-out infinite; }
@media (max-width: 600px) { .hero .emoji { font-size: 44px; top: 24px; transform: none; } }

/* ===================== Calendar ===================== */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .day { min-height: 108px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px; cursor: pointer; transition: transform .15s var(--ease), border-color .2s; overflow: hidden; display: flex; flex-direction: column; gap: 3px; backdrop-filter: blur(10px); }
.cal .day:hover { border-color: var(--accent); transform: translateY(-1px); }
.cal .day.other { opacity: .45; }
.cal .day .n { font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .n { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-text); }
.cal .day.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.chip { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c, var(--accent)); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.chip.soft { text-shadow: none; }
.chip.soft { background: var(--surface-2); color: var(--text); border-left: 3px solid var(--c, var(--accent)); }
.chip.paid { opacity: .55; text-decoration: line-through; }
.more { font-size: 11px; color: var(--muted); font-weight: 600; padding-left: 4px; }
@media (max-width: 700px) {
  .cal { gap: 3px; }
  .cal .day { min-height: 58px; padding: 3px; border-radius: 10px; }
  .cal .day .chip { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .cal .day .more { display: none; }
  .cal-head { font-size: 10px; }
}
.agenda-day { margin-top: 14px; }
.agenda-day h3 { margin-bottom: 6px; }
.event-row { display: flex; gap: 12px; padding: 10px; border-radius: 12px; border-left: 4px solid var(--c, var(--accent)); background: var(--surface-2); margin-bottom: 8px; cursor: pointer; transition: transform .15s; }
.event-row:hover { transform: translateX(3px); }
.event-row .time { font-weight: 700; font-size: 13px; min-width: 64px; }

/* ===================== Bills ===================== */
.period { margin-bottom: 16px; }
.period-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.period-head .grow { flex: 1 1 280px; }
.period-head .grow h2 { font-size: 17px; }
@media (max-width: 600px) {
  .totals { width: 100%; justify-content: space-between; gap: 8px; }
  .topbar { flex-wrap: wrap; }
  .topbar .grow { flex-basis: calc(100% - 60px); }
  .topbar .top-tools { order: 1; }
  .topbar > :not(.grow):not(.top-tools) { order: 2; }
}
.period.current { outline: 2px solid var(--accent); outline-offset: -2px; }
.totals { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.totals b { font-size: 15px; display: block; }

/* ===================== Allowance ===================== */
.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jar { text-align: center; padding: 14px 8px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.jar .e { font-size: 28px; }
.jar .v { font-family: var(--display); font-size: 21px; font-weight: 750; }
.jar .l { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* ===================== Board (sticky notes) ===================== */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.sticky { position: relative; padding: 16px 16px 12px; border-radius: 4px 4px 18px 4px; color: #2a2414; min-height: 140px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .4); white-space: pre-wrap; word-break: break-word; transform: rotate(var(--tilt, -1deg)); transition: transform .2s var(--ease); animation: rise .4s var(--ease) both; }
.sticky:hover { transform: rotate(0) scale(1.02); }
.sticky.yellow { background: #fff2a8; } .sticky.pink { background: #ffd1e1; } .sticky.blue { background: #cfe8ff; } .sticky.green { background: #d4f5d0; } .sticky.purple { background: #e5d6ff; }
.sticky .by { margin-top: 10px; font-size: 12px; opacity: .7; display: flex; align-items: center; justify-content: space-between; }
.sticky .pin { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 18px; }
.sticky button { background: none; border: 0; cursor: pointer; opacity: .55; font-size: 14px; }
.sticky button:hover { opacity: 1; }

/* meal week */
.mealweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.mday { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.mday.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.mday-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 2px 4px 4px; }
.mslot { appearance: none; text-align: left; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 2px; padding: 8px 9px; border-radius: 12px; border: 1px dashed var(--border); background: transparent; cursor: pointer; transition: all .2s var(--ease); min-height: 52px; }
.mslot:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.mslot:disabled { cursor: default; }
.mslot.set { border-style: solid; background: var(--surface-2); }
.mslot.dinner { min-height: 72px; }
.mslot.dinner.set { background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.mslot-l { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mslot-t { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
@media (max-width: 1100px) { .mealweek { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .mealweek { grid-template-columns: 1fr; } .mday { display: grid; grid-template-columns: 1fr 1fr; } .mday-head { grid-column: 1 / -1; } }
/* savings goals */
.split-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.split-bar i { display: block; height: 100%; animation: grow 1s var(--ease) both; transform-origin: left; }
.split-bar i.free, .dot.free { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--border) 4px, var(--border) 8px); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.goal { padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); border-top: 4px solid var(--c); }
.goal-amt { font-family: var(--display); font-size: 22px; font-weight: 750; margin-top: 4px; }
.payday-setup { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* theme picker */.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.theme-opt { border: 2px solid var(--border); border-radius: 16px; padding: 12px; cursor: pointer; text-align: center; transition: all .2s var(--ease); background: var(--surface-2); }
.theme-opt:hover { transform: translateY(-2px); }
.theme-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-opt .sw { height: 46px; border-radius: 10px; margin-bottom: 8px; display: grid; place-items: center; font-size: 24px; }
.sw.classic { background: linear-gradient(135deg, #f6f7fc, #c9d1ff); }
.sw.midnight { background: linear-gradient(135deg, #0b0f1f, #3a2d6b); }
.sw.christmas { background: linear-gradient(135deg, #0b2a1e, #8c1520); }
.sw.thanksgiving { background: linear-gradient(135deg, #fff1dc, #d6782f); }
.sw.winter { background: linear-gradient(135deg, #0c223d, #9cc7ea); }
.sw.spring { background: linear-gradient(135deg, #dff8e5, #ffc4dd); }
.sw.summer { background: linear-gradient(135deg, #bfeaff, #ffd56a); }
.sw.fall { background: linear-gradient(135deg, #3d2216, #e8661c); }
.sw.auto { background: conic-gradient(from 45deg, #8c1520, #d6782f, #9cc7ea, #ffc4dd, #ffd56a, #e8661c, #8c1520); }

.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick label { cursor: pointer; }
.emoji-pick input { display: none; }
.emoji-pick span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 20px; background: var(--surface-2); border: 2px solid transparent; transition: all .15s; }
.emoji-pick input:checked + span { border-color: var(--accent); transform: scale(1.08); }
.color-pick span { width: 30px; height: 30px; border-radius: 50%; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }

.chart { width: 100%; height: 160px; }
.cat-row { display: grid; grid-template-columns: 120px 1fr 90px; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
