@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg: #f3f0e9;
  --surface: #fcfbf8;
  --surface-2: #f7f5f0;
  --surface-3: #eeebe3;
  --text: #20241f;
  --muted: #777b73;
  --line: #e7e3da;
  --lime: #c7f26c;
  --lime-strong: #8ebd33;
  --lime-soft: #eff9d9;
  --violet: #8068d9;
  --violet-soft: #eee9fb;
  --blue: #4d9fce;
  --blue-soft: #e2f4fb;
  --coral: #e27a63;
  --coral-soft: #fae8e3;
  --amber: #d99c3b;
  --dark: #242a24;
  --dark-2: #303831;
  --shadow: 0 12px 36px rgba(50, 52, 44, 0.07);
  --shadow-lg: 0 24px 60px rgba(35, 38, 32, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --sidebar-width: 254px;
  --ease: 180ms ease;
}

body.dark {
  --bg: #171b18;
  --surface: #202520;
  --surface-2: #262c27;
  --surface-3: #303630;
  --text: #f0f2eb;
  --muted: #a5aba2;
  --line: #343a34;
  --lime-soft: #303c28;
  --violet-soft: #332f43;
  --blue-soft: #243942;
  --coral-soft: #3e2f2d;
  --dark: #d7f59b;
  --dark-2: #b7d981;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  transition: background var(--ease), color var(--ease);
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 0 0 auto;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.main-content { grid-column: 2; min-width: 0; }

.brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 22px; }
.brand-mark { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: var(--dark); color: var(--lime); overflow: hidden; flex: 0 0 auto; }
.brand-orbit { position: absolute; width: 46px; height: 20px; border: 1px solid currentColor; border-radius: 50%; transform: rotate(-33deg); opacity: .5; }
.brand-leaf { font-weight: 800; font-size: 18px; }
.brand > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 19px; letter-spacing: -.4px; }
.brand span:last-child { font-size: 10px; color: var(--muted); margin-top: 4px; }
.sidebar-close { display: none !important; margin-right: auto; }

.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-caption { margin: 15px 12px 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .03em; }
.nav-item {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 8px 12px;
  color: var(--muted);
  text-align: right;
  transition: var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--surface-2); transform: translateX(-2px); }
.nav-item.is-active { color: #1e241b; background: var(--lime); font-weight: 700; }
.nav-item svg { width: 18px; height: 18px; }
.nav-badge { margin-right: auto; min-width: 22px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 10px; }
.nav-item.is-active .nav-badge { background: rgba(32, 36, 31, .12); color: #20241f; }
.nav-ai { color: var(--violet); }
.ai-dot { margin-right: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }

.level-card { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.level-top { display: flex; align-items: center; gap: 8px; }
.level-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--coral-soft); color: var(--coral); }
.level-icon svg { width: 17px; }
.level-top > div { display: flex; flex-direction: column; line-height: 1.3; }
.level-top strong { font-size: 12px; }
.level-top span { color: var(--muted); font-size: 9px; }
.level-top b { margin-right: auto; font-size: 10px; color: var(--lime-strong); }
.progress-track { height: 6px; margin: 10px 0 7px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--lime-strong); }
.level-card small { font-size: 9px; color: var(--muted); }

.profile-card { width: 100%; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 7px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: right; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, #e7b394, #bc745c); color: #fff; font-weight: 800; }
.profile-card > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.4; }
.profile-card strong { font-size: 11px; }
.profile-card small { font-size: 9px; color: var(--muted); }
.profile-card > svg { width: 17px; margin-right: auto; color: var(--muted); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 3vw, 44px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title > div { display: flex; flex-direction: column; line-height: 1.4; }
.topbar-title span { font-size: 10px; color: var(--muted); }
.topbar-title strong { font-size: 17px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); transition: var(--ease); }
.icon-btn:hover { color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.has-notification { position: relative; }
.has-notification > span { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--coral); }
.moon-icon { display: none; }
body.dark .sun-icon { display: none; }
body.dark .moon-icon { display: block; }
.search-box { width: 230px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); }
.search-box svg { width: 17px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.search-box input::placeholder { color: var(--muted); }
.search-box kbd { direction: ltr; padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font: 9px sans-serif; }
.primary-btn, .secondary-btn, .dark-btn, .light-btn, .light-blue-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11px;
  transition: var(--ease);
}
.primary-btn { background: var(--dark); color: var(--surface); }
body:not(.dark) .primary-btn { color: #fff; }
.primary-btn:hover, .dark-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(32, 36, 31, .18); }
.primary-btn svg, .dark-btn svg { width: 16px; }

.content-wrap { width: 100%; max-width: 1580px; margin: 0 auto; padding: 27px clamp(18px, 3vw, 44px) 50px; }
.view { display: none; animation: viewIn 260ms ease; }
.view.is-visible { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.sidebar-scrim { display: none; }

.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.eyebrow { display: block; margin: 0 0 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.welcome-row h1, .section-heading h1 { margin: 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.35; letter-spacing: -.8px; }
.welcome-row > div:first-child > p:last-child, .section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.day-progress { display: flex; align-items: center; gap: 16px; }
.day-progress > div:last-child { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; }
.dot-green, .dot-lime { background: var(--lime-strong); }
.dot-amber { background: var(--amber); }
.dot-dark { background: var(--dark); }
.progress-ring, .big-progress {
  --progress: 50;
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--lime-strong) calc(var(--progress) * 1%), var(--surface-3) 0);
}
.progress-ring::after, .big-progress::after { content: ""; position: absolute; inset: 7px; border-radius: inherit; background: var(--bg); }
.progress-ring > div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.progress-ring strong { font-size: 17px; }
.progress-ring span { font-size: 8px; color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { min-height: 118px; display: flex; align-items: center; gap: 12px; padding: 17px; }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; font-size: 18px; }
.stat-icon svg { width: 19px; }
.icon-lime { color: #6c9029; background: var(--lime-soft); }
.icon-violet { color: var(--violet); background: var(--violet-soft); }
.icon-blue { color: var(--blue); background: var(--blue-soft); }
.icon-coral { color: var(--coral); background: var(--coral-soft); }
.stat-card > div:nth-child(2), .finance-stat > div, .health-stat > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.stat-card span:not(.stat-icon), .finance-stat span, .health-stat span { color: var(--muted); font-size: 10px; }
.stat-card strong { font-size: 18px; line-height: 1.4; white-space: nowrap; }
.stat-card small, .finance-stat small, .health-stat small { color: var(--muted); font-size: 8px; }
.positive { color: var(--lime-strong) !important; }
.mini-ring { --value: 50; width: 36px; height: 36px; margin-right: auto; border: 5px solid var(--surface-3); border-top-color: var(--lime-strong); border-right-color: color-mix(in srgb, var(--lime-strong) calc(var(--value) * 1%), var(--surface-3)); border-radius: 50%; transform: rotate(25deg); }
.coral-ring { border-top-color: var(--coral); border-right-color: var(--coral); }
.spark-line { width: 66px; height: 34px; margin-right: auto; overflow: visible; }
.spark-line path { fill: none; stroke: var(--violet); stroke-width: 2.4; }
.spark-line.coral path { stroke: var(--coral); }
.water-drops { display: flex; align-items: flex-end; gap: 3px; margin-right: auto; }
.water-drops i { width: 5px; border-radius: 5px 5px 2px 2px; background: var(--blue); }
.water-drops i:nth-child(1) { height: 13px; opacity: .5; }.water-drops i:nth-child(2) { height: 24px; }.water-drops i:nth-child(3) { height: 18px; opacity: .75; }.water-drops i:nth-child(4) { height: 29px; opacity: .3; }

.dashboard-grid { display: grid; grid-template-columns: 1.35fr .75fr 1fr; gap: 14px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.text-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 0; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.text-btn:hover { color: var(--text); }
.text-btn svg { width: 13px; }
.agenda-panel { grid-row: span 2; }
.agenda-list { display: flex; flex-direction: column; }
.agenda-item { position: relative; display: grid; grid-template-columns: 58px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 61px; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { font-size: 10px; color: var(--muted); direction: ltr; }
.task-check { width: 23px; height: 23px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); }
.task-check svg { width: 13px; opacity: 0; }
.agenda-item.is-done .task-check, .full-task.is-done .task-check { border-color: var(--lime-strong); background: var(--lime); color: #20241f; }
.agenda-item.is-done .task-check svg, .full-task.is-done .task-check svg { opacity: 1; }
.agenda-item.is-done .agenda-copy strong, .full-task.is-done .full-task-copy strong { color: var(--muted); text-decoration: line-through; }
.agenda-copy { min-width: 0; display: flex; flex-direction: column; }
.agenda-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.agenda-copy small { color: var(--muted); font-size: 8px; }
.task-category, .tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 8px; }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.add-dashed { width: 100%; height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; border: 1px dashed var(--line); border-radius: 11px; background: transparent; color: var(--muted); font-size: 9px; }
.add-dashed:hover { border-color: var(--lime-strong); color: var(--text); background: var(--lime-soft); }
.add-dashed svg { width: 14px; }
.focus-visual { display: flex; align-items: center; gap: 12px; margin: 12px 0 19px; }
.focus-orbit { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--violet); background: var(--violet-soft); }
.focus-orbit span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: var(--violet); color: white; }
.focus-orbit svg { width: 17px; }
.focus-visual > div:last-child { display: flex; flex-direction: column; }
.focus-visual strong { font-size: 11px; }
.focus-visual span { color: var(--muted); font-size: 8px; }
.dark-btn { width: 100%; background: var(--dark); color: var(--surface); }
body:not(.dark) .dark-btn { color: white; }
.select-button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-size: 8px; }
.select-button svg { width: 12px; }
.chart-summary { display: flex; align-items: flex-end; justify-content: space-between; }
.chart-summary > div:first-child { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 7px; }
.chart-summary strong { font-size: 22px; }
.chart-summary span { font-size: 9px; }
.chart-summary small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.chart-legend { display: flex; gap: 10px; color: var(--muted); font-size: 8px; }
.bar-chart { height: 126px; display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; margin-top: 14px; padding-top: 9px; border-top: 1px dashed var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 30px, color-mix(in srgb, var(--line) 50%, transparent) 31px); }
.bar-chart > div { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; padding-bottom: 21px; }
.bar-chart span { width: 6px; min-height: 3px; border-radius: 5px 5px 2px 2px; transition: height 600ms ease; }
.bar-dark { background: var(--dark); }
.bar-lime { background: var(--lime); }
.bar-chart small { position: absolute; bottom: 0; color: var(--muted); font-size: 8px; }
.bar-chart .is-today small { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: #20241f; font-weight: 700; }
.mini-goals { display: flex; flex-direction: column; gap: 13px; }
.mini-goal { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; }
.mini-goal-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 15px; background: var(--surface-2); }
.mini-goal-copy { min-width: 0; }
.mini-goal-copy > div { display: flex; justify-content: space-between; gap: 5px; margin-bottom: 4px; font-size: 9px; }
.mini-goal-copy span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-goal-copy b { font-size: 8px; color: var(--muted); }
.mini-goal .progress-track { height: 5px; margin: 0; }
.mini-goal > small { color: var(--muted); font-size: 8px; }
.habits-panel { grid-column: 2 / span 2; }
.streak { display: inline-flex; align-items: center; gap: 4px; color: var(--coral); font-size: 9px; }
.streak svg { width: 14px; }
.habit-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.habit { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: right; }
.habit > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); }
.habit strong { font-size: 9px; }
.habit i { width: 20px; height: 20px; display: grid; place-items: center; margin-right: auto; border: 1px solid var(--line); border-radius: 7px; color: #20241f; }
.habit i svg { width: 12px; opacity: 0; }
.habit.is-done { border-color: color-mix(in srgb, var(--lime-strong) 35%, var(--line)); background: var(--lime-soft); }
.habit.is-done i { background: var(--lime); border-color: var(--lime); }
.habit.is-done i svg { opacity: 1; }
.ai-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 14px; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(110deg, #252b25, #384136); color: white; box-shadow: var(--shadow); }
.ai-banner::before { content: ""; position: absolute; }
.ai-mark, .assistant-logo { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--lime); color: #20241f; }
.ai-mark svg, .assistant-logo svg { width: 23px; }
.ai-banner span { color: #cbd3c6; font-size: 8px; }
.ai-banner h2 { margin: 2px 0 1px; font-size: 15px; }
.ai-banner p { margin: 0; color: #cbd3c6; font-size: 9px; }
.ai-actions { display: flex; gap: 7px; }
.light-btn { background: var(--lime); color: #20241f; }
.ghost-on-dark { min-height: 40px; padding: 8px 13px; border: 1px solid #566255; border-radius: 12px; background: transparent; color: white; font-size: 9px; }

.section-heading { min-height: 94px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading .primary-btn { margin-top: 14px; }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 14px; }
.filter-tabs, .timer-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); }
.filter-tabs button, .timer-tabs button { min-height: 32px; padding: 5px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 9px; }
.filter-tabs button.is-active, .timer-tabs button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 3px 10px rgba(40, 43, 37, .07); font-weight: 700; }
.compact-search { width: 210px; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.compact-search svg { width: 15px; }
.compact-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 9px; }
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
.task-main-panel { min-height: 500px; }
.soft-count { padding: 3px 9px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 9px; }
.full-task-list { display: flex; flex-direction: column; }
.full-task { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; min-height: 68px; padding: 8px 3px; border-bottom: 1px solid var(--line); }
.full-task-copy { min-width: 0; display: flex; flex-direction: column; }
.full-task-copy strong { font-size: 11px; }
.full-task-copy small { color: var(--muted); font-size: 8px; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; }
.priority-dot.high { background: var(--coral); }.priority-dot.medium { background: var(--amber); }.priority-dot.low { background: var(--blue); }
.delete-task { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); opacity: 0; transition: var(--ease); }
.full-task:hover .delete-task { opacity: 1; }
.delete-task:hover { background: var(--coral-soft); color: var(--coral); }
.delete-task svg { width: 15px; }
.task-side { display: flex; flex-direction: column; gap: 14px; }
.completion-card { text-align: center; }
.big-progress { --progress: 50; width: 136px; height: 136px; margin: 16px auto; }
.big-progress::after { inset: 10px; background: var(--surface); }
.big-progress strong, .big-progress span { position: absolute; z-index: 1; }
.big-progress strong { margin-top: -14px; font-size: 27px; }
.big-progress span { margin-top: 25px; color: var(--muted); font-size: 8px; }
.completion-card p { margin: 0; color: var(--muted); font-size: 9px; }
.priority-card { display: flex; flex-direction: column; gap: 13px; }
.priority-card > div { display: flex; align-items: center; gap: 9px; }
.priority-card > div > span { display: flex; flex-direction: column; }
.priority-card strong { font-size: 9px; }
.priority-card small { color: var(--muted); font-size: 8px; }
.empty-state { min-height: 300px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state span { font-size: 36px; }
.empty-state p { margin: 4px 0; font-size: 11px; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.calendar-card { padding: 22px; }
.calendar-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 19px; }
.calendar-head h2 { min-width: 160px; margin: 0; text-align: center; font-size: 17px; }
.calendar-head .mirror { transform: scaleX(-1); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { padding: 8px; color: var(--muted); text-align: center; font-size: 9px; }
.calendar-grid { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar-day { position: relative; min-height: 84px; padding: 9px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: right; }
.calendar-day:hover { background: var(--surface-2); }
.calendar-day.is-muted { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.calendar-day.is-today > b { width: 25px; height: 25px; display: grid; place-items: center; margin-top: -2px; border-radius: 8px; background: var(--lime); color: #20241f; }
.calendar-day b { font-size: 10px; }
.calendar-event-dot { position: absolute; right: 10px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.calendar-event-label { display: block; max-width: 100%; margin-top: 12px; padding: 2px 5px; overflow: hidden; border-radius: 5px; background: var(--violet-soft); color: var(--violet); text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.upcoming-events { display: flex; flex-direction: column; gap: 10px; }
.upcoming-event { display: grid; grid-template-columns: 43px 1fr; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.event-date { width: 43px; height: 43px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 11px; background: var(--surface); line-height: 1.2; }
.event-date strong { font-size: 14px; }.event-date small { color: var(--muted); font-size: 7px; }
.upcoming-event > div:last-child { display: flex; flex-direction: column; }
.upcoming-event strong { font-size: 9px; }.upcoming-event span { color: var(--muted); font-size: 8px; }

.goal-overview { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-bottom: 14px; }
.goal-hero { padding: 24px; border-radius: var(--radius); background: linear-gradient(125deg, #2a312a, #414d3d); color: white; }
.goal-hero > span { color: #cbd2c7; font-size: 9px; }
.goal-hero > strong { display: block; margin: 3px 0; font-size: 29px; }
.goal-hero p { margin: 0 0 12px; color: #cbd2c7; font-size: 9px; }
.goal-hero .progress-track { max-width: 400px; background: rgba(255,255,255,.15); }
.goal-hero .progress-track span { background: var(--lime); }
.goal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
.goal-metrics > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-left: 1px solid var(--line); }
.goal-metrics > div:last-child { border-left: 0; }
.goal-metrics strong { font-size: 18px; }.goal-metrics small { color: var(--muted); font-size: 8px; }
.goals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.goal-card { position: relative; min-height: 228px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.goal-card::before { content: ""; position: absolute; top: 0; right: 0; width: 100%; height: 4px; background: var(--goal-color, var(--lime-strong)); }
.goal-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.goal-emoji { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-2); font-size: 20px; }
.goal-card h3 { margin: 16px 0 4px; font-size: 14px; }
.goal-card p { margin: 0; color: var(--muted); font-size: 8px; }
.goal-progress-copy { display: flex; justify-content: space-between; margin-top: 19px; font-size: 8px; }
.goal-progress-copy b { font-size: 10px; }
.goal-card .progress-track span { background: var(--goal-color, var(--lime-strong)); }
.goal-card-footer { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 8px; }
.goal-delete { border: 0; background: transparent; color: var(--muted); }
.goal-delete:hover { color: var(--coral); }
.goal-delete svg { width: 16px; }

.study-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.timer-card { min-height: 540px; display: flex; flex-direction: column; align-items: center; padding: 26px; border-radius: var(--radius-lg); background: linear-gradient(145deg, #252b25, #384337); color: white; box-shadow: var(--shadow-lg); }
.timer-tabs { background: rgba(255,255,255,.07); }
.timer-tabs button { color: #aeb8aa; }
.timer-tabs button.is-active { background: var(--lime); color: #20241f; }
.timer-orbit { position: relative; width: min(270px, 70vw); height: min(270px, 70vw); display: grid; place-items: center; margin: 40px 0 30px; }
.timer-orbit svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-bg, .timer-progress { fill: none; stroke-width: 7; }
.timer-bg { stroke: rgba(255,255,255,.1); }
.timer-progress { stroke: var(--lime); stroke-dasharray: 616; stroke-dashoffset: 0; transition: stroke-dashoffset .8s linear; }
.timer-orbit > div { position: absolute; display: flex; flex-direction: column; align-items: center; }
.timer-orbit span, .timer-orbit small { color: #aeb8aa; font-size: 9px; }
.timer-orbit strong { direction: ltr; font-size: 52px; font-weight: 300; letter-spacing: 2px; }
.timer-controls { display: flex; align-items: center; gap: 13px; }
.timer-controls .icon-btn { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: white; }
.timer-main { min-width: 124px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 15px; background: var(--lime); color: #20241f; font-weight: 800; }
.study-side { display: flex; flex-direction: column; gap: 14px; }
.field { position: relative; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { color: var(--muted); font-size: 9px; font-weight: 600; }
.field input, .field textarea, .field select, .chat-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 12px;
  font-size: 11px;
  transition: var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus, .chat-form input:focus { border-color: var(--lime-strong); box-shadow: 0 0 0 3px var(--lime-soft); }
.field textarea { resize: vertical; min-height: 92px; }
.field output { position: absolute; left: 4px; top: 0; color: var(--lime-strong); font-size: 9px; }
input[type="range"] { padding: 0; accent-color: var(--lime-strong); }
.session-stats { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 145px; }
.session-stats > div { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-left: 1px solid var(--line); }
.session-stats > div:last-child { border: 0; }
.session-stats strong { font-size: 25px; }.session-stats span { max-width: 80px; color: var(--muted); font-size: 8px; }

.health-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.water-card { grid-row: span 2; padding: 22px; border-radius: var(--radius); background: linear-gradient(145deg, #dff5fb, #c7eaf3); color: #19455a; box-shadow: var(--shadow); }
body.dark .water-card { background: linear-gradient(145deg, #233940, #294852); color: #dff5fb; }
.large-drop { width: 42px; height: 42px; color: var(--blue); stroke-width: 1.2; }
.water-value { display: flex; flex-direction: column; margin: 30px 0 22px; }
.water-value strong { font-size: 38px; line-height: 1; }.water-value span { margin-top: 8px; opacity: .7; font-size: 9px; }
.glass-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 18px; }
.glass { min-height: 54px; display: grid; place-items: center; border: 1px solid rgba(25,69,90,.15); border-radius: 12px; background: rgba(255,255,255,.35); color: rgba(25,69,90,.25); }
.glass.is-filled { background: var(--blue); color: white; }
.glass svg { width: 17px; }
.light-blue-btn { width: 100%; background: rgba(255,255,255,.62); color: #19455a; }
.health-stat { min-height: 160px; display: flex; align-items: center; gap: 12px; }
.health-stat strong { font-size: 14px; }
.health-stat .spark-line, .health-stat .mini-ring { margin-right: auto; }
.sleep-bars { height: 45px; display: flex; align-items: flex-end; gap: 3px; margin-right: auto; }
.sleep-bars i { width: 4px; border-radius: 4px; background: var(--violet); opacity: .75; }

.finance-summary { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 14px; margin-bottom: 14px; }
.balance-card { position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: center; padding: 23px; overflow: hidden; border-radius: var(--radius); background: linear-gradient(125deg, #29302a, #434e3f); color: white; }
.balance-card span, .balance-card small { color: #b9c3b5; font-size: 9px; }
.balance-card strong { margin: 4px 0; font-size: 24px; }
.balance-card svg { position: absolute; left: -10px; bottom: -4px; width: 50%; height: 70%; opacity: .18; }
.balance-card path { fill: none; stroke: var(--lime); stroke-width: 4; }
.finance-stat { display: flex; align-items: center; gap: 12px; }
.finance-stat strong { font-size: 16px; }
.finance-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.transaction-list { display: flex; flex-direction: column; }
.transaction-item { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 10px; min-height: 64px; border-bottom: 1px solid var(--line); }
.transaction-item:last-child { border: 0; }
.transaction-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); font-size: 16px; }
.transaction-copy { display: flex; flex-direction: column; }.transaction-copy strong { font-size: 10px; }.transaction-copy small { color: var(--muted); font-size: 8px; }
.transaction-amount { direction: ltr; font-size: 10px; }.transaction-amount.income { color: var(--lime-strong); }.transaction-amount.expense { color: var(--coral); }
.transaction-delete { border: 0; background: transparent; color: var(--muted); opacity: 0; }.transaction-item:hover .transaction-delete { opacity: 1; }.transaction-delete svg { width: 14px; }
.budget-panel > div:last-child { display: flex; flex-direction: column; gap: 16px; }
.budget-row > div:first-child { display: flex; justify-content: space-between; font-size: 9px; }
.budget-row small { color: var(--muted); }.budget-row .progress-track span { background: var(--budget-color); }

.mood-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.mood-card { padding: 26px; border-radius: var(--radius-lg); background: linear-gradient(145deg, #f1e9fc, #e3dcf4); color: #302947; box-shadow: var(--shadow); }
body.dark .mood-card { background: linear-gradient(145deg, #302b3c, #383246); color: #eee9fb; }
.mood-card > span { display: block; text-align: center; font-weight: 700; font-size: 13px; }
.mood-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 23px 0; }
.mood-picker button { min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(128,104,217,.14); border-radius: 18px; background: rgba(255,255,255,.4); color: inherit; transition: var(--ease); }
.mood-picker button:hover { transform: translateY(-3px); background: rgba(255,255,255,.65); }
.mood-picker button.is-selected { border-color: var(--violet); background: white; box-shadow: 0 9px 22px rgba(91,74,150,.14); }
body.dark .mood-picker button.is-selected { background: #4a425d; }
.mood-picker span { font-size: 30px; }.mood-picker small { font-size: 9px; }
.mood-note label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 700; }
.mood-note textarea { width: 100%; min-height: 130px; padding: 13px; border: 1px solid rgba(128,104,217,.16); border-radius: 15px; outline: 0; resize: vertical; background: rgba(255,255,255,.45); color: inherit; font-size: 10px; }
.mood-note .dark-btn { margin-top: 10px; }
.mood-side { display: flex; flex-direction: column; gap: 14px; }
.mood-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding-top: 20px; }
.mood-week > div { min-height: 65px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mood-week span { font-size: 23px; filter: grayscale(.5); opacity: .75; }.mood-week small { color: var(--muted); font-size: 8px; }
.mood-week .today { padding-top: 6px; border-radius: 12px; background: var(--violet-soft); }.mood-week .today span { filter: none; opacity: 1; }
.quote-card { padding: 24px; border-radius: var(--radius); background: linear-gradient(125deg, #29302a, #414c3e); color: white; }
.quote-card svg { color: var(--lime); }.quote-card p { margin: 16px 0 8px; font-size: 13px; line-height: 2; }.quote-card span { color: #bbc5b8; font-size: 8px; }

.assistant-layout { min-height: calc(100vh - 130px); display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: center; }
.assistant-intro { max-width: 460px; }
.assistant-logo { margin-bottom: 17px; }
.assistant-intro h1 { max-width: 420px; margin: 6px 0 12px; font-size: clamp(29px, 4vw, 45px); line-height: 1.4; letter-spacing: -1.4px; }
.assistant-intro p { max-width: 420px; color: var(--muted); font-size: 12px; }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.prompt-chips button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 9px; }
.prompt-chips button:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }
.chat-card { min-height: 570px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.assistant-logo.small { width: 38px; height: 38px; margin: 0; border-radius: 12px; }.assistant-logo.small svg { width: 18px; }
.chat-head > div { display: flex; flex-direction: column; line-height: 1.4; }.chat-head strong { font-size: 11px; }.chat-head span { color: var(--muted); font-size: 8px; }.chat-head span i { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #5bb16c; }
.chat-head .icon-btn { margin-right: auto; }
.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 13px; padding: 20px; overflow-y: auto; max-height: 410px; }
.message { max-width: 78%; display: flex; align-items: flex-end; gap: 7px; }
.message p { margin: 0; padding: 10px 13px; border-radius: 15px 15px 4px 15px; background: var(--surface-2); font-size: 10px; }
.message-avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--lime); color: #20241f; }.message-avatar svg { width: 14px; }
.user-message { align-self: flex-end; direction: ltr; }.user-message p { direction: rtl; border-radius: 15px 15px 15px 4px; background: var(--dark); color: var(--surface); }
.typing p { display: flex; gap: 4px; padding: 14px; }.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite alternate; }.typing i:nth-child(2) { animation-delay: .2s; }.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .25; transform: translateY(-3px); } }
.chat-form { display: flex; align-items: center; gap: 8px; margin: 0 14px 5px; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.chat-form input { border: 0; background: transparent; box-shadow: none !important; }
.chat-form button { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--dark); color: var(--surface); transform: scaleX(-1); }.chat-form button svg { width: 17px; }
.ai-disclaimer { padding: 0 20px 12px; color: var(--muted); text-align: center; font-size: 7px; }

.modal { position: fixed; z-index: 60; inset: 0; display: none; place-items: center; padding: 18px; background: rgba(18, 21, 18, .5); backdrop-filter: blur(7px); }
.modal.is-open { display: grid; animation: fadeIn 160ms ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { width: min(510px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); animation: modalIn 220ms ease; }
@keyframes modalIn { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.secondary-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 16px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.type-toggle input { position: absolute; opacity: 0; }
.type-toggle span { min-height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); cursor: pointer; font-size: 10px; }
.type-toggle input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 700; }

.toast-region { position: fixed; z-index: 90; left: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 240px; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-lg); animation: toastIn 220ms ease; font-size: 10px; }
.toast i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--lime); color: #20241f; font-style: normal; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1.2fr .8fr; }
  .agenda-panel { grid-row: span 2; }
  .activity-panel { grid-column: 1; }
  .goals-panel { grid-column: 2; }
  .habits-panel { grid-column: 1 / -1; }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .water-card { grid-row: span 2; }
  .finance-summary { grid-template-columns: 1.2fr .8fr; }
  .finance-summary > article:last-child { grid-column: 2; }
  .balance-card { grid-row: span 2; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .main-content { width: 100%; }
  .sidebar { transform: translateX(105%); box-shadow: -16px 0 50px rgba(20, 22, 19, .2); transition: transform 220ms ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .menu-toggle { display: grid !important; }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(15, 18, 15, .42); backdrop-filter: blur(3px); }
  .sidebar-scrim.is-visible { display: block; }
  .topbar { padding: 0 18px; }
  .search-box { display: none; }
  .calendar-layout, .task-layout, .study-layout, .mood-layout, .assistant-layout, .finance-layout { grid-template-columns: 1fr; }
  .calendar-layout > aside, .task-side { display: grid; grid-template-columns: 1fr 1fr; }
  .goals-grid { grid-template-columns: repeat(2, 1fr); }
  .assistant-layout { align-items: start; }
  .assistant-intro { max-width: none; }
}

@media (max-width: 650px) {
  .content-wrap { padding-top: 19px; }
  .topbar { height: 66px; }
  .topbar-title span { display: none; }
  .topbar-title strong { font-size: 14px; }
  .top-add-task { width: 40px; padding: 0; }
  .top-add-task span { display: none; }
  .welcome-row { align-items: flex-start; }
  .welcome-row h1, .section-heading h1 { font-size: 24px; }
  .day-progress > div:last-child { display: none; }
  .progress-ring { width: 70px; height: 70px; }
  .progress-ring::after { inset: 6px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 130px; flex-wrap: wrap; align-content: center; padding: 13px; }
  .stat-card > div:nth-child(2) { flex: 1; }
  .stat-card .mini-ring, .stat-card .spark-line, .stat-card .water-drops { display: none; }
  .dashboard-grid { display: flex; flex-direction: column; }
  .agenda-panel { order: 0; }.focus-panel { order: 1; }.habits-panel { order: 2; }.activity-panel { order: 3; }.goals-panel { order: 4; }
  .habit-list { grid-template-columns: 1fr; }
  .ai-banner { grid-template-columns: auto 1fr; }
  .ai-actions { grid-column: 1 / -1; }
  .ai-actions > * { flex: 1; }
  .section-heading { min-height: 112px; }
  .task-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-tabs { overflow-x: auto; }
  .filter-tabs button { flex: 1; white-space: nowrap; }
  .compact-search { width: 100%; }
  .task-layout > .task-side, .calendar-layout > aside { display: flex; }
  .full-task { grid-template-columns: 26px 1fr auto; }
  .full-task .task-category { display: none; }
  .delete-task { opacity: 1; }
  .calendar-card { padding: 13px; overflow-x: auto; }
  .weekdays, .calendar-grid { min-width: 530px; }
  .goal-overview { grid-template-columns: 1fr; }
  .goal-metrics { min-height: 135px; }
  .goals-grid { grid-template-columns: 1fr; }
  .timer-card { min-height: 500px; padding: 18px 10px; }
  .timer-tabs button { padding: 5px 9px; }
  .health-grid, .finance-summary { grid-template-columns: 1fr; }
  .water-card, .balance-card, .finance-summary > article:last-child { grid-row: auto; grid-column: auto; }
  .health-stat { min-height: 120px; }
  .mood-picker { gap: 5px; }
  .mood-picker button { min-height: 75px; border-radius: 13px; }
  .mood-picker span { font-size: 23px; }
  .assistant-layout { min-height: auto; }
  .assistant-intro h1 { font-size: 30px; }
  .chat-card { min-height: 520px; }
  .message { max-width: 90%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 410px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 100px; }
  .mood-card { padding: 18px 12px; }
  .mood-picker small { font-size: 7px; }
  .topbar-actions { gap: 5px; }
  .topbar .icon-btn, .top-add-task { width: 37px; height: 37px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== صفحه ورود ===== */
body.auth-locked .app-shell { display: none; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(128, 104, 217, 0.22), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(142, 189, 51, 0.18), transparent 60%),
    var(--bg, #f3f0e9);
}
.auth-screen.is-visible { display: flex; }

.auth-card {
  width: min(420px, 100%);
  padding: 32px 28px;
  border-radius: 26px;
  background: var(--surface, #fff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 30px 70px rgba(24, 22, 18, 0.16);
  animation: authIn 0.35s ease;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand strong { display: block; font-size: 1.05rem; }
.auth-brand span span,
.auth-brand > div > span { font-size: 0.8rem; opacity: 0.65; }

.auth-card h2 { margin: 0 0 6px; font-size: 1.35rem; }
.auth-sub { margin: 0 0 20px; font-size: 0.86rem; line-height: 1.9; opacity: 0.7; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(128, 104, 217, 0.08);
}
.auth-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.auth-tabs button.is-active {
  background: var(--surface, #fff);
  box-shadow: 0 4px 14px rgba(24, 22, 18, 0.1);
  font-weight: 700;
}

.auth-card .field { display: block; margin-bottom: 14px; }
.auth-card .field > span { display: block; margin-bottom: 6px; font-size: 0.82rem; opacity: 0.75; }
.auth-card .field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
  font: inherit;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-card .field input:focus {
  outline: none;
  border-color: #8068d9;
  box-shadow: 0 0 0 4px rgba(128, 104, 217, 0.16);
}

.auth-error {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(226, 122, 99, 0.14);
  color: #b4472c;
  font-size: 0.84rem;
}
.auth-error.is-visible { display: block; }

.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-note { display: block; margin-top: 16px; font-size: 0.75rem; line-height: 1.8; opacity: 0.6; text-align: center; }

body.dark .auth-card { border-color: rgba(255, 255, 255, 0.08); }
body.dark .auth-card .field input { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
body.dark .auth-tabs { background: rgba(255, 255, 255, 0.06); }

.profile-card { display: flex; align-items: center; gap: 10px; }
.profile-card #logoutBtn { margin-inline-start: auto; }

/* ==========================================================
   LifeYar — لایهٔ طراحی پریمیوم (دارک-فرست، گلس‌مورفیسم، نئون)
   ========================================================== */

:root {
  --glass-blur: 18px;
  --ring: 0 0 0 4px rgba(128, 104, 217, 0.18);
  --ease-out: 260ms cubic-bezier(0.22, 1, 0.36, 1);
  --neon-violet: rgba(140, 116, 255, 0.55);
  --neon-lime: rgba(178, 235, 92, 0.45);
}

body.dark {
  --bg: #0c0f16;
  --surface: rgba(23, 27, 39, 0.72);
  --surface-2: rgba(30, 35, 50, 0.72);
  --surface-3: rgba(40, 46, 64, 0.8);
  --text: #eef1f8;
  --muted: #98a0b5;
  --line: rgba(255, 255, 255, 0.08);
  --lime: #b2eb5c;
  --lime-strong: #9fe03f;
  --lime-soft: rgba(178, 235, 92, 0.14);
  --violet: #8c74ff;
  --violet-soft: rgba(140, 116, 255, 0.16);
  --blue: #58b6f0;
  --blue-soft: rgba(88, 182, 240, 0.14);
  --coral: #ff8f74;
  --coral-soft: rgba(255, 143, 116, 0.14);
  --amber: #f0b64c;
  --dark: #b2eb5c;
  --dark-2: #9fe03f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 4px rgba(140, 116, 255, 0.24);
  color-scheme: dark;
}

/* پس‌زمینهٔ گرادیانی زنده */
body.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 520px at 82% -6%, rgba(140, 116, 255, 0.26), transparent 62%),
    radial-gradient(680px 480px at 6% 12%, rgba(88, 182, 240, 0.16), transparent 60%),
    radial-gradient(700px 560px at 46% 108%, rgba(178, 235, 92, 0.14), transparent 62%);
}

/* سطوح شیشه‌ای */
body.dark .sidebar,
body.dark .topbar,
body.dark .panel,
body.dark .stat-card,
body.dark .goal-card,
body.dark .chat-card,
body.dark .modal-card,
body.dark .auth-card,
body.dark .task-side,
body.dark .mood-side {
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--line);
  background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 42%);
}

body.dark .sidebar { border-left: 1px solid var(--line); }

/* درخشش نئون روی عناصر کلیدی */
body.dark .primary-btn,
body.dark .auth-submit {
  box-shadow: 0 10px 30px rgba(140, 116, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
body.dark .primary-btn:hover,
body.dark .auth-submit:hover {
  box-shadow: 0 14px 38px var(--neon-violet), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
body.dark .nav-item.is-active {
  box-shadow: inset 0 0 0 1px rgba(140, 116, 255, 0.35), 0 8px 24px rgba(140, 116, 255, 0.18);
}
body.dark .assistant-logo,
body.dark .brand-mark {
  box-shadow: 0 0 26px var(--neon-violet);
}
body.dark .task-check:not(.is-done):hover { box-shadow: 0 0 0 4px rgba(178, 235, 92, 0.16); }
body.dark .glass.is-filled { box-shadow: 0 0 18px rgba(88, 182, 240, 0.35); }

/* ریزتعامل‌ها */
.stat-card,
.goal-card,
.panel,
.full-task,
.transaction-item,
.agenda-item {
  transition: transform var(--ease-out), box-shadow var(--ease-out), border-color var(--ease-out);
}
.stat-card:hover,
.goal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.full-task:hover,
.transaction-item:hover,
.agenda-item:hover { transform: translateX(-3px); }

button:not(:disabled):active { transform: scale(0.97); }

:where(button, input, textarea, select, a):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}

/* گذر نرم بین صفحه‌ها */
.view.is-visible { animation: viewIn 340ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* حالت‌های خالی */
.empty-state { animation: viewIn 320ms ease; }
.empty-state.compact { min-height: 120px; }
.empty-state small { display: block; margin-top: 2px; opacity: 0.75; }

/* اسکلت لودینگ */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  min-height: 14px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* صفحهٔ ورود در حالت تاریک */
body.dark .auth-screen {
  background:
    radial-gradient(900px 620px at 16% 8%, rgba(140, 116, 255, 0.3), transparent 62%),
    radial-gradient(760px 520px at 86% 92%, rgba(178, 235, 92, 0.16), transparent 60%),
    #0c0f16;
}
body.dark .auth-card { box-shadow: var(--shadow-lg); }

/* اسکرول‌بار ظریف */
body.dark ::-webkit-scrollbar { width: 10px; height: 10px; }
body.dark ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.14);
}
body.dark ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
