:root {
    color-scheme: light;
    --ink: #192538;
    --navy: #17243b;
    --muted: #7f8b9d;
    --paper: #f5f7fb;
    --dashboard-background: linear-gradient(135deg, #1b3e68, #526c8c);
    --surface: #fff;
    --line: #e9edf3;
    --green: #15966a;
    --green-soft: #e7f6ef;
    --blue: #4a78d0;
    --blue-soft: #edf3ff;
    --amber: #d49a3e;
    --shadow: 0 12px 34px rgba(31, 50, 79, .055);
    font-family: "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e4ebf5;
    --navy: #e4ebf5;
    --muted: #a1aec0;
    --paper: #111923;
    --dashboard-background: linear-gradient(135deg, #101a28, #263c5b);
    --surface: #1b2633;
    --line: #344154;
    --green-soft: #173b32;
    --blue-soft: #202f49;
    --shadow: 0 12px 34px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
.brand strong { font-weight: 800; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(140deg, #337be8, #668ce1 55%, #344e7b); box-shadow: 0 6px 15px rgba(74, 120, 208, .25); font-size: 19px; font-weight: 750; }
.eyebrow { margin: 0 0 10px; color: #6985bd; font-size: 10px; font-weight: 800; letter-spacing: .15em; }

.auth-page { display: flex; min-height: 100vh; flex-direction: column; color: #fff; background: linear-gradient(135deg, #1b3e68, #526c8c); }
:root[data-theme="dark"] .auth-page { background: linear-gradient(135deg, #101a28, #263c5b); }
.auth-header { display: flex; min-height: 98px; align-items: center; justify-content: space-between; gap: 24px; padding: 12px max(28px, calc((100% - 1280px) / 2)); border-bottom: 1px solid rgba(255, 255, 255, .16); }
.auth-brand-lockup { display: grid; gap: 3px; }
.auth-header .brand { color: #fff; }
.auth-header .brand-mark { width: 48px; height: 48px; border-radius: 12px; font-size: 23px; }
.auth-company { margin-left: 60px; color: rgba(255, 255, 255, .78); font-size: 12px; }
.auth-navigation { display: flex; align-items: center; gap: 10px; }
.product-switcher { position: relative; }
.product-switcher summary { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.product-switcher summary::-webkit-details-marker { display: none; }
.product-switcher summary::after { margin-left: 8px; content: "⌄"; }
.product-switcher[open] summary { background: rgba(255, 255, 255, .14); }
.product-switcher nav { position: absolute; z-index: 10; top: calc(100% + 7px); right: 0; display: grid; min-width: 190px; gap: 3px; padding: 7px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 7px; background: #1b3e68; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.product-switcher nav a { padding: 9px 10px; border-radius: 4px; color: #fff; font-size: 12px; text-decoration: none; }
.product-switcher nav a:hover { background: rgba(255, 255, 255, .15); }
.topbar .product-switcher summary { min-height: 34px; padding: 0 10px; }
.topbar .product-switcher nav { top: calc(100% + 12px); }
.topbar-plans { color: rgba(255, 255, 255, .9); font-size: 11px; font-weight: 700; text-decoration: none; }
.topbar-plans:hover { color: #fff; text-decoration: underline; }
.auth-nav-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .16s ease, border-color .16s ease; }
.auth-nav-link:hover, .auth-header .theme-toggle:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .14); }
.auth-header .theme-toggle { width: 44px; min-width: 44px; height: 44px; border-color: rgba(255, 255, 255, .35); border-radius: 6px; color: #fff; background: transparent; }
.auth-layout { display: grid; flex: 1; width: 100%; place-items: center; padding: 48px 20px; }
.auth-main { width: min(550px, 100%); }
.auth-card { padding: 42px 46px; border: 1px solid rgba(23, 36, 59, .08); border-radius: 9px; color: #17243b; background: #fff; box-shadow: 0 18px 55px rgba(7, 24, 49, .2); }
:root[data-theme="dark"] .auth-card { border-color: var(--line); color: var(--ink); background: var(--surface); }
.auth-card .eyebrow { margin-bottom: 30px; color: #4a78d0; font-size: 12px; letter-spacing: .12em; }
.auth-card h1 { margin: 0; color: #17243b; font-size: clamp(32px, 4vw, 42px); font-weight: 750; letter-spacing: -.05em; line-height: 1.18; }
:root[data-theme="dark"] .auth-card h1 { color: var(--navy); }
.auth-subtitle { margin: 18px 0 0; color: #35445a; font-size: 18px; line-height: 1.5; }
:root[data-theme="dark"] .auth-subtitle { color: var(--muted); }
.form-stack { display: grid; gap: 20px; margin-top: 32px; }
.form-stack label, .habit-editor > label { display: grid; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.auth-card .form-stack label { color: #4f70ac; font-size: 14px; }
:root[data-theme="dark"] .auth-card .form-stack label { color: #a8c2f2; }
.form-stack input, .habit-editor input:not([type="radio"]):not([type="checkbox"]), .habit-editor textarea { width: 100%; min-height: 45px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; outline-color: var(--blue); color: var(--ink); background: var(--surface); font-size: 13px; font-weight: 400; }
.form-stack input:focus, .habit-editor input:focus, .habit-editor textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(74,120,208,.11); }
.auth-card .form-stack input { min-height: 54px; border-radius: 6px; font-size: 15px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 12px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 750; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #315fbd, #4a78d0); box-shadow: 0 7px 17px rgba(74,120,208,.2); }
.button-primary:hover { background: linear-gradient(135deg, #284f9f, #3e69bf); }
.button-secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button-full { width: 100%; min-height: 46px; margin-top: 3px; }
.auth-switch { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.auth-switch a { color: var(--blue); font-weight: 750; text-decoration: none; }
.trial-note { display: grid; gap: 7px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.trial-note strong { color: var(--ink); font-size: 15px; }
.trial-note p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.trial-note a { width: fit-content; margin-top: 3px; color: #4a78d0; font-size: 14px; font-weight: 750; text-decoration: none; }
.alert { padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; line-height: 1.55; }
.alert-error { border-color: #f4cbc8; color: #a43d36; background: #fff3f1; }
.alert-success { border-color: #cce8d9; color: #24734f; background: #effaf4; }
.auth-card > .alert { margin-top: 18px; }
.site-footer { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px max(28px, calc((100% - 1280px) / 2)); border-top: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: 11px; }
.dashboard-page .site-footer { border-top-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .8); background: var(--dashboard-background); }
.auth-page .site-footer { min-height: 78px; gap: 20px; padding: 18px max(28px, calc((100% - 1280px) / 2)); border-top-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); background: transparent; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.dashboard-page .site-footer a:hover { color: #dce8ff; }
.auth-page .site-footer a:hover { color: #a8c2f2; }

.dashboard-page { --sidebar-width: 252px; background: var(--dashboard-background); }
.app-shell { min-height: 100vh; background: var(--dashboard-background); }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 25px 17px 16px; border-right: 1px solid rgba(255, 255, 255, .18); color: #fff; background: var(--dashboard-background); }
.sidebar-brand { margin: 0 0 43px 8px; }
.sidebar .brand { color: #fff; }
.nav-caption { margin: 0 0 11px 11px; color: rgba(255, 255, 255, .68); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; color: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 650; text-decoration: none; transition: background .16s ease, color .16s ease; }
.side-nav a:hover, .side-nav a.active { color: #fff; background: rgba(255, 255, 255, .17); }
.nav-icon { width: 18px; color: rgba(255, 255, 255, .75); font-size: 17px; text-align: center; }
.side-nav a.active .nav-icon { color: #fff; }
.sidebar-bottom { margin-top: auto; }
.trial-card { display: block; padding: 15px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: linear-gradient(135deg, #1b3e68, #526c8c); text-decoration: none; }
.trial-card-icon { display: block; margin-bottom: 9px; color: #c4d8ff; font-size: 18px; }
.trial-card strong { font-size: 12px; }
.trial-card p { margin: 5px 0 0; color: rgba(255,255,255,.72); font-size: 10px; line-height: 1.5; }
.profile-row { display: flex; align-items: center; gap: 10px; margin-top: 15px; padding: 12px 0 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #4a70b3; background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.profile-name { display: grid; min-width: 0; gap: 3px; flex: 1; }
.profile-name strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-name small { color: rgba(255, 255, 255, .72); font-size: 10px; }
.profile-row form { display: contents; }
.icon-button { display: inline-grid; min-width: 34px; height: 34px; place-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 17px; text-decoration: none; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.icon-button:hover { border-color: #cad7ed; color: var(--blue); background: var(--blue-soft); }
.logout-button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 18px; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 3; top: 0; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 3.8vw, 56px); border-bottom: 1px solid rgba(255, 255, 255, .18); background: var(--dashboard-background); }
.breadcrumb { color: rgba(255, 255, 255, .88); font-size: 11px; }
.breadcrumb i { margin: 0 8px; color: rgba(255, 255, 255, .55); font-style: normal; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.topbar-date { color: rgba(255, 255, 255, .78); font-size: 11px; }
.theme-toggle { width: 34px; font-size: 15px; }
.topbar .icon-button { border-color: rgba(255, 255, 255, .4); color: #fff; background: rgba(255, 255, 255, .1); }
.topbar .icon-button:hover { border-color: rgba(255, 255, 255, .7); color: #fff; background: rgba(255, 255, 255, .2); }
.mobile-menu { display: none; }
.page-content { width: min(1310px, 100%); min-height: calc(100vh - 128px); margin: 0 auto; padding: 34px clamp(22px, 3.8vw, 56px) 48px; }
.page-content > .alert { margin-bottom: 19px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.welcome-row h1 { margin: 0; color: #fff; font-size: clamp(25px, 3vw, 34px); font-weight: 650; letter-spacing: -.055em; }
.welcome-subtitle { margin: 8px 0 0; color: rgba(255, 255, 255, .78); font-size: 12px; }
.welcome-row .eyebrow { margin-bottom: 8px; }
.welcome-row > div > .eyebrow { color: #dce8ff; }
.date-picker { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.date-picker form { margin: 0; }
.date-picker input { max-width: 132px; padding: 7px 4px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.date-picker .icon-button, .calendar-month .icon-button { width: 29px; min-width: 29px; height: 29px; border: 0; font-size: 18px; }
.is-disabled { opacity: .35; cursor: default; pointer-events: none; }
.progress-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.progress-card, .panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.progress-card { min-width: 0; padding: 16px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; }
.progress-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #4673c6; background: var(--blue-soft); font-size: 15px; }
.progress-card:nth-child(2) .progress-icon { color: #16815d; background: var(--green-soft); }
.progress-card:nth-child(3) .progress-icon { color: #a87626; background: #fff5e6; }
.progress-percent { color: var(--navy); font-size: 19px; font-weight: 750; letter-spacing: -.04em; }
.progress-label { margin-top: 13px; color: var(--navy); font-size: 12px; font-weight: 700; }
.progress-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.progress-track { overflow: hidden; height: 5px; margin-top: 13px; border-radius: 6px; background: var(--paper); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3d76d4, #6c98e9); transition: width .25s ease; }
.progress-card:nth-child(2) .progress-track span { background: linear-gradient(90deg, #16845f, #48b78b); }
.progress-card:nth-child(3) .progress-track span { background: linear-gradient(90deg, #bf872d, #e5bb67); }
.focus-card { background: linear-gradient(142deg, var(--surface), color-mix(in srgb, var(--blue-soft) 52%, var(--surface))); }
.focus-icon { color: #a77a28; background: #fff5e6; }
.focus-count { color: var(--navy); font-size: 20px; font-weight: 750; }
.focus-count small { color: var(--muted); font-size: 12px; font-weight: 500; }
.focus-dots { display: flex; gap: 5px; margin-top: 13px; }
.focus-dots i { width: 14px; height: 5px; border-radius: 4px; background: var(--line); }
.focus-dots i.done { background: #40a87d; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(260px, .68fr); align-items: start; gap: 17px; }
.panel { min-width: 0; padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 14px; letter-spacing: -.02em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--blue); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.text-link:hover { color: #294f9b; }
.habit-list { display: grid; }
.habit-row { display: flex; min-height: 70px; align-items: center; gap: 13px; border-top: 1px solid var(--line); transition: opacity .2s ease; }
.habit-row:first-child { border-top: 0; }
.complete-form { display: contents; }
.check-button { display: grid; width: 23px; min-width: 23px; height: 23px; place-items: center; border: 1.5px solid #cbd5e2; border-radius: 7px; color: #fff; background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 800; transition: all .16s ease; }
.check-button:hover { border-color: var(--green); background: var(--green-soft); }
.habit-row.is-done .check-button { border-color: var(--green); background: var(--green); }
.habit-row-copy { display: grid; min-width: 0; flex: 1; gap: 5px; }
.habit-row-copy strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.habit-row-copy > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.habit-row.is-done .habit-row-copy strong { color: var(--muted); text-decoration: line-through; text-decoration-color: #a5b5aa; }
.streak-pill { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 7px; color: #a67627; background: #fff7e9; white-space: nowrap; }
.streak-pill > span:first-child { font-size: 10px; }
.streak-pill strong { font-size: 10px; }
.streak-pill small { color: #a78a59; font-size: 9px; }
.streak-divider { width: 1px; height: 13px; margin: 0 2px; background: #ead9b8; }
.done-label { min-width: 57px; color: var(--muted); font-size: 9px; text-align: right; }
.habit-row.is-done .done-label { color: var(--green); }
.empty-state { display: flex; min-height: 228px; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center; }
.empty-state .empty-icon { display: grid; width: 39px; height: 39px; place-items: center; margin-bottom: 12px; border-radius: 12px; color: #4e78c6; background: var(--blue-soft); font-size: 18px; }
.empty-state strong { color: var(--navy); font-size: 13px; }
.empty-state p { max-width: 340px; margin: 7px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.empty-state .button { min-height: 36px; font-size: 10px; }
.calendar-panel { padding: 19px; }
.calendar-month { display: flex; align-items: center; gap: 4px; }
.calendar-month strong { min-width: 115px; color: var(--navy); font-size: 10px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-weekday { display: grid; height: 24px; place-items: center; color: #9aa5b4; font-size: 8px; font-weight: 750; }
.calendar-day, .calendar-blank { display: grid; aspect-ratio: 1; place-items: center; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 10px; text-decoration: none; }
.calendar-day { background: var(--paper); transition: transform .15s ease, border-color .15s ease; }
.calendar-day:hover { z-index: 1; transform: scale(1.08); border-color: #9cb7e7; }
.calendar-day.level-0 { background: var(--paper); }
.calendar-day.level-1 { color: #287657; background: #e7f5ed; }
.calendar-day.level-2 { color: #216f51; background: #c8e9d7; }
.calendar-day.level-3 { color: #185b42; background: #92d2b0; }
.calendar-day.level-4 { color: #fff; background: #21805c; }
:root[data-theme="dark"] .calendar-day.level-1 { color: #aadcc4; background: #244638; }
:root[data-theme="dark"] .calendar-day.level-2 { color: #bcebd3; background: #2c6148; }
:root[data-theme="dark"] .calendar-day.level-3 { color: #e1f7ec; background: #34835e; }
:root[data-theme="dark"] .calendar-day.level-4 { color: #fff; background: #42a878; }
.calendar-day.selected { outline: 2px solid #4a78d0; outline-offset: 1px; }
.calendar-day.future { opacity: .38; }
.calendar-legend { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 15px; color: var(--muted); font-size: 8px; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 3px; }
.calendar-legend .level-0 { background: var(--paper); }
.calendar-legend .level-1 { background: #e7f5ed; }
.calendar-legend .level-2 { background: #c8e9d7; }
.calendar-legend .level-3 { background: #92d2b0; }
.calendar-legend .level-4 { background: #21805c; }
:root[data-theme="dark"] .calendar-legend .level-1 { background: #244638; }
:root[data-theme="dark"] .calendar-legend .level-2 { background: #2c6148; }
:root[data-theme="dark"] .calendar-legend .level-3 { background: #34835e; }
:root[data-theme="dark"] .calendar-legend .level-4 { background: #42a878; }
.calendar-legend span:first-child { margin-right: 2px; }
.management-welcome { margin-bottom: 23px; }
.habits-total { padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: var(--surface); font-size: 17px; font-weight: 750; }
.habits-total small { color: var(--muted); font-size: 10px; font-weight: 500; }
.management-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(380px, 1.2fr); align-items: start; gap: 17px; }
.habit-form-panel, .habits-management-panel { padding: 20px; }
.habit-editor { display: grid; gap: 15px; }
.optional-label { display: inline; color: var(--muted); font-size: 10px; font-weight: 400; }
.habit-editor textarea { min-height: 72px; resize: vertical; line-height: 1.55; }
.frequency-options, .weekday-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.frequency-options legend, .weekday-field legend { margin-bottom: 9px; color: var(--ink); font-size: 11px; font-weight: 750; }
.frequency-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.frequency-options legend { grid-column: 1 / -1; }
.radio-card { position: relative; display: flex; min-height: 55px; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: #9bb6e4; background: var(--blue-soft); }
.radio-card input { accent-color: var(--blue); }
.radio-card span { display: grid; gap: 3px; }
.radio-card strong { color: var(--ink); font-size: 10px; }
.radio-card small { color: var(--muted); font-size: 9px; }
.weekday-field[hidden] { display: none; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.weekday-picker label { position: relative; }
.weekday-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.weekday-picker span { display: grid; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 9px; font-weight: 700; }
.weekday-picker input:checked + span { border-color: #93b0e4; color: #345fae; background: var(--blue-soft); }
.weekday-picker input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.habit-editor .button-full { margin-top: 2px; }
.list-count { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 750; }
.manage-list { display: grid; }
.manage-item { display: flex; min-height: 65px; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.manage-item:first-child { border-top: 0; }
.manage-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.manage-copy { display: grid; min-width: 0; flex: 1; gap: 5px; }
.manage-copy strong, .manage-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-copy strong { color: var(--navy); font-size: 11px; }
.manage-copy span { color: var(--muted); font-size: 9px; }
.manage-item .icon-button { width: 30px; min-width: 30px; height: 30px; border-color: transparent; font-size: 14px; }
.manage-item form { display: contents; }
.manage-item.is-archived { opacity: .58; }
.manage-item.is-archived .manage-icon { color: var(--muted); background: var(--paper); }
.expired-panel { display: flex; min-height: 390px; flex-direction: column; align-items: center; justify-content: center; margin: 9vh auto; padding: 36px; text-align: center; }
.expired-icon { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 17px; border-radius: 16px; color: #a67627; background: #fff5e6; font-size: 25px; }
.expired-panel h1 { max-width: 480px; margin: 0; color: var(--navy); font-size: clamp(25px, 4vw, 36px); letter-spacing: -.05em; }
.expired-panel > p:not(.eyebrow) { max-width: 490px; margin: 12px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.expired-panel .eyebrow { margin-bottom: 8px; }
.plans-content { width: min(1120px, 100%); margin: 10px auto 28px; }
.plans-intro { margin-bottom: 20px; }
.plans-intro .eyebrow { color: #dce8ff; }
.plans-intro h1 { margin: 0 0 8px; color: #fff; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.05em; }
.plans-intro > p:not(.eyebrow) { margin: 0; color: rgba(255, 255, 255, .8); font-size: 13px; }
.plans-intro .alert { margin-top: 16px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.plan-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.plan-card.is-selected { border-color: #b8c9ed; box-shadow: 0 0 0 3px rgba(255, 255, 255, .16), var(--shadow); }
.plan-card h2 { min-height: 38px; margin: 0; color: var(--navy); font-size: 14px; }
.plan-price { margin: 15px 0 4px; color: var(--navy); font-size: 27px; font-weight: 800; letter-spacing: -.04em; }
.plan-duration { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.plan-card form, .plan-card .button { width: 100%; margin-top: auto; }
.plan-card .button { gap: 6px; padding: 0 9px; font-size: 10px; }
.plans-note { margin: 15px 0 0; color: rgba(255, 255, 255, .78); font-size: 11px; line-height: 1.6; }
.plans-account-link { margin: 16px 0 0; color: rgba(255, 255, 255, .85); font-size: 12px; }
.plans-account-link a { color: #fff; font-weight: 700; }

@media (max-width: 1100px) {
    .progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr); }
    .management-grid { grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr); }
    .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .auth-header { padding-right: 24px; padding-left: 24px; }
    .auth-card { padding: 36px; }
    .auth-page .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
    .dashboard-page { --sidebar-width: 218px; }
    .sidebar { padding-right: 12px; padding-left: 12px; }
    .page-content { padding-right: 22px; padding-left: 22px; }
    .dashboard-grid, .management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .auth-header { min-height: 78px; padding: 10px 18px; }
    .auth-header .brand { font-size: 15px; }
    .auth-header .brand-mark { width: 38px; height: 38px; font-size: 19px; }
    .auth-company { margin-left: 48px; font-size: 10px; }
    .auth-navigation { gap: 6px; }
    .auth-nav-link { min-height: 38px; padding: 0 10px; font-size: 11px; }
    .auth-header .theme-toggle { width: 38px; min-width: 38px; height: 38px; }
    .auth-layout { padding: 32px 18px; }
    .auth-card { padding: 30px 25px; }
    .auth-card .eyebrow { margin-bottom: 22px; font-size: 10px; }
    .auth-card h1 { font-size: 32px; }
    .auth-subtitle { margin-top: 13px; font-size: 15px; }
    .form-stack { gap: 15px; margin-top: 24px; }
    .auth-card .form-stack label { font-size: 13px; }
    .auth-card .form-stack input { min-height: 49px; }
    .trial-note { margin-top: 20px; padding-top: 16px; }
    .auth-page .site-footer { min-height: 72px; align-items: center; gap: 8px; padding: 14px 18px; font-size: 10px; text-align: center; }
    .site-footer nav { gap: 12px; }
    .dashboard-page { --sidebar-width: 0px; }
    .sidebar { width: 250px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
    .sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .topbar { height: 56px; padding: 0 16px; }
    .mobile-menu { display: inline-grid; width: 32px; min-width: 32px; height: 32px; font-size: 14px; }
    .breadcrumb { margin-right: auto; margin-left: 9px; font-size: 10px; }
    .topbar-date { display: none; }
    .topbar-actions { gap: 8px; }
    .page-content { min-height: calc(100vh - 121px); padding: 25px 16px 30px; }
    .welcome-row { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 19px; }
    .welcome-row h1 { font-size: 27px; }
    .welcome-subtitle { font-size: 11px; }
    .date-picker { align-self: stretch; justify-content: center; }
    .date-picker input { max-width: none; width: 145px; }
    .progress-grid { gap: 9px; margin-bottom: 13px; }
    .progress-card { padding: 13px; }
    .progress-percent { font-size: 17px; }
    .progress-label { margin-top: 10px; font-size: 11px; }
    .progress-meta { min-height: 24px; font-size: 9px; line-height: 1.4; }
    .focus-dots { margin-top: 11px; }
    .dashboard-grid, .management-grid { gap: 13px; }
    .plans-grid { gap: 9px; }
    .plan-card { padding: 15px; }
    .plan-card h2 { font-size: 12px; }
    .plan-price { font-size: 22px; }
    .plan-card .button { min-height: 42px; }
    .panel { padding: 16px; }
    .panel-heading { margin-bottom: 13px; }
    .habit-row { min-height: 67px; gap: 9px; }
    .streak-pill { gap: 3px; padding: 6px; }
    .streak-pill small { font-size: 8px; }
    .done-label { display: none; }
    .calendar-panel { padding: 15px; }
    .calendar-grid { gap: 5px; }
    .calendar-month strong { min-width: 107px; font-size: 9px; }
    .management-welcome { align-items: center; flex-direction: row; }
    .management-welcome h1 { font-size: 24px; }
    .management-welcome .welcome-subtitle { max-width: 260px; line-height: 1.5; }
    .management-welcome .habits-total { flex-shrink: 0; }
    .habit-form-panel, .habits-management-panel { padding: 16px; }
    .expired-panel { min-height: 330px; margin: 5vh auto; padding: 22px; }
}
@media (max-width: 480px) {
    .auth-header { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .auth-navigation { width: 100%; justify-content: flex-end; }
    .auth-main { max-width: 420px; }
    .auth-card { padding: 28px 22px; }
}
@media (max-width: 375px) {
    .progress-card { padding: 11px; }
    .progress-grid { gap: 7px; }
    .streak-pill { font-size: 8px; }
    .calendar-grid { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
