:root {
    /* Base Variables (Light Theme) */
    --bg-main: #f4f5f7;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f9fafb;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: rgba(226, 232, 240, 0.5);
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    
    --secondary: #f1f5f9;
    --secondary-hover: #e2e8f0;
    
    --accent: #8b5cf6;
    --accent-light: #ede9fe;
    
    --success: #10b981;
    --success-bg: #d1fae5;
    
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --sidebar-width: 260px;
    --topbar-height: 80px;
}

[data-theme="dark"] {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-hover: #1f2937;
    --bg-surface-glass: rgba(17, 24, 39, 0.85);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-color: #1f2937;
    --border-light: rgba(31, 41, 55, 0.5);
    
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --secondary: #1f2937;
    --secondary-hover: #374151;
    
    --accent: #a78bfa;
    --accent-light: rgba(167, 139, 250, 0.15);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.15);
    
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.15);
    
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.15);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* Prevent body scroll, manage scroll in main content */
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: 15px;
}

/* Layout */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform var(--transition);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

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

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

.user-status {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-light);
    z-index: 30;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.greeting-area h1 {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.greeting-area p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.global-search {
    position: relative;
    display: none; /* Hide on very small screens */
}

@media(min-width: 768px) {
    .global-search {
        display: block;
    }
}

.global-search input {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 10px 16px 10px 40px;
    border-radius: var(--radius-full);
    color: var(--text-main);
    width: 250px;
    transition: var(--transition);
}

.global-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    width: 300px;
}

.global-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
    pointer-events: none;
}

/* Views Container */
.views-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    position: relative;
}

.view {
    display: none;
    animation: fadeIn var(--transition-fast) forwards;
}

.view.active {
    display: block;
}

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

/* UI Components */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-danger {
    background-color: var(--danger-bg);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: white;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: var(--transition-fast);
    background-color: transparent;
}

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

.text-btn {
    color: var(--primary);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.text-btn:hover {
    background-color: var(--primary-light);
}

.input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-select {
    padding: 10px 36px 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    color: var(--text-main);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='%2364748b'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

.input-select:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.w-full { width: 100%; }
.border-t { border-top: 1px solid var(--border-light); }
.pt-4 { padding-top: 16px; }
.hidden { display: none !important; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media(min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    grid-column: 1 / -1;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.task-icon { background-color: var(--primary-light); color: var(--primary); }
.assignment-icon { background-color: var(--warning-bg); color: var(--warning); }
.focus-icon { background-color: var(--accent-light); color: var(--accent); }
.habit-icon { background-color: var(--success-bg); color: var(--success); }

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
}

.main-panels {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-panels {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.panel-header h2 {
    font-size: 1.25rem;
}

/* Dashboard Task List */
.dash-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.dash-task-item:hover {
    border-color: var(--border-color);
    transform: translateX(4px);
}

.dash-task-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.dash-task-info {
    flex: 1;
}

.dash-task-title {
    font-weight: 500;
}

.dash-task-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-high { background-color: var(--danger-bg); color: var(--danger); }
.badge-medium { background-color: var(--warning-bg); color: var(--warning); }
.badge-low { background-color: var(--success-bg); color: var(--success); }

/* Mini Pomodoro */
.mini-timer-display {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    margin: 20px 0;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-light);
}

.mini-timer-controls {
    display: flex;
    gap: 12px;
}

.mini-timer-controls .btn-primary {
    flex: 1;
}

/* General View Headers */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.view-header h2 {
    font-size: 1.8rem;
}

.view-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Tasks View */
.tasks-container {
    max-width: 900px;
    margin: 0 auto;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.task-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.task-item.completed {
    opacity: 0.6;
    background-color: var(--bg-main);
}

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

.task-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    color: transparent;
}

.task-item:not(.completed) .custom-checkbox:hover {
    border-color: var(--primary);
}

.task-item.completed .custom-checkbox {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.task-details {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-details .material-symbols-rounded {
    font-size: 14px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

/* Assignments View */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.assignment-card {
    display: flex;
    flex-direction: column;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.assignment-course {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

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

.assignment-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.assignment-meta div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-main);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

.assignment-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Planner */
.planner-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media(max-width: 1024px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
}

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

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

.day-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-header {
    text-align: center;
    padding: 8px;
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
}

.day-header.today {
    background-color: var(--primary);
    color: white;
}

.session-slot {
    background-color: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.session-slot:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.session-list-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pomodoro View */
.pomodoro-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.timer-modes {
    display: flex;
    gap: 8px;
    background-color: var(--bg-main);
    padding: 6px;
    border-radius: var(--radius-full);
    margin-bottom: 40px;
}

.mode-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.mode-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.timer-display-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    stroke: var(--border-color);
}

.progress-ring-circle {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.time-display {
    font-size: 4.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    line-height: 1;
}

.timer-status {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timer-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.timer-controls .btn-primary {
    width: 160px;
    font-size: 1.25rem;
}

.session-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    background-color: var(--bg-main);
    padding: 8px 16px;
    border-radius: var(--radius-full);
}

/* Habits View */
.habits-wrapper {
    overflow-x: auto;
}

.habit-grid-header {
    display: grid;
    grid-template-columns: 250px repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.habit-day-lbl {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.habit-row {
    display: grid;
    grid-template-columns: 250px repeat(7, 1fr);
    gap: 8px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
}

.habit-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.habit-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.habit-name {
    font-weight: 500;
}

.habit-check-cell {
    display: flex;
    justify-content: center;
}

.habit-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition-bounce);
}

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

.habit-btn.completed {
    background-color: var(--success);
    color: white;
    transform: scale(1.05);
}

/* GPA View */
.gpa-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media(max-width: 1024px) {
    .gpa-layout {
        grid-template-columns: 1fr;
    }
}

.gpa-table-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 50px;
    gap: 16px;
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.gpa-course-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 50px;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.gpa-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.gpa-score {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.gpa-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 8px;
}

.gpa-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
}

.gpa-scale-info {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
}

/* Notes View */
.notes-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    height: calc(100vh - 200px);
}

@media(max-width: 768px) {
    .notes-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .notes-sidebar {
        display: none; /* In a real app, we'd toggle this on mobile */
    }
}

.notes-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notes-search {
    margin-bottom: 16px;
}

.note-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-list-item {
    padding: 16px;
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.note-list-item:hover {
    border-color: var(--border-color);
}

.note-list-item.active {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.note-item-title {
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: right;
}

.note-editor {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.editor-empty span {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.editor-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.note-title-input {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.format-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-muted);
}

.format-btn:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

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

.note-content-input {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
    outline: none;
    line-height: 1.6;
}

.note-content-input[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
}

/* Analytics View */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

@media(max-width: 1024px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.score-display {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.score-ring-bg { stroke: var(--bg-main); }
.score-ring-progress { stroke: var(--primary); stroke-dashoffset: 440; stroke-dasharray: 440; transition: stroke-dashoffset 1.5s ease; }

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.score-caption { color: var(--text-muted); font-size: 0.9rem; }

.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.a-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
}

.a-stat span.material-symbols-rounded {
    font-size: 32px;
    color: var(--primary);
}

.a-stat-info h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.a-stat-info p {
    font-size: 1.5rem;
    font-weight: 700;
}

.analytics-chart-card {
    grid-column: 1 / -1;
}

.css-chart-container {
    height: 250px;
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.css-bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40px;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--accent));
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
    min-height: 4px;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Settings View */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.data-actions {
    display: flex;
    gap: 12px;
}

.quick-tools-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tool-item h4 {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.tool-result {
    font-size: 1.1rem;
    padding: 8px;
    background-color: var(--bg-main);
    border-radius: var(--radius-sm);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-fast);
}

.modal-container {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-glass);
    animation: modalSlideUp var(--transition-bounce);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.quick-add-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quick-add-btn-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.quick-add-btn-large span.material-symbols-rounded {
    font-size: 32px;
    color: var(--primary);
}

.quick-add-btn-large:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

/* Empty States */
.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-large h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: right;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

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

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

/* Responsive specific */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .mobile-only { display: flex; }
    
    .top-bar { padding: 0 16px; }
    .views-container { padding: 16px; }
}

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}
