/* ── Variables ─────────────────────────────────────────── */
:root {
    --bg:          #FAFAF5;
    --bg2:         #F2F2EA;
    --card:        #FFFFFF;
    --sidebar:     #0D1A14;
    --sidebar2:    #162219;
    --text:        #1A1A1A;
    --text2:       #6B7280;
    --border:      #E5E5DC;
    --accent:      #00C896;
    --accent-dim:  rgba(0,200,150,0.12);
    --accent-glow: rgba(0,200,150,0.35);
    --red:         #EF4444;
    --amber:       #F59E0B;
    --blue:        #3B82F6;
    --shadow:      0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:   0 12px 48px rgba(0,0,0,0.14);
    --radius:      14px;
    --radius-sm:   8px;
    --sidebar-w:   260px;
    --transition:  0.2s ease;
}
.dark-mode {
    --bg:        #0F1410;
    --bg2:       #161D18;
    --card:      #1C2620;
    --text:      #E8EDE8;
    --text2:     #7A9280;
    --border:    #2A3530;
    --shadow:    0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
input, textarea, select, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Auth Screen ───────────────────────────────────────── */
.auth-screen {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}
.auth-left::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -100px; left: -100px;
    animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { transform: scale(1); opacity: 0.6; }
    50%      { transform: scale(1.15); opacity: 1; }
}

.auth-brand { text-align: center; margin-bottom: 60px; z-index: 1; }
.brand-mark {
    font-size: 48px;
    color: var(--accent);
    animation: spin 8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-name {
    font-family: 'Fraunces', serif;
    font-size: 48px;
    color: #fff;
    margin: 8px 0 12px;
    letter-spacing: -1px;
}
.brand-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 16px;
    font-weight: 300;
}

.auth-floats { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; }
.float-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    backdrop-filter: blur(8px);
    animation: floatIn 0.6s ease both;
}
.float-card span:nth-child(2) { flex: 1; }
.float-card.done { opacity: 0.5; }
.float-card.done span:nth-child(2) { text-decoration: line-through; }
.fc-1 { animation-delay: 0.1s; }
.fc-2 { animation-delay: 0.2s; }
.fc-3 { animation-delay: 0.3s; }
.fc-4 { animation-delay: 0.4s; }
@keyframes floatIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.fc-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.fc-badge.high { background: rgba(239,68,68,0.2); color: #FF8080; }
.fc-badge.med  { background: rgba(245,158,11,0.2); color: #FFC060; }
.fc-badge.low  { background: rgba(0,200,150,0.2); color: #00C896; }

.auth-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg);
}
.auth-box { width: 100%; max-width: 380px; }

.auth-tabs {
    display: flex;
    position: relative;
    background: var(--bg2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 36px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    border-radius: 9px;
    position: relative;
    z-index: 1;
    transition: color var(--transition);
}
.auth-tab.active { color: var(--text); }
.tab-slider {
    position: absolute;
    top: 4px; left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--card);
    border-radius: 9px;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.tab-slider.right { transform: translateX(100%); }

.auth-form h2 {
    font-family: 'Fraunces', serif;
    font-size: 30px;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.auth-sub { color: var(--text2); margin-bottom: 28px; font-size: 14px; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { appearance: none; cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.eye-btn {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 16px;
    padding: 4px;
}
.eye-btn:hover { opacity: 1; }

.auth-error {
    color: var(--red);
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 18px;
    animation: shake 0.3s ease;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-8px); }
    75%      { transform: translateX(8px); }
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
    filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; text-align: center; }

.btn-secondary {
    background: var(--bg2);
    color: var(--text);
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: 1.5px solid var(--border);
    transition: border-color var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); }

.auth-demo {
    text-align: center;
    font-size: 12px;
    color: var(--text2);
    margin-top: 16px;
}

/* ── App Screen ────────────────────────────────────────── */
.app-screen {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar.collapsed { transform: translateX(-100%); }

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo {
    font-family: 'Fraunces', serif;
    color: var(--accent);
    font-size: 20px;
    letter-spacing: -0.5px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin: 10px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
}
.user-avatar {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}
.user-name { color: #fff; font-size: 14px; font-weight: 600; }
.user-status { color: rgba(255,255,255,0.4); font-size: 11px; display: flex; align-items: center; gap: 4px; }
.dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s ease infinite;
}
@keyframes blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

.sidebar-search {
    padding: 0 12px;
    margin: 8px 0;
}
.sidebar-search input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition);
}
.sidebar-search input::placeholder { color: rgba(255,255,255,0.3); }
.sidebar-search input:focus { border-color: var(--accent); }

.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    padding: 12px 18px 6px;
}
.sidebar-nav { padding: 0 8px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}
.nav-item.active .nav-badge { background: var(--accent); color: #fff; }

.sidebar-section { padding: 0 8px; margin-bottom: 8px; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; }
.section-header .nav-label { padding: 0; }

.board-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
    position: relative;
}
.board-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.board-item.active { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.06); }
.board-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.board-name { flex: 1; }
.board-count { font-size: 11px; opacity: 0.5; }
.board-del {
    opacity: 0;
    font-size: 14px;
    color: var(--red);
    padding: 2px 5px;
    transition: opacity var(--transition);
}
.board-item:hover .board-del { opacity: 1; }

.tags-cloud { padding: 0 10px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    border: 1px solid rgba(255,255,255,0.08);
}
.tag-pill:hover, .tag-pill.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
    border: 1px solid rgba(255,255,255,0.06);
}
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #FF8080; border-color: rgba(239,68,68,0.3); }

.icon-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 6px 8px;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 28px 36px;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
    min-height: 100vh;
}
.main-content.expanded { margin-left: 0; }

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-left h2 {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    letter-spacing: -0.5px;
}
.count-badge {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    padding: 2px 10px;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.header-right select {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    outline: none;
    appearance: none;
}
.hamburger {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 16px;
    color: var(--text2);
    display: block;
    transition: border-color var(--transition);
    margin-right: 16px;
}
.hamburger:hover { border-color: var(--accent); }
.view-btns { display: flex; gap: 4px; }
.view-btn {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text2);
    font-size: 16px;
    transition: border-color var(--transition), color var(--transition);
}
.view-btn.active { border-color: var(--accent); color: var(--accent); }

/* Progress */
.progress-bar-wrap { margin-bottom: 20px; }
.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 6px;
}
.progress-track {
    height: 6px;
    background: var(--bg2);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00E5B0);
    border-radius: 6px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* Quick Add */
.quick-add-section { margin-bottom: 24px; }
.quick-add-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.quick-add-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.plus-icon {
    color: var(--accent);
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
}
.quick-add-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    outline: none;
}
.quick-add-box input::placeholder { color: var(--text2); }
.btn-detailed {
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition);
    flex-shrink: 0;
}
.btn-detailed:hover { border-color: var(--accent); color: var(--accent); }

/* Task List */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-list.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.task-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
    cursor: pointer;
    animation: slideIn 0.3s cubic-bezier(0.4,0,0.2,1) both;
    position: relative;
    overflow: hidden;
}
.task-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--priority-color, var(--border));
    transition: width var(--transition);
}
.task-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.task-card:hover::before { width: 6px; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.task-card.exiting {
    animation: slideOut 0.25s ease forwards;
}
@keyframes slideOut {
    to { opacity: 0; transform: translateY(-10px) scale(0.97); }
}
.task-card.completing {
    animation: completePop 0.4s ease;
}
@keyframes completePop {
    0%  { transform: scale(1); }
    40% { transform: scale(1.03); }
    100%{ transform: scale(1); }
}

.task-card.done { opacity: 0.55; }
.task-card.done .task-title { text-decoration: line-through; }

.task-card.p-high  { --priority-color: var(--red); }
.task-card.p-medium{ --priority-color: var(--amber); }
.task-card.p-low   { --priority-color: var(--accent); }

.task-check {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
    cursor: pointer;
}
.task-check:hover { border-color: var(--accent); }
.task-check.checked { background: var(--accent); border-color: var(--accent); }
.task-check.checked::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.task-desc { font-size: 12.5px; color: var(--text2); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.meta-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    background: var(--bg2);
    color: var(--text2);
    border: 1px solid var(--border);
}
.meta-due {
    font-size: 11px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 3px;
}
.meta-due.overdue { color: var(--red); font-weight: 600; }
.meta-due.soon { color: var(--amber); font-weight: 600; }

.subtask-bar { margin-top: 8px; }
.subtask-progress { font-size: 11px; color: var(--text2); margin-bottom: 4px; }
.subtask-track { height: 3px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.subtask-fill { height: 100%; background: var(--accent); transition: width 0.4s ease; }

.priority-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.priority-badge.high { background: rgba(239,68,68,0.12); color: var(--red); }
.priority-badge.medium { background: rgba(245,158,11,0.12); color: var(--amber); }
.priority-badge.low { background: rgba(0,200,150,0.12); color: var(--accent); }

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
    flex-shrink: 0;
}
.task-card:hover .task-actions { opacity: 1; }
.task-action-btn {
    width: 26px; height: 26px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.task-action-btn:hover { background: var(--bg2); }
.task-action-btn.del:hover { background: rgba(239,68,68,0.12); color: var(--red); }

/* Grid card adjustments */
.grid-view .task-card { flex-direction: column; }
.grid-view .task-actions { flex-direction: row; opacity: 1; margin-top: 8px; }
.grid-view .task-check { margin-top: 0; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text2);
}
.empty-icon { font-size: 52px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Fraunces', serif; font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 380px; }
@keyframes modalIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: 'Fraunces', serif; font-size: 20px; }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 20px;
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
    line-height: 1;
    padding-bottom: 2px;
}
.modal-close:hover { background: var(--bg2); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--text2); }

/* Subtasks */
.subtask-section { margin-top: 4px; }
.subtask-section label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }
#subtaskList { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    animation: slideIn 0.2s ease;
}
.subtask-item input[type=checkbox] { accent-color: var(--accent); cursor: pointer; }
.subtask-item span { flex: 1; }
.subtask-item button { color: var(--red); opacity: 0.6; font-size: 16px; }
.subtask-item button:hover { opacity: 1; }
.subtask-add { display: flex; gap: 8px; }
.subtask-add input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    outline: none;
}
.subtask-add input:focus { border-color: var(--accent); }
.subtask-add button {
    padding: 8px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
}

/* Color picker */
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid transparent;
}
.color-dot:hover { transform: scale(1.2); }
.color-dot.selected { transform: scale(1.2); box-shadow: 0 0 0 3px var(--card), 0 0 0 5px currentColor; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 500;
}
.toast {
    background: var(--sidebar);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
    border-left: 3px solid var(--accent);
    max-width: 280px;
}
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--amber); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(20px); }
}

/* Hidden */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .auth-screen { flex-direction: column; }
    .auth-left { display: none; }
    .auth-right { width: 100%; padding: 40px 24px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 20px 16px; }
    .hamburger { display: flex !important; }
    .form-row { grid-template-columns: 1fr; }
    .main-header { flex-wrap: wrap; gap: 10px; }
    .header-right select { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    margin-left: auto; /* Pushes the X to the far right */
    padding: 0 4px;
}

.toast-close:hover {
    opacity: 1;
}

.close-sidebar {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5); /* Faded white so it matches the sidebar text */
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-sidebar:hover {
    color: var(--accent); /* Turns green when hovered */
}