@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* Variabel Desain Utama */
:root {
    --accent-blue: #1A3A5C;
    --accent-blue-hover: #10243b;
    --bs-primary: #1A3A5C;
    --bs-primary-rgb: 26, 58, 92;
    --bg-light: #ffffff;
    --bg-header: #1A3A5C; /* Selaras dengan tema sekolah */
    --bg-footer: #10243b;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #cbd5e1;
    --transition-smooth: all 0.2s ease-in-out;
}

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

html, body {
    height: 100%;
}

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

/* Header Atas */
.top-header {
    background-color: var(--bg-header);
    color: #ffffff;
    padding: 1.1rem 2rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Footer Bawah */
.bottom-footer {
    background-color: var(--bg-footer);
    color: #4b5563;
    padding: 0.9rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    border-top: 1px solid #d1d5db;
}

/* Konten Utama (Hero Landing Page) */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

/* Logo Bulat Sesuai Storyboard */
.logo-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    overflow: hidden;
    padding: 6px;
}

.logo-circle:hover {
    transform: translateY(-2px);
    border-color: var(--accent-blue);
    box-shadow: 0 8px 20px rgba(26, 58, 92, 0.16);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #4b5563;
    letter-spacing: 2px;
}

/* Teks Selamat Datang & Nama Sekolah */
.welcome-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-main);
    margin-bottom: 0.65rem;
    letter-spacing: -0.3px;
}

.school-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2.25rem;
    letter-spacing: 0.2px;
}

/* Tombol Aksi */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.action-buttons .btn {
    display: block;
    width: 100%;
}

.btn-primary {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--accent-blue-hover) !important;
    border-color: var(--accent-blue-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.2);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

/* Tampilan Gambar Logo Sekolah */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Menjaga aspek rasio gambar agar tidak pecah/terdistorsi */
    border-radius: 50%;  /* Menjaga gambar tetap berbentuk lingkaran */
    padding: 8px;        /* Margin dalam agar logo sekolah terlihat rapi di dalam lingkaran */
}

/* ==========================================================================
   LAYOUT SISTEM SISWA (SIDEBAR + MAIN CONTENT)
   ========================================================================== */

.siswa-layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   SIDEBAR SISWA ULTRA MODERN & INTERAKTIF (SMP SWASTA NOMMENSEN)
   ========================================================================== */
.siswa-sidebar {
    width: 285px;
    background: linear-gradient(180deg, #0d1e33 0%, #152c48 45%, #1a3a5c 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 6px 0 25px rgba(10, 25, 47, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 1000;
}

/* Brand Header */
.sidebar-brand-wrapper {
    padding: 1.35rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    flex: 1;
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    position: relative;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    background-color: #22c55e;
    border: 2px solid #0d1e33;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.1;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: #7dd3fc;
    font-weight: 600;
    display: block;
    margin-top: 0.2rem;
    letter-spacing: 0.3px;
}

/* User Profile Mini Widget */
.sidebar-user-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin: 1rem 1rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #38bdf8 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.user-details {
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.user-badge-class {
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.user-nis {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}

/* Navigasi Menu */
.sidebar-nav-container {
    padding: 0.75rem 0.65rem;
    flex: 1;
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.42);
    padding: 0.6rem 0.85rem 0.3rem;
}

.siswa-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.siswa-sidebar-menu li {
    margin-bottom: 0.3rem;
}

.siswa-sidebar-menu a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.75rem;
    border: 1px solid transparent;
}

.nav-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.siswa-sidebar-menu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.siswa-sidebar-menu a:hover .nav-icon-box {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.siswa-sidebar-menu a.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, rgba(37, 99, 235, 0.12) 100%);
    border-color: rgba(56, 189, 248, 0.3);
    border-left: 3.5px solid #38bdf8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.siswa-sidebar-menu a.active .nav-icon-box {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

/* Badges pada Item Navigasi */
.nav-pill-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    white-space: nowrap;
}

.badge-blue {
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-amber {
    background: rgba(251, 191, 36, 0.18);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-green {
    background: rgba(52, 211, 153, 0.18);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-red {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Footer Navigasi Sidebar */
.siswa-sidebar-footer {
    padding: 0.85rem 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-sidebar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.95rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-sidebar-home {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sidebar-home:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.btn-sidebar-logout {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-sidebar-logout:hover {
    color: #ffffff;
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateX(3px);
}

/* Area Konten Utama */
.siswa-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8fafc;
    margin-left: 285px;
    width: calc(100% - 285px);
}

.siswa-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.siswa-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: 700;
}

.siswa-header-school {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.siswa-content {
    flex-grow: 1;
    padding: 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.siswa-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.1rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   KARTU FITUR & STATISTIK HOMEPAGE SISWA
   ========================================================================== */
.feature-card {
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1), border-color 0.25s ease;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
}

.feature-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.feature-card:hover .feature-icon-box {
    transform: scale(1.08);
}

.stat-bento-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.stat-bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.pilar-flow-step {
    transition: transform 0.2s ease;
}

.pilar-flow-step:hover {
    transform: translateY(-3px);
}

.pilar-step-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================================================
   KOMPONEN HERO SAMBUTAN SISWA
   ========================================================================== */
.siswa-welcome-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.siswa-welcome-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.siswa-welcome-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.92rem;
}

.siswa-meta-badge {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
}

.siswa-welcome-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.siswa-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 1.15rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.siswa-hero-btn:hover {
    background: #ffffff;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

/* Container & Kartu Menu Siswa Sesuai Storyboard */
.menu-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.menu-card {
    flex: 1 1 280px;
    max-width: 320px;
    background: #ffffff;
    border: 2px solid #374151; /* Outline tebal sesuai storyboard */
    border-radius: 4px; /* Sudut tajam/rounded tipis sesuai storyboard */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(26, 58, 92, 0.1);
    border-color: var(--accent-blue);
}

.menu-card-header {
    background-color: #e5e7eb; /* Header kartu abu-abu sesuai storyboard */
    border-bottom: 2px solid #374151;
    padding: 0.85rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    transition: var(--transition-smooth);
}

.menu-card:hover .menu-card-header {
    background-color: var(--accent-blue-light);
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.menu-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    text-align: center;
    min-height: 140px;
}

.menu-card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* Tombol Buka di dalam Kartu */
.menu-card-btn {
    background-color: #4b5563; /* Warna default tombol abu-abu tua sesuai storyboard */
    color: #ffffff;
    padding: 0.55rem 2.2rem;
    border: 2px solid #374151;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-block;
}

.menu-card:hover .menu-card-btn {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ==========================================================================
   STYLING TABEL & FORM GLOBAL
   ========================================================================== */

.table-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.table-materi {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table-materi th {
    background-color: #f1f5f9;
    color: var(--accent-blue);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table-materi td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

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

/* Tombol Aksi Skala Kecil (Small Buttons) */
.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: var(--transition-smooth);
    border: none;
    font-family: inherit;
}

.btn-play {
    background-color: var(--accent-blue);
    color: #ffffff;
}

.btn-play:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.btn-edit {
    background-color: #d97706; /* Kuning Amber gelap */
    color: #ffffff;
}

.btn-edit:hover {
    background-color: #b45309;
    transform: translateY(-1px);
}

.btn-delete {
    background-color: #dc2626; /* Merah */
    color: #ffffff;
}

.btn-delete:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #16a34a; /* Hijau */
    color: #ffffff;
}

.btn-success:hover {
    background-color: #15803d;
    transform: translateY(-1px);
}

/* Form Styles */
.form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.form-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* ==========================================================================
   KOMPONEN TAMBAHAN: KURIKULUM 20 MATERI KELAS 7, TABS, VIDEO & AUDIO PLAYER
   ========================================================================== */

/* Tab Navigasi Semester */
.semester-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.tab-btn {
    padding: 0.65rem 1.35rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.tab-btn.active {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.badge-count {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.25);
    font-weight: 700;
}
.tab-btn:not(.active) .badge-count {
    background: #e2e8f0;
    color: #475569;
}

/* Grid Materi 20 Bab — Auto-fill Rapih dengan Equal Height Cards */
.materi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

.materi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.materi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

/* Kontainer Konten Atas Kartu */
.materi-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.materi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.bab-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #1e3a8a;
    background: #eff6ff;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
    letter-spacing: 0.5px;
}

.badge-sem {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-sem-1 {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-sem-2 {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.materi-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    min-height: 3.2rem; /* Menjaga perataan horizontal antar-kartu */
}

.materi-card-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Kontainer Aksi Bawah Kartu */
.materi-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

/* Fitur Badges (Video, Teks, Audio, Kuis) Grid 2x2 Simetris */
.materi-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2e8f0;
}

.feat-badge {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
}

.feat-badge.active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-materi-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1e3a8a;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}

.btn-materi-open:hover {
    background: #172554;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.25);
}

/* ==========================================================================
   HALAMAN DETAIL MATERI (4 PILAR TERPADU)
   ========================================================================== */
.materi-detail-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.materi-detail-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.materi-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.materi-breadcrumb a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

.materi-detail-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.materi-detail-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Section Box Pembelajaran */
.pilar-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pilar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.65rem;
}

/* Player Video 16:9 Responsif */
.video-container-responsive {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Rasio 16:9 */
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.video-container-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}

/* Modul Teks Guru Template */
.materi-reading-body {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
}

.materi-reading-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    color: #1e3a8a;
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
    border-left: 4px solid #3b82f6;
    padding-left: 0.65rem;
}

.materi-reading-body p {
    margin-bottom: 1rem;
}

.materi-reading-body ul, .materi-reading-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.materi-reading-body li {
    margin-bottom: 0.4rem;
}

/* Audio Player Box */
.audio-player-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.audio-player-card audio {
    width: 100%;
    outline: none;
    border-radius: 8px;
}

/* Box Kuis CTA */
.quiz-cta-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.2);
}

.quiz-cta-banner h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.quiz-cta-banner p {
    color: #bfdbfe;
    font-size: 0.95rem;
}

.btn-start-quiz {
    padding: 0.85rem 1.75rem;
    background: #f59e0b;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn-start-quiz:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* Navigasi Bab Sebelumnya & Selanjutnya */
.materi-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-nav-step {
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-nav-step:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}







/* ==========================================================================
   RESPONSIF MOBILE & TABLET — Hanya perubahan layout, desain tetap asli
   ========================================================================== */

/* 1. Gambar & Video — Tidak meluap dari kontainer */
img, video {
    max-width: 100%;
    height: auto;
}

/* 2. Tabel — Scroll horizontal pada layar sempit */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 3. Login card & splash screen — Fleksibel di semua ukuran layar */
.login-card {
    max-width: 460px;
    width: 100%;
}

.main-container {
    width: 100%;
    max-width: 800px;
    padding: 2rem 1rem;
}

/* ============================================================
   HAMBURGER BUTTON — Tombol buka/tutup sidebar mobile
   Hanya tampil di mobile, tersembunyi di desktop
   ============================================================ */
.mobile-hamburger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.mobile-hamburger:hover {
    background: rgba(255,255,255,0.15);
}

.mobile-hamburger svg {
    display: block;
}




/* ============================================================
   TABLET — Breakpoint 1024px (Atur minmax grid materi)
   ============================================================ */
@media (max-width: 1024px) {
    .materi-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }

    .siswa-content {
        padding: 2rem;
    }
}

/* ==========================================================================
   DESKTOP ADMIN / GURU FIXED SIDEBAR & OFFSET LAYOUT (>768px)
   ========================================================================== */
@media (min-width: 769px) {
    .admin-body .sidebar,
    body:has(.admin-layout) .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 250px !important;
        height: 100vh !important;
        overflow: hidden !important;
        z-index: 1000 !important;
    }

    .admin-body .top-header,
    body:has(.admin-layout) .top-header,
    .admin-body .admin-layout,
    body:has(.admin-layout) .admin-layout,
    .admin-body .bottom-footer,
    body:has(.admin-layout) .bottom-footer {
        margin-left: 250px !important;
        width: calc(100% - 250px) !important;
    }

    .admin-body .main-content,
    .admin-body .admin-content,
    body:has(.admin-layout) .main-content,
    body:has(.admin-layout) .admin-content {
        margin-left: 0 !important;
        width: 100% !important;
        overflow-y: visible !important;
        min-width: 0 !important;
    }
}

/* ============================================================
   MOBILE — Breakpoint 768px
   ============================================================ */
@media (max-width: 768px) {

    .mobile-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .siswa-layout,
    .admin-layout {
        flex-direction: column;
        align-items: stretch !important;
    }

    /* Siswa sidebar: collapsible di mobile (scroll normal) */
    .siswa-sidebar {
        width: 100% !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        height: auto !important;
        border-right: none;
        border-bottom: 2px solid rgba(255, 255, 255, 0.15);
        max-height: 72px;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: auto;
    }

    .siswa-sidebar.sidebar-open {
        max-height: 950px;
        overflow-y: auto;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    }

    .sidebar-brand-wrapper {
        padding: 0.85rem 1.25rem;
        border-bottom: none;
    }

    .sidebar-user-card {
        margin: 0.75rem 1rem;
    }

    .siswa-sidebar-menu {
        padding: 0.25rem 0.5rem 0.5rem;
        flex-grow: 0;
    }

    .siswa-sidebar-footer {
        padding: 0.75rem 1rem 1.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem;
        align-items: stretch !important;
    }

    .siswa-welcome-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem 1.1rem;
    }

    .siswa-welcome-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .siswa-hero-btn {
        flex: 1;
        justify-content: center;
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Admin sidebar: flat horizontal layout */
    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        overflow: visible !important;
        border-right: none !important;
        border-bottom: 2px solid #cbd5e1 !important;
        padding: 1rem 1.25rem !important;
        flex-shrink: 0 !important;
    }

    .top-header,
    .admin-layout,
    .bottom-footer,
    .main-content,
    .admin-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar-brand h3 {
        margin-bottom: 1rem !important;
    }

    .sidebar-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        flex-grow: 0 !important;
    }

    .sidebar-menu li {
        margin-bottom: 0 !important;
        flex: 1 1 140px !important;
    }

    .sidebar-menu a {
        font-size: 0.8rem !important;
        padding: 0.6rem 0.5rem !important;
    }

    .btn-logout-sidebar {
        margin-top: 0.5rem !important;
        font-size: 0.85rem !important;
        padding: 0.6rem 1rem !important;
    }

    .main-content,
    .admin-content {
        padding: 1.25rem 1rem !important;
        overflow-y: visible !important;
    }

    .siswa-main {
        min-width: 0;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .siswa-content {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }

    .siswa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 1rem 1.25rem;
    }

    .siswa-header h1 {
        font-size: 1.2rem;
    }

    .top-header {
        font-size: 1rem;
        padding: 0.85rem 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        text-align: left;
    }

    .bottom-footer {
        font-size: 0.78rem;
        padding: 0.65rem 1rem;
    }

    .materi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .materi-card {
        max-width: 100%;
        height: auto;
    }

    .materi-card-body {
        flex: unset;
    }

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

    .menu-container {
        gap: 1rem;
    }

    .menu-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .semester-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.85rem;
        padding: 0.55rem 1rem;
    }

    .materi-detail-wrapper {
        max-width: 100%;
    }

    .materi-detail-header,
    .pilar-section {
        padding: 1.1rem 1rem;
        border-radius: 8px;
    }

    .materi-detail-title {
        font-size: 1.3rem;
    }

    .materi-detail-meta {
        gap: 0.5rem;
    }

    .quiz-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }

    .btn-start-quiz {
        width: 100%;
        justify-content: center;
    }

    .materi-nav-buttons {
        flex-direction: column;
        gap: 0.65rem;
        margin-top: 1.5rem;
    }

    .btn-nav-step {
        width: 100%;
        justify-content: center;
    }

    .welcome-text {
        font-size: 1.3rem;
    }

    .logo-circle {
        width: 120px;
        height: 120px;
        margin-bottom: 1.25rem;
    }

    .action-buttons {
        max-width: 100%;
    }

    .form-card {
        padding: 1.25rem 1rem;
    }

    .btn-sm {
        font-size: 0.78rem;
        padding: 0.35rem 0.65rem;
    }
}

/* ============================================================
   SMALL MOBILE — Breakpoint 480px
   ============================================================ */
@media (max-width: 480px) {
    .top-header {
        font-size: 0.9rem;
    }

    .siswa-header h1 {
        font-size: 1.1rem;
    }

    .materi-detail-title {
        font-size: 1.15rem;
    }

    .pilar-title {
        font-size: 1.1rem;
    }

    .login-card {
        border-radius: 6px;
    }

    .semester-tabs {
        gap: 0.35rem;
    }

    .tab-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}

/* ============================================================
   STYLING ELEGAN MODUL PEMBELAJARAN SISWA (MATERI HTML CONTENT)
   ============================================================ */
.materi-html-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.8;
}

.materi-html-content h2,
.materi-html-content h3,
.materi-html-content h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #1e3a8a;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.materi-html-content h2 { font-size: 1.35rem; }
.materi-html-content h3 { font-size: 1.2rem; }
.materi-html-content h4 { font-size: 1.05rem; }

.materi-html-content p {
    margin-bottom: 0.9rem;
}

.materi-html-content ul,
.materi-html-content ol {
    margin-bottom: 1.1rem;
    padding-left: 1.6rem;
}

.materi-html-content li {
    margin-bottom: 0.4rem;
}

.materi-html-content blockquote {
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 10px 10px 0;
    color: #1e40af;
    font-style: italic;
}

.materi-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.materi-html-content th,
.materi-html-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    font-size: 0.92rem;
}

.materi-html-content th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 700;
}

.materi-html-content tr:nth-child(even) {
    background-color: #f8fafc;
}

/* ==========================================================================
   Leaderboard & Podium Styles
   ========================================================================== */
.podium-box {
    border-radius: 12px;
    padding: 0.75rem 0.6rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podium-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.podium-1 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.podium-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px solid #94a3b8;
}

.podium-3 {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border: 2px solid #f97316;
}

.rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.rank-1 { background-color: #fef08a; color: #854d0e; }
.rank-2 { background-color: #e2e8f0; color: #334155; }
.rank-3 { background-color: #ffedd5; color: #9a3412; }
.rank-other { background-color: #f1f5f9; color: #64748b; }

.leaderboard-scroll::-webkit-scrollbar {
    width: 6px;
}
.leaderboard-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.leaderboard-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.leaderboard-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

