@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Light Corporate Color System */
    --bg-body: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    --border-sidebar: #E2E8F0;
    
    --bg-card: #FFFFFF;
    --border-card: #E2E8F0;
    --border-card-hover: #CBD5E1;
    
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --primary-border: #C7D2FE;
    
    --secondary: #059669;
    --secondary-hover: #047857;
    --secondary-light: #ECFDF5;
    --secondary-border: #A7F3D0;
    
    --accent: #D97706;
    --accent-light: #FFFBEB;
    --accent-border: #FDE68A;
    
    --danger: #E11D48;
    --danger-light: #FFF1F2;
    --danger-border: #FECDD3;
    
    --info: #0284C7;
    --info-light: #F0F9FF;
    --info-border: #BAE6FD;
    
    --text-main: #0F172A;
    --text-body: #334155;
    --text-muted: #475569; /* WCAG AA Compliant contrast on white */
    --text-light: #4B5563; /* WCAG AA Compliant contrast on white */
    
    --bg-sidebar-footer: #FAF5FF;
    --bg-input: #FFFFFF;
    --border-input: #CBD5E1;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    
    --transition-fast: all 0.15s ease-in-out;
    --transition-smooth: all 0.25s ease-in-out;
}

[data-theme="dark"] {
    --bg-body: #0F172A;
    --bg-sidebar: #1E293B;
    --border-sidebar: #334155;
    
    --bg-card: #1E293B;
    --border-card: #334155;
    --border-card-hover: #475569;
    
    /* Contrast-Compliant Theme Colors for Dark Backgrounds */
    --primary: #818CF8;
    --primary-hover: #A5B4FC;
    --primary-light: rgba(129, 140, 248, 0.15);
    --primary-border: #4338CA;
    
    --secondary: #34D399;
    --secondary-hover: #6EE7B7;
    --secondary-light: rgba(52, 211, 153, 0.15);
    --secondary-border: #047857;
    
    --accent: #FBBF24;
    --accent-light: rgba(251, 191, 36, 0.15);
    --accent-border: #D97706;
    
    --danger: #FB7185;
    --danger-light: rgba(251, 113, 133, 0.15);
    --danger-border: #E11D48;
    
    --info: #38BDF8;
    --info-light: rgba(56, 189, 248, 0.15);
    --info-border: #0284C7;
    
    --text-main: #F8FAFC;
    --text-body: #E2E8F0;
    --text-muted: #CBD5E1; /* WCAG AA Compliant contrast on slate-800 */
    --text-light: #A8B2C1; /* WCAG AA Compliant contrast on slate-800 */
    
    --bg-sidebar-footer: #1E1B4B;
    --bg-input: #1E293B;
    --border-input: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* App Shell Structure (Sidebar + Top Bar + Content) */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-sidebar);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.brand-logo-svg {
    transition: var(--transition-smooth);
}

.brand-logo-svg .logo-path-primary {
    fill: var(--primary);
}

.brand-logo-svg .logo-path-dark {
    fill: var(--text-main);
}

.footer-logo-svg .logo-path-primary {
    fill: #818CF8 !important;
}

.footer-logo-svg .logo-path-dark {
    fill: #FFFFFF !important;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.4rem 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-sidebar);
    opacity: 0.5;
}

.sidebar-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.sidebar-nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.sidebar-nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.sidebar-nav-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-sidebar);
    background: var(--bg-sidebar-footer);
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - 260px);
}

.top-header {
    height: 64px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-sidebar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-area h1 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.top-user-area {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
}

.content-body {
    flex: 1;
    padding: 1rem 1.25rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Corporate Cards */
.card-corporate {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition-fast);
}

.card-corporate:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-card-hover);
}

.card-header-corporate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-card);
}

.card-header-corporate h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Corporate Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--text-light);
    color: var(--text-main);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-border);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-outline-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--danger-border);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-danger:hover {
    background-color: #FFE4E6;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.4rem;
}

.form-control, .form-select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.badge-pending {
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.badge-completed {
    background-color: var(--secondary-light);
    color: var(--secondary);
    border: 1px solid var(--secondary-border);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
}

/* Tab Controls */
.active-tab {
    background-color: var(--primary) !important;
    color: #FFFFFF !important;
    border-color: var(--primary) !important;
}

/* Metric / Stat Widgets */
.stat-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Corporate Data Tables */
.table-corporate-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-corporate {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table-corporate th {
    background-color: var(--bg-body);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-card);
}

.table-corporate td {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-card);
    color: var(--text-body);
}

.table-corporate tbody tr:last-child td {
    border-bottom: none;
}

.table-corporate tbody tr:hover {
    background-color: var(--bg-body);
}

@media (max-width: 768px) {
    .table-corporate, 
    .table-corporate thead, 
    .table-corporate tbody, 
    .table-corporate th, 
    .table-corporate td, 
    .table-corporate tr {
        display: block;
        width: 100%;
    }
    .table-corporate thead {
        display: none;
    }
    .table-corporate tr {
        margin-bottom: 0.75rem;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: var(--radius-md);
        padding: 0.5rem 0.75rem;
    }
    .table-corporate td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right !important;
        border: none !important;
        padding: 0.5rem 0 !important;
        border-bottom: 1px dashed var(--border-card) !important;
    }
    .table-corporate td:last-child {
        border-bottom: none !important;
    }
    .table-corporate td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
        margin-right: 0.5rem;
        font-size: 0.75rem;
        text-transform: uppercase;
    }
}

/* Responsive Sidebar Hamburger and Mobile Optimizations */
.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-sidebar-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .btn-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 9999;
        box-shadow: var(--shadow-lg);
    }
    
    .app-sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .top-header {
        padding: 0 1rem;
    }
}

/* Toast Notification System */
#toastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99999;
    max-width: 360px;
    width: calc(100vw - 48px);
}

.toast-message {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-message.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-message.success {
    border-left: 4px solid var(--secondary);
}

.toast-message.success i {
    color: var(--secondary);
}

.toast-message.error {
    border-left: 4px solid var(--danger);
}

.toast-message.error i {
    color: var(--danger);
}

.toast-message.info {
    border-left: 4px solid var(--info);
}

.toast-message.info i {
    color: var(--info);
}

.toast-message.warning {
    border-left: 4px solid var(--accent);
}

.toast-message.warning i {
    color: var(--accent);
}

/* Admin Panel & Dashboard Custom Styles */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}
.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-card-hover);
}
.border-glow {
    border-color: var(--border-card) !important;
}
.border-danger-card {
    border-color: var(--danger-border) !important;
}
.hover-slide {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.85rem;
}
.hover-row {
    transition: background-color 0.15s ease;
}
.hover-row:hover {
    background-color: var(--bg-body) !important;
}
.pagination-custom .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.pagination-custom .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}
.pagination-custom .page-item.disabled .page-link {
    background: transparent;
    border-color: transparent;
    color: var(--text-light);
    opacity: 0.5;
}
.grade-pill-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.grade-pill-link:hover, .grade-pill-link.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}
.grade-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 0.75rem;
    transition: var(--transition-fast);
}
.grade-pill-link:hover .grade-number, .grade-pill-link.active .grade-number {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}
.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.topic-tag {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}
.topic-tag:hover {
    background: var(--bg-body);
    border-color: var(--border-card-hover);
}
.btn-icon-small {
    background: none;
    border: none;
    padding: 2px 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}
.btn-icon-small:hover {
    color: var(--text-main);
}
.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-body);
    transition: var(--transition-fast);
}
.btn-action:hover {
    background: var(--bg-body);
    color: var(--primary);
    border-color: var(--primary-border);
}
.btn-action-danger:hover {
    color: var(--danger) !important;
    border-color: var(--danger-border) !important;
    background: var(--danger-light) !important;
}

/* Card Loader Spinner overlay for AJAX toggle */
.card-loading {
    position: relative;
    pointer-events: none;
}
.card-loading::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-lg);
    z-index: 10;
    transition: var(--transition-smooth);
}
.card-loading::before {
    content: "";
    position: absolute;
    top: calc(50% - 16px);
    left: calc(50% - 16px);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: card-spin 0.8s linear infinite;
    z-index: 11;
}
@keyframes card-spin {
    to { transform: rotate(360deg); }
}

/* Auth Page Enhancements */
.auth-body {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.06) 0%, rgba(168, 85, 247, 0.04) 90%), var(--bg-body) !important;
}
.auth-card {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    border-radius: var(--radius-lg);
    border-color: var(--border-card) !important;
}

/* Form Controls with Icons */
.form-control-icon-wrapper {
    position: relative;
    width: 100%;
}
.form-control-has-icon {
    padding-left: 2.5rem !important;
}
.form-control-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition-fast);
}
.form-control-icon-wrapper:focus-within .form-control-icon {
    color: var(--primary);
}

/* Password Toggle Field */
.password-toggle-btn {
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    z-index: 10;
}
.password-toggle-btn:hover {
    color: var(--text-main);
}

/* Segmented Control (Tabs) */
.segmented-control {
    display: inline-flex;
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    padding: 3px;
    border-radius: var(--radius-md);
    gap: 2px;
}
.segmented-item {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.segmented-item:hover {
    color: var(--text-main);
}
.segmented-item.active {
    background: var(--bg-card);
    color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

/* Hover Glow Effects for Cards */
.hover-glow-primary:hover {
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.1), 0 8px 8px -6px rgba(79, 70, 229, 0.05);
    border-color: var(--primary-border) !important;
}
.hover-glow-success:hover {
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.1), 0 8px 8px -6px rgba(5, 150, 105, 0.05);
    border-color: var(--secondary-border) !important;
}
.hover-glow-danger:hover {
    box-shadow: 0 10px 20px -5px rgba(225, 29, 72, 0.1), 0 8px 8px -6px rgba(225, 29, 72, 0.05);
    border-color: var(--danger-border) !important;
}
.hover-glow-warning:hover {
    box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.1), 0 8px 8px -6px rgba(217, 119, 6, 0.05);
    border-color: var(--accent-border) !important;
}
.hover-glow-info:hover {
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.1), 0 8px 8px -6px rgba(2, 132, 199, 0.05);
    border-color: var(--info-border) !important;
}

/* Speech Bubble Comments styling */
.speech-bubble {
    position: relative;
    background: var(--bg-body);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    box-shadow: var(--shadow-sm);
}
.speech-bubble-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.speech-bubble-text {
    font-size: 0.85rem;
    color: var(--text-body);
    font-style: italic;
    line-height: 1.4;
}

/* Timeline Layout */
.timeline-list {
    position: relative;
    padding-left: 2rem;
}
.timeline-list::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 7px;
    width: 2px;
    background-color: var(--border-card);
}
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-node {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 3px solid var(--primary);
    z-index: 2;
    transition: var(--transition-fast);
}
.timeline-item:hover .timeline-node {
    transform: scale(1.2);
}
.timeline-node.success { border-color: var(--secondary); }
.timeline-node.danger { border-color: var(--danger); }
.timeline-node.warning { border-color: var(--accent); }
.timeline-node.info { border-color: var(--info); }

/* Avatar Stack */
.avatar-stack {
    display: inline-flex;
    align-items: center;
}
.avatar-stack-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    margin-left: -8px;
    transition: var(--transition-fast);
    cursor: pointer;
}
.avatar-stack-item:first-child {
    margin-left: 0;
}
.avatar-stack-item:hover {
    transform: translateY(-2px);
    z-index: 10;
}
.avatar-stack-more {
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border-card);
}

/* Premium Backdrop & Modal styling */
.modal-backdrop-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}
.modal-backdrop-premium.open {
    opacity: 1;
}
.modal-dialog-premium {
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop-premium.open .modal-dialog-premium {
    transform: scale(1);
}

/* Premium Hover & Physics Scaling for Buttons */
.btn-primary, .btn-secondary, .btn-outline-primary, .btn-danger {
    transition: var(--transition-fast);
}
.btn-primary:hover, .btn-secondary:hover, .btn-outline-primary:hover, .btn-danger:hover {
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md);
}
.btn-primary:active, .btn-secondary:active, .btn-outline-primary:active, .btn-danger:active {
    transform: translateY(0) scale(0.97);
}

/* Responsive Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Hover Glow Effects for Metric Widgets */
.hover-glow-primary:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 20px -2px rgba(79, 70, 229, 0.25) !important;
    transform: translateY(-2px);
}
[data-theme="dark"] .hover-glow-primary:hover {
    box-shadow: 0 4px 20px -2px rgba(129, 140, 248, 0.25) !important;
}

.hover-glow-success:hover {
    border-color: var(--secondary) !important;
    box-shadow: 0 4px 20px -2px rgba(5, 150, 105, 0.25) !important;
    transform: translateY(-2px);
}
[data-theme="dark"] .hover-glow-success:hover {
    box-shadow: 0 4px 20px -2px rgba(52, 211, 153, 0.25) !important;
}

.hover-glow-warning:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 4px 20px -2px rgba(217, 119, 6, 0.25) !important;
    transform: translateY(-2px);
}
[data-theme="dark"] .hover-glow-warning:hover {
    box-shadow: 0 4px 20px -2px rgba(251, 191, 36, 0.25) !important;
}

.hover-glow-info:hover {
    border-color: var(--info) !important;
    box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.25) !important;
    transform: translateY(-2px);
}
[data-theme="dark"] .hover-glow-info:hover {
    box-shadow: 0 4px 20px -2px rgba(56, 189, 248, 0.25) !important;
}

/* Responsive Filter Bar Container & Elements */
.filter-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.filter-controls-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 280px;
    flex-wrap: wrap;
}
.filter-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
}
.filter-select-wrapper {
    min-width: 170px;
}
@media (max-width: 768px) {
    .filter-bar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-controls-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .filter-search-wrapper, .filter-select-wrapper {
        width: 100%;
        flex: none;
    }
}

/* Touch Targets, Buttons and Actions */
.btn-primary, .btn-secondary, .btn-outline-primary, .btn-danger {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.btn-action {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Responsive Table Layout for Small Devices */
@media (max-width: 768px) {
    .table-corporate-responsive {
        display: block;
        border: none !important;
    }
    .table-corporate-responsive thead {
        display: none !important; /* Hide headings */
    }
    .table-corporate-responsive tbody,
    .table-corporate-responsive tr,
    .table-corporate-responsive td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
    .table-corporate-responsive tr {
        background-color: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow-sm);
    }
    .table-corporate-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.65rem 0.5rem !important;
        border-bottom: 1px solid var(--border-card) !important;
        text-align: right !important;
        font-size: 0.85rem;
    }
    .table-corporate-responsive td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    .table-corporate-responsive td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        text-align: left;
        margin-right: 1.5rem;
        flex-shrink: 0;
    }
    /* Ensure child divs inside responsive cells stack nicely */
    .table-corporate-responsive td > div {
        text-align: right;
    }
}

/* Profile Layout & Danger Zone custom styles */
.user-profile-badge-link {
    text-decoration: none;
    transition: var(--transition-fast);
}
.user-profile-badge-link:hover .user-profile-badge {
    border-color: var(--primary-border);
    background-color: var(--primary-light);
}

.sidebar-footer-link {
    text-decoration: none;
    display: block;
    transition: var(--transition-fast);
}
.sidebar-footer-link:hover .sidebar-footer {
    background-color: var(--primary-light);
    border-top-color: var(--primary-border);
}
.sidebar-footer-link:hover .sidebar-footer .fa-gear {
    color: var(--primary) !important;
}

.danger-zone-card {
    transition: var(--transition-smooth);
}
.danger-zone-card:hover {
    border-color: var(--danger) !important;
    box-shadow: var(--shadow-md);
}

/* Ensure mobile-first tap targets are at least 44px (WCAG/iOS/Android Guidelines) */
@media (max-width: 768px) {
    .btn-primary, 
    .btn-secondary, 
    .btn-outline-primary, 
    .btn-danger,
    .btn-action,
    .segmented-item {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Shimmer Skeleton Loader animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-loader {
    background: linear-gradient(90deg, var(--bg-body) 25%, var(--border-card) 50%, var(--bg-body) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

/* Premium Empty State styling */
.empty-state-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.08);
}

.empty-state-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   EĞİTİM YILI (EDUCATION YEAR) & SINIF REHBERİ (GRADE GUIDE) STYLES
   ========================================================================== */

/* Progress Bar Container */
.ey-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.65rem 1.85rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}

.ey-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ey-progress-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ey-progress-percent {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-heading);
}

.ey-progress-track {
    width: 100%;
    height: 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.ey-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4F46E5 0%, #6366F1 50%, #10B981 100%);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.ey-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
    animation: progress-shimmer 2.5s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ey-progress-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Living Timeline (Pixel-Perfect Line & Marker) */
.ey-timeline-container {
    position: relative;
    padding-left: 2.75rem;
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ey-timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 16px;
    bottom: 16px;
    width: 3px;
    background: var(--border-card);
    border-radius: 2px;
}

.ey-timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
    width: 100%;
    display: block;
}

.ey-timeline-item:last-child {
    margin-bottom: 0;
}

.ey-timeline-marker {
    position: absolute;
    left: -2.75rem;
    margin-left: 12.5px;
    top: 1.35rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--text-light);
    z-index: 2;
    transition: var(--transition-fast);
}

.ey-timeline-item.completed .ey-timeline-marker {
    background: var(--secondary);
    border-color: var(--secondary-border);
}

.ey-timeline-item.ongoing .ey-timeline-marker {
    background: var(--primary);
    border-color: #A5B4FC;
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.25);
    animation: marker-pulse 1.8s infinite;
}

@keyframes marker-pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.ey-timeline-item.upcoming .ey-timeline-marker {
    background: var(--bg-card);
    border-color: var(--primary);
}

.ey-timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.65rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
}

.ey-timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-card-hover);
}

.ey-timeline-item.ongoing .ey-timeline-card {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
}

.ey-timeline-item.completed .ey-timeline-card {
    opacity: 0.88;
}

.ey-timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.ey-timeline-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
}

.ey-timeline-date-range {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

/* Category Filter Pills */
.filter-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}

.filter-pill:hover {
    background: var(--bg-body);
    border-color: var(--primary-border);
    color: var(--primary);
}

.filter-pill.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.25);
}

/* Sınıf Rehberi Hero Card */
.hero-card-grade-guide {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
    color: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 2.25rem 2.5rem;
    box-shadow: 0 12px 30px -5px rgba(49, 46, 129, 0.35);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-card-grade-guide::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FDE68A;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.hero-card-subtitle {
    color: #E0E7FF;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 720px;
}

.hero-card-countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #10B981;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Action Required Badge */
.action-required-badge {
    background: #FFF1F2;
    color: #E11D48;
    border: 1px solid #FECDD3;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

[data-theme="dark"] .action-required-badge {
    background: rgba(225, 29, 72, 0.2);
    color: #FB7185;
    border-color: #E11D48;
}

/* Source Info Footer */
.source-info-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-card);
}

.source-info-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.source-info-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   SINIF REHBERİ (GRADE GUIDE) ROADMAP REDESIGN STYLES
   ========================================================================== */

/* Refined "Sırada Ne Var?" Hero Banner */
.gg-hero-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 70, 229, 0.06) 100%);
    border: 1px solid var(--primary-border);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gg-hero-card:hover {
    box-shadow: var(--shadow-md);
}

.gg-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.65rem;
}

.gg-hero-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.gg-hero-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.gg-hero-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 0.6rem 1.1rem;
    min-width: 130px;
    box-shadow: var(--shadow-sm);
}

.gg-hero-countdown-val {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
}

.gg-hero-countdown-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Annual Summary Legend Bar */
.gg-summary-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.gg-summary-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gg-summary-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gg-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-body);
    border: 1px solid var(--border-card);
    color: var(--text-body);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-md);
}

.gg-summary-chip.primary {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
}

.gg-summary-chip.amber {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #D97706;
}
[data-theme="dark"] .gg-summary-chip.amber {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.3);
    color: #FBBF24;
}

/* Compact Roadmap Filter Bar */
.gg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gg-toolbar-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.gg-filter-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 0.3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
}

.gg-filter-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gg-filter-tab:hover {
    color: var(--primary);
    background: var(--bg-body);
}

.gg-filter-tab.active {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* Vertical Editorial Roadmap Journey */
.gg-roadmap-journey {
    position: relative;
    padding-left: 3rem;
    margin-top: 1rem;
}

.gg-roadmap-journey::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 24px;
    bottom: 24px;
    width: 3px;
    background: var(--border-card);
    border-radius: 2px;
}

.gg-roadmap-node {
    position: relative;
    margin-bottom: 1.5rem;
    transition: all 0.25s ease;
}

.gg-roadmap-node:last-child {
    margin-bottom: 0;
}

/* Node Marker Icon */
.gg-marker {
    position: absolute;
    left: -3rem;
    top: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2.5px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    z-index: 3;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

/* Node Category Semantic Colors */
.gg-marker.cat-exam { color: #4F46E5; border-color: #C7D2FE; background: #EEF2FF; }
.gg-marker.cat-app { color: #0284C7; border-color: #BAE6FD; background: #F0F9FF; }
.gg-marker.cat-reg { color: #059669; border-color: #A7F3D0; background: #ECFDF5; }
.gg-marker.cat-res { color: #7C3AED; border-color: #DDD6FE; background: #F5F3FF; }
.gg-marker.cat-pref { color: #D97706; border-color: #FDE68A; background: #FFFBEB; }
.gg-marker.cat-doc { color: #0891B2; border-color: #CFFAFE; background: #ECFEFF; }
.gg-marker.cat-info { color: #64748B; border-color: #E2E8F0; background: #F8FAFC; }

[data-theme="dark"] .gg-marker.cat-exam { color: #818CF8; border-color: rgba(99, 102, 241, 0.4); background: rgba(99, 102, 241, 0.15); }
[data-theme="dark"] .gg-marker.cat-app { color: #38BDF8; border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.15); }
[data-theme="dark"] .gg-marker.cat-reg { color: #34D399; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.15); }
[data-theme="dark"] .gg-marker.cat-res { color: #A78BFA; border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.15); }
[data-theme="dark"] .gg-marker.cat-pref { color: #FBBF24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.15); }
[data-theme="dark"] .gg-marker.cat-doc { color: #22D3EE; border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.15); }
[data-theme="dark"] .gg-marker.cat-info { color: #94A3B8; border-color: rgba(148, 163, 184, 0.4); background: rgba(148, 163, 184, 0.15); }

/* Three Visual States */
/* 1. Completed / Past State */
.gg-roadmap-node.gg-state-completed {
    opacity: 0.72;
}

.gg-roadmap-node.gg-state-completed .gg-marker {
    background: var(--bg-body);
    border-color: var(--border-card);
    color: var(--text-light);
}

.gg-roadmap-node.gg-state-completed:hover {
    opacity: 0.95;
}

/* 2. Ongoing / Present State */
.gg-roadmap-node.gg-state-ongoing .gg-marker {
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.2);
    animation: gg-ring-pulse 2s infinite;
}

@keyframes gg-ring-pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.gg-roadmap-node.gg-state-ongoing .gg-card {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
    box-shadow: var(--shadow-md);
}

/* 3. Upcoming State */
.gg-roadmap-node.gg-state-upcoming .gg-card {
    border: 1px solid var(--border-card);
}

/* Next Important Item Highlight */
.gg-roadmap-node.gg-next-important .gg-card {
    border-left: 4px solid var(--accent);
}

/* Roadmap Card Component */
.gg-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.gg-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.gg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.gg-card-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.gg-card-summary {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

/* Contextual Amber Action Box */
.gg-action-box {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

[data-theme="dark"] .gg-action-box {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.35);
    color: #FBBF24;
}

/* Date Rail Badge */
.gg-date-rail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}

.gg-countdown-badge {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
}

/* Right Offcanvas Slide Drawer for Grade Guide Details */
.gg-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10500;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gg-drawer-backdrop.open {
    display: block;
    opacity: 1;
}

.gg-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-card);
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    z-index: 10501;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gg-drawer-backdrop.open .gg-drawer-panel {
    transform: translateX(0);
}

.gg-drawer-header {
    padding: 1.35rem 1.65rem;
    border-bottom: 1px solid var(--border-card);
    background: var(--bg-body);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gg-drawer-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.gg-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.gg-drawer-close:hover {
    color: var(--text-main);
    background: var(--border-card);
}

.gg-drawer-body {
    padding: 1.65rem;
    overflow-y: auto;
    flex: 1;
}

/* Past events collapsible wrapper */
.gg-past-toggle-btn {
    background: var(--bg-card);
    border: 1px dashed var(--border-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    transition: var(--transition-fast);
}

.gg-past-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary-border);
    background: var(--primary-light);
}

@media (max-width: 768px) {
    .gg-roadmap-journey {
        padding-left: 2.35rem;
    }
    .gg-roadmap-journey::before {
        left: 15px;
    }
    .gg-marker {
        left: -2.35rem;
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .gg-drawer-panel {
        width: 100vw;
        max-width: 100vw;
    }
}
