@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');

/* --- CSS Variables & Design System --- */
:root {
    --primary: #0f172a;       /* Deep Navy */
    --primary-light: #1e293b; /* Slate Navy */
    --accent: #d97706;        /* Warm Gold */
    --accent-hover: #b45309;  /* Dark Gold */
    --accent-light: #fef3c7;  /* Light Gold */
    --bg-main: #f8fafc;       /* Off-white */
    --bg-dark: #020617;       /* Very Dark Slate */
    --text-dark: #0f172a;     /* Dark Slate Text */
    --text-light: #f8fafc;    /* Off-white Text */
    --text-muted: #64748b;    /* Cool Gray */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Master Layout Wrapper --- */
.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Premium Header Navbar --- */
.header-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-dki {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-spmb-banner {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Navigation Links (Right Side) */
.nav-menu-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-light);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white !important;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(15, 23, 42, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white !important;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px -3px rgba(217, 119, 6, 0.4);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(217, 119, 6, 0.5);
}

/* --- Hero Landing Section --- */
.hero-section {
    background: radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.08) 0%, transparent 50%),
                linear-gradient(135deg, #0f172a 0%, #020617 100%);
    color: white;
    padding: 5rem 5% 4rem 5%;
    position: relative;
    overflow: hidden;
    border-bottom-right-radius: 40px;
    border-bottom-left-radius: 40px;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: radial-gradient(circle, white 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.badge-headline {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #fbbf24;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: white;
}

.hero-title span {
    color: #fbbf24;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Quick Stats Bar */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 2rem auto 0 auto;
}

.stat-item {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 4px;
}

/* --- Dashboard Grid Container --- */
.main-content {
    padding: 3rem 5%;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--accent);
    padding-left: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* --- Section 1: Regulasi (Glassmorphic cards) --- */
.regulations-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

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

.regulation-card:hover {
    transform: translateX(6px);
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: var(--shadow-md);
}

.regulation-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.regulation-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.regulation-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.regulation-body {
    font-size: 0.95rem;
    color: #475569;
}

/* --- Section 2: SSG Catalog (Grid with Search & Filter) --- */
.filter-bar {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group-small {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-light);
    letter-spacing: 0.5px;
}

.filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.btn-filter-submit {
    align-self: flex-end;
    padding: 10px 20px;
    height: 42px;
}

.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.school-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 0; /* Updated: No padding for full-bleed cover image */
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.school-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(217, 119, 6, 0.2);
}

/* --- Flyer Cover Styles --- */
.school-flyer-cover {
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background-color: #f1f5f9;
    cursor: zoom-in;
    border-bottom: 1px solid var(--card-border);
}

.flyer-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.school-card:hover .flyer-img {
    transform: scale(1.08);
}

.flyer-overlay-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    opacity: 0;
    transition: var(--transition);
    gap: 8px;
    z-index: 2;
}

.school-flyer-cover:hover .flyer-overlay-hover {
    opacity: 1;
}

/* --- Flyer Placeholder Styles (CSS Generated Flyer) --- */
.school-flyer-cover-placeholder {
    height: 220px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 24px;
    color: white;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.school-flyer-cover-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.placeholder-tag {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.placeholder-level-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 6px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.placeholder-school-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.placeholder-footer {
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 4px;
    font-weight: 600;
}

/* --- Floating Avatar Styles --- */
.school-profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -32px; /* Pulls it up to overlap the cover image */
    position: relative;
    z-index: 5;
    padding: 0 24px;
}

.school-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    background-color: white;
}

.school-profile-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-light);
}

.school-profile-avatar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 24px; /* Aligns vertically with overlapping text */
}

.school-card-npsn-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Card Body --- */
.school-card-body {
    padding: 20px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.school-logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-light);
    border: 1px solid #e2e8f0;
}

.school-badge-level {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    align-self: flex-start;
}

.level-sd { background: #fee2e2; color: #ef4444; }
.level-smp { background: #dbeafe; color: #3b82f6; }
.level-sma { background: #fef3c7; color: #d97706; }
.level-smk { background: #f3e8ff; color: #a855f7; }

.school-npsn {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.school-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.school-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.school-details-list {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.school-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.school-detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

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

.school-compliance-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

/* Pulsing Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-active {
    background-color: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}

.dot-expired {
    background-color: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
}

.badge-active {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-expired {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.badge-none {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* --- Section 3: Daya Tampung & Hasil Seleksi (Table Layout) --- */
.table-container {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    background-color: var(--primary);
    color: white;
    padding: 18px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.premium-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    vertical-align: middle;
}

.premium-table tbody tr:last-child td {
    border-bottom: none;
}

.premium-table tbody tr {
    transition: var(--transition);
}

.premium-table tbody tr:hover {
    background-color: #f8fafc;
}

.school-quota-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quota-item-tag {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.quota-numbers {
    display: flex;
    gap: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 4px;
}

.download-link-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

/* --- Auth Login Page --- */
.auth-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 60px;
    margin-bottom: 12px;
}

.login-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* --- Alerts & Notifications --- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* --- Admin / Dashboard Panels --- */
.dashboard-layout {
    display: flex;
    flex: 1;
    background: #f1f5f9;
}

.sidebar {
    width: 280px;
    background: var(--primary);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: #94a3b8;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-link.active {
    border-left: 4px solid var(--accent);
}

.dashboard-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 20px;
    border-bottom: 1px solid #cbd5e1;
}

.panel-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.panel-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Countdown Component --- */
.countdown-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.countdown-timer-wrapper {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 80px;
    padding: 10px;
    border-radius: var(--radius-md);
}

.timer-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

.timer-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

/* Forms inside panels */
.panel-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.panel-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

/* Modal Styling (Clean simple CSS modal) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    color: white;
}

.modal-body {
    padding: 30px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Footer --- */
.app-footer {
    background-color: var(--primary);
    color: #94a3b8;
    padding: 3rem 5% 2rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto 2rem auto;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link-title {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-link-item {
    font-size: 0.85rem;
}

.footer-link-item:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Keyframe Animations --- */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-menu-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
    }
}

/* --- Homepage Hero & Layout Classes (Desktop) --- */
.hero-official {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 3.5rem 5%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.hero-branding-block {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.logo-dki-hero {
    height: 85px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.jenjang-grid-container {
    display: grid;
    grid-template-columns: 0.7fr 2fr;
    gap: 2.5rem;
    align-items: center;
}

/* --- Additional Responsive Rules for Mobile --- */
.responsive-grid-2-1 {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}
.responsive-grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.responsive-grid-1-5-0-5 {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr;
    gap: 20px;
    align-items: center;
}
.responsive-grid-0-8-1-2 {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
}

.hero-branding-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (max-width: 991px) {
    /* Responsive grids stack on tablet/mobile */
    .responsive-grid-2-1,
    .responsive-grid-1-1,
    .responsive-grid-1-5-0-5,
    .responsive-grid-0-8-1-2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* Homepage Hero grid stack */
    .hero-official {
        grid-template-columns: 1fr !important;
        padding: 2.5rem 5% !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    /* Hide Hero Right Banner Card on Mobile/Tablet to match official site */
    .hero-official .hero-right {
        display: none !important;
    }
    
    .hero-official .hero-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-official .hero-branding-block {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
    }
    
    .logo-dki-hero {
        height: 120px !important; /* Scale up DKI emblem on mobile/tablet to look prominent, matching official site */
        margin: 0 auto 0.5rem auto !important;
    }
    
    .hero-branding-text {
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Homepage Jenjang Grid stack */
    .jenjang-grid-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Hide mascot on mobile/tablet to save vertical space, matching official site */
    .jenjang-grid-container .mascot-container {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Navbar remains in a single compact row on mobile, matching spmb.jakarta.go.id */
    .header-nav {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 4% !important;
        gap: 8px !important;
        min-height: 60px !important;
    }
    
    .logo-container {
        justify-content: flex-start !important;
        width: auto !important;
        gap: 8px !important;
    }
    
    .logo-spmb-online {
        height: 28px !important;
    }
    
    .logo-dki-mini {
        height: 26px !important;
        padding-left: 8px !important;
    }
    
    .nav-menu-right {
        width: auto !important;
        gap: 10px !important;
    }
    
    .btn-login-header {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        height: 32px !important;
    }
    
    /* Force level cards into a neat 2-column grid on mobile, matching official layout */
    .jenjang-cards-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    /* Make card elements slightly smaller to fit perfectly */
    .jenjang-card {
        padding: 1.25rem 0.75rem !important;
        border-radius: 12px !important;
    }
    
    .jenjang-card img {
        height: 40px !important;
        margin-bottom: 0.5rem !important;
    }
    
    .jenjang-card h3 {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
    }
    
    .jenjang-card div {
        font-size: 0.85rem !important;
    }
    
    .jenjang-card div:last-child {
        font-size: 0.7rem !important;
    }
    
    /* Table responsive scroll container */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md) !important;
    }
    
    .premium-table th, .premium-table td {
        padding: 12px 16px !important;
        white-space: nowrap; /* Prevent ugly wrapping inside tables */
    }
    
    /* General section paddings */
    .main-content, .dashboard-main, .jenjang-section, .hero-official {
        padding: 20px 15px !important;
    }
    
    .panel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .panel-user-info {
        width: 100% !important;
        justify-content: space-between !important;
    }
}

/* --- Premium School Detail Page Styling --- */
.school-profile-header {
    padding: 3rem 5%;
    color: white;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

.school-profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.school-theme-sd { background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%); }
.school-theme-smp { background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%); }
.school-theme-sma { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }
.school-theme-smk { background: linear-gradient(135deg, #0f172a 0%, #020617 100%); }

.school-grid-detail {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.countdown-timer-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
    text-align: center;
    margin-top: 15px;
}

.countdown-timer-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 65px;
    padding: 6px;
    border-radius: 8px;
}

.countdown-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1;
}

.countdown-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

@media (max-width: 991px) {
    .school-grid-detail {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 20px 15px !important;
    }
    
    .school-profile-header {
        padding: 2.5rem 15px !important;
        text-align: center !important;
    }
    
    .school-profile-header .btn-premium {
        align-self: center !important;
    }
}

