:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-base: #0f172a;
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-surface-hover: rgba(51, 65, 85, 0.8);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --border-color: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
    
    font-family: 'Outfit', sans-serif;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-hover: rgba(248, 250, 252, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    color-scheme: light;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
}

.app-container {
    display: flex;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 320px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    z-index: 10;
    transition: transform 0.3s ease;
}

.sidebar-header {
    margin-bottom: 2.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon.text-accent {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.5px;
}
.logo-text strong {
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Circular Progress */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.03);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-chart.accent .circle {
    stroke: url(#progress-gradient);
}
.circular-chart.accent .circle {
    stroke: var(--accent-primary);
}

.percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-label {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nav Menu */
.nav-menu {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.nav-menu::-webkit-scrollbar { width: 4px; }
.nav-menu::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}
.nav-item.active {
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 12px 12px 0;
}

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-badge {
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-weight: 700;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.btn-icon:hover { color: var(--text-primary); }

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

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
}
.text-danger { color: var(--danger); transition: opacity 0.2s; }
.text-danger:hover { opacity: 0.8; }

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem 4rem;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.header-titles h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.header-titles p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Sections */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 4rem;
}

.section-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow);
}

.section-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .section-header { background: rgba(241, 245, 249, 0.5); }

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.section-progress {
    font-weight: 600;
    color: var(--accent-primary);
}
.chevron-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}
.section-card.expanded .chevron-icon {
    transform: rotate(180deg);
}

.section-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}
.section-card.expanded .section-content {
    max-height: 2000px;
    transition: max-height 0.6s ease-in-out;
}

.task-list {
    list-style: none;
    padding: 1rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    cursor: pointer;
}
.task-item:hover {
    background: var(--bg-surface-hover);
}

/* Custom Checkbox */
.checkbox-wrapper {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.task-item input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background-color: var(--bg-base);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-item:hover .checkmark {
    border-color: var(--accent-primary);
}

.task-item input:checked ~ .checkmark {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.checkmark i {
    color: white;
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.task-item input:checked ~ .checkmark i {
    opacity: 1;
    transform: scale(1);
}

.task-desc {
    flex: 1;
}

.task-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

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

.task-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.task-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
}
.task-tag.high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.task-tag.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.section-card {
    animation: fadeIn 0.5s ease backwards;
}
.section-card:nth-child(1) { animation-delay: 0.1s; }
.section-card:nth-child(2) { animation-delay: 0.2s; }
.section-card:nth-child(3) { animation-delay: 0.3s; }
.section-card:nth-child(4) { animation-delay: 0.4s; }
.section-card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive */
@media (max-width: 1024px) {
    .app-container { flex-direction: column; height: auto; }
    .sidebar { width: 100%; height: auto; position: static; padding: 1.5rem; border-right: none; border-bottom: 1px solid var(--border-color); }
    .sidebar-header { flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
    .logo-container { margin-bottom: 0; }
    .progress-container { flex-direction: row; gap: 1rem; padding: 0.75rem 1.5rem; }
    .progress-circle { width: 60px; height: 60px; }
    .percentage { font-size: 1rem; }
    .progress-label { margin-top: 0; font-size: 0.75rem; }
    .nav-menu { display: none; }
    .main-content { padding: 1.5rem; }
    .top-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
