:root {
    --primary: #1a5632;
    --primary-light: #2d7a4a;
    --primary-dark: #0f3a20;
    --gold: #8B7D3C;
    --gold-light: #BFA84F;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-light: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    min-height: 56px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    margin-right: 2rem;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.navbar-brand .logo {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}
.navbar-brand span {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin-left: auto;
    align-items: center;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    display: block;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--gold-light);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.5rem;
    flex-shrink: 0;
}
.nav-auth a {
    color: #fff;
    text-decoration: none;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-auth .btn-login { background: rgba(255,255,255,0.15); }
.nav-auth .btn-login:hover { background: rgba(255,255,255,0.25); }
.nav-auth .btn-register { background: var(--gold); }
.nav-auth .btn-register:hover { background: var(--gold-light); }
.nav-auth .user-info { color: rgba(255,255,255,0.9); font-size: 0.85rem; padding: 0.4rem 0.9rem; border-bottom: 2px solid transparent; border-radius: 4px; transition: all 0.2s; }
.nav-auth .user-info:hover { color: #fff; background: rgba(255,255,255,0.1); border-bottom-color: var(--gold-light); }
.nav-auth .btn-logout { background: rgba(220,53,69,0.8); }

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}
.hero-content {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Page Header ── */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 2.5rem 1rem;
    text-align: center;
}
.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}
.page-header p {
    opacity: 0.85;
    margin-top: 0.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Container ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}
.card-header {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 600;
}
.card-body { padding: 1.5rem; }

/* ── Welcome Section ── */
.welcome-section {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
}
.welcome-section h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}
.welcome-section .subtitle {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.welcome-section p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

/* ── Materi Card ── */
.materi-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.materi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.materi-number {
    background: var(--primary);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.materi-info { flex: 1; min-width: 0; }
.materi-info h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); }
.materi-meta { font-size: 0.85rem; color: var(--text-light); }
.materi-meta strong { color: var(--text); }
.materi-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.absensi-timestamp {
    font-size: 0.75rem;
    color: var(--text-light);
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    font-style: italic;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-warning { background: var(--warning); color: var(--text); }
.btn-info { background: var(--info); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Quiz ── */
.quiz-container { max-width: 800px; margin: 0 auto; }
.question-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.question-number {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.75rem;
}
.question-text { font-weight: 500; margin-bottom: 1rem; display: inline; }
.options { list-style: none; }
.options li {
    margin-bottom: 0.5rem;
}
.options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.options label:hover { border-color: var(--primary); background: rgba(26,86,50,0.03); }
.options input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
.options input[type="radio"]:checked + span { font-weight: 500; }

.result-correct { border-color: var(--success) !important; background: rgba(40,167,69,0.05) !important; }
.result-wrong { border-color: var(--danger) !important; background: rgba(220,53,69,0.05) !important; }

/* ── Score Display ── */
.score-display {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    color: #fff;
}
.score-pass { background: linear-gradient(135deg, #28a745, #20c997); }
.score-fail { background: linear-gradient(135deg, #dc3545, #e74c3c); }

/* ── Alert ── */
.alert {
    padding: 0.75rem 1.25rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
}
.alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.alert-error { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.alert-info { background: #d1ecf1; border-color: #bee5eb; color: #0c5460; }
.alert-warning { background: #fff3cd; border-color: #ffeeba; color: #856404; }

/* ── Sertifikat ── */
.cert-preview {
    text-align: center;
    padding: 3rem 1rem;
}
.cert-preview .cert-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}
.cert-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.cert-eligible { background: #d4edda; color: #155724; }
.cert-not-eligible { background: #f8d7da; color: #721c24; }

/* ── Table ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); white-space: nowrap; }
td { font-size: 0.9rem; }
tr:hover td { background: rgba(0,0,0,0.02); }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus { border-color: var(--primary); outline: none; }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; }

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--primary);
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 0.25rem; }

/* ── Badge ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-penting { background: var(--danger); color: #fff; }

/* ── Pengumuman ── */
.pengumuman-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.pengumuman-item:last-child { border-bottom: none; }
.pengumuman-item h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.pengumuman-item .date { font-size: 0.8rem; color: var(--text-light); }
.pengumuman-item p { font-size: 0.9rem; color: var(--text-light); margin-top: 0.5rem; }

/* ── Jadwal ── */
.jadwal-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.jadwal-date {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
}
.jadwal-date .day { font-size: 1.5rem; }
.jadwal-date .month { font-size: 0.8rem; opacity: 0.9; }

/* ── Footer ── */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 1rem 1.5rem;
    margin-top: 3rem;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.footer h3 { color: var(--gold-light); font-size: 1rem; margin-bottom: 0.75rem; }
.footer p, .footer a { font-size: 0.85rem; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ── Auth Pages ── */
.auth-container {
    max-width: 420px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.auth-container.auth-wide {
    max-width: 900px;
}
.auth-wide .auth-body form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}
.auth-wide .auth-body .form-full {
    grid-column: 1 / -1;
}
.password-meter {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 0.4rem;
    overflow: hidden;
}
.password-meter .meter-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}
.password-meter-label {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.auth-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 2rem;
    text-align: center;
}
.auth-header h2 { margin-bottom: 0.3rem; }
.auth-header p { opacity: 0.8; font-size: 0.9rem; }
.auth-body { padding: 2rem; }
.auth-footer { text-align: center; padding: 1rem 2rem 2rem; font-size: 0.9rem; }
.auth-footer a { color: var(--primary); font-weight: 500; }

/* ── Timer ── */
.timer {
    position: fixed;
    top: 70px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ── Bimtek Page (SIPINTAR-style) ── */
.bimtek-section-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.bimtek-enrolled-section { margin-bottom: 2rem; }
.bimtek-enrolled-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.bimtek-enrolled-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.bimtek-enrolled-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.bimtek-enrolled-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.bimtek-enrolled-info { flex: 1; min-width: 0; }
.bimtek-enrolled-info h4 { font-size: 0.95rem; margin: 0 0 0.25rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bimtek-enrolled-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.bimtek-enrolled-role { font-size: 0.8rem; color: var(--text-light); }

.bimtek-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bimtek-badge-aktif { background: #d4edda; color: #155724; }
.bimtek-badge-mendatang { background: #fff3cd; color: #856404; }
.bimtek-badge-selesai { background: #e2e3e5; color: #495057; }

.bimtek-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.bimtek-tabs {
    display: flex;
    gap: 0.25rem;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.bimtek-tab {
    padding: 0.5rem 1.2rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}
.bimtek-tab:hover { color: var(--primary); background: rgba(26,86,50,0.05); }
.bimtek-tab.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(26,86,50,0.3); }

.bimtek-search {
    position: relative;
    min-width: 250px;
}
.bimtek-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.2s;
}
.bimtek-search-input:focus { border-color: var(--primary); outline: none; }
.bimtek-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.5;
}

.bimtek-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.bimtek-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.bimtek-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }

.bimtek-card-header {
    padding: 1.25rem 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.bimtek-card-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.bimtek-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}
.bimtek-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bimtek-card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.bimtek-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.bimtek-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-light);
}
.bimtek-meta-icon { font-size: 0.85rem; }

.bimtek-card-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.bimtek-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 500;
}

.bimtek-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.bimtek-status-enrolled {
    color: var(--success);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Bimtek Detail Modal ── */
.bimtek-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
    animation: overlayFadeIn 0.3s ease;
}
.bimtek-dialog::backdrop {
    background: rgba(0,0,0,0.5);
    animation: overlayFadeIn 0.3s ease;
}
.bimtek-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto;
    background: #fff;
}
.bimtek-dialog[open] { display: block; }
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.bimtek-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    margin: auto;
    animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.bimtek-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.bimtek-modal-header h3 { font-size: 1.1rem; margin: 0; }
.bimtek-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}
.bimtek-modal-close:hover { color: var(--text); }
.bimtek-modal-body { padding: 1.5rem; }
.bimtek-modal-icon-wrapper {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}
.bimtek-modal-title {
    text-align: center;
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 600;
    margin: 0 0 1.5rem;
    line-height: 1.4;
}
.bimtek-modal-section {
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
}
.bimtek-modal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}
.bimtek-modal-section-header:hover { background: rgba(0,0,0,0.02); }
.bimtek-modal-toggle {
    width: 28px; height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 700;
}
.bimtek-modal-section-content {
    padding: 0 1.25rem 1rem;
    max-height: 800px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
.bimtek-modal-section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}
.bimtek-modal-info { display: flex; flex-direction: column; gap: 0.75rem; }
.bimtek-modal-info-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}
.bimtek-modal-label { font-weight: 600; white-space: nowrap; }
.bimtek-modal-features { display: flex; flex-direction: column; gap: 0.5rem; }
.bimtek-modal-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.4rem 0;
}
.bimtek-modal-link-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.bimtek-modal-link-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateX(4px);
}
.bimtek-modal-link-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}
.bimtek-modal-link-btn:hover .bimtek-modal-link-arrow {
    opacity: 1;
    transform: translateX(4px);
}
.bimtek-modal-action {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.btn-back-bimtek {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    margin-bottom: 0.5rem;
}
.btn-back-bimtek:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateX(-4px);
}

.bimtek-confirm-dialog {
    max-width: 420px;
    padding: 0;
}
.bimtek-confirm-content {
    padding: 2rem;
    text-align: center;
}
.bimtek-confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.bimtek-confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}
.bimtek-confirm-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.bimtek-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.bimtek-confirm-actions .btn {
    min-width: 120px;
    justify-content: center;
}

.bimtek-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.bimtek-empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.bimtek-empty h3 { color: var(--text); margin-bottom: 0.5rem; }
.bimtek-empty p { color: var(--text-light); font-size: 0.9rem; }

/* ── Panduan Bimtek Carousel ── */
.panduan-section {
    padding: 3rem 0;
}
.panduan-heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.panduan-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}
.panduan-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0 1rem;
    box-sizing: border-box;
}
.panduan-carousel {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 1rem 0;
    flex: 1;
}
.panduan-carousel::-webkit-scrollbar { display: none; }
.panduan-card {
    flex: 0 0 380px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}
.panduan-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.panduan-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.panduan-card:hover img {
    transform: scale(1.08);
}
.panduan-nav {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.2s, color 0.2s;
}
.panduan-nav:hover {
    background: var(--primary);
    color: #fff;
}

/* Panduan Lightbox Modal */
.panduan-modal {
    background: transparent;
    border: none;
    max-width: 95vw;
    max-height: 95vh;
    width: 95vw;
    height: 95vh;
    padding: 0;
    margin: auto;
    align-items: center;
    justify-content: center;
}
.panduan-modal[open] {
    display: flex;
}
.panduan-modal::backdrop {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.panduan-modal img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    animation: panduanZoomIn 0.3s ease;
}
@keyframes panduanZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.panduan-modal-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.panduan-modal-close:hover { opacity: 1; }
.panduan-modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 3rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.panduan-modal-nav:hover { background: rgba(255,255,255,0.3); }
.panduan-modal-prev { left: 1.5rem; }
.panduan-modal-next { right: 1.5rem; }
.panduan-modal-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    opacity: 0.8;
    background: rgba(0,0,0,0.5);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .nav-links a {
        padding: 1rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        z-index: 1001;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        font-size: 0.9rem;
    }
    .navbar-inner { flex-wrap: wrap; }
    .nav-auth {
        display: none;
        width: 100%;
        padding: 0.75rem 1rem;
        justify-content: center;
        background: var(--primary-dark);
    }
    .nav-links.open ~ .nav-auth { display: flex; }

    .hero { padding: 2.5rem 1rem; }
    .hero h1 { font-size: 1.4rem; }
    .hero p { font-size: 0.95rem; }

    .page-header { padding: 1.5rem 1rem; }
    .page-header h1 { font-size: 1.3rem; }
    .page-header p { font-size: 0.85rem; }

    .container { padding: 1rem 0.75rem; }

    .card-header { padding: 0.75rem 1rem; font-size: 0.9rem; }
    .card-body { padding: 1rem; }

    .materi-card {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
    .materi-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .materi-info h3 { font-size: 1rem; }
    .materi-actions { gap: 0.4rem; }
    .materi-actions .btn { font-size: 0.75rem; padding: 0.25rem 0.6rem; }

    .jadwal-item {
        grid-template-columns: 80px 1fr;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    .jadwal-date { padding: 0.5rem; }
    .jadwal-date .day { font-size: 1.2rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-number { font-size: 1.5rem; }
    .stat-card .stat-label { font-size: 0.75rem; }

    .question-card { padding: 1rem; }
    .options label { padding: 0.6rem 0.75rem; gap: 0.5rem; font-size: 0.9rem; }

    .cert-preview { padding: 2rem 1rem; }
    .cert-preview .cert-icon { font-size: 3.5rem; }

    .auth-container { margin: 1.5rem auto; }
    .auth-container.auth-wide { max-width: 100%; }
    .auth-wide .auth-body form { grid-template-columns: 1fr; }
    .auth-header { padding: 1.5rem; }
    .auth-body { padding: 1.5rem; }

    .timer { top: 60px; right: 10px; font-size: 0.85rem; padding: 0.4rem 0.75rem; }

    .footer { padding: 2rem 1rem 1rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    table { font-size: 0.8rem; }
    th, td { padding: 0.5rem 0.6rem; }

    .btn-lg { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

    .welcome-section { padding: 2rem 1rem; }
    .welcome-section h2 { font-size: 1.3rem; }

    .pengumuman-item { padding: 0.75rem 1rem; }

    .bimtek-filter-bar { flex-direction: column; align-items: stretch; }
    .bimtek-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bimtek-search { min-width: unset; }
    .bimtek-grid { grid-template-columns: 1fr; }
    .bimtek-enrolled-card { flex-wrap: wrap; }
    .bimtek-enrolled-info h4 { white-space: normal; }

    .panduan-card { flex: 0 0 280px; }
    .panduan-heading { font-size: 1.4rem; }
    .panduan-subtitle { font-size: 0.9rem; margin-bottom: 1rem; }
    .panduan-nav { width: 36px; height: 36px; font-size: 1.2rem; }
    .panduan-carousel-wrapper { padding: 0 0.5rem; }
    .panduan-modal-nav { width: 40px; height: 40px; font-size: 2rem; }
    .panduan-modal-prev { left: 0.5rem; }
    .panduan-modal-next { right: 0.5rem; }
}

@media (max-width: 480px) {
    .navbar-brand span { font-size: 0.9rem; }
    .navbar-brand img { width: 35px !important; height: 43px !important; }

    .hero h1 { font-size: 1.2rem; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-card { padding: 0.75rem; }
    .stat-card .stat-number { font-size: 1.3rem; }

    .materi-card { padding: 0.75rem; }
    .materi-actions .btn { font-size: 0.7rem; padding: 0.2rem 0.5rem; }

    .jadwal-item { grid-template-columns: 1fr; }

    .question-card { padding: 0.75rem; margin-bottom: 1rem; }
    .question-number { width: 28px; height: 28px; line-height: 28px; font-size: 0.75rem; margin-right: 0.5rem; }

    .score-circle { width: 100px; height: 100px; font-size: 1.6rem; }

    .form-control { font-size: 0.9rem; padding: 0.5rem 0.6rem; }

    .panduan-card { flex: 0 0 240px; }
    .panduan-nav { width: 32px; height: 32px; font-size: 1rem; }
    .panduan-carousel { gap: 0.75rem; }
    .panduan-modal-nav { width: 36px; height: 36px; font-size: 1.5rem; }
    .panduan-modal-prev { left: 0.25rem; }
    .panduan-modal-next { right: 0.25rem; }
    .panduan-modal-close { font-size: 2rem; top: 0.5rem; right: 0.75rem; }
    .panduan-modal-counter { font-size: 0.85rem; bottom: 1rem; }
}
