:root {
    color-scheme: light;
    --bg-main: #ffffff;
    --bg-subtle: #f2f2f7;
    --bg-input: #f2f2f7;
    --bg-muted: #f2f2f7;
    --bg-hover: #e5e5ea;
    --text-primary: #1c1c1e;
    --text-secondary: #636366;
    --text-muted: #8e8e93;
    --border-color: #d1d1d6;
    --border-hover: #aeaeb2;
    --accent-black: #000000;
    --accent-blue: #0099ff;
    --accent-blue-hover: #0088e5;
    --accent-blue-text: #ffffff;
    --status-warning: #805d00;
    --status-warning-surface: #fff0b3;
    --status-critical-surface: #ffe7e5;
    --accent-red: #a64b4b;
    --button-text: #ffffff;
    --avatar-bg: #000000;
    --avatar-text: #ffffff;
    --date-muted: #636366;
    --backdrop: rgba(0, 0, 0, 0.42);
    --glass-surface: rgba(255, 255, 255, 0.78);
    --glass-active: rgba(255, 255, 255, 0.9);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --glass-control-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-navbar: none;
    --shadow-card: none;
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.14);
    --radius-sm: 9999px;
    --radius-md: 9999px;
    --radius-lg: 28px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-main: #1c1c1e;
    --bg-subtle: #000000;
    --bg-input: #2c2c2e;
    --bg-muted: #2c2c2e;
    --bg-hover: #3a3a3c;
    --text-primary: #ffffff;
    --text-secondary: #aeaeb2;
    --text-muted: #8e8e93;
    --border-color: #38383a;
    --border-hover: #48484a;
    --accent-black: #ffffff;
    --accent-blue: #0099ff;
    --accent-blue-hover: #33adff;
    --accent-blue-text: #000000;
    --status-warning: #ffd60a;
    --status-warning-surface: rgba(255, 214, 10, 0.14);
    --status-critical-surface: rgba(255, 69, 58, 0.16);
    --accent-red: #ff8a93;
    --button-text: #000000;
    --avatar-bg: #2c2c2e;
    --avatar-text: #ffffff;
    --date-muted: #aeaeb2;
    --backdrop: rgba(0, 0, 0, 0.76);
    --glass-surface: rgba(44, 44, 46, 0.78);
    --glass-active: rgba(255, 255, 255, 0.13);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    --glass-control-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
    --shadow-navbar: none;
    --shadow-card: none;
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button {
    min-height: 41px;
}

body {
    touch-action: manipulation;
    font-family: 'Inter', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-subtle);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s, color 0.2s;
}

body.modal-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

/* จัดการหน้าจอสลับ View */
.view {
    display: none;
    min-height: 100vh;
    flex-direction: column;
}

.view.active {
    display: flex;
}

/* ================= NAVBAR ================= */
.navbar {
    width: 100%;
    padding: 12px 32px;
    background-color: transparent;
    border-bottom: 0;
    box-shadow: var(--shadow-navbar);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    transition: filter 0.2s ease;
}

[data-theme="dark"] .logo-img {
    filter: invert(1) hue-rotate(180deg);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    margin-left: 8px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* ================= VIEW 1: LOGIN ================= */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-grid {
    max-width: 960px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 420px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-list .dot {
    width: 5px;
    height: 5px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.feature-list strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-list p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Auth Card */
.auth-card {
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-card);
}

.card-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
    min-width: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 0;
    border-radius: var(--radius-sm);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-group textarea {
    min-height: 96px;
    height: 112px;
    line-height: 1.5;
    border-radius: 12px !important;
}

#task-description {
    display: block;
    max-height: 220px;
}

#task-form > .form-group:last-of-type {
    margin-top: 8px;
}

.form-group input[type="date"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    -webkit-appearance: auto;
    appearance: auto;
}

.form-group input[type="date"]::-webkit-date-and-time-value {
    min-height: 1.5em;
    text-align: left;
}

.form-group input:focus,
.form-group textarea:focus {
    background-color: var(--bg-main);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.18);
}

.btn-primary {
    height: 44px;
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.form-message {
    color: var(--accent-red);
    font-size: 12px;
    margin-top: 10px;
}

.form-message:empty {
    display: none;
}

.dashboard-message {
    margin: -8px 0 16px;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 36px 16px;
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.register-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

.privacy-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 14px;
}

.privacy-note a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 41px;
    height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: var(--glass-surface);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--glass-control-shadow), inset 0 1px 0 var(--glass-highlight);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-muted);
    transform: translateY(-1px);
}

.theme-icon {
    width: 17px;
    height: 17px;
}

.theme-icon-sun {
    display: none;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

[data-theme="dark"] .theme-icon-sun {
    display: block;
}

.about-main {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    padding: 72px 24px 80px;
}

.about-hero {
    max-width: 700px;
    margin-bottom: 48px;
}

.about-hero .hero-title {
    margin-bottom: 18px;
}

.about-hero .hero-subtitle {
    max-width: 620px;
    margin-bottom: 24px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.about-card,
.about-note {
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.about-card-number {
    display: inline-block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 24px;
}

.about-card h2,
.about-note h2 {
    font-size: 16px;
    margin-bottom: 8px;
}

.about-card p,
.about-note p {
    color: var(--text-secondary);
    font-size: 13px;
}

.about-note {
    margin-top: 16px;
}

/* ================= VIEW 2: DASHBOARD ================= */
.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--avatar-bg);
    color: var(--avatar-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-main {
    max-width: 1120px;
    width: 100%;
    margin: 24px auto 60px;
    padding: 0 24px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.stats-group {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.btn-pill {
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: 13px;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0;
    padding-bottom: 12px;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--glass-surface);
    border: 0;
    border-radius: var(--radius-full);
    box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-control-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
}

.tab-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding-bottom: 12px;
    margin-bottom: -13px;
    position: relative;
}

.tab-btn.active {
    color: var(--accent-blue);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
}

.search-sort {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-box input {
    height: 44px;
    padding: 12px 16px 12px 34px;
    font-size: 12px;
    font-family: inherit;
    border: 0;
    border-radius: var(--radius-full);
    background-color: var(--bg-input);
    outline: none;
    width: 200px;
}

.search-box input:focus {
    background-color: var(--bg-main);
    border-color: transparent;
}

.sort-box select {
    padding: 12px 34px 12px 14px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-secondary);
    border: 0;
    border-radius: var(--radius-full);
    background-color: var(--bg-input);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.sort-box {
    position: relative;
}

.sort-box::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-secondary);
    border-bottom: 1.5px solid var(--text-secondary);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* Task Cards */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    background: var(--bg-main);
    border-radius: 28px;
}

.task-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 44px;
    grid-template-areas: "due info actions";
    align-items: center;
    gap: 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 18px;
    min-height: 124px;
    position: relative;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.task-card:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: 0;
    left: 122px;
    height: 1px;
    background: var(--border-color);
    opacity: 0.5;
    pointer-events: none;
}

.task-card:hover {
    background-color: var(--bg-hover);
}

.task-card.menu-open {
    z-index: 2;
}

.task-card.completed .task-info {
    opacity: 0.78;
}

.task-card.completed .task-title {
    text-decoration: line-through;
}

.due-badge-box {
    grid-area: due;
    background-color: var(--bg-muted);
    color: var(--text-primary);
    border-radius: 16px;
    width: 88px;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.due-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.due-date {
    color: var(--accent-blue);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.due-year {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--date-muted);
    margin-top: 3px;
}

.task-info {
    grid-area: info;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.task-meta {
    display: flex;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    flex-wrap: wrap;
}

.days-left-pill {
    background-color: var(--bg-muted);
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: var(--radius-full);
}

.days-left-pill--soon {
    background-color: var(--status-warning-surface);
    color: var(--status-warning);
}

.days-left-pill--urgent {
    background-color: var(--status-critical-surface);
    color: var(--accent-red);
}

.days-left-pill--complete {
    background-color: var(--bg-muted);
    color: var(--text-secondary);
}

.start-date-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-description {
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Task Actions */
.task-actions {
    grid-area: actions;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    position: relative;
    align-self: center;
}

.action-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
}

.btn-danger {
    margin-right: auto;
    padding: 10px 16px;
    color: var(--accent-red);
    background: transparent;
    border: 0;
    border-radius: var(--radius-full);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger:hover {
    background: var(--bg-muted);
}

.btn-danger[hidden] {
    display: none;
}

.action-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.task-menu-toggle {
    background: transparent;
    color: var(--text-secondary);
}

.task-menu-toggle:hover,
.task-menu-toggle[aria-expanded="true"] {
    color: var(--text-primary);
    background: transparent;
}

.task-action-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 3;
    display: grid;
    min-width: 196px;
    padding: 6px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.task-action-menu[hidden] {
    display: none;
}

.task-menu-item {
    min-height: 44px;
    padding: 9px 12px;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.task-menu-item:hover,
.task-menu-item:focus-visible {
    background: var(--bg-muted);
}

.task-menu-item:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
}
/* ================= MODAL ================= */
.modal-overlay {
position: fixed;
inset: 0;
overscroll-behavior: contain;
background: var(--backdrop);
 -webkit-backdrop-filter: blur(12px);
 backdrop-filter: blur(12px);
display: none;
align-items: center;
justify-content: center;
padding: 20px;
z-index: 100;
}
.modal-overlay.open {
display: flex;
}
.modal-card {
background: var(--glass-surface);
border: 0;
border-radius: var(--radius-lg);
width: 100%;
max-width: 440px;
padding: 24px;
box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
 -webkit-backdrop-filter: blur(30px) saturate(180%);
 backdrop-filter: blur(30px) saturate(180%);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.modal-header h3 {
font-size: 16px;
font-weight: 700;
}
.icon-btn {
width: 41px;
height: 41px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
background: none;
border: none;
font-size: 16px;
color: var(--text-secondary);
cursor: pointer;
}
.form-row {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 0;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}
.btn-secondary {
background-color: var(--glass-surface);
color: var(--text-primary);
border: 0;
font-family: inherit;
font-size: 13px;
font-weight: 500;
padding: 10px 18px;
border-radius: var(--radius-sm);
cursor: pointer;
box-shadow: var(--glass-control-shadow), inset 0 1px 0 var(--glass-highlight);
 -webkit-backdrop-filter: blur(16px) saturate(180%);
 backdrop-filter: blur(16px) saturate(180%);
}
:focus-visible {
outline: 2px solid var(--accent-blue);
outline-offset: 3px;
}

/* Restrained, editorial visual system */
body {
    background: var(--bg-subtle);
}

.navbar {
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    box-shadow: none;
}

.nav-container {
    width: 100%;
    max-width: 1440px;
    padding: 0 32px;
}

.logo-text {
    letter-spacing: -0.035em;
}

.nav-links {
    align-items: center;
    gap: 30px;
}

.nav-link {
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active {
    box-shadow: inset 0 -1px var(--accent-blue);
}

.theme-toggle {
    color: var(--text-secondary);
    border-radius: 6px;
}

.eyebrow,
.card-tag {
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.hero-title {
    font-weight: 600;
    letter-spacing: -0.035em;
}

.login-main {
    padding-top: 76px;
    padding-bottom: 88px;
}

.login-grid {
    max-width: 1240px;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(56px, 9vw, 128px);
}

.auth-card {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.form-group input,
.search-box input,
.sort-box select {
    border-radius: 6px;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-group input:focus,
.search-box input:focus,
.sort-box select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.16);
}

.btn-primary {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 14px rgba(0, 153, 255, 0.24);
    transition: background-color 0.18s, color 0.18s;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    opacity: 1;
}

.about-main {
    max-width: 1240px;
    padding-top: 88px;
    padding-bottom: 100px;
}

.about-hero {
    max-width: 900px;
    padding: 0 0 56px;
    margin-bottom: 54px;
    background: none;
    border: 0;
    border-bottom: 0;
    border-radius: 0;
}

.about-hero .hero-title {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.14;
}

.about-hero .hero-subtitle {
    max-width: 680px;
    line-height: 1.8;
}

.about-grid {
    gap: 32px;
}

.about-card {
    padding: 24px;
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.about-card-number {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.about-note {
    margin-top: 56px;
    padding: 24px;
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.dashboard-main {
    max-width: 1240px;
    margin-top: 48px;
    margin-bottom: 80px;
}

.stats-header {
    align-items: center;
    padding: 0 0 24px;
    margin-bottom: 28px;
    border-bottom: 0;
}

.stat-value {
    color: var(--accent-black);
}

.modal-card {
    border-radius: var(--radius-lg);
}

.btn-secondary:hover,
.icon-btn:hover {
    background-color: var(--bg-hover);
}

.register-link {
    color: var(--text-primary);
}

:focus-visible {
    outline-color: var(--accent-blue);
}

.account-menu-wrap {
    position: relative;
}

.account-trigger {
    height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1px 8px 1px 4px;
    color: var(--text-primary);
    background: var(--glass-surface);
    border: 0;
    border-radius: var(--radius-full);
    box-shadow: var(--glass-control-shadow), inset 0 1px 0 var(--glass-highlight);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    cursor: pointer;
    font: inherit;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
    background: var(--glass-active);
}

.account-trigger-email {
    max-width: 200px;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.18s;
}

.account-trigger[aria-expanded="true"] .account-chevron {
    transform: rotate(180deg);
}

.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    width: min(292px, calc(100vw - 32px));
    padding: 8px;
    background: var(--glass-surface);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
}

.account-menu[hidden] {
    display: none;
}

.account-menu-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
}

.account-menu-caption {
    color: var(--text-muted);
    font-size: 11px;
}

.account-menu-email {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-item {
    display: flex;
    width: 100%;
    min-height: 41px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 5px;
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
    background: var(--bg-muted);
}

.account-menu-item .theme-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.account-menu-trailing {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.account-menu-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--border-color);
}

.account-menu-signout {
    color: var(--accent-red);
}

.settings-card {
    max-width: 480px;
}

.settings-section {
    display: grid;
    gap: 8px;
    padding: 8px 0 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.settings-section select {
    width: 100%;
    padding: 10px 12px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 0;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 13px;
}

.settings-section select:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.settings-section select:disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
}

.settings-section p {
    color: var(--text-muted);
    font-size: 12px;
}

.settings-card .modal-actions {
    display: flex;
    margin-top: 12px;
}

.settings-card .modal-actions .btn-primary {
    width: 100%;
    min-height: 44px;
    height: 44px;
    background: var(--accent-blue);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

.faq-section {
    max-width: 900px;
    margin-top: 72px;
}

.faq-section h2 {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.faq-item {
    border-top: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
    padding: 18px 4px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.faq-item p {
    max-width: 760px;
    padding: 0 4px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

#about,
#features,
#privacy,
#faq {
    scroll-margin-top: 80px;
}

button,
input:not([type="hidden"]),
select,
textarea,
.theme-toggle,
.sort-box select,
.settings-section select,
.tabs,
.account-menu-item {
    border-radius: var(--radius-full);
}

.tab-btn {
    padding: 8px 14px;
    margin: 0;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--glass-active);
}

.tab-btn.active::after {
    display: none;
}

.landing-main {
    width: min(100% - 64px, 1240px);
    margin: 0 auto;
    padding: 82px 0 96px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(40px, 7vw, 96px);
}

.landing-copy .hero-title {
    font-size: clamp(44px, 5.2vw, 68px);
    line-height: 1.12;
}

.landing-copy .hero-subtitle {
    max-width: 500px;
    line-height: 1.85;
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.landing-secondary-link,
.landing-footer a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
}

.landing-secondary-link:hover,
.landing-footer a:hover {
    color: var(--text-primary);
}

.landing-note {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 11px;
}

.product-preview {
    min-width: 0;
    padding: 28px;
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-lg);
}

.preview-topbar,
.preview-summary,
.preview-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-topbar h2 {
    margin-top: 5px;
    font-size: 18px;
    font-weight: 600;
}

.preview-overline {
    color: var(--text-muted);
    font-size: 9px;
    letter-spacing: 0.08em;
}

.preview-add {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    background: var(--accent-blue);
    border-radius: 50%;
    color: var(--accent-blue-text);
    font-size: 21px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 12px rgba(0, 153, 255, 0.24);
}

.preview-summary {
    justify-content: flex-start;
    gap: 38px;
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.preview-summary div {
    display: grid;
    gap: 3px;
}

.preview-summary span,
.preview-task-info small {
    color: var(--text-muted);
    font-size: 11px;
}

.preview-summary strong {
    font-size: 14px;
    font-weight: 600;
}

.preview-filters {
    display: flex;
    gap: 18px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

.preview-filters .selected {
    color: var(--text-primary);
    font-weight: 600;
}

.preview-task-list {
    list-style: none;
}

.preview-task {
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.preview-date {
    display: flex;
    width: 46px;
    height: 48px;
    flex: 0 0 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: 8px;
}

.preview-date strong {
    font-size: 15px;
    line-height: 1.2;
}

.preview-date small {
    color: var(--text-secondary);
    font-size: 9px;
}

.preview-task-info {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.preview-task-info strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-task-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-due {
    flex: 0 0 auto;
    padding: 4px 8px;
    background: var(--bg-muted);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 9px;
}

.preview-caption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 10px;
    text-align: right;
}

.landing-features,
.how-it-works {
    margin-top: 96px;
    padding-top: 44px;
    border-top: 1px solid var(--border-color);
}

.landing-section-heading {
    margin-bottom: 32px;
}

.landing-section-heading .eyebrow {
    margin-bottom: 8px;
}

.landing-section-heading h2 {
    max-width: 700px;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.35;
}

.landing-features .about-card h3 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.landing-features .about-card p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-bottom: 32px;
    list-style: none;
}

.how-steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.how-steps li > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 12px;
}

.how-steps h3 {
    margin: 2px 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.how-steps p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.8;
}

.landing-footer {
    display: flex;
    width: min(100% - 64px, 1240px);
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
}

/* Dashboard: native-inspired, calm surfaces and clear spacing */
#dashboard-view {
    background: var(--bg-subtle);
}

#dashboard-view .navbar {
    padding: 6px 0;
    background: #ffffff;
    border-bottom: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

[data-theme="dark"] #dashboard-view .navbar {
    background: #0c0c0e;
}

#dashboard-view .nav-container {
    max-width: 1028px;
    padding: 0 24px;
}

#dashboard-view .logo-img {
    height: 22px;
}

#dashboard-view .logo-text {
    font-size: 20px;
    font-weight: 600;
}

#dashboard-view .avatar-btn {
    width: 28px;
    height: 28px;
    background: var(--bg-muted);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

#dashboard-view .account-trigger {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: none;
    border: 0;
    border-radius: var(--radius-full);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#dashboard-view .account-menu {
    background: var(--bg-main);
    border: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#dashboard-view .dashboard-main {
    max-width: 1028px;
    margin: 40px auto 80px;
    padding: 0 24px;
}

.dashboard-intro {
    margin-bottom: 24px;
}

.dashboard-eyebrow {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.dashboard-intro h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.dashboard-subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

#dashboard-view .stats-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 0;
}

#dashboard-view .stats-group {
    position: relative;
    display: grid;
    width: min(100%, 380px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    background: var(--bg-main);
    border-radius: var(--radius-full);
}

#dashboard-view .stat-item {
    max-height: 44px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#dashboard-view .stats-group::after {
    content: "";
    position: absolute;
    top: 24%;
    bottom: 24%;
    left: 50%;
    width: 1px;
    background: var(--border-color);
    transform: translateX(-50%);
}

#dashboard-view .stat-label {
    margin: 0;
    font-size: 12px;
}

#dashboard-view .stat-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
}

#dashboard-view #open-modal-btn {
    justify-self: end;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    box-shadow: none;
    font-size: 13px;
    font-weight: 500;
}

#dashboard-view #open-modal-btn > span:first-child {
    font-size: 18px;
    line-height: 1;
}

#dashboard-view .controls-bar {
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 0;
}

#dashboard-view .tabs {
    gap: 4px;
    padding: 3px;
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-full);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#dashboard-view .tab-btn {
    min-height: 36px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#dashboard-view .tab-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--accent-blue-text);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] #dashboard-view .tab-btn.active {
    color: #ffffff;
}

#dashboard-view .search-sort {
    gap: 8px;
}

#dashboard-view .search-box input,
#dashboard-view .sort-box select {
    height: 42px;
    background: var(--bg-main);
    border: 0;
    border-radius: var(--radius-full);
    font-size: 12px;
}

#dashboard-view .search-box input {
    width: 196px;
    padding: 9px 12px 9px 34px;
}

#dashboard-view .search-box input:focus,
#dashboard-view .sort-box select:focus {
    background: var(--bg-main);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
}

#dashboard-view .sort-box select {
    padding: 8px 30px 8px 12px;
}

#dashboard-view .task-list {
    gap: 0;
    overflow: visible;
    background: var(--bg-main);
    border-radius: 28px;
}

#dashboard-view .task-card {
    grid-template-columns: 88px minmax(0, 1fr) 44px;
    gap: 16px;
    min-height: 124px;
    padding: 18px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#dashboard-view .task-card:not(:last-child)::after {
    display: block;
    right: 20px;
    left: 122px;
    background: var(--border-color);
    opacity: 0.5;
}

#dashboard-view .task-card:hover {
    background: var(--bg-hover);
}

#dashboard-view .task-card:first-child:hover {
    border-radius: 28px 28px 0 0;
}

#dashboard-view .task-card:last-child:hover {
    border-radius: 0 0 28px 28px;
}

#dashboard-view .task-card:only-child:hover {
    border-radius: 28px;
}

#dashboard-view .due-badge-box {
    width: 88px;
    min-height: 82px;
    background: var(--bg-muted);
    border-radius: 16px;
}

#dashboard-view .due-date {
    font-size: 20px;
    font-weight: 700;
}

#dashboard-view .task-title {
    font-size: 15px;
    font-weight: 500;
}

#dashboard-view .task-info {
    gap: 6px;
}

#dashboard-view .days-left-pill {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
}

#dashboard-view .start-date-text {
    font-size: 12px;
}

#dashboard-view .action-btn {
    color: var(--text-muted);
}

#dashboard-view .empty-state {
    background: var(--bg-main);
    border: 0;
    border-radius: 24px;
}

@media (min-width: 811px) and (max-width: 1199px) {
    .controls-bar {
        align-items: center;
        flex-wrap: nowrap;
    }

    .tabs {
        width: auto;
        flex: 0 0 auto;
    }

    .search-sort {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
    }

    .search-box {
        min-width: 140px;
        flex: 0 1 200px;
    }

    .search-box input {
        width: 100%;
    }

    input:not([type="hidden"]):focus,
    textarea:focus,
    select:focus {
        font-size: 16px !important;
    }
}

@media (max-width: 810px) {
    #dashboard-view .sort-box select {
        font-size: 12px;
    }

    #dashboard-view .sort-box select:focus {
        font-size: 12px !important;
    }

    .navbar {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top));
        position: static;
    }

    .nav-container {
        gap: 8px;
        padding: 0;
    }

    .logo-text {
        font-size: 20px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-link {
        font-size: 12px;
    }

    .theme-toggle {
        width: 41px;
        height: 41px;
        flex-shrink: 0;
    }

    .login-main {
        padding: 40px 16px;
    }

    .login-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .auth-card-wrapper {
        order: -1;
    }

    .hero-title {
        font-size: 32px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .dashboard-main {
        padding: 0 16px;
    }

    .stats-group {
        gap: 24px;
    }

    .stats-header {
        align-items: center;
        gap: 12px;
    }

    .btn-pill {
        padding: 9px 12px;
        font-size: 12px;
    }

    .controls-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    .tabs {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        padding: 4px;
        background: var(--glass-surface);
        border: 0;
    }

    .tab-btn {
        min-width: 0;
        padding: 10px 4px;
        font-size: clamp(11px, 1.5vw, 13px);
        line-height: 1.35;
    }

    .tab-btn.active {
        background: var(--glass-active);
        box-shadow: inset 0 1px 0 var(--glass-highlight), 0 1px 4px rgba(0, 0, 0, 0.12);
    }

    .search-sort {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 144px;
        align-items: stretch;
        gap: 12px;
    }

    .search-box {
        min-width: 0;
    }

    .search-box input {
        width: 100%;
        height: 44px;
        padding: 10px 10px 10px 36px;
    }

    .sort-box {
        position: relative;
        display: flex;
        align-items: center;
    }

    .sort-box select {
        width: 100%;
        height: 44px;
        padding: 6px 30px 6px 12px;
        appearance: none;
        -webkit-appearance: none;
    }

    .task-card {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 14px 16px;
    }

    .task-card:not(:last-child)::after {
        left: 84px;
    }

    .task-info {
        min-width: 0;
    }

    .task-actions {
        gap: 8px;
    }

    .due-badge-box {
        width: 56px;
        height: 60px;
    }

    .task-meta {
        column-gap: 6px;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .about-main {
        padding-top: 56px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-hero {
        padding-bottom: 32px;
        margin-bottom: 36px;
    }

    .account-trigger {
        gap: 6px;
        padding-right: 4px;
    }

    .account-trigger-email {
        display: none;
    }

    .settings-card {
        padding: 20px;
    }

    body {
        min-height: 100svh;
    }

    .dashboard-main {
        margin-top: 18px;
        margin-bottom: 60px;
    }

    .stats-header {
        margin-bottom: 24px;
    }

    .task-card {
        grid-template-columns: 82px minmax(0, 1fr) 44px;
        grid-template-areas: "due info actions";
        gap: 12px;
        padding: 14px 16px;
    }

    .task-card:not(:last-child)::after {
        display: none;
    }

    .task-info {
        gap: 7px;
    }

    .task-title {
        font-size: 14px;
        font-weight: 500;
    }

    .task-meta {
        column-gap: 8px;
        row-gap: 8px;
    }

    .days-left-pill {
        padding: 3px 8px;
    }

    .start-date-text {
        font-size: 12px;
    }

    .task-actions {
        justify-content: flex-end;
    }

    .modal-overlay {
        align-items: center;
        padding: 12px 10px calc(10px + env(safe-area-inset-bottom));
    }

    #task-modal.modal-overlay.open {
        align-items: center;
        justify-content: center;
    }

    .modal-card {
        max-width: none;
        max-height: calc(100svh - 24px - env(safe-area-inset-top));
        overflow-y: auto;
        padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius: 28px;
        margin-block: auto;
        overscroll-behavior: contain;
        animation: ios-sheet-in 0.22s ease-out;
    }

    .modal-header {
        align-items: center;
        margin-bottom: 18px;
    }

    .modal-header h3,
    .modal-header h2 {
        font-size: 20px;
        line-height: 1.25;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--glass-surface);
        border: 0;
        box-shadow: var(--glass-control-shadow), inset 0 1px 0 var(--glass-highlight);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        backdrop-filter: blur(16px) saturate(180%);
        color: var(--text-primary);
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .form-group input,
    .form-group textarea,
    .settings-section select {
        height: 56px;
        border-radius: 9999px;
        padding: 12px 16px;
    }

    .form-group textarea {
        height: 112px;
        border-radius: 12px !important;
        resize: vertical;
    }

    .form-row {
        gap: 0;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        min-height: 56px;
        height: 56px;
        font-size: 16px;
        font-weight: 700;
    }

    .modal-actions .btn-danger {
        grid-column: 1 / -1;
        min-height: 48px;
    }

    .modal-actions .btn-primary {
        background: var(--bg-muted);
        color: #ffffff;
    }

    .settings-card .settings-section {
        margin-bottom: 14px;
    }

    @keyframes ios-sheet-in {
        from {
            transform: scale(0.98);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    #task-modal.modal-overlay.open {
        padding: 20px 16px;
    }

    #task-modal .modal-card {
        max-width: 440px;
        max-height: calc(100svh - 40px);
        padding: 24px;
        border-radius: var(--radius-lg);
        margin: 0;
    }

    #task-modal .modal-header {
        margin-bottom: 20px;
    }

    #task-modal .modal-header h3 {
        font-size: 16px;
        line-height: normal;
    }

    #task-modal .icon-btn {
        width: 41px;
        height: 41px;
        background: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        color: var(--text-secondary);
        font-size: 16px;
    }

    #task-modal .form-group {
        margin-bottom: 16px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    #task-modal .form-group label {
        margin-bottom: 6px;
        font-size: 12px;
    }

    #task-modal .form-group input:not([type="hidden"]) {
        display: block;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 41px;
        padding: 10px 14px;
        font-size: 14px;
    }

    #task-modal .form-group input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 41px;
        min-height: 41px;
        padding: 10px;
        border: 0;
        border-radius: var(--radius-full);
        line-height: 1.2;
    }

    #task-modal .form-group input[type="date"]::-webkit-date-and-time-value {
        min-height: 1em;
        text-align: left;
    }

    #task-modal .form-row {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    #task-modal .modal-actions {
        display: flex;
        grid-template-columns: none;
        gap: 10px;
        margin-top: 20px;
    }

    #task-modal .modal-actions .btn-primary,
    #task-modal .modal-actions .btn-secondary {
        min-height: 44px;
        height: 44px;
        font-size: 13px;
        font-weight: 500;
    }

    #task-modal .modal-actions .btn-primary {
        background: var(--accent-blue);
        color: #ffffff;
    }

    #task-modal .modal-actions .btn-danger {
        grid-column: auto;
        min-height: 41px;
    }

    .landing-main {
        width: min(100% - 32px, 600px);
        padding: 56px 0 72px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .landing-copy .hero-title {
        font-size: clamp(38px, 10vw, 54px);
    }

    .product-preview {
        padding: 20px 16px;
    }

    .landing-features,
    .how-it-works {
        margin-top: 64px;
        padding-top: 32px;
    }

    .landing-section-heading {
        margin-bottom: 20px;
    }

    .how-steps {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .landing-footer {
        width: calc(100% - 32px);
        margin: 0 16px;
    }

    .landing-nav-secondary {
        display: none;
    }

    .landing-actions {
        gap: 16px;
    }

    .landing-note {
        max-width: 300px;
        line-height: 1.7;
    }

    .preview-task {
        gap: 9px;
    }

    .preview-due {
        padding: 4px 6px;
        font-size: 8px;
    }

    .landing-footer {
        flex-direction: column;
        gap: 8px;
    }

    #dashboard-view .navbar {
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    #dashboard-view .navbar {
        padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
    }

    #dashboard-view .nav-container {
        padding: 0;
    }

    #dashboard-view .dashboard-main {
        margin-top: 32px;
        padding: 0 16px;
    }

    #dashboard-view .controls-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    #dashboard-view .tabs {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #dashboard-view .tab-btn {
        min-width: 0;
        padding: 7px 4px;
    }

    #dashboard-view .search-sort {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 160px;
    }

    #dashboard-view .search-box input {
        width: 100%;
    }

    #dashboard-view .dashboard-main {
        margin-top: 28px;
        margin-bottom: 60px;
    }

    .dashboard-intro {
        margin-bottom: 20px;
    }

    .dashboard-intro h2 {
        font-size: 24px;
    }

    #dashboard-view .stats-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        margin-bottom: 24px;
    }

    #dashboard-view .stats-group {
        width: auto;
        min-width: 0;
        gap: 0;
    }

    #dashboard-view .stat-item {
        min-width: 0;
        min-height: 48px;
        max-height: 48px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 4px 6px;
        border-radius: 0;
    }

    #dashboard-view .stat-label {
        font-size: 9px;
        line-height: 1.2;
        white-space: nowrap;
    }

    #dashboard-view .stat-value {
        font-size: 16px;
    }

    #dashboard-view #open-modal-btn {
        padding: 0 10px;
        font-size: 12px;
    }

    #dashboard-view .search-sort {
        grid-template-columns: minmax(0, 1fr) 144px;
        gap: 8px;
    }

    #dashboard-view .task-card {
        grid-template-columns: 76px minmax(0, 1fr) 44px;
        gap: 10px;
        min-height: 108px;
        padding: 24px 0px 24px 12px;
    }

    #dashboard-view .task-card:not(:last-child)::after {
        display: block;
        right: 12px;
        left: 98px;
    }

    #dashboard-view .due-badge-box {
        width: 76px;
        min-height: 76px;
    }

    #dashboard-view .due-date {
        font-size: 17px;
    }

    [data-theme="dark"] #dashboard-view .navbar {
        background: transparent;
    }

    input:not([type="hidden"]):focus,
    textarea:focus,
    select:focus {
        font-size: 16px !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .navbar,
    .tabs,
    .theme-toggle,
    .account-trigger,
    .modal-card,
    .btn-secondary,
    .icon-btn,
    .account-menu {
        background: var(--bg-main);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .modal-overlay {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .account-trigger:hover,
    .account-trigger[aria-expanded="true"] {
        background: var(--bg-muted);
    }
}
