:root {
  color-scheme: light;
  --bg: #f5f8f6;
  --surface: #fff;
  --surface-soft: #f8faf9;
  --text: #1c2925;
  --muted: #82908a;
  --line: #e9efeb;
  --green: #2e9c72;
  --green-dark: #237b59;
  --green-pale: #e8f6ef;
  --blue: #548bd2;
  --blue-pale: #edf4ff;
  --orange: #e5a34b;
  --orange-pale: #fff5e8;
  --red: #d76666;
  --red-pale: #fff0ef;
  --shadow: 0 10px 35px rgba(38, 71, 57, .045);
  --sidebar-width: 248px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(46,156,114,.3); outline-offset: 2px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.app-shell { min-height: 100vh; }

.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 27px 17px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 45px; text-decoration: none; color: var(--text); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg,#41b887,#268b67); box-shadow: 0 6px 13px #2e9c7233; }
.brand-mark .icon { width: 21px; height: 21px; }
.brand-copy, .profile-chip > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 18px; letter-spacing: -.7px; }
.brand-copy small, .profile-chip small { font-size: 11px; color: var(--muted); }
.nav-caption, .eyebrow { color: #97a39d; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.nav-caption { padding: 0 12px 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; color: #74817b; background: transparent; text-align: left; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.nav-link:hover { color: var(--green-dark); background: var(--surface-soft); }
.nav-link.active { color: var(--green-dark); background: var(--green-pale); font-weight: 700; }
.nav-link.active::before { content: ""; position: absolute; left: -17px; width: 3px; height: 23px; border-radius: 0 4px 4px 0; background: var(--green); }
.nav-link .icon { width: 18px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 12px; background: var(--surface); font-size: 11px; text-align: center; color: var(--muted); }
.sidebar-bottom { margin-top: auto; }
.quote-card { margin: 0 3px 18px; padding: 15px 14px; border-radius: 12px; background: linear-gradient(135deg,#edf8f2,#f4f8ff); }
.quote-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--green); background: white; }
.quote-card p { margin: 9px 0 0; color: #63726b; font-size: 12px; line-height: 1.6; }
.settings-link { margin-bottom: 12px; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.profile-chip strong { font-size: 12px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #327d60; background: #e3f2e9; font-weight: 700; }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { height: 76px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #98a39e; font-size: 12px; }
.breadcrumb .icon { width: 14px; height: 14px; }
.breadcrumb strong { color: var(--text); font-size: 12px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.today-label { color: var(--muted); font-size: 12px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #65756e; cursor: pointer; transition: .2s; }
.icon-button:hover { border-color: #b7d9c8; color: var(--green); background: var(--green-pale); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; font-size: 12px; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green); box-shadow: 0 5px 12px #2e9c7228; }
.button-primary:hover { background: var(--green-dark); box-shadow: 0 7px 15px #2e9c7233; }
.button-primary .icon { width: 16px; height: 16px; }
.button-outline { border-color: var(--line); color: #66756e; background: var(--surface); }
.button-outline:hover { border-color: #a7cfbb; color: var(--green-dark); }
.button-soft { color: var(--green-dark); background: var(--green-pale); }
.button-soft:hover { background: #d9f0e4; }
.button-danger { color: white; background: #d76565; }
.button-danger:hover { background: #bd4d4d; }
.button-small { min-height: 34px; padding: 0 12px; }
.mobile-menu { display: none; }
.content { max-width: 1480px; margin: 0 auto; padding: 34px 42px 55px; }
.page-section { display: none; animation: appear .28s ease both; }
.page-section.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.welcome-row, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Manrope, "DM Sans", sans-serif; letter-spacing: -.55px; }
h1 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: 750; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
.wave { display: inline-block; color: #e6ad58; font-family: sans-serif; font-size: .75em; vertical-align: 3px; }
.subheading { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; align-items: center; gap: 14px; min-height: 105px; padding: 18px 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; }
.stat-icon.green { color: var(--green); background: var(--green-pale); }
.stat-icon.blue { color: var(--blue); background: var(--blue-pale); }
.stat-icon.orange { color: var(--orange); background: var(--orange-pale); }
.stat-icon.red { color: var(--red); background: var(--red-pale); }
.stat-icon .icon { width: 20px; height: 20px; }
.stat-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-copy strong { font-family: Manrope, sans-serif; font-size: 22px; line-height: 1.2; }
.stat-copy span { color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); gap: 16px; margin-bottom: 16px; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.focus-card, .weekly-card, .upcoming-card, .today-card, .calendar-card, .selected-day-card, .progress-chart-card, .completion-card, .study-stats-card { padding: 21px 22px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading .eyebrow { margin-bottom: 6px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 600; cursor: pointer; }
.text-button .icon { width: 14px; height: 14px; }
.focus-content { display: flex; align-items: center; gap: 25px; min-height: 167px; }
.focus-illustration { position: relative; width: 150px; height: 150px; flex: 0 0 auto; display: grid; place-items: center; }
.focus-orbit { position: absolute; border: 1px solid #dfeee6; border-radius: 50%; }
.orbit-one { inset: 12px; }
.orbit-two { inset: 27px; border-style: dashed; }
.focus-core { z-index: 1; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 22px; color: white; background: linear-gradient(145deg,#64c89c,#339b72); box-shadow: 0 10px 20px #2e9c7233; transform: rotate(-8deg); }
.focus-core .icon { width: 29px; height: 29px; }
.floating-dot { position: absolute; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: #eeb568; box-shadow: 0 2px 6px #0001; }
.dot-one { top: 17px; right: 31px; }.dot-two { bottom: 23px; left: 18px; width: 7px; height: 7px; background: #75a8e7; }
.focus-copy strong { font-size: 13px; }
.focus-copy p { max-width: 290px; margin: 7px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.focus-copy .button { min-height: 36px; padding: 0 12px; font-size: 11px; }
.focus-copy .button .icon { width: 14px; height: 14px; }
.mini-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 7px; background: var(--surface-soft); color: #89958f; font-size: 10px; }
.mini-badge .icon { width: 13px; height: 13px; }
.chart-summary { display: flex; align-items: baseline; gap: 9px; margin-top: 18px; }
.chart-summary strong { font-family: Manrope, sans-serif; font-size: 24px; }
.chart-summary span { color: var(--muted); font-size: 11px; }
.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 9px; height: 108px; padding-top: 8px; }
.chart-column { display: flex; flex: 1; height: 100%; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.chart-bar-wrap { display: flex; align-items: flex-end; width: 100%; height: 76px; }
.chart-bar { width: min(25px, 75%); min-height: 4px; margin: 0 auto; border-radius: 6px 6px 2px 2px; background: #dcefe4; transition: height .35s ease, background .2s; }
.chart-bar.has-value { background: #6bc69a; }
.chart-bar.today-bar { background: var(--green); }
.chart-label { color: #96a19c; font-size: 9px; }
.lower-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); }
.task-preview-list { display: grid; gap: 3px; margin-top: 14px; }
.preview-task { display: flex; align-items: center; gap: 11px; min-height: 47px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.preview-task:last-child { border-bottom: 0; }
.preview-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.preview-dot.high { background: var(--red); }.preview-dot.medium { background: var(--orange); }.preview-dot.low { background: #76a3db; }
.preview-info { min-width: 0; flex: 1; }
.preview-info strong { display: block; overflow: hidden; color: #3a4943; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.preview-info span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.preview-date { color: #84918b; font-size: 10px; white-space: nowrap; }
.empty-hint { padding: 18px 5px; color: var(--muted); font-size: 12px; text-align: center; }
.today-count { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--green-dark); background: var(--green-pale); font-size: 12px; font-weight: 700; }
.full-button { width: 100%; margin-top: 12px; min-height: 35px; font-size: 11px; }
.full-button .icon { width: 14px; height: 14px; }

.page-heading { margin-bottom: 24px; }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; margin-bottom: 13px; }
.filter-tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 9px; background: var(--surface-soft); }
.filter-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 11px; border: 0; border-radius: 7px; color: #89958f; background: transparent; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .2s; }
.filter-tab span { color: #a1aaa5; font-size: 10px; }
.filter-tab.active { color: var(--green-dark); background: var(--surface); box-shadow: 0 2px 6px #122e1d0b; }
.filter-tab.active span { color: var(--green); }
.search-box { display: flex; align-items: center; gap: 8px; width: 225px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: #a1aba6; }
.search-box .icon { width: 15px; height: 15px; }
.search-box input { width: 100%; height: 34px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box input:focus-visible { outline: none; }
.task-list { padding: 5px 18px; }
.task-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; min-height: 73px; padding: 12px 3px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-check { width: 19px; height: 19px; margin: 0; accent-color: var(--green); cursor: pointer; }
.task-main { min-width: 0; }
.task-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.task-title { overflow: hidden; color: #36443e; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-row.completed .task-title { color: #9aa49f; text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.task-description { overflow: hidden; max-width: 600px; margin-top: 5px; color: #929e98; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.priority-pill, .category-pill, .due-pill { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.priority-pill.high { color: #bd5b57; background: var(--red-pale); }.priority-pill.medium { color: #bd873c; background: var(--orange-pale); }.priority-pill.low { color: #5e8dc4; background: var(--blue-pale); }
.category-pill { color: #688477; background: var(--green-pale); font-weight: 500; }
.due-pill { color: #7e8d86; background: var(--surface-soft); }
.due-pill.overdue { color: #c35353; background: var(--red-pale); }
.task-actions { display: flex; align-items: center; gap: 4px; }
.task-actions .icon-button { width: 31px; height: 31px; border-color: transparent; background: transparent; }
.task-actions .icon { width: 15px; height: 15px; }
.task-actions .delete-task:hover { color: var(--red); background: var(--red-pale); border-color: transparent; }
.task-empty { padding: 50px 20px; text-align: center; }
.task-empty .empty-symbol { display: grid; place-items: center; width: 47px; height: 47px; margin: 0 auto 13px; border-radius: 15px; color: var(--green); background: var(--green-pale); }
.task-empty strong { font-family: Manrope, sans-serif; font-size: 14px; }
.task-empty p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }

.calendar-card { margin-bottom: 16px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.calendar-month-control { display: flex; align-items: center; gap: 12px; }
.calendar-month-control h2 { min-width: 150px; text-align: center; text-transform: capitalize; }
.calendar-month-control .icon-button { width: 32px; height: 32px; }
.calendar-view-switch { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--surface-soft); }
.calendar-view-switch .filter-tab { min-height: 29px; padding: 0 10px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-weekday { padding: 7px 4px 11px; color: #9aa59f; font-size: 10px; font-weight: 600; text-align: center; }
.calendar-day { position: relative; min-height: 79px; padding: 10px 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); color: #56655e; font-size: 11px; cursor: pointer; transition: background .18s; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: var(--surface-soft); }
.calendar-day.outside-month { color: #c3cbc6; background: color-mix(in srgb,var(--surface-soft) 55%,transparent); }
.calendar-day.selected { background: var(--green-pale); }
.calendar-day.today .day-number { color: white; background: var(--green); }
.day-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; }
.day-events { display: flex; gap: 3px; margin: 7px 0 0 4px; }
.day-event-dot { width: 5px; height: 5px; border-radius: 50%; background: #e4ab58; }
.day-event-dot.done { background: var(--green); }
.day-event-count { margin-left: 4px; color: #87958e; font-size: 9px; }
.calendar-legend { display: flex; gap: 18px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.due-dot { background: #e4ab58; }.done-dot { background: var(--green); }
.selected-day-card .card-heading { margin-bottom: 3px; }
.calendar-day.week-mode { min-height: 160px; }
.calendar-day.day-mode { grid-column: 1 / -1; min-height: 125px; }
.day-mode .day-events { margin-top: 20px; }

.pomodoro-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,.65fr); gap: 16px; align-items: stretch; }
.pomodoro-card { display: flex; flex-direction: column; align-items: center; padding: 22px 24px 20px; }
.timer-mode-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.timer-mode-tabs .filter-tab { min-height: 34px; }
.timer-face { position: relative; width: min(260px, 68vw); aspect-ratio: 1; margin: 22px auto 15px; display: grid; place-items: center; }
.timer-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-track, .timer-progress { fill: none; stroke-width: 7; }
.timer-track { stroke: var(--line); }
.timer-progress { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 741.4; stroke-dashoffset: 0; transition: stroke-dashoffset .4s linear, stroke .25s; }
.timer-progress.break-ring { stroke: var(--blue); }
.timer-label { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.timer-label > span { color: #94a099; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.timer-label strong { font-family: Manrope, sans-serif; font-size: 52px; font-weight: 600; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.timer-label small { color: var(--muted); font-size: 11px; }
.timer-controls { display: flex; gap: 9px; }
.timer-start { min-width: 126px; }
.timer-hint { display: flex; align-items: center; gap: 7px; margin: 18px 0 0; color: var(--muted); font-size: 10px; }
.timer-hint .icon { width: 14px; height: 14px; color: #dfa34e; }
.pomodoro-side { display: grid; grid-template-rows: auto 1fr; gap: 15px; }
.session-card { position: relative; overflow: hidden; padding: 20px; }
.session-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 10px; color: var(--green); background: var(--green-pale); }
.session-card > strong { display: block; margin-bottom: 4px; font-family: Manrope, sans-serif; font-size: 28px; }
.session-card > span:last-child { color: var(--muted); font-size: 11px; }
.tip-card { position: relative; overflow: hidden; padding: 20px; background: linear-gradient(145deg,var(--surface),#f0f8f3); }
.tip-card h2 { max-width: 220px; margin-bottom: 10px; line-height: 1.5; }
.tip-card > p:not(.eyebrow) { max-width: 260px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.tip-decoration { position: absolute; right: 15px; bottom: 12px; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #65b98c; background: #e5f4eb; transform: rotate(10deg); }
.tip-decoration .icon { width: 27px; height: 27px; }

.progress-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(230px,.65fr); gap: 16px; margin-bottom: 16px; }
.large-chart { display: flex; align-items: flex-end; justify-content: space-around; gap: 14px; height: 210px; padding-top: 20px; }
.large-chart .chart-column { max-width: 54px; }
.large-chart .chart-bar-wrap { height: 163px; align-items: flex-end; border-bottom: 1px solid var(--line); }
.large-chart .chart-bar { width: min(34px,70%); }
.large-chart .chart-label { font-size: 10px; }
.completion-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.completion-card > .eyebrow { align-self: flex-start; }
.completion-card h2 { align-self: flex-start; }
.completion-ring { display: grid; place-items: center; width: 156px; height: 156px; margin: 15px 0 10px; border-radius: 50%; background: conic-gradient(var(--green) 0%, #edf2ef 0); }
.completion-ring > div { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 128px; height: 128px; border-radius: 50%; background: var(--surface); }
.completion-ring strong { font-family: Manrope, sans-serif; font-size: 30px; }
.completion-ring span { color: var(--muted); font-size: 10px; }
.completion-card > p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.study-stats-card { margin-bottom: 15px; }
.study-chart { height: 135px; margin-top: 15px; }
.study-chart .chart-bar-wrap { height: 102px; }
.study-chart .chart-bar { background: #cfe4fa; }.study-chart .chart-bar.has-value { background: #84afe0; }.study-chart .chart-bar.today-bar { background: #548bd2; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(230px,.8fr); gap: 16px; align-items: start; }
.settings-card { padding: 0 21px; }
.settings-section { display: flex; align-items: center; gap: 14px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-icon, .danger-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; color: var(--green); background: var(--green-pale); }
.settings-copy { flex: 1; min-width: 0; }
.settings-copy h2, .danger-card h2 { margin-bottom: 4px; font-size: 13px; }
.settings-copy p, .danger-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.name-form { display: flex; gap: 7px; margin-top: 11px; }
.form-control, .name-form input { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font-size: 11px; }
.name-form input { max-width: 280px; }
.theme-choice { width: 42px; height: 24px; padding: 3px; border: 0; border-radius: 20px; background: #dbe5df; cursor: pointer; transition: .2s; }
.theme-choice span { display: block; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; transition: transform .2s; }
.theme-choice[aria-pressed="true"] { background: var(--green); }.theme-choice[aria-pressed="true"] span { transform: translateX(18px); }
.local-badge { padding: 6px 8px; border-radius: 6px; color: var(--green-dark); background: var(--green-pale); font-size: 9px; white-space: nowrap; }
.danger-card { display: flex; gap: 13px; padding: 20px; border-color: #f2e2e1; }
.danger-icon { color: var(--red); background: var(--red-pale); }
.danger-card p { margin: 8px 0 14px; }
.danger-card .button { min-height: 35px; font-size: 10px; }
.danger-card .button .icon { width: 14px; }

.task-dialog { width: min(500px, calc(100% - 28px)); max-height: min(92vh, 760px); padding: 25px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: 0 22px 80px #173a2b33; }
.task-dialog::backdrop { background: rgba(25,41,34,.43); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 20px; }
.dialog-close { font-size: 22px; line-height: 1; }
.field-label { display: block; margin: 14px 0 7px; color: #586760; font-size: 11px; font-weight: 600; }
.field-label > span:first-child { color: var(--red); }
.field-label .optional { color: #a1aaa5; font-weight: 400; }
.task-dialog .form-control { height: 40px; }
.task-dialog textarea.form-control { height: auto; min-height: 76px; padding-top: 10px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row > div { min-width: 0; }
.form-error { min-height: 16px; margin: 8px 0 0; color: #c64f4f; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: min(380px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); box-shadow: 0 8px 30px #152b201b; font-size: 12px; animation: toast-in .25s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.toast.error::before { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141b18;
  --surface: #1c2621;
  --surface-soft: #222e28;
  --text: #e7eee9;
  --muted: #9baaa1;
  --line: #2c3932;
  --green: #53bd8e;
  --green-dark: #72d0a6;
  --green-pale: #21392e;
  --blue: #79a8e5;
  --blue-pale: #25364a;
  --orange: #e3af63;
  --orange-pale: #3a3021;
  --red: #e17a75;
  --red-pale: #3a2828;
  --shadow: 0 10px 35px rgba(0, 0, 0, .12);
}
[data-theme="dark"] .quote-card { background: linear-gradient(135deg,#22382d,#243142); }
[data-theme="dark"] .focus-orbit { border-color: #314b3d; }
[data-theme="dark"] .focus-copy strong, [data-theme="dark"] .preview-info strong, [data-theme="dark"] .task-title { color: var(--text); }
[data-theme="dark"] .avatar { color: var(--green-dark); background: var(--green-pale); }
[data-theme="dark"] .tip-card { background: linear-gradient(145deg,var(--surface),#22332a); }
[data-theme="dark"] .tip-decoration { color: var(--green); background: var(--green-pale); }
[data-theme="dark"] .calendar-day.today .day-number { color: #10251b; }
[data-theme="dark"] .theme-choice { background: var(--green); }

@media (max-width: 1100px) {
  :root { --sidebar-width: 218px; }
  .sidebar { padding-inline: 14px; }
  .topbar { padding: 0 28px; }
  .content { padding: 29px 28px 45px; }
  .stats-grid { gap: 10px; }
  .stat-card { gap: 10px; padding: 15px 13px; }
  .stat-icon { width: 36px; height: 36px; }
  .focus-illustration { width: 125px; height: 125px; }
  .focus-content { gap: 16px; }
}
@media (max-width: 850px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 248px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 12px 0 30px #152b2014; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .topbar { height: 66px; padding: 0 22px; }
  .mobile-menu { display: grid; margin-right: 12px; }
  .topbar { justify-content: flex-start; }
  .breadcrumb { flex: 1; }
  .topbar-actions { gap: 9px; }
  .mobile-menu + .breadcrumb { margin-left: 0; }
  .menu-lines { position: relative; width: 16px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .menu-lines::after { content: ""; position: absolute; top: 4px; left: 0; width: 16px; border-top: 2px solid currentColor; }
  .content { padding: 27px 22px 40px; }
}
@media (max-width: 650px) {
  .topbar { padding: 0 15px; }
  .today-label { display: none; }
  .topbar-actions { gap: 7px; }
  .top-add { width: 37px; min-width: 37px; height: 37px; min-height: 37px; padding: 0; border-radius: 10px; }
  .top-add span { display: none; }
  .content { padding: 23px 15px 35px; }
  .welcome-row, .page-heading { align-items: flex-start; margin-bottom: 20px; }
  .welcome-row > .button, .page-heading > .button { width: 40px; min-width: 40px; min-height: 40px; padding: 0; overflow: hidden; font-size: 0; gap: 0; }
  .welcome-row > .button .icon, .page-heading > .button .icon { width: 18px; height: 18px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 13px; }
  .stat-card { min-height: 82px; padding: 12px 11px; }
  .stat-copy strong { font-size: 19px; }
  .stat-copy span { font-size: 10px; }
  .dashboard-grid, .lower-grid, .pomodoro-layout, .progress-grid, .settings-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .focus-card, .weekly-card, .upcoming-card, .today-card, .calendar-card, .selected-day-card, .progress-chart-card, .completion-card, .study-stats-card { padding: 17px; }
  .focus-illustration { width: 112px; height: 112px; }
  .focus-content { min-height: 145px; }
  .focus-core { width: 57px; height: 57px; border-radius: 18px; }
  .focus-copy .button { font-size: 10px; }
  .weekly-card { min-height: 220px; }
  .task-toolbar { flex-direction: column; align-items: stretch; padding: 10px; }
  .filter-tabs { justify-content: space-between; }
  .filter-tab { padding-inline: 8px; }
  .search-box { width: 100%; }
  .task-list { padding-inline: 12px; }
  .task-row { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; }
  .task-row > .due-pill { display: none; }
  .task-actions { gap: 0; }
  .task-actions .icon-button { width: 29px; height: 29px; }
  .task-meta { gap: 5px; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-view-switch { align-self: stretch; justify-content: space-around; }
  .calendar-view-switch .filter-tab { justify-content: center; flex: 1; }
  .calendar-day { min-height: 55px; padding: 5px 3px; text-align: center; }
  .day-number { width: 23px; height: 23px; margin: auto; }
  .day-events { justify-content: center; margin: 4px 0 0; }
  .day-event-count { display: none; }
  .calendar-day.week-mode { min-height: 110px; }
  .calendar-day.day-mode { min-height: 100px; }
  .timer-mode-tabs { width: 100%; justify-content: center; }
  .timer-mode-tabs .filter-tab { flex: 1; justify-content: center; padding: 0 3px; font-size: 9px; }
  .pomodoro-card { padding: 18px 12px; }
  .pomodoro-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .session-card, .tip-card { padding: 15px; }
  .tip-decoration { opacity: .6; transform: scale(.75) rotate(10deg); transform-origin: bottom right; }
  .large-chart { gap: 5px; }
  .large-chart .chart-label { font-size: 9px; }
  .settings-card { padding-inline: 15px; }
  .local-badge { white-space: normal; text-align: center; }
}
@media (max-width: 390px) {
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .mobile-menu { margin-right: 8px; }
  .topbar-actions { gap: 5px; }
  .stats-grid { gap: 7px; }
  .stat-card { gap: 8px; padding: 10px 8px; }
  .stat-icon { width: 32px; height: 32px; }
  .focus-content { gap: 9px; }
  .focus-illustration { width: 90px; height: 100px; }
  .focus-copy .button { min-height: 32px; padding-inline: 8px; font-size: 9px; }
  .pomodoro-side { grid-template-columns: 1fr; }
  .form-row { gap: 8px; }
}
