/* ============================================================
   B.Tech Life Tracker — Complete Stylesheet
   Premium Glassmorphism Design with Dark/Light Mode
   ============================================================ */

/* ─── CSS Custom Properties (Design Tokens) ─────────────────── */
:root {
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 64px;
    
    /* Accent Colors */
    --accent-primary: #6c63ff;
    --accent-secondary: #00d4ff;
    --accent-success: #6bcb77;
    --accent-warning: #ffd93d;
    --accent-danger: #ff6b6b;
    --accent-pink: #ff8fab;
    --accent-purple: #a78bfa;
    
    /* Heatmap Colors */
    --heatmap-0: #1e1e3f;
    --heatmap-1: #2d4a3e;
    --heatmap-2: #3a7a4f;
    --heatmap-3: #4caf50;
    --heatmap-4: #6bcb77;
}

/* ─── Dark Theme ─────────────────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #070708;
    --bg-tertiary: #0e0e11;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(15, 15, 15, 0.6);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-focus: var(--accent-primary);
    --text-primary: #ffffff;
    --text-secondary: #a3a3bc;
    --text-muted: #5e5e7a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.95);
    --shadow-glow: 0 0 25px rgba(108, 99, 255, 0.25);
    --glass-blur: blur(24px);
    --glass-bg: rgba(7, 7, 8, 0.75);
    --sidebar-bg: rgba(3, 3, 4, 0.97);
    --scrollbar-thumb: rgba(255, 255, 255, 0.12);
    --heatmap-0: #0a0a0f;
    --heatmap-1: #1a233a;
    --heatmap-2: #224a3c;
    --heatmap-3: #388e3c;
    --heatmap-4: #4caf50;
}

/* ─── Light Theme ────────────────────────────────────────────── */
[data-theme="light"] {
    --bg-primary: #f0f2f9;
    --bg-secondary: #e8ebf5;
    --bg-tertiary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-input: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-focus: var(--accent-primary);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15);
    --glass-blur: blur(20px);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --scrollbar-thumb: rgba(0, 0, 0, 0.15);
    --heatmap-0: #ebedf0;
    --heatmap-1: #9be9a8;
    --heatmap-2: #40c463;
    --heatmap-3: #30a14e;
    --heatmap-4: #216e39;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--transition-base), color var(--transition-base);
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(255, 107, 107, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }

/* ─── Glass Card Component ───────────────────────────────────── */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: var(--shadow-glow);
}

/* ─── Sidebar Navigation ────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition-base);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--space-xs);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.user-avatar i {
    font-size: 2.5rem;
    color: var(--accent-primary);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    padding: var(--space-md) var(--space-sm);
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(0, 212, 255, 0.1));
    color: var(--accent-primary);
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    margin-bottom: var(--space-sm);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
}

.logout-link {
    color: var(--accent-danger) !important;
}

.logout-link:hover {
    background: rgba(255, 107, 107, 0.1) !important;
}

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    transition: margin-left var(--transition-base);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    height: var(--topbar-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: var(--space-sm);
}

.topbar-title h1 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-actions {
    display: flex;
    gap: var(--space-sm);
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.topbar-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.4);
}

.page-content {
    padding: var(--space-xl);
    max-width: 1400px;
}

/* ─── Flash Messages ─────────────────────────────────────────── */
.flash-container {
    padding: var(--space-md) var(--space-xl);
}

.flash-message {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

.flash-success {
    background: rgba(107, 203, 119, 0.15);
    border: 1px solid rgba(107, 203, 119, 0.3);
    color: var(--accent-success);
}

.flash-error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--accent-danger);
}

.flash-info {
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: var(--accent-primary);
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #5a52e0);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.btn-ghost {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), #e55050);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* ─── Form Elements ──────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-md);
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

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

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ba4b5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-range {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    margin-top: var(--space-sm);
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(108, 99, 255, 0.4);
}

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-lg {
    max-width: 680px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-md);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-danger);
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-md);
}

/* ─── Auth Pages ─────────────────────────────────────────────── */
.auth-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: var(--space-2xl);
    animation: slideUp 0.5s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-logo i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    display: inline-block;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-link {
    color: var(--accent-primary);
    font-weight: 600;
}

.auth-flash {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 500px;
}

/* Floating Decorations */
.auth-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.15), transparent);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent);
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.08), transparent);
    top: 50%;
    left: 30%;
    animation-delay: 4s;
}

/* ─── Dashboard ──────────────────────────────────────────────── */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.quote-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(0, 212, 255, 0.1));
    border: 1px solid rgba(108, 99, 255, 0.2);
    padding: var(--space-lg) var(--space-xl);
}

.quote-icon {
    color: var(--accent-primary);
    font-size: 1.5rem;
    opacity: 0.5;
}

.quote-text {
    flex: 1;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
}

.quote-author {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    white-space: nowrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent, var(--accent-primary));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(108, 99, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent, var(--accent-primary));
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-progress {
    margin-top: auto;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.chart-card {
    min-height: 280px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
}

.card-title i {
    color: var(--accent-primary);
}

.chart-container {
    position: relative;
    width: 100%;
    height: 220px;
}

/* Progress Grid */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.progress-card {
    min-height: 200px;
}

.semester-overview {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--space-md);
}

.semester-stat {
    text-align: center;
}

.semester-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.semester-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 2px;
}

.cgpa-value {
    color: var(--accent-success) !important;
}

.semester-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sem-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sem-bar-label {
    width: 36px;
    text-align: right;
    font-weight: 600;
}

.sem-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.sem-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.sem-bar-fill.completed { background: var(--accent-success); }
.sem-bar-fill.ongoing { background: var(--accent-primary); }
.sem-bar-fill.upcoming { background: var(--border-color); }

/* Skills Overview */
.skills-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.skill-mini {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
}

.skill-mini-name {
    width: 100px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-mini-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.skill-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 1s ease;
}

.skill-mini-pct {
    width: 35px;
    text-align: right;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Goals Overview */
.goal-stats-row {
    display: flex;
    justify-content: space-around;
    padding-top: var(--space-md);
}

.goal-stat {
    text-align: center;
}

.goal-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.goal-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-md);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-align: center;
    font-size: 0.8rem;
}

.action-btn:hover {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-primary);
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-btn i {
    font-size: 1.5rem;
}

/* ─── Tasks Page ─────────────────────────────────────────────── */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
}

.toolbar-left, .toolbar-center, .toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box .form-input {
    padding-left: 36px;
    width: 250px;
}

.filter-group {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 3px;
    border: 1px solid var(--border-color);
}

.filter-btn {
    padding: 6px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* Task Stats Row */
.task-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.mini-stat {
    text-align: center;
    padding: var(--space-md);
}

.mini-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.mini-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Task Items */
.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease;
}

.task-item:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateX(4px);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

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

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

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.task-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.task-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high { background: rgba(255, 107, 107, 0.15); color: var(--accent-danger); }
.priority-medium { background: rgba(255, 217, 61, 0.15); color: var(--accent-warning); }
.priority-low { background: rgba(107, 203, 119, 0.15); color: var(--accent-success); }

.task-actions {
    display: flex;
    gap: var(--space-xs);
}

/* ─── Semesters Page ─────────────────────────────────────────── */
.semesters-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.cgpa-card {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(0, 212, 255, 0.08));
}

.cgpa-display {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.cgpa-circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.cgpa-circle svg {
    transform: rotate(-90deg);
}

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

.cgpa-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.5s ease;
}

.cgpa-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.cgpa-info h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.cgpa-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Semester Accordion */
.semester-accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
}

.semester-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.semester-header:hover {
    background: var(--bg-card-hover);
}

.semester-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sem-number {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.semester-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sem-status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-upcoming { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
.status-ongoing { background: rgba(108, 99, 255, 0.15); color: var(--accent-primary); }
.status-completed { background: rgba(107, 203, 119, 0.15); color: var(--accent-success); }

.semester-body {
    display: none;
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.semester-body.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.subject-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: var(--space-md);
}

.subject-table th, .subject-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.subject-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* ─── LeetCode Page ──────────────────────────────────────────── */
.leetcode-container, .gfg-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.lc-stats-grid, .gfg-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.lc-stat-card, .gfg-stat-card {
    text-align: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.lc-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.lc-stat-card.total::after { background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); }
.lc-stat-card.easy::after { background: var(--accent-success); }
.lc-stat-card.medium::after { background: var(--accent-warning); }
.lc-stat-card.hard::after { background: var(--accent-danger); }

.lc-stat-icon, .gfg-stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--accent-primary);
}

.lc-stat-card.easy .lc-stat-icon { color: var(--accent-success); }
.lc-stat-card.medium .lc-stat-icon { color: var(--accent-warning); }
.lc-stat-card.hard .lc-stat-icon { color: var(--accent-danger); }

.lc-stat-value, .gfg-stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    display: block;
    margin-bottom: var(--space-xs);
}

.lc-stat-label, .gfg-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lc-row, .gfg-row, .gfg-forms-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.lc-detail-item, .gfg-detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Calendar Heatmap */
.heatmap-container {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 2px;
    margin-bottom: var(--space-md);
}

.heatmap-day {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.heatmap-day:hover {
    transform: scale(1.5);
    z-index: 1;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    justify-content: flex-end;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Achievement Badges */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.badge-item {
    text-align: center;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    position: relative;
}

.badge-item.unlocked {
    border-color: rgba(108, 99, 255, 0.3);
    background: rgba(108, 99, 255, 0.05);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(80%);
}

.badge-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.badge-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.badge-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Log Card */
.log-card, .update-card {
    padding: var(--space-lg);
}

.log-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ─── GFG Roadmap ────────────────────────────────────────────── */
.roadmap {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.roadmap-phase {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    position: relative;
    padding-left: var(--space-xl);
}

.roadmap-phase::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 30px;
    bottom: -16px;
    width: 2px;
    background: var(--border-color);
}

.roadmap-phase:last-child::before {
    display: none;
}

.phase-number {
    position: absolute;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 1;
}

.phase-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.phase-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.phase-difficulty {
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.phase-topics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.phase-topic {
    padding: 3px 10px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--accent-primary);
}

/* ─── Skills Page ────────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.skill-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.skill-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.skill-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.skill-status-badge {
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.skill-progress-section {
    margin-bottom: var(--space-md);
}

.skill-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
    font-size: 0.8rem;
}

.skill-progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.skill-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-xs);
}

/* ─── Projects Page ──────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-md);
}

.project-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
}

.project-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.tech-tag {
    padding: 3px 10px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-links a {
    margin-right: var(--space-sm);
    font-size: 0.85rem;
}

/* ─── Placement Page ─────────────────────────────────────────── */
.placement-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.placement-cat-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--transition-fast);
}

.placement-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.placement-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    font-size: 1.2rem;
}

.placement-cat-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.placement-cat-progress {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.placement-topics {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.placement-topic-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.placement-topic-item:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateX(4px);
}

.topic-cat-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

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

.topic-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.topic-progress-bar {
    width: 120px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.topic-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.5s ease;
}

.topic-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    width: 40px;
    text-align: right;
}

/* ─── Notes Page ─────────────────────────────────────────────── */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.note-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.note-title {
    font-weight: 600;
    font-size: 1rem;
}

.note-pin {
    color: var(--accent-warning);
    font-size: 0.85rem;
}

.note-content-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.note-category-badge {
    padding: 2px 8px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-weight: 500;
}

/* Rich Text Editor */
.editor-toolbar {
    display: flex;
    gap: 2px;
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    flex-wrap: wrap;
}

.editor-toolbar button {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.editor-toolbar button:hover {
    background: var(--accent-primary);
    color: white;
}

.toolbar-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 4px;
}

.rich-editor {
    min-height: 200px;
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}

.rich-editor:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
}

.rich-editor:focus {
    border-color: var(--accent-primary);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.color-opt {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-opt:hover, .color-opt.selected {
    transform: scale(1.2);
    border-color: var(--text-primary);
    box-shadow: 0 0 8px currentColor;
}

/* ─── Goals Page ─────────────────────────────────────────────── */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.goal-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease;
}

.goal-item:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateX(4px);
}

.goal-type-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.type-daily { background: rgba(108, 99, 255, 0.15); color: var(--accent-primary); }
.type-weekly { background: rgba(0, 212, 255, 0.15); color: var(--accent-secondary); }
.type-monthly { background: rgba(255, 217, 61, 0.15); color: var(--accent-warning); }
.type-yearly { background: rgba(167, 139, 250, 0.15); color: var(--accent-purple); }

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

.goal-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.goal-progress-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.goal-progress-bar {
    flex: 1;
    max-width: 200px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.5s ease;
}

.goal-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.goal-increment-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--accent-success);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.goal-increment-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(107, 203, 119, 0.4);
}

.goal-status-badge {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.status-active { background: rgba(108, 99, 255, 0.15); color: var(--accent-primary); }
.status-completed-badge { background: rgba(107, 203, 119, 0.15); color: var(--accent-success); }
.status-expired { background: rgba(255, 107, 107, 0.15); color: var(--accent-danger); }
.status-paused { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }

/* ─── Search Results ─────────────────────────────────────────── */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: var(--space-md);
}

.search-result-item {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}

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

/* ─── Toast Notifications ────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
    font-size: 0.9rem;
}

.toast-success { border-left: 4px solid var(--accent-success); }
.toast-error { border-left: 4px solid var(--accent-danger); }
.toast-info { border-left: 4px solid var(--accent-primary); }

/* ─── Loading Spinner ────────────────────────────────────────── */
.loading-spinner {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes counterUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive Design ─────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .progress-grid { grid-template-columns: 1fr; }
    .actions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Sidebar mobile behavior */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .page-content {
        padding: var(--space-md);
    }
    
    .topbar {
        padding: var(--space-md);
    }
    
    /* Grid adjustments */
    .stats-grid,
    .task-stats-row,
    .lc-stats-grid,
    .gfg-stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .charts-grid,
    .lc-row,
    .gfg-row,
    .gfg-forms-row {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-center, .toolbar-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-box .form-input {
        width: 100%;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .placement-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .heatmap-container {
        overflow-x: auto;
    }
    
    .modal {
        max-width: 95%;
        margin: var(--space-md);
    }
    
    /* Quote banner compact */
    .quote-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .cgpa-display {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .task-stats-row,
    .lc-stats-grid,
    .gfg-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .placement-categories {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topbar-title h1 {
        font-size: 1.1rem;
    }
}

/* ─── Utility Classes ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.hidden { display: none !important; }
