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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body,
button,
input,
select,
textarea {
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: rgba(99, 102, 241, 0.06);
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --border-hover: rgba(99, 102, 241, 0.3);
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
    --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 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-header: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Dark Mode (Default) */
body {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: rgba(148, 163, 184, 0.2);
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* Light Mode */
body.light-mode {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: rgba(148, 163, 184, 0.15);
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
    --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 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', 'Outfit', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    display: none;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-20px, 25px) scale(1.03);
    }

    66% {
        transform: translate(15px, -12px) scale(0.98);
    }
}

/* ===================== CONTAINER ===================== */
.container {
    min-height: 100vh;
    background: transparent;
    animation: containerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.container::before {
    display: none;
}

@keyframes containerIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ===================== HEADER ===================== */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 24px 5% 80px;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.header::after {
    display: none;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.3s ease-out 0.1s both;
}

.header h1 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    animation: fadeIn 0.3s ease-out 0.15s both;
}

.header p {
    font-size: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeIn 0.3s ease-out 0.2s both;
}

/* ===================== STATS CARDS ===================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 5%;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.stat-card:last-child {
    border-right: 1px solid var(--border);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transition: transform 0.2s ease;
    transform: scaleX(0);
    transform-origin: center;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card>* {
    position: relative;
    z-index: 1;
}

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: fadeIn 0.2s ease-out;
}

.stat-card:nth-child(1) .stat-value {
    color: var(--primary);
}

.stat-card:nth-child(2) .stat-value {
    color: var(--secondary);
}

.stat-card:nth-child(3) .stat-value {
    color: var(--success);
}

.stat-card:nth-child(4) .stat-value {
    color: var(--accent);
}

.stat-value {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -2px;
    line-height: 1;
    animation: countUp 0.3s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    color: var(--gray);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

/* ===================== HEADINGS ===================== */
h2 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0;
    position: relative;
    padding-left: 16px;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

h3 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin-bottom: 16px;
}

/* ===================== SECTIONS ===================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* ===================== TABS ===================== */
.tabs-container {
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 20px;
    z-index: 100;
    padding: 0 5%;
    margin-bottom: 30px;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    gap: 4px;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.tab {
    padding: 5px 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 10px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-bg);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 14px;
}

.tab:hover::before {
    opacity: 1;
}

.tab-icon-wrapper {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    border: 1.5px solid transparent;
}

.tab:hover .tab-icon-wrapper {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12));
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.tab.active .tab-icon-wrapper {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.tab-icon {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    display: block;
}

.tab:hover .tab-icon {
    transform: scale(1.1);
}

.tab.active .tab-icon {
    transform: scale(1.15);
    filter: brightness(0) invert(1);
}

.tab-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.tab-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.2s ease;
    letter-spacing: 0.05px;
    line-height: 1;
}

.tab-description {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--gray-light);
    transition: color 0.2s ease;
    line-height: 1;
}

.tab:hover .tab-label {
    color: var(--primary);
}

.tab:hover .tab-description {
    color: var(--primary-light);
}

.tab.active {
    background: rgba(99, 102, 241, 0.04);
}

.tab.active .tab-label {
    color: var(--primary);
    font-weight: 800;
}

.tab.active .tab-description {
    color: var(--primary);
}

.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%;
    height: 3px;
    background: var(--gradient-primary);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 3px 3px 0 0;
}

.tab.active .tab-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* ===================== TAB CONTENT ===================== */
.tab-content {
    display: none;
    padding: 40px 5%;
    background: var(--bg-primary);
    min-height: calc(100vh - 400px);
    animation: fadeIn 0.2s ease;
}

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

/* ===================== QUICK ACTIONS ===================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

/* ===================== BUTTONS ===================== */
.btn {
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.07);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.15);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-info {
    background: linear-gradient(135deg, var(--accent) 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

/* ===================== SAVE BUTTON ===================== */
.save-btn {
    font-family: inherit;
    font-size: 0.76rem;
    background: var(--gradient-primary);
    color: white;
    fill: rgba(255, 255, 255, 0.7);
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.save-btn .svg-wrapper-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: transform 0.5s ease;
}

.save-btn .svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.save-btn span {
    display: block;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.save-btn svg {
    display: block;
    transform-origin: center center;
    transition: all 0.5s ease;
}

.save-btn:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.save-btn:hover .svg-wrapper-1 {
    transform: translateX(calc(50% + 4px));
}

.save-btn:hover .svg-wrapper {
    transform: scale(1.3);
}

.save-btn:hover svg {
    fill: #fff;
}

.save-btn:hover span {
    opacity: 0;
    transform: translateX(10px);
}

.save-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===================== FORMS ===================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: var(--card-bg);
    font-weight: 500;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
    background: var(--card-bg);
}

select.form-control {
    cursor: pointer;
}

/* ===================== FUTURE PLANNER LECTURE CARD ===================== */
.future-lecture-card {
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: center;
    will-change: transform;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.future-lecture-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2) !important;
}

/* ===================== TIMETABLE ===================== */
.timetable-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.day-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 0;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.day-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.day-card:hover::before {
    opacity: 1;
}

.day-header {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary);
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: var(--primary-bg);
}

.lecture-item {
    background: var(--card-bg);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.lecture-item:last-child {
    border-bottom: none;
}

.lecture-item:hover {
    background: var(--bg-tertiary);
    padding-left: 34px;
}

.lecture-info {
    flex: 1;
}

.lecture-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.lecture-time {
    font-size: 0.82rem;
    color: var(--gray);
}

.lecture-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
    box-shadow: var(--shadow-xs);
}

.btn-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.btn-edit {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, var(--danger-light), var(--danger));
    color: white;
}

/* ===================== ATTENDANCE ===================== */
.attendance-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.attendance-btn {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.attendance-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

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

.attendance-btn:active::before {
    width: 200px;
    height: 200px;
}

.attendance-btn.attended {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.attendance-btn.attended:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.attendance-btn.absent {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.attendance-btn.absent:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.attendance-btn.not-conducted {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.2);
    color: var(--gray);
}

.attendance-btn.not-conducted:hover {
    background: rgba(100, 116, 139, 0.14);
}

/* ===================== WEEK STRIP CALENDAR ===================== */
.att-week-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.att-week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.att-week-label {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    text-align: center;
    flex: 1;
}

.att-cal-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.att-cal-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Week day strip */
.att-week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.att-week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 7px 4px 6px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
    user-select: none;
    background: var(--bg-secondary);
}

.att-week-day:hover:not(.att-week-day-selected):not(.att-week-day-today) {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.att-week-day-name {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-light);
    line-height: 1;
}

.att-week-day-num {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

/* Today */
.att-week-day-today .att-week-day-name {
    color: var(--primary-light);
}

.att-week-day-today .att-week-day-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

/* Selected */
.att-week-day-selected {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.att-week-day-selected .att-week-day-name,
.att-week-day-selected .att-week-day-num {
    color: #fff;
    background: none;
    box-shadow: none;
}

.att-week-day-selected .att-week-dot { filter: brightness(1.8); }

/* Status dot under number */
.att-week-dot-row {
    display: flex;
    gap: 2px;
    justify-content: center;
    min-height: 5px;
}

.att-week-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.att-week-dot.dot-attended  { background: var(--success); }
.att-week-dot.dot-absent    { background: var(--danger); }
.att-week-dot.dot-nc        { background: var(--gray); }
.att-week-dot.dot-unmarked  { background: var(--warning); }

/* Legend */
.att-cal-legend {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.att-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.att-dot-attended { background: var(--success); }
.att-dot-absent   { background: var(--danger); }
.att-dot-mixed    { background: var(--warning); }
.att-dot-nc       { background: var(--gray); }

/* ===================== DATE BANNER ===================== */
.att-date-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.att-date-banner-left {
    display: flex;
    flex-direction: column;
}

.att-date-banner-day {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
}

.att-date-banner-full {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.att-date-banner-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.att-chip {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.att-chip-total   { background: rgba(255,255,255,0.18); color: #fff; }
.att-chip-green   { background: rgba(16,185,129,0.35);  color: #6ee7b7; }
.att-chip-red     { background: rgba(239,68,68,0.35);   color: #fca5a5; }
.att-chip-gray    { background: rgba(148,163,184,0.25); color: rgba(255,255,255,0.7); }

/* ===================== ATTENDANCE LECTURE CARDS ===================== */
.att-lecture-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.att-lecture-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.att-lecture-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px 9px 14px;
}

.att-lecture-type-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.att-badge-lecture { background: rgba(99,102,241,0.12); }
.att-badge-lab     { background: rgba(6,182,212,0.12); }
.att-badge-extra   { background: rgba(245,158,11,0.14); }

.att-lecture-meta {
    flex: 1;
    min-width: 0;
}

.att-lecture-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.att-lecture-sub {
    font-size: 0.72rem;
    color: var(--gray);
    font-weight: 500;
    margin-top: 1px;
}

.att-status-pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.att-status-pill.attended    { background: rgba(16,185,129,0.15);  color: var(--success); }
.att-status-pill.absent      { background: rgba(239,68,68,0.15);   color: var(--danger); }
.att-status-pill.nc          { background: rgba(100,116,139,0.12); color: var(--gray); }
.att-status-pill.unmarked    { background: rgba(245,158,11,0.12);  color: var(--warning); }

.att-btns-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
}

.att-mark-btn {
    padding: 9px 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.att-mark-btn:last-child {
    border-right: none;
}

.att-mark-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.att-mark-btn.active-attended {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.15));
    color: var(--success);
}

.att-mark-btn.active-absent {
    background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(220,38,38,0.15));
    color: var(--danger);
}

.att-mark-btn.active-nc {
    background: rgba(100,116,139,0.1);
    color: var(--gray);
}

.att-mark-btn .btn-check-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s;
}

.att-mark-btn.active-attended .btn-check-indicator,
.att-mark-btn.active-absent   .btn-check-indicator,
.att-mark-btn.active-nc       .btn-check-indicator {
    opacity: 1;
}

/* No-lectures empty state inside attendance */
.att-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.att-empty-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.att-empty-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.att-empty-sub {
    font-size: 0.84rem;
    color: var(--gray);
}

@media (max-width: 480px) {
    .att-week-card {
        padding: 10px 8px;
    }

    .att-week-day-num {
        font-size: 0.85rem;
        width: 26px;
        height: 26px;
    }

    .att-week-day-name {
        font-size: 0.55rem;
    }

    .att-mark-btn {
        font-size: 0.7rem;
        padding: 8px 2px;
        gap: 3px;
    }

    .att-date-banner {
        padding: 8px 12px;
    }
}

/* ===================== MODALS ===================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.97) translateY(8px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-bg);
    font-size: 1.1rem;
}

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

/* ===================== BULK / INITIAL ROWS ===================== */
.bulk-lecture-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.bulk-lecture-row:hover {
    border-color: var(--border-hover);
    background: var(--card-bg);
    box-shadow: var(--shadow-xs);
}

.bulk-lecture-row input {
    flex: 1;
}

.bulk-lecture-row .btn-icon {
    flex-shrink: 0;
}

#bulkLecturesContainer {
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.initial-attendance-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.initial-attendance-row:hover {
    border-color: var(--border-hover);
    background: var(--card-bg);
    box-shadow: var(--shadow-xs);
}

.initial-attendance-row input {
    flex: 1;
}

.initial-attendance-row .btn-icon {
    flex-shrink: 0;
}

#initialAttendanceContainer {
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

/* ===================== ALERTS ===================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: none;
    font-size: 0.92rem;
    line-height: 1.5;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
    border-left: 4px solid var(--primary);
    color: var(--text-primary);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.06));
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.06));
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.06));
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

/* ===================== PROGRESS BAR ===================== */
.progress-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.progress-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.progress-container {
    margin: 0;
}

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

.progress-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.progress-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.progress-percentage-display {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: baseline;
    gap: 4px;
    transition: all 0.3s ease;
}

.percentage-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -1px;
}

.percentage-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-wrapper {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    width: 100%;
    height: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    border-radius: 16px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.progress-fill-modern {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    position: relative;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.progress-fill-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.progress-glow {
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    width: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 14px 14px 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.progress-target-line {
    position: absolute;
    left: 75%;
    top: -4px;
    bottom: -4px;
    width: 3px;
    background: linear-gradient(180deg, #f59e0b, #ef4444);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    z-index: 10;
}

.progress-target-line::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.progress-target-line::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.target-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.progress-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1;
}

.progress-stat .stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.progress-separator {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.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);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    border-radius: 12px;
}

/* ===================== SUBJECT CARDS ===================== */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.subject-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.subject-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.subject-card:hover::before {
    opacity: 1;
}

.subject-name {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.subject-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.subject-percentage {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    text-align: center;
    margin: 16px 0;
    line-height: 1;
    letter-spacing: -2px;
}

.percentage-good {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.percentage-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.percentage-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-light);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 500;
    color: var(--gray);
}

/* ===================== SPINNER ===================== */
.spinner {
    border: 4px solid rgba(99, 102, 241, 0.12);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    animation: spin 0.9s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    body::before {
        height: 250px;
    }

    .header {
        padding: 20px 5% 60px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 0.95rem;
    }

    .header-badge {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

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

    .stat-card {
        padding: 20px 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .stat-card:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .stat-value {
        font-size: 2rem;
    }

    .tabs-container {
        top: 10px;
        padding: 0 3%;
    }

    .tabs {
        padding: 5px;
        gap: 4px;
        border-radius: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        padding: 5px 5px;
        gap: 2px;
        min-width: 55px;
    }

    .tab-icon-wrapper {
        width: 26px;
        height: 26px;
        border-radius: 7px;
    }

    .tab-icon {
        font-size: 0.85rem;
    }

    .tab-label {
        font-size: 0.6rem;
    }

    .tab-description {
        display: none;
    }

    .tab-content {
        padding: 24px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 6px;
    }

    .calendar-day {
        padding: 6px;
        font-size: 0.85rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-content {
        padding: 24px;
        max-width: 95%;
        border-radius: var(--radius-md);
    }

    .future-planner-week {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }

    .header-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: -50px;
        padding: 0 5%;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 13px 18px;
    }

    .tab-content {
        padding: 24px 5%;
    }

    .lecture-item {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .lecture-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .subject-percentage {
        font-size: 2.2rem;
    }

    .modal-content {
        padding: 20px;
        margin: 0 5%;
    }

    .header-actions {
        flex-direction: column;
    }

    /* Progress Section Mobile */
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-title {
        width: 100%;
    }

    .progress-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .progress-percentage-display {
        padding: 10px 20px;
    }

    .percentage-number {
        font-size: 2rem;
    }

    .percentage-symbol {
        font-size: 1rem;
    }

    .progress-stats {
        flex-direction: column;
        gap: 12px;
    }

    .progress-stat {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 0;
    }

    .progress-stat .stat-value {
        font-size: 1.2rem;
    }

    .progress-separator {
        width: 100%;
        height: 1px;
    }

    .target-label {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
}

/* ===================== UTILITIES ===================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

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

.gap-10 {
    gap: 10px;
}

/* Modern Full-Width Utilities */
.section-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-padding {
    padding: 0 5%;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.03);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* ===================== SELECTION ===================== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ===================== FOCUS / A11Y ===================== */
*:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

button:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* ===================== TRANSITIONS ===================== */
a,
button,
input,
select,
textarea {
    transition: all 0.15s ease;
}

button:active {
    transform: scale(0.98);
}

input:focus,
select:focus,
textarea:focus {
    background: var(--card-bg);
}

/* ===================== LOGIN SCREEN ===================== */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}

.login-screen.hidden {
    display: none;
}

/* Animated Background Pattern */
.login-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: patternFloat 20s ease-in-out infinite;
}

/* Floating Orbs */
.login-bg-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(45deg, #ec4899, #f472b6);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #a78bfa, #c084fc);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

.login-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 60px 40px;
    margin: auto;
    min-height: min-content;
}

.login-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent 70%);
    pointer-events: none;
    animation: floatOrb 10s ease-in-out infinite;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    font-size: 3.5rem;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    animation: badgeBounce 2s ease-in-out infinite;
}

.badge-shine {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s ease-in-out infinite;
}

.badge-icon {
    position: relative;
    z-index: 1;
}

.login-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2.5px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 40%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.3);
    animation: titleFloat 3s ease-in-out infinite;
}

.title-underline {
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    margin: 16px auto 0;
    border-radius: 3px;
    animation: underlineGlow 2s ease-in-out infinite;
}

.login-subtitle {
    color: #ddd6fe;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Feature Pills */
.feature-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: pillFadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.pill:nth-child(1) { animation-delay: 0.2s; }
.pill:nth-child(2) { animation-delay: 0.3s; }
.pill:nth-child(3) { animation-delay: 0.4s; }

.login-prompt {
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1.6;
}

.login-prompt svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.google-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 48px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #1e293b;
    border: none;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    overflow: hidden;
}

.btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.google-signin-btn:hover .btn-shine {
    transform: translateX(100%);
}

.google-signin-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.google-signin-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-footer {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 32px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.5;
    opacity: 0.9;
}

.login-footer svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Animations */
@keyframes patternFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.05); }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

@keyframes badgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes underlineGlow {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
    50% { opacity: 1; box-shadow: 0 0 16px rgba(255, 255, 255, 0.8); }
}

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

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

/* ===================== AUTH FORMS ===================== */
.auth-forms-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-form {
    display: none;
    animation: formFadeIn 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-input-group {
    margin-bottom: 16px;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auth-btn {
    width: 100%;
    padding: 18px 40px;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.primary-btn {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #1e293b;
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.primary-btn:active {
    transform: translateY(-1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.auth-divider span {
    padding: 0 16px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-links a:hover {
    text-decoration: underline;
    transform: translateY(-1px);
}

.auth-links .separator {
    color: rgba(255, 255, 255, 0.4);
}

.form-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

/* Recovery Section */
.recovery-section {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.recovery-label {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.recovery-options {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.radio-option input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-option span {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* ===================== LOADING OVERLAY ===================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: #a5b4fc;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===================== HEADER TOP BAR (User Profile) ===================== */
.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.header-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    transform: translateY(-1px);
}

.theme-toggle-btn svg {
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

body.light-mode .theme-toggle-btn .sun-icon {
    display: none;
}

body.light-mode .theme-toggle-btn .moon-icon {
    display: block !important;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    transform: translateY(-1px);
}

.logout-btn svg {
    opacity: 0.8;
}

/* ===================== RESPONSIVE AUTH ===================== */
@media (max-width: 768px) {
    .login-screen {
        padding: 30px 15px;
    }

    .login-container {
        padding: 48px 36px;
    }

    .login-badge {
        width: 96px;
        height: 96px;
    }

    .title-main {
        font-size: 2.8rem;
    }

    .login-subtitle {
        font-size: 1.1rem;
    }

    .google-signin-btn {
        padding: 18px 40px;
        font-size: 1.05rem;
    }
}

@media (max-width: 600px) {
    .login-screen {
        padding: 20px 10px;
    }

    .login-container {
        padding: 40px 24px;
    }

    .login-badge {
        width: 88px;
        height: 88px;
        border-radius: 26px;
        font-size: 3rem;
    }

    .title-main {
        font-size: 2.2rem;
        letter-spacing: -1.8px;
    }

    .title-underline {
        width: 70px;
        height: 4px;
    }

    .login-subtitle {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .feature-pills {
        flex-direction: column;
        align-items: stretch;
    }

    .pill {
        justify-content: center;
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .login-prompt {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 28px;
    }

    .google-signin-btn {
        padding: 17px 36px;
        font-size: 1rem;
        width: 100%;
    }

    .auth-input {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .auth-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }

    .recovery-section {
        padding: 16px;
    }

    .recovery-options {
        flex-direction: column;
        gap: 10px;
    }

    .login-footer {
        font-size: 0.78rem;
        flex-direction: column;
        gap: 6px;
        margin-top: 28px;
    }

    .orb {
        filter: blur(40px);
        opacity: 0.3;
    }

    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }
}

    .header-top-bar {
        padding: 0 0 14px 0;
    }

    .user-name {
        display: none;
    }

    .logout-btn span {
        display: none;
    }

    .logout-btn {
        padding: 10px;
    }
}

/* ===================== TOAST NOTIFICATIONS ===================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 48px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: all;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    line-height: 1.5;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.toast-success::before { background: var(--success); }
.toast.toast-error::before   { background: var(--danger); }
.toast.toast-warning::before { background: var(--warning); }
.toast.toast-info::before    { background: var(--primary); }

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-message {
    flex: 1;
    color: var(--text-secondary);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-light);
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s ease;
    line-height: 1;
    margin-top: 1px;
}

.toast-close:hover {
    color: var(--text-primary);
}

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

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

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
        max-height: 120px;
        margin-bottom: 0;
        padding-top: 14px;
        padding-bottom: 14px;
    }
    to {
        transform: translateX(calc(100% + 24px));
        opacity: 0;
        max-height: 0;
        margin-bottom: -10px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 600px) {
    .toast-container {
        top: 16px;
        right: 16px;
        width: calc(100% - 32px);
    }
}

/* ===================== ENHANCED MOBILE RESPONSIVE ===================== */

/* Tablets and Small Laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0;
    }

    .tabs-container {
        padding: 0 3%;
    }

    .tab-content {
        padding: 28px 3%;
    }

    .stats-container {
        padding: 0 3%;
    }
}

/* Large Mobile & Small Tablets */
@media (max-width: 768px) {
    /* Tabs - Make scrollable horizontally */
    .tabs-container {
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-container::-webkit-scrollbar {
        display: none;
    }

    .tabs {
        display: flex;
        flex-wrap: nowrap;
        min-width: min-content;
        width: auto;
        margin: 0 3%;
        padding: 8px;
        gap: 8px;
    }

    .tab {
        flex-shrink: 0;
        min-width: 120px;
        padding: 10px 12px;
        gap: 6px;
    }

    .tab-icon-wrapper {
        width: 32px;
        height: 32px;
    }

    .tab-icon {
        font-size: 1rem;
    }

    .tab-label {
        font-size: 0.7rem;
    }

    .tab-description {
        font-size: 0.6rem;
    }

    /* Forms - Better mobile layout */
    .form-group {
        margin-bottom: 16px;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 14px;
    }

    select.form-control {
        font-size: 16px;
    }

    /* Modals - Better mobile fit */
    .modal {
        padding: 20px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .modal-header {
        padding: 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    /* Cards - Better spacing */
    .card {
        padding: 20px;
        margin-bottom: 16px;
    }

    /* Day cards in timetable */
    .day-card {
        padding: 18px;
    }

    .day-name {
        font-size: 1rem;
    }

    /* Lecture items */
    .lecture-time {
        font-size: 0.75rem;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.3rem;
    }

    /* Buttons */
    .btn-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    /* Header actions */
    .header-actions-group {
        gap: 8px;
    }

    .theme-toggle-btn {
        padding: 10px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    /* Root adjustments */
    :root {
        --radius-sm: 8px;
        --radius-md: 12px;
        --radius-lg: 16px;
        --radius-xl: 20px;
    }

    /* Container */
    .container {
        padding: 0;
    }

    /* Header adjustments */
    .header {
        padding: 16px 4% 50px;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .header p {
        font-size: 0.85rem;
    }

    .header-badge {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .header-top-bar {
        padding: 0 0 12px 0;
        margin-bottom: 14px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    /* Stats - 2 columns on mobile */
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 4%;
        margin-top: -45px;
    }

    .stat-card {
        padding: 16px 12px;
        border-right: none !important;
        border-bottom: 1px solid var(--border);
    }

    .stat-card:nth-child(odd) {
        border-right: 1px solid var(--border) !important;
    }

    .stat-card:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .stat-icon {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .stat-value {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Tabs - Compact mobile view */
    .tabs-container {
        top: 10px;
        margin-bottom: 20px;
    }

    .tabs {
        margin: 0 4%;
        padding: 6px;
        gap: 6px;
    }

    .tab {
        min-width: 100px;
        padding: 8px 10px;
        gap: 4px;
    }

    .tab-icon-wrapper {
        width: 28px;
        height: 28px;
    }

    .tab-icon {
        font-size: 0.85rem;
    }

    .tab-label {
        font-size: 0.65rem;
    }

    .tab-description {
        display: none; /* Hide descriptions on small screens */
    }

    /* Tab content */
    .tab-content {
        padding: 20px 4%;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 18px;
    }

    .section-header h2 {
        font-size: 1.15rem;
    }

    /* Cards */
    .card {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    /* Progress card */
    .progress-header {
        gap: 12px;
    }

    .progress-title h3 {
        font-size: 0.95rem;
    }

    .progress-title p {
        font-size: 0.75rem;
    }

    .progress-percentage-display {
        width: 55px;
        height: 55px;
    }

    .percentage-number {
        font-size: 1.3rem;
    }

    .percentage-symbol {
        font-size: 0.7rem;
    }

    .progress-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .progress-stat {
        flex: 1;
        min-width: 45%;
    }

    .progress-separator {
        display: none;
    }

    /* Subject cards */
    .subject-card {
        padding: 18px;
    }

    .subject-name {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .subject-percentage {
        font-size: 2rem;
    }

    .progress-bar {
        height: 8px;
    }

    /* Timetable */
    .day-card {
        padding: 14px;
    }

    .day-name {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .empty-day {
        padding: 20px;
        font-size: 0.85rem;
    }

    /* Lecture items */
    .lecture-item {
        padding: 12px;
        gap: 10px;
    }

    .lecture-info {
        gap: 6px;
    }

    .lecture-name {
        font-size: 0.85rem;
    }

    .lecture-time {
        font-size: 0.7rem;
    }

    .lecture-type {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .lecture-actions {
        gap: 6px;
    }

    /* Buttons */
    .btn {
        padding: 11px 16px;
        font-size: 0.85rem;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .save-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    /* Forms */
    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }

    /* Attendance buttons */
    .attendance-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    /* Calendar */
    .att-calendar-header {
        padding: 14px;
    }

    .att-month-year {
        font-size: 1rem;
    }

    .att-cal-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .att-week-days {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        padding: 10px;
    }

    .att-week-day {
        padding: 8px 4px;
        font-size: 0.7rem;
    }

    /* Lecture cards in attendance */
    .att-lecture-card {
        padding: 14px;
        gap: 10px;
    }

    .att-lecture-name {
        font-size: 0.9rem;
    }

    .att-lecture-time {
        font-size: 0.7rem;
    }

    .att-mark-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    /* Future planner */
    .future-lecture-card {
        padding: 14px;
        gap: 10px;
    }

    /* Modals */
    .modal {
        padding: 10px;
        padding-top: 30px;
    }

    .modal-content {
        max-height: calc(100vh - 60px);
        border-radius: var(--radius-lg);
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 14px 16px;
    }

    .modal-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Alerts */
    .alert {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    /* Bulk/Initial attendance rows */
    .bulk-lecture-row,
    .initial-attendance-row {
        gap: 8px;
        padding: 10px;
    }

    /* Login screen */
    .login-container {
        padding: 32px 20px;
        width: 95%;
    }

    .login-badge {
        width: 64px;
        height: 64px;
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .login-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .google-signin-btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .google-signin-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Toast notifications */
    .toast-container {
        top: 12px;
        right: 12px;
        width: calc(100% - 24px);
        max-width: none;
    }

    .toast {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .toast-icon {
        font-size: 1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .header h1 {
        font-size: 1.3rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    .stats-container {
        gap: 10px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .tab {
        min-width: 90px;
        padding: 6px 8px;
    }

    .tab-label {
        font-size: 0.6rem;
    }

    .tab-icon-wrapper {
        width: 26px;
        height: 26px;
    }

    .modal-content {
        padding: 14px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Landscape Mobile Phones */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: 12px 4% 40px;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .header-badge {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .stats-container {
        margin-top: -35px;
        gap: 10px;
    }

    .stat-card {
        padding: 12px 10px;
    }

    .tabs-container {
        position: relative;
        top: 0;
    }

    .modal {
        padding-top: 20px;
    }

    .modal-content {
        max-height: calc(100vh - 40px);
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .tab {
        min-height: 60px;
    }

    .attendance-btn {
        min-height: 44px;
        padding: 10px 16px;
    }

    /* Remove hover effects on touch devices */
    .tab:hover::before,
    .card:hover,
    .stat-card:hover,
    .subject-card:hover,
    .lecture-item:hover {
        transform: none;
    }

    /* Better touch scrolling */
    .tabs-container,
    .modal-body,
    .tab-content {
        -webkit-overflow-scrolling: touch;
    }
}