:root {
    --bg: #0a0a0f;
    --surface: #111118;
    --surface2: #1a1a24;
    --surface3: #222230;
    --border: #2a2a3a;
    --text: #e8e8f0;
    --text-muted: #6b6b88;
    --text-dim: #3a3a52;
    --accent: #351cd4;
    --accent-hover: #4a30f0;
    --accent-glow: rgba(53, 28, 212, 0.15);
    --red: #fc5c5c;
    --yellow: #fcdc5c;
    --green: #5cfca4;
    --radius: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ── AUTH SCREENS ── */
#auth-view {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 420px;
    max-width: 95vw;
}

.auth-logo {
    margin-bottom: 32px;
}

.auth-logo img {
    height: 40px;
    object-fit: contain;
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.field-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
}

.field-input:focus {
    border-color: var(--accent);
}

.field-input::placeholder {
    color: var(--text-dim);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    margin-top: 4px;
}

.auth-btn:hover {
    background: var(--accent-hover);
}

.auth-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 12px;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-btn {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
}

.auth-switch a {
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    background: rgba(252, 92, 92, .1);
    border: 1px solid rgba(252, 92, 92, .3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--red);
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    background: rgba(92, 252, 164, .1);
    border: 1px solid rgba(92, 252, 164, .3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--green);
    display: none;
}

.auth-success.show {
    display: block;
}

.forgot-link {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: right;
    display: block;
    margin-top: -8px;
}

.forgot-link:hover {
    color: var(--accent);
}

/* ── APP LAYOUT ── */
#app-view {
    display: none;
    height: 100vh;
    flex-direction: row;
}

#app-view.visible {
    display: flex;
}

/* ── SIDEBAR ── */
.sidebar {
    width: 268px;
    min-width: 268px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header img {
    height: 34px;
    object-fit: contain;
    object-position: left;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0 12px;
}

.sec-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 6px 20px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px 8px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all .15s;
    border-radius: 0;
}

.nav-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item .cnt {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: var(--surface3);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
}

.nav-item.active .cnt {
    background: var(--accent);
    color: white;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 8px 16px;
}

.tg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .15s;
}

.tg-header:hover {
    background: var(--surface2);
    color: var(--text);
}

.tg-arrow {
    font-size: 9px;
    color: var(--text-dim);
    transition: transform .2s;
    flex-shrink: 0;
}

.tg-arrow.open {
    transform: rotate(90deg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tg-name {
    flex: 1;
}

.tg-cnt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: var(--surface3);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
}

.tg-child {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 34px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all .15s;
}

.tg-child:hover {
    background: var(--surface2);
    color: var(--text);
}

.tg-child.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.tg-child .cnt {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
}

.add-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 34px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-dim);
    transition: all .15s;
}

.add-sub:hover {
    color: var(--accent);
}

.add-group-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-dim);
    border: 1px dashed var(--border);
    background: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 4px 14px 2px;
    transition: all .15s;
}

.add-group-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.prog-label {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

.prog-wrap {
    background: var(--surface2);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
    margin-top: 7px;
}

.prog-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #fc5c7c);
    border-radius: 4px;
    transition: width .5s ease;
}

.footer-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    margin-top: 6px;
}

.footer-btn:hover {
    border-color: var(--accent);
    color: #a090ff;
    background: var(--accent-glow);
}

.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 4px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 13px;
    padding: 4px;
    transition: color .15s;
}

.logout-btn:hover {
    color: var(--red);
}

/* ── MAIN ── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex: 1;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: var(--text);
    width: 150px;
}

.search-box input::placeholder {
    color: var(--text-dim);
}

.btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .15s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface2);
    color: var(--text);
}

.filters {
    padding: 10px 28px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all .15s;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── TASKS ── */
.task-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
}

.tgrp {
    margin-bottom: 26px;
}

.tgrp-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tgrp-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.task-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 7px;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background .15s;
}

.task-item:hover {
    border-color: var(--surface3);
    background: var(--surface2);
}

.task-item:hover::before {
    background: var(--accent);
}

.task-item.done {
    opacity: .4;
}

.task-item.done .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-item.ph::before {
    background: var(--red) !important;
}

.task-item.pm::before {
    background: var(--yellow) !important;
}

.task-item.pl::before {
    background: var(--green) !important;
}

.task-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.checkbox {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.checkbox:hover {
    border-color: var(--accent);
}

.checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: 700;
}

.task-body {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.task-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.task-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
}

.task-date.overdue {
    color: var(--red);
}

.task-date.today {
    color: #fc5c7c;
}

.task-date.soon {
    color: var(--yellow);
}

.tbadge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid;
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
    flex-shrink: 0;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--surface3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    transition: all .15s;
}

.icon-btn:hover {
    background: var(--border);
    color: var(--text);
}

.icon-btn.del:hover {
    background: rgba(252, 92, 92, .15);
    color: var(--red);
}

/* ── SUBTASKS ── */
.subtasks-wrap {
    border-top: 1px solid var(--border);
    padding: 8px 14px 10px 42px;
}

.sub-prog-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sub-prog-bar {
    flex: 1;
    height: 3px;
    background: var(--surface3);
    border-radius: 2px;
    overflow: hidden;
}

.sub-prog-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .3s;
}

.sub-prog-txt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--text-dim);
}

.subtask-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.sub-check {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: all .15s;
}

.sub-check:hover {
    border-color: var(--accent);
}

.sub-check.checked {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.sub-title {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}

.sub-title.done {
    text-decoration: line-through;
    opacity: .5;
}

.expand-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--surface3);
    border: none;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
    transition: all .15s;
    margin-top: 0;
}

.expand-btn:hover {
    color: var(--accent);
}

/* ── REPORT ── */
.report-container {
    flex: 1;
    overflow-y: auto;
    padding: 22px 28px;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.month-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.month-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.month-label {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    min-width: 160px;
    text-align: center;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.stat-val {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 3px;
}

.week-section {
    margin-bottom: 26px;
}

.week-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.week-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.week-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.wc-val {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.wc-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wc-bar {
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
}

.tag-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 6px;
}

.tr-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    width: 18px;
}

.tr-bar-wrap {
    width: 80px;
    height: 4px;
    background: var(--surface3);
    border-radius: 2px;
    overflow: hidden;
}

.tr-bar {
    height: 100%;
    border-radius: 2px;
}

/* ── MODALS ── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 500px;
    max-width: 95vw;
    padding: 26px;
    transform: translateY(14px);
    transition: transform .2s;
    max-height: 90vh;
    overflow-y: auto;
}

.overlay.open .modal {
    transform: translateY(0);
}

.modal-sm {
    width: 400px;
}

.modal-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -.3px;
}

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

.form-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
}

.form-select option {
    background: var(--surface2);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.pri-row {
    display: flex;
    gap: 7px;
}

.pri-btn {
    flex: 1;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .15s;
}

.pri-btn.ph.sel {
    background: rgba(252, 92, 92, .1);
    border-color: var(--red);
    color: var(--red);
}

.pri-btn.pm.sel {
    background: rgba(252, 220, 92, .1);
    border-color: var(--yellow);
    color: var(--yellow);
}

.pri-btn.pl.sel {
    background: rgba(92, 252, 164, .1);
    border-color: var(--green);
    color: var(--green);
}

.pri-btn.pn.sel {
    background: var(--surface3);
    border-color: var(--border);
    color: var(--text);
}

.tag-picker {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.tp-parent {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.tp-parent:hover {
    background: var(--surface3);
}

.tp-child {
    padding: 6px 12px 6px 26px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
}

.tp-child:hover {
    background: var(--surface3);
    color: var(--text);
}

.tp-child.sel {
    color: var(--accent);
    background: var(--accent-glow);
}

.tp-check {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
}

.tp-child.sel .tp-check {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.sel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.stag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.stag .x {
    opacity: .6;
}

.stag .x:hover {
    opacity: 1;
}

.stm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.stm-row:last-child {
    border-bottom: none;
}

.stm-title {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.stm-del {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 12px;
}

.stm-del:hover {
    color: var(--red);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.color-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cpick {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
}

.cpick.sel {
    border-color: white;
    transform: scale(1.18);
}

/* ── PREFS MODAL ── */
.prefs-section {
    margin-bottom: 20px;
}

.prefs-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.days-row {
    display: flex;
    gap: 6px;
}

.day-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .15s;
}

.day-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── CONFIRM MODAL ── */
.confirm-option {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    transition: all .15s;
    margin-bottom: 8px;
}

.confirm-option:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-glow);
}

.confirm-option .opt-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.confirm-option .opt-sub {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 17px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    z-index: 200;
    transform: translateY(80px);
    opacity: 0;
    transition: all .3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ── EMPTY ── */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 260px;
    gap: 10px;
}

.empty-icon {
    font-size: 40px;
    opacity: .2;
}

.empty p {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.empty span {
    font-size: 12px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

/* ── LOADING ── */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* ── POMODORO WIDGET ── */
.pomo-widget {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.pomo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pomo-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.pomo-mode-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--accent-glow);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pomo-mode-badge.break {
    background: rgba(92, 252, 164, .1);
    color: var(--green);
}

.pomo-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

.pomo-svg {
    width: 80px;
    height: 80px;
}

.pomo-track {
    fill: none;
    stroke: var(--surface3);
    stroke-width: 5;
}

.pomo-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 5;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke .3s;
}

.pomo-fill.break {
    stroke: var(--green);
}

.pomo-time {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.pomo-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pomo-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.pomo-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pomo-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pomo-linked-task {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--text-dim);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 3px 0;
    transition: color .15s;
}

.pomo-linked-task:hover {
    color: var(--text-muted);
}

/* ── TASK TIMER BUTTON ── */
.task-timer-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface3);
    color: var(--text-dim);
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.task-timer-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.task-timer-btn.running {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ── MEETING BANNER ── */
.meeting-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(53, 28, 212, 0.07);
    border: 1px solid rgba(53, 28, 212, 0.2);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 14px;
}

.meeting-icon { font-size: 18px; }

.meeting-text { flex: 1; }

.meeting-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1px;
}

.meeting-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── TOGGLE SWITCH ── */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-thumb {
    position: absolute;
    inset: 0;
    background: var(--surface3);
    border-radius: 22px;
    cursor: pointer;
    transition: .2s;
    border: 1px solid var(--border);
}

.toggle-thumb::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: .2s;
}

.toggle-switch input:checked + .toggle-thumb {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-thumb::before {
    transform: translateX(16px);
    background: var(--accent);
}
