/* Achieva Smart Academic Planner Stylesheet */
:root {
    --primary: #4682b4;
    --primary-light: #7cb3eb;
    --primary-dark: #0d47a1;
    --secondary: #5f9ea0;
    --accent: #e8491d;
    --accent-light: #f38262;
    --success: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg-layout: #f4f7fb;
    --bg-card: #ffffff;
    --border-color: rgba(13, 71, 161, 0.08);
    --text-main: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    --shadow-sm: 0 4px 12px rgba(13, 71, 161, 0.04);
    --shadow-md: 0 12px 30px -8px rgba(13, 71, 161, 0.08);
    --shadow-lg: 0 20px 40px -12px rgba(13, 71, 161, 0.12);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

.dark-theme {
    --bg-layout: #0b0f19;
    --bg-card: #1e293b;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #cbd5e1;
    --text-light: #94a3b8;
    --text-muted: #64748b;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.5);

    --primary: #7cb3eb;
    --primary-light: #a9d4ff;
    --primary-dark: #4682b4;
    --bg-card-glass: rgba(30, 41, 59, 0.7);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-layout);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* --- Desktop Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.dark-theme .sidebar-brand {
    color: var(--primary);
}

.brand-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-brand h2 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border: none;
    background: none;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

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

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.2);
}

.nav-item:hover:not(.active) {
    color: var(--primary-dark);
    background-color: rgba(70, 130, 180, 0.08);
    transform: translateX(4px);
}

.dark-theme .nav-item:hover:not(.active) {
    color: var(--primary-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.icon-btn {
    background: rgba(70, 130, 180, 0.08);
    border: 1px solid transparent;
    color: var(--text-light);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    text-decoration: none;
}

.dark-theme .icon-btn {
    background: rgba(255, 255, 255, 0.05);
}

.icon-btn:hover {
    color: var(--primary-dark);
    background-color: rgba(70, 130, 180, 0.15);
    transform: scale(1.05);
    border-color: rgba(70, 130, 180, 0.2);
}

.dark-theme .icon-btn:hover {
    color: var(--primary-light);
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Main Content Area --- */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Topbar & Mobile Header --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    background: transparent;
}

.topbar-brand {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.topbar-brand h2 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 800;
}

.page-title {
    font-family: var(--font-head);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- Bottom Nav (Mobile) --- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 999;
    height: 70px;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    flex: 1;
    height: 100%;
    gap: 0.25rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: var(--primary-dark);
}

.dark-theme .bottom-nav-item.active {
    color: var(--primary-light);
}

/* --- Scrollable Content Body --- */
.content-body {
    flex: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* --- Cards & UI Elements --- */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    position: relative;
}

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

.card h3 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

/* --- Dashboard Grid & Stats --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-layout));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-family: var(--font-head);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-theme .stat-number {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(70, 130, 180, 0.35);
}

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

.btn-secondary:hover {
    background-color: rgba(70, 130, 180, 0.08);
    border-color: var(--primary-light);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-light);
    padding: 0.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 32px;
    height: 32px;
}

.btn-icon:hover {
    background-color: rgba(70, 130, 180, 0.1);
    color: var(--primary-dark);
}

.dark-theme .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--primary-light);
}

.btn-icon.btn-danger-icon:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* --- Modals & Forms --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background-color: rgba(70, 130, 180, 0.1);
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-layout);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.15);
}

/* --- Subject Grid, Cards, and Assessments --- */
.subject-card {
    border-left: 4px solid var(--primary);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.subject-info h4 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.subject-code {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(70, 130, 180, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.dark-theme .subject-code {
    color: var(--primary-light);
    background-color: rgba(255, 255, 255, 0.06);
}

.subject-meta {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.subject-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.subject-grade {
    text-align: right;
}

.grade-number {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.dark-theme .grade-number {
    color: var(--primary-light);
}

.grade-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-light);
}

.grade-label-small {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.assessments-section {
    margin-top: 1.5rem;
}

.assessments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.assessments-header h4 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.assessment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.assessment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background-color: var(--bg-layout);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.assessment-item:hover {
    border-color: var(--primary-light);
    transform: translateX(2px);
}

.assessment-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.assessment-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.assessment-details {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.assessment-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.assessment-score {
    text-align: right;
    min-width: 100px;
    margin-right: 1rem;
}

.score-value {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.score-weight {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.subject-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* --- What-if Grade Simulator Drawer --- */
.simulator-drawer {
    background-color: rgba(70, 130, 180, 0.04);
    border: 1px dashed var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.dark-theme .simulator-drawer {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.simulator-drawer h5 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark-theme .simulator-drawer h5 {
    color: var(--primary-light);
}

.simulator-intro {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.simulator-sliders-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.simulator-slider-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.slider-name {
    color: var(--text-main);
}

.slider-value {
    color: var(--primary-dark);
    font-weight: 700;
}

.dark-theme .slider-value {
    color: var(--primary-light);
}

.sim-slider {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    cursor: pointer;
}

.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.sim-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.simulator-summary {
    display: flex;
    gap: 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.simulated-badge {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.simulated-badge span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.simulated-badge strong {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 800;
}

/* --- Due Dates & Task Items --- */
.due-item-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.due-item {
    border-left: 4px solid var(--primary);
    position: relative;
    padding: 1.25rem;
}

.due-item.task-item {
    border-left-color: var(--accent);
}

.due-item.assessment-item {
    border-left-color: var(--primary);
}

.due-item.completed {
    opacity: 0.65;
    border-left-color: var(--success);
}

.due-item.overdue {
    border-left-color: var(--danger);
}

.due-item h4 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    padding-right: 2rem;
}

.due-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.due-item p strong {
    color: var(--text-main);
}

.due-item small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.due-item-checkbox {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* --- Academic Goals --- */
.goal-card {
    border-left: 4px solid var(--warning);
}

.goal-card.completed {
    border-left-color: var(--success);
    opacity: 0.7;
}

.goal-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.goal-info {
    flex: 1;
}

.goal-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.goal-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.goal-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.goal-meta strong {
    color: var(--primary-dark);
}

.dark-theme .goal-meta strong {
    color: var(--primary-light);
}

.goal-progress {
    margin-top: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

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

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
}

.goal-status-message {
    font-size: 0.85rem;
    color: var(--primary-dark);
    background-color: rgba(70, 130, 180, 0.08);
    border-left: 3px solid var(--primary);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
}

.dark-theme .goal-status-message {
    color: var(--primary-light);
    background-color: rgba(255, 255, 255, 0.04);
    border-left-color: var(--primary-light);
}

.goal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    margin-left: 1.5rem;
}

/* --- Smart Study Schedule Generator UI (Absorbed & Enhanced) --- */
.schedule-generator-card {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.03), rgba(95, 158, 160, 0.05));
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.dark-theme .schedule-generator-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(30, 41, 59, 0.4));
    border-color: var(--border-color);
}

.schedule-days-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.day-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.day-checkbox-label:hover {
    border-color: var(--primary);
}

.day-checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary-dark);
    font-weight: 700;
}

.dark-theme .day-checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary-light);
}

.timetable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.day-schedule-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.day-schedule-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.day-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.day-schedule-header h4 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.time-slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background-color: var(--bg-layout);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    font-size: 0.85rem;
}

.time-slot-item.break-slot {
    border-left-color: var(--warning);
    background-color: rgba(245, 158, 11, 0.08);
}

.time-slot-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
    border-left-color: var(--success);
}

.time-slot-time {
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.8rem;
    white-space: nowrap;
}

.time-slot-subject {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* --- Pomodoro Focus Timer UI --- */
.pomodoro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
}

.pomodoro-timer-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 1.5rem;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

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

.timer-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.pomodoro-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pomodoro-modes {
    display: flex;
    gap: 0.5rem;
    background-color: var(--bg-layout);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.btn-mode {
    background: none;
    border: none;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

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

.dark-theme .btn-mode.active {
    color: var(--primary-light);
}

/* --- Analytics Tab Charts Layout --- */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--text-light);
    background-color: rgba(70, 130, 180, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* --- Print & Print Layout --- */
@media print {
    .sidebar,
    .bottom-nav,
    .topbar .topbar-actions,
    .subject-actions,
    .btn,
    .btn-icon,
    .simulator-drawer,
    .schedule-generator-card {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 1.5rem;
        padding-bottom: 90px;
    }

    .topbar-brand {
        display: flex;
    }

    .topbar .page-title {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

/* --- Button Text Wrapping Fix --- */
.btn {
    white-space: nowrap;
}

/* --- Dashboard Quick Tool Chips --- */
.dashboard-quick-tools {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    scrollbar-width: none;
}

.dashboard-quick-tools::-webkit-scrollbar {
    display: none;
}

.quick-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quick-tool-chip:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* --- Schedule Header & Quick Add Dropdown --- */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.schedule-header h2 {
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 800;
}

.quick-add-wrapper {
    position: relative;
}

.btn-quick-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

.quick-add-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    min-width: 230px;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    animation: fadeIn 0.2s ease-out;
}

.quick-add-menu.active {
    display: flex;
}

.quick-add-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.quick-add-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.quick-add-item strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-main);
}

.quick-add-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
}

.quick-add-item:hover {
    background-color: rgba(70, 130, 180, 0.08);
}

.dark-theme .quick-add-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- Schedule Sub-Tab Segment Switcher --- */
.schedule-segment-tabs {
    display: flex;
    background: rgba(70, 130, 180, 0.08);
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 1.75rem;
    gap: 6px;
    border: 1px solid var(--border-color);
}

.dark-theme .schedule-segment-tabs {
    background: rgba(255, 255, 255, 0.04);
}

.segment-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.segment-tab.active {
    background-color: var(--bg-card);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.08);
}

.dark-theme .segment-tab.active {
    background-color: var(--bg-card);
    color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.segment-tab:hover:not(.active) {
    color: var(--primary-dark);
}

/* --- Mobile Bottom Sheet Modal (More Nav) --- */
.bottom-sheet-modal {
    align-items: flex-end !important;
    padding: 0 !important;
}

.bottom-sheet-modal .modal-content {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    max-width: 100%;
    width: 100%;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.more-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0.5rem 0 1rem;
}

.more-nav-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.more-nav-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.more-nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.more-nav-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
}

.more-nav-info small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
}

