:root {
    --primary: #F97316;
    --primary-hover: #ea580c;
    --secondary: #14532D;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
}

.dark-mode {
    --bg-color: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-sm { font-size: 0.875rem; color: var(--text-muted); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.w-100 { width: 100%; }
.text-center { text-align: center; }

/* Premium Glassmorphism UI Style */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

/* Base Master Layout Structure */
.app-container { display: flex; min-height: 100vh; }

/* Desktop Navigation Sidebar Panel */
.sidebar {
    width: 260px; height: 100vh; position: fixed;
    display: flex; flex-direction: column; padding: 25px 20px; z-index: 100;
}
.logo { font-size: 1.35rem; font-weight: 700; margin-bottom: 45px; display: flex; align-items: center; gap: 12px; }
.nav-links { list-style: none; flex-grow: 1; }
.nav-links li {
    padding: 14px 16px; margin-bottom: 8px; border-radius: 12px;
    cursor: pointer; font-weight: 500; display: flex; align-items: center;
    gap: 14px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted);
}
.nav-links li:hover, .nav-links li.active { background: var(--primary); color: #ffffff; }
.theme-toggle { margin-top: auto; }

/* Core Application Control Workspace */
.main-content { margin-left: 260px; padding: 35px; width: calc(100% - 260px); }
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.header-left { display: flex; align-items: center; gap: 15px; }
.quote-box { font-style: italic; color: var(--text-muted); max-width: 420px; font-size: 0.9rem; }

/* Adaptive Responsive Grid Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stat-card { display: flex; align-items: center; gap: 22px; }
.stat-card i { font-size: 2.25rem; }
.stat-info h3 { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.stat-info h2 { font-size: 1.75rem; font-weight: 700; }

/* Linear Dashboard Progress Status Bar */
.progress-bar-bg {
    width: 100%; height: 12px; background: rgba(148, 163, 184, 0.15);
    border-radius: 20px; margin-top: 12px; overflow: hidden;
}
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #fb923c); border-radius: 20px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

/* Control Flow Section Animations */
.view-section { display: none; animation: slideInFrame 0.35s ease-out; }
.view-section.active { display: block; }
@keyframes slideInFrame { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Global Custom Buttons styling */
.btn {
    padding: 12px 24px; border-radius: 10px; border: none;
    font-weight: 600; cursor: pointer; transition: all 0.2s ease;
    display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem;
}
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: #ffffff; }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-main); }
.btn-outline:hover { background: rgba(148, 163, 184, 0.1); }
.btn-icon { background: none; border: none; font-size: 1.35rem; cursor: pointer; color: var(--text-main); transition: color 0.2s; }

/* Modular Task List Items styling */
.task-controls { display: flex; gap: 15px; align-items: center; justify-content: space-between; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--glass-bg); padding: 4px 15px; border-radius: 10px; border: 1px solid var(--glass-border); max-width: 300px; width: 100%; }
.search-box input { border: none; padding: 8px 0; background: transparent; }
.task-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; margin-bottom: 12px; border-radius: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow); transition: transform 0.2s;
}
.task-item:hover { transform: translateX(2px); }
.task-item.completed h4 { text-decoration: line-through; color: var(--text-muted); opacity: 0.65; }
.priority-high { color: #ef4444; font-weight: 600; }
.priority-med { color: #f59e0b; font-weight: 600; }
.priority-low { color: #10b981; font-weight: 600; }

/* Custom Modal Pop-up forms Overlay Setup */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(6px);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.modal-content { width: 92%; max-width: 440px; background: var(--bg-color); padding: 30px; }
.form-control {
    width: 100%; padding: 12px; margin-top: 6px;
    border-radius: 8px; border: 1px solid var(--glass-border);
    background: transparent; color: var(--text-main); outline: none; font-size: 0.95rem;
}
.form-control:focus { border-color: var(--primary); }
.form-control option { background: var(--bg-color); color: var(--text-main); }

textarea, input {
    width: 100%; padding: 14px; border-radius: 8px;
    border: 1px solid var(--glass-border); background: transparent;
    color: var(--text-main); outline: none; font-size: 0.95rem;
}
textarea:focus, input:focus { border-color: var(--primary); }

/* Pomodoro Engine Dashboard View */
.timer-container { max-width: 480px; margin: 40px auto; padding: 45px 30px; }
.timer-display { font-size: 6.5rem; font-weight: 700; color: var(--primary); margin: 25px 0; letter-spacing: -2px; }
.timer-controls { display: flex; justify-content: center; gap: 15px; }

/* AI Assistant Insights Box */
.ai-response h4 { margin-top: 15px; color: var(--primary); font-size: 1.1rem; }
.ai-response p { margin-top: 5px; font-size: 0.95rem; }
.ai-response ul { margin-left: 20px; margin-top: 12px; line-height: 1.7; font-size: 0.95rem; text-align: left; }
.ai-response li { margin-bottom: 8px; }

/* Mobile Utilities & Breakpoints Override (Hamburger Drawer Engine) */
.mobile-only { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: block; }
    
    /* Sliding Navigation Drawer Mechanics */
    .sidebar { 
        transform: translateX(-100%); 
        width: 260px; 
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        background: var(--bg-color);
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar span, .logo span { display: inline; } 
    
    .main-content { margin-left: 0; width: 100%; padding: 20px; }
    .top-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .task-controls { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
    
    /* Active Dark Mask overlay under open drawer panel */
    .sidebar-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(15, 23, 42, 0.4); z-index: 99; backdrop-filter: blur(4px);
    }
    .sidebar-overlay.active { display: block; }
}
