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

:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f9f9fc;
    --surface-hover: #f0effa;
    --text: #1d1c2b;
    --muted: #77778b;
    --subtle: #a3a3b3;
    --line: #e9e9f0;
    --primary: #6c5ce7;
    --primary-dark: #5849ce;
    --primary-soft: #eeebff;
    --danger: #e54864;
    --success: #16a36a;
    --warning: #e79522;
    --sidebar-width: 252px;
    --drawer-width: 390px;
    --shadow-sm: 0 1px 2px rgba(24, 24, 38, .04), 0 6px 18px rgba(24, 24, 38, .035);
    --shadow-lg: 0 20px 70px rgba(31, 27, 66, .17);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111118;
    --surface: #191920;
    --surface-soft: #202028;
    --surface-hover: #272534;
    --text: #f3f2f8;
    --muted: #a3a1b2;
    --subtle: #777584;
    --line: #2d2c36;
    --primary: #8878f4;
    --primary-dark: #9a8df7;
    --primary-soft: #2b2749;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-lg: 0 20px 70px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, .task-row, .nav-item { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.loading-screen {
    position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; gap: 22px;
    background: var(--bg);
}

.loader-logo { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 22px; }
.loading-line { width: 180px; height: 3px; overflow: hidden; background: var(--line); border-radius: 5px; }
.loading-line span { display: block; width: 50%; height: 100%; background: var(--primary); border-radius: inherit; animation: loading 1s ease-in-out infinite alternate; }
@keyframes loading { from { transform: translateX(-70%); } to { transform: translateX(170%); } }

.brand-mark {
    display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px;
    color: white; background: linear-gradient(145deg, #7b6cf0, #5b49d4); font-weight: 800;
    box-shadow: 0 7px 18px rgba(108, 92, 231, .28);
}

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column;
    padding: 24px 14px 16px; background: var(--surface); border-right: 1px solid var(--line);
}

.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.sidebar-close { display: none !important; }

.main-nav, .project-nav { display: grid; gap: 4px; }
.nav-item, .project-item {
    position: relative; width: 100%; min-height: 42px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center;
    gap: 8px; padding: 8px 11px; border: 0; border-radius: 11px; background: transparent; cursor: pointer;
    color: var(--muted); text-align: left; font-weight: 600;
}
.nav-item:hover, .project-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item.active, .project-item.active { background: var(--primary-soft); color: var(--primary); }
.project-item.drag-over { outline: 2px solid var(--primary); background: var(--primary-soft); color: var(--primary); }
.nav-item b, .project-item b { min-width: 21px; font-size: 11px; color: var(--subtle); text-align: right; }
.project-item b { margin-right: 20px; }
.project-edit-button { position: absolute; right: 8px; top: 50%; width: 20px; height: 22px; display: grid; place-items: center; transform: translateY(-50%); border-radius: 6px; color: var(--subtle); cursor: pointer; font-size: 16px; font-style: normal; letter-spacing: 0; line-height: .7; opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease; }
.project-item:hover .project-edit-button, .project-item:focus-within .project-edit-button { opacity: 1; }
.project-edit-button:hover { background: var(--surface); color: var(--primary); }
.nav-item.active b { color: var(--primary); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.nav-icon svg, .mobile-nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.today-icon { color: var(--primary); }
.project-dot { width: 9px; height: 9px; margin-left: 5px; border-radius: 50%; background: var(--project-color); }

.sidebar-section { margin-top: 24px; min-height: 0; overflow: auto; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 11px 8px; color: var(--subtle); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.small-icon-button, .icon-button { display: inline-grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.small-icon-button { width: 26px; height: 26px; border-radius: 8px; color: var(--muted); font-size: 18px; }
.small-icon-button:hover, .icon-button:hover { background: var(--surface-hover); }

.sidebar-footer { position: relative; margin-top: auto; border-top: 1px solid var(--line); padding-top: 13px; }
.profile-button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 7px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; text-align: left; }
.profile-button:hover { background: var(--surface-soft); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f4e5dc; color: #8e4c31; font-weight: 800; }
.profile-copy { min-width: 0; display: flex; flex-direction: column; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--subtle); font-size: 9px; }
.profile-menu { position: absolute; left: 5px; right: 5px; bottom: 58px; z-index: 5; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); }
.profile-menu button { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.profile-menu button:hover { background: var(--surface-soft); }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin .25s ease; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 98px; display: flex; align-items: center; justify-content: space-between; padding: 22px 35px 18px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); }
.topbar-title { display: flex; align-items: center; gap: 8px; }
.view-kicker { margin: 0 0 3px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.topbar h1 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.75px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none !important; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }

.search-box { width: 214px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--subtle); box-shadow: var(--shadow-sm); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; font-size: 9px; color: var(--subtle); }
.view-switcher { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.view-switcher button { width: 30px; height: 29px; border: 0; border-radius: 7px; background: transparent; color: var(--subtle); cursor: pointer; }
.view-switcher button.active { background: var(--primary-soft); color: var(--primary); }
.notification-button { position: relative; border: 1px solid var(--line); background: var(--surface); }
.notification-dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border: 1px solid var(--surface); border-radius: 50%; background: var(--danger); }
.notification-panel { position: fixed; z-index: 50; top: 70px; right: 24px; width: min(360px, calc(100vw - 32px)); max-height: 470px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.notification-item { display: grid; grid-template-columns: 9px 1fr; gap: 10px; padding: 11px 8px; border-radius: 10px; cursor: pointer; }
.notification-item:hover { background: var(--surface-soft); }
.notification-item i { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--primary); }
.notification-item.read i { background: var(--line); }
.notification-item strong { display: block; font-size: 12px; }
.notification-item p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.content { max-width: 1100px; margin: 0 auto; padding: 2px 35px 80px; }
.quick-add-wrap { position: relative; margin-bottom: 24px; }
.quick-add { height: 52px; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.quick-plus { color: var(--primary); font-size: 24px; font-weight: 400; }
.quick-input-wrap { position: relative; min-width: 80px; flex: 1; overflow: hidden; }
.quick-date-highlight { position: absolute; inset: 0; display: none; align-items: center; overflow: hidden; color: var(--text); font: inherit; line-height: normal; white-space: pre; pointer-events: none; }
.quick-date-highlight mark { padding: 0; border-radius: 3px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.quick-input-wrap.has-detected-date .quick-date-highlight { display: flex; }
.quick-add input { width: 100%; min-width: 80px; border: 0; outline: 0; background: transparent; color: var(--text); }
.quick-input-wrap.has-detected-date input { color: transparent; caret-color: var(--text); }
.quick-input-wrap.has-detected-date input::selection { color: var(--text); background: var(--primary-soft); }
.quick-meta { padding: 7px 10px; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--muted); cursor: pointer; font-size: 11px; }
.quick-meta.detected-date { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.quick-date-popover { position: absolute; z-index: 35; top: 60px; right: 0; width: 304px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.quick-date-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 12px; }
.quick-date-presets button { min-height: 31px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.quick-date-presets button:hover { border-color: var(--primary); color: var(--primary); }
.quick-date-popover label { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.quick-date-popover input { min-height: 35px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--surface-soft); color: var(--text); }
.quick-date-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 13px; }
.quick-date-actions .primary-button, .quick-date-actions .secondary-button { min-height: 34px; padding: 0 11px; font-size: 11px; }
.primary-button, .secondary-button { min-height: 40px; padding: 0 17px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.primary-button { border: 0; background: var(--primary); color: white; box-shadow: 0 7px 18px rgba(108, 92, 231, .19); }
.primary-button:hover { background: var(--primary-dark); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.primary-button.compact { min-height: 36px; padding: 0 13px; font-size: 11px; }

.task-list { display: grid; gap: 26px; }
.task-group-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 4px; }
.task-group-heading h2 { margin: 0; font-size: 12px; letter-spacing: .01em; }
.task-group-heading span { color: var(--subtle); font-size: 10px; }
.task-group-body { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.task-row { position: relative; min-height: 58px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 9px 15px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--surface-soft); }
.task-row.selected { background: var(--primary-soft); }
.task-checkbox { width: 19px; height: 19px; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--checkbox-color, #b6b6c4); border-radius: 50%; background: transparent; color: white; cursor: pointer; font-size: 11px; }
.task-checkbox:hover { background: color-mix(in srgb, var(--checkbox-color, var(--primary)) 14%, transparent); }
.task-checkbox.checked { border-color: var(--success); background: var(--success); }
.task-copy { min-width: 0; }
.task-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.task-row.completed .task-title { color: var(--subtle); text-decoration: line-through; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--subtle); font-size: 9px; }
.task-tag { padding: 2px 5px; border-radius: 5px; background: color-mix(in srgb, var(--tag-color) 12%, transparent); color: var(--tag-color); font-weight: 700; }
.task-due { display: flex; align-items: center; gap: 4px; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; white-space: nowrap; }
.task-due:hover { background: var(--primary-soft); color: var(--primary); }
.task-due.overdue { background: rgba(229, 72, 100, .08); color: var(--danger); }
.inline-due-editor { position: absolute; z-index: 4; right: 9px; top: calc(100% - 3px); display: flex; align-items: center; gap: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg); }
.inline-due-editor input { width: 118px; min-height: 30px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--text); font-size: 10px; }
.inline-due-editor input[name="time"] { width: 76px; }
.inline-due-clear { min-height: 30px; padding: 0 7px; border: 1px solid rgba(229,72,100,.2); border-radius: 7px; background: rgba(229,72,100,.07); color: var(--danger); cursor: pointer; font-size: 10px; font-weight: 700; }
.priority-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.empty-state { padding: 58px 20px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; color: var(--muted); }
.empty-state-mark { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 24px; }
.empty-state h2 { margin: 0 0 5px; color: var(--text); font-size: 15px; }
.empty-state p { margin: 0; font-size: 12px; }

.board-view { display: grid; grid-template-columns: repeat(3, minmax(245px, 1fr)); gap: 15px; align-items: start; overflow-x: auto; padding-bottom: 20px; }
.board-column { min-height: 310px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface-soft) 75%, transparent); }
.board-column.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.board-heading { display: flex; align-items: center; gap: 7px; padding: 2px 3px 11px; }
.board-heading i { width: 8px; height: 8px; border-radius: 50%; background: var(--column-color); }
.board-heading strong { font-size: 11px; }
.board-heading span { margin-left: auto; color: var(--subtle); font-size: 10px; }
.board-cards { display: grid; gap: 8px; min-height: 220px; }
.board-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: grab; }
.board-card:active { cursor: grabbing; }
.board-card h3 { margin: 0 0 9px; font-size: 12px; line-height: 1.45; }
.board-card-footer { display: flex; align-items: center; justify-content: space-between; color: var(--subtle); font-size: 9px; }
.board-add { width: 100%; margin-top: 8px; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.board-add:hover { background: var(--surface); color: var(--primary); }

.task-drawer { position: fixed; z-index: 60; top: 0; right: calc(var(--drawer-width) * -1 - 30px); bottom: 0; width: var(--drawer-width); overflow: auto; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -12px 0 40px rgba(24, 24, 38, .07); transition: right .25s ease; }
.task-drawer.open { right: 0; }
.drawer-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 91%, transparent); backdrop-filter: blur(12px); }
.drawer-header-actions { display: flex; gap: 3px; }
.copy-link-button { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.copy-link-button:hover { border-color: var(--primary); color: var(--primary); }
.editor-body { padding: 19px 20px 80px; }
.editor-title-row { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.editor-title { width: 100%; min-height: 48px; padding: 0; border: 0; outline: 0; resize: none; overflow: hidden; background: transparent; color: var(--text); font-size: 19px; font-weight: 750; line-height: 1.35; }
.editor-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; margin-top: 15px; }
.field > span, .color-fieldset legend { color: var(--muted); font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea, .editor-control { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface-soft); color: var(--text); font-size: 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.description-toolbar { display: flex; gap: 4px; margin-bottom: 7px; }
.description-toolbar button { min-width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 700; }
.description-input { min-height: 120px !important; resize: vertical; line-height: 1.55; }
.description-preview { min-height: 120px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); font-size: 12px; line-height: 1.6; }
.description-preview h2, .description-preview h3, .description-preview h4 { margin: 7px 0; }
.description-preview h2 { font-size: 16px; }
.description-preview h3 { font-size: 14px; }
.description-preview h4 { font-size: 12px; }
.description-preview p { margin: 5px 0; }
.description-preview ul { margin: 5px 0; padding-left: 20px; }
.description-preview a { color: var(--primary); }
.editor-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-choice { cursor: pointer; }
.tag-choice input { position: absolute; opacity: 0; pointer-events: none; }
.tag-choice span { display: block; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; }
.tag-choice input:checked + span { border-color: var(--tag-color); background: color-mix(in srgb, var(--tag-color) 10%, transparent); color: var(--tag-color); }
.tag-add-button { padding: 5px 8px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--primary); cursor: pointer; font-size: 10px; font-weight: 700; }
.tag-add-button:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, transparent); }
.tag-create { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 8px; border: 1px solid var(--primary); border-radius: 8px; background: color-mix(in srgb, var(--primary) 5%, var(--panel)); color: var(--primary); }
.tag-create input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.tag-create-hint { color: var(--muted); font-size: 9px; }
.subtask-list { display: grid; gap: 6px; }
.subtask-row { display: grid; grid-template-columns: 21px 1fr auto; align-items: center; gap: 7px; min-height: 34px; }
.subtask-row input[type="text"] { border: 0; border-bottom: 1px solid transparent; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.subtask-row input[type="text"]:focus { border-bottom-color: var(--line); }
.subtask-add { width: 100%; padding: 8px 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; text-align: left; font-size: 11px; font-weight: 700; }
.editor-actions { display: flex; gap: 8px; margin-top: 18px; }
.editor-actions .primary-button { flex: 1; }
.danger-button { min-height: 40px; padding: 0 13px; border: 1px solid rgba(229, 72, 100, .2); border-radius: 10px; background: rgba(229, 72, 100, .07); color: var(--danger); cursor: pointer; }
.drawer-delete-button { min-height: 32px; padding: 0 10px; font-size: 11px; font-weight: 700; }
.recurrence-days { display: flex; gap: 4px; margin-top: 8px; }
.recurrence-days label input { position: absolute; opacity: 0; }
.recurrence-days span { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 9px; }
.recurrence-days input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(19, 18, 32, .42); backdrop-filter: blur(5px); }
.modal { width: min(420px, 100%); padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal h2 { margin: 0; font-size: 18px; }
.color-fieldset { margin: 18px 0; padding: 0; border: 0; }
.color-options { display: flex; gap: 10px; margin-top: 9px; }
.color-options input { position: absolute; opacity: 0; }
.color-options i { display: block; width: 27px; height: 27px; border: 4px solid var(--surface); border-radius: 50%; background: var(--color); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-options input:checked + i { box-shadow: 0 0 0 2px var(--color); }
.project-status-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.project-status-list { display: grid; gap: 7px; }
.project-status-row { display: grid; grid-template-columns: 18px 1fr 70px 28px; align-items: center; gap: 8px; }
.project-status-row > i { width: 9px; height: 9px; border-radius: 50%; background: var(--status-color, var(--primary)); }
.project-status-row input[type="text"] { min-width: 0; min-height: 34px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--surface-soft); color: var(--text); font-size: 11px; }
.project-status-row label { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; cursor: pointer; }
.project-status-row input[type="checkbox"] { accent-color: var(--success); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-spacer { flex: 1; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 360px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-lg); animation: toast-in .2s ease-out; font-size: 12px; }
.toast.error { border-color: rgba(229, 72, 100, .3); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: var(--surface); }
.auth-visual { position: relative; min-height: 100vh; overflow: hidden; padding: 38px 56px; background: #232038; color: white; }
.auth-visual::before { content: ''; position: absolute; width: 520px; height: 520px; left: -130px; bottom: -230px; border-radius: 50%; background: rgba(115, 94, 226, .23); filter: blur(4px); }
.auth-visual::after { content: ''; position: absolute; width: 370px; height: 370px; right: -120px; top: -110px; border-radius: 50%; background: rgba(231, 149, 34, .08); }
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.auth-copy { position: relative; z-index: 2; max-width: 520px; margin-top: 16vh; }
.eyebrow { margin: 0 0 10px; color: #8c7ff0; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-copy h1 { margin: 0; font-size: clamp(40px, 5.3vw, 72px); line-height: 1.03; letter-spacing: -3px; }
.auth-copy > p:last-child { max-width: 480px; margin-top: 22px; color: #aaa7ba; font-size: 15px; line-height: 1.7; }
.auth-preview { position: absolute; z-index: 2; right: 8%; bottom: 7%; width: min(490px, 75%); padding: 17px; border: 1px solid rgba(255,255,255,.08); border-radius: 17px; background: rgba(255,255,255,.07); box-shadow: 0 30px 80px rgba(0,0,0,.25); backdrop-filter: blur(18px); transform: rotate(-2deg); }
.preview-date { margin-bottom: 10px; color: #9c98ab; font-size: 10px; font-weight: 700; }
.preview-task { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; padding: 11px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11px; }
.preview-task:last-child { border-bottom: 0; }
.preview-task b { color: #9995a8; font-size: 9px; }
.fake-check { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #706c7c; border-radius: 50%; font-style: normal; font-size: 9px; }
.fake-check.done { border-color: #62c797; background: #62c797; }
.auth-panel { display: grid; place-items: center; padding: 40px; }
.auth-form { width: min(370px, 100%); }
.auth-form h2 { margin: 0 0 7px; font-size: 29px; letter-spacing: -.8px; }
.auth-form > .muted { margin: 0 0 29px; font-size: 12px; }
.auth-submit { width: 100%; margin-top: 21px; }
.text-button { width: 100%; margin-top: 12px; padding: 8px; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 11px; font-weight: 700; }
.form-error { margin: 11px 0 0; padding: 9px 10px; border-radius: 8px; background: rgba(229, 72, 100, .09); color: var(--danger); font-size: 11px; }
.mobile-auth-brand { display: none; }
.mobile-bottom-nav { display: none; }

@media (min-width: 1180px) {
    .app-shell.drawer-visible .workspace { margin-right: var(--drawer-width); }
}

@media (max-width: 820px) {
    :root { --sidebar-width: 280px; }
    .sidebar { transform: translateX(-102%); box-shadow: var(--shadow-lg); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close, .mobile-menu { display: inline-grid !important; }
    .workspace { margin-left: 0; }
    .topbar { min-height: 82px; padding: 16px 18px 11px; }
    .topbar h1 { font-size: 21px; }
    .view-kicker { display: none; }
    .search-box { width: 36px; padding: 0; justify-content: center; border: 0; background: transparent; box-shadow: none; }
    .search-box input, .search-box kbd { display: none; }
    .view-switcher { display: none; }
    .content { padding: 6px 14px 100px; }
    .quick-meta { display: none; }
    .quick-date-popover { right: 0; left: 0; width: auto; }
    .quick-add { padding-left: 11px; }
    .quick-add .compact { display: none; }
    .task-row { min-height: 61px; padding: 10px 12px; }
    .project-edit-button { opacity: 1; }
    .task-drawer { width: 100%; right: -105%; }
    .mobile-bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(67px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; padding: 7px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(16px); }
    .mobile-bottom-nav button { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--subtle); font-size: 9px; cursor: pointer; }
    .mobile-bottom-nav button span { font-size: 19px; }
    .mobile-bottom-nav .mobile-nav-icon { width: 21px; height: 21px; display: grid; place-items: center; }
    .mobile-bottom-nav .mobile-nav-icon svg { width: 20px; height: 20px; }
    .mobile-bottom-nav button.active { color: var(--primary); }
    .mobile-bottom-nav .mobile-add-task { width: 45px; height: 45px; min-height: 45px; margin: -17px auto 0; border-radius: 15px; background: var(--primary); color: white; box-shadow: 0 8px 22px rgba(108, 92, 231, .32); font-size: 27px; }
    .board-view { margin-right: -14px; grid-template-columns: repeat(3, 270px); }
    .toast-region { left: 14px; right: 14px; bottom: 80px; }
    .toast { min-width: 0; max-width: none; }
    .auth-screen { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; padding: 28px; }
    .mobile-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 60px; font-size: 18px; font-weight: 800; }
}

@media (max-width: 430px) {
    .notification-button { display: none; }
    .topbar-actions { gap: 2px; }
    .task-due { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
    .editor-body { padding: 17px 16px 80px; }
    .editor-grid { grid-template-columns: 1fr; }
}

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