/* ============================================
   mytodolist - Todoist-Inspired CSS
   ============================================ */

:root {
    --red:        #DB4035;
    --red-hover:  #C73A30;
    --red-light:  #fdecea;
    --sidebar-bg: #1F2022;
    --sidebar-text: #d0d0d0;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(255,255,255,0.12);
    --sidebar-border: rgba(255,255,255,0.06);
    --bg:         #FAFAFA;
    --surface:    #FFFFFF;
    --border:     #E5E5E5;
    --text-main:  #202020;
    --text-muted: #767676;
    --text-light: #999999;
    --priority-1: #DB4035;
    --priority-2: #FF9A14;
    --priority-3: #4073FF;
    --priority-4: #808080;
    --success:    #299438;
    --warning:    #FF9A14;
    --danger:     #DB4035;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.15);
    --radius:     8px;
    --radius-lg:  12px;
    --sidebar-w:  260px;
    --topbar-h:   52px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg:        #1A1A1A;
    --surface:   #242424;
    --border:    #333333;
    --text-main: #EBEBEB;
    --text-muted:#A0A0A0;
    --text-light:#8A8A8A;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --red-light: rgba(219, 64, 53, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    background: var(--bg);
    overflow-x: hidden;
}

/* ============ APP LAYOUT ============ */
.app-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width var(--transition), min-width var(--transition);
    position: relative;
    z-index: 100;
}

.sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar.collapsed .brand-name,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .sidebar-quick-add span,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-section-header span,
.sidebar.collapsed .user-info {
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    gap: 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.2px;
    overflow: hidden;
    white-space: nowrap;
}

.brand-icon {
    width: 30px;
    height: 30px;
    background: var(--red);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: #fff;
}

.sidebar-toggle-btn {
    color: var(--sidebar-text);
    border: none;
    background: none;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background var(--transition);
}

.sidebar-toggle-btn:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

/* Search Box */
.sidebar-search {
    padding: 6px 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.07);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--sidebar-text);
    font-size: 13px;
    transition: background var(--transition);
    user-select: none;
}

.search-box:hover { background: rgba(255,255,255,0.12); }
.search-box kbd {
    margin-left: auto;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: var(--sidebar-text);
}

/* Quick Add */
.sidebar-quick-add {
    padding: 4px 10px 8px;
}

.btn-quick-add {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    color: var(--red);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-quick-add:hover { background: rgba(219,64,53,0.12); }
.btn-quick-add i { font-size: 18px; }

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 10px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-list {
    list-style: none;
    padding: 0 8px;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 500;
}

.nav-item i {
    font-size: 16px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.nav-item .project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: rgba(219,64,53,0.8);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.nav-badge.faded {
    background: rgba(255,255,255,0.15);
    color: var(--sidebar-text);
}

/* Sections */
.nav-section {
    margin-top: 6px;
    padding: 0 8px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    color: var(--sidebar-text);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition);
    user-select: none;
}

.nav-section-header:hover { background: var(--sidebar-hover); }

.nav-section-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--sidebar-text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition);
}

.btn-icon:hover { background: var(--sidebar-hover); color: #fff; }

.projects-list { padding-top: 4px; }

.project-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 10px;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition);
    color: var(--sidebar-text);
}

.user-btn:hover { background: var(--sidebar-hover); }
.user-btn::after { display: none; }

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

.user-info {
    overflow: hidden;
    flex: 1;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    display: block;
    font-size: 11px;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

.topbar-menu-btn {
    display: none;
    border: none;
    background: none;
    color: var(--text-main);
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 6px;
}

.topbar-menu-btn:hover { background: var(--border); }

.btn-icon-round {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    font-size: 17px;
    transition: background var(--transition), color var(--transition);
}

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

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

/* ============ BUTTONS ============ */
.btn-primary-red {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
}

.btn-primary-red:hover { background: var(--red-hover); color: #fff; }
.btn-primary-red:active { transform: scale(0.98); }

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13.5px;
}

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

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============ TASK ITEMS ============ */
.task-list-section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.section-label.overdue { color: var(--danger); }
.section-label.today   { color: var(--text-main); }

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

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    transition: background var(--transition);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    animation: slideIn 0.2s ease;
    position: relative;
}

.task-item:last-child { border-bottom: none; }

.task-item:hover { background: var(--surface); }
.task-item:hover .task-actions { opacity: 1; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.task-check-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: border-color var(--transition), background var(--transition);
    position: relative;
}

.task-check-btn:hover {
    border-color: var(--red);
    background: var(--red-light);
}

.task-check-btn.priority-1 { border-color: var(--priority-1); }
.task-check-btn.priority-2 { border-color: var(--priority-2); }
.task-check-btn.priority-3 { border-color: var(--priority-3); }
.task-check-btn.priority-4 { border-color: #ccc; }

.task-check-btn.checked {
    background: var(--success);
    border-color: var(--success);
    animation: checkPop 0.3s ease;
}

.task-check-btn.checked::after {
    content: '';
    width: 10px;
    height: 6px;
    border: 2px solid #fff;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg) translate(1px, -1px);
    display: block;
}

@keyframes checkPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

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

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

.task-item.completed {
    opacity: 0.5;
}
.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-light);
}

/* Override Bootstrap text-muted */
.text-muted {
    color: var(--text-muted) !important;
}

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

.task-project {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
}

.task-due.today  { color: var(--success); font-weight: 500; }
.task-due.overdue{ color: var(--danger);  font-weight: 500; }
.task-due.tomorrow { color: var(--warning); }

.task-label-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--border);
    color: var(--text-muted);
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
    flex-shrink: 0;
    margin-top: -2px;
}

.task-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition), color var(--transition);
}

.task-action-btn:hover { background: var(--border); color: var(--text-main); }
.task-action-btn.delete:hover { background: #fdecea; color: var(--danger); }

/* Priority flag on task item */
.priority-flag {
    font-size: 12px;
    margin-left: 4px;
}

.priority-flag.p1 { color: var(--priority-1); }
.priority-flag.p2 { color: var(--priority-2); }
.priority-flag.p3 { color: var(--priority-3); }
.priority-flag.p4 { display: none; }

/* ============ EMPTY STATES & HELPERS ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 15px; opacity: 0.8; }
.empty-state h4 { color: var(--text-main); font-weight: 600; margin-bottom: 8px; font-size: 16px; }
.empty-state p { font-size: 13px; margin-bottom: 20px; max-width: 300px; margin-left: auto; margin-right: auto; }

/* Infinite Scroll */
.infinite-scroll-trigger {
    transition: opacity 0.2s;
    opacity: 0;
}
.infinite-scroll-trigger.loading {
    opacity: 1;
}

/* Voice Recording Pulse */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
.pulse-animation {
    animation: pulse 1.5s infinite ease-in-out;
}

/* ============ STATS CARDS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card.red   .stat-number { color: var(--danger); }
.stat-card.green .stat-number { color: var(--success); }
.stat-card.orange .stat-number { color: var(--warning); }

/* ============ QUICK ADD BAR ============ */
.quick-add-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13.5px;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    margin-bottom: 16px;
}

.quick-add-bar:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-light);
}

.quick-add-bar i { font-size: 16px; }

/* ============ TASK MODAL ============ */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

.task-modal {
    border: 1px solid var(--border);
    background: var(--surface);
}

.task-modal-body { padding: 20px 20px 14px; }

.task-title-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    background: transparent;
    font-family: inherit;
    margin-bottom: 8px;
}

.task-title-input::placeholder { color: var(--text-light); }

.task-desc-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-muted);
    background: transparent;
    font-family: inherit;
    resize: none;
}

/* Base form inputs theming */
.form-control, .form-select, select {
    background-color: var(--surface);
    color: var(--text-main);
    border-color: var(--border);
}

.form-control:focus, .form-select:focus, select:focus {
    background-color: var(--surface);
    color: var(--text-main);
    border-color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.05);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.dropdown-menu {
    background-color: var(--surface);
    border-color: var(--border);
}
.dropdown-item {
    color: var(--text-main);
}
.dropdown-item:hover {
    background-color: var(--bg);
    color: var(--text-main);
}

/* Mobile Sidebar & Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s ease;
        width: 280px;
        min-width: 280px;
    }
    
    .sidebar.show-mobile {
        left: 0;
    }

    .topbar-menu-btn {
        display: block;
    }

    .sidebar-toggle-btn {
        display: none; /* Hide collapse btn on mobile */
    }

    .page-content {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.task-desc-input::placeholder { color: var(--text-light); }

.task-modal-options {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Bootstrap Card Theming */
.card {
    background-color: var(--surface) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.card-header, .card-footer {
    background-color: transparent !important;
    border-color: var(--border) !important;
}

.task-option-group { display: flex; gap: 8px; flex-wrap: wrap; }

.task-option-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition), color var(--transition);
}

.task-option-btn:hover { border-color: var(--red); color: var(--red); }
.task-option-btn::after { display: none; } /* Remove dropdown arrow */

.task-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Date picker in modal */
.task-date-picker { min-width: 240px; }
.quick-dates { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============ COLOR PICKER ============ */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.color-swatch:hover { transform: scale(1.2); }
.color-swatch input:checked + span,
.color-swatch:has(input:checked) {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor;
}

/* ============ PROJECT COLOR DOT ============ */
.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ============ SEARCH MODAL ============ */
.modal-dialog-top {
    margin-top: 80px;
}

.search-modal {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.search-result-item:hover { background: var(--bg); }

/* ============ FLASH TOAST ============ */
.alert-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3s forwards;
}

.alert-toast.success { background: #e8f5e9; color: var(--success); border: 1px solid #c8e6c9; }
.alert-toast.error   { background: var(--red-light); color: var(--danger); border: 1px solid #ffcdd2; }

@keyframes toastIn  { from { opacity:0; top:0; } to { opacity:1; top:20px; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; visibility:hidden; } }

/* ============ PROJECT SHOW ============ */
.project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.project-color-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============ AUTH PAGES ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1F2022 0%, #2d2f31 50%, #1a1c1e 100%);
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.auth-brand-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-main);
}

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

.auth-form .form-control {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    transition: border-color var(--transition);
}

.auth-form .form-control:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(219,64,53,0.12);
}

.auth-form label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 5px;
}

.auth-submit {
    width: 100%;
    padding: 11px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.auth-submit:hover { background: var(--red-hover); }

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

.auth-footer a { color: var(--red); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }



/* ============ PROGRESS BAR ============ */
.progress-bar-thin {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--red);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============ TOGGLE ICON ============ */
.toggle-icon {
    transition: transform 0.2s;
    font-size: 12px;
}

.collapsed .toggle-icon { transform: rotate(-90deg); }

/* ============ DARK MODE ADAPTATIONS ============ */
[data-theme="dark"] .auth-card { background: var(--surface); }
[data-theme="dark"] .task-item:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .modal-content { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .task-title-input,
[data-theme="dark"] .task-desc-input,
[data-theme="dark"] .search-modal-input { color: var(--text-main); }
[data-theme="dark"] .stat-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .topbar { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .dropdown-menu { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .dropdown-item { color: var(--text-main); }
[data-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,0.06); }
. n l p - s u g g e s t i o n   {   p o s i t i o n :   a b s o l u t e ;   b o t t o m :   - 2 0 p x ;   l e f t :   0 ;   b a c k g r o u n d :   v a r ( - - b l u e - l i g h t ) ;   c o l o r :   v a r ( - - p r i m a r y ) ;   p a d d i n g :   2 p x   8 p x ;   b o r d e r - r a d i u s :   4 p x ;   f o n t - s i z e :   1 1 p x ;   z - i n d e x :   1 0 ;   p o i n t e r - e v e n t s :   n o n e ;   }  

/* ============ MOBILE BOTTOM MENU ============ */
.bottom-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    z-index: 997;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font-size: 11px;
    font-weight: 500;
    transition: color var(--transition);
}

.bottom-menu-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-menu-item:hover, .bottom-menu-item.active {
    color: var(--red);
}

.bottom-menu-btn {
    width: 46px;
    height: 46px;
    background-color: var(--red);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-top: -16px;
    box-shadow: 0 4px 10px rgba(219, 64, 53, 0.3);
    transition: background var(--transition), transform 0.1s;
}

.bottom-menu-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .bottom-menu {
        display: flex;
    }
    
    .app-wrapper {
        padding-bottom: 60px;
    }
}
/* Custom Red Outline Toggle */
.btn-outline-primary-red {
    color: var(--red);
    border-color: var(--red);
    background: transparent;
}
.btn-outline-primary-red:hover {
    color: #fff;
    background-color: var(--red);
    border-color: var(--red);
}
.btn-check:checked + .btn-outline-primary-red,
.btn-check:active + .btn-outline-primary-red,
.btn-outline-primary-red:active,
.btn-outline-primary-red.active {
    color: #fff;
    background-color: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--red) 25%, transparent);
}
