/* ==========================================================================
 * Desain situs XII TKJ 3 (navbar hamburger, beranda, footer).
 * CSS biasa (tanpa Tailwind) → tidak perlu build ulang saat diubah.
 * Warna biru tetap: #0284c7 (utama), #0369a1 (tua), #e0f2fe (muda), #0c4a6e (footer).
 * ========================================================================== */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / navbar ---------- */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(2, 132, 199, 0.14);
}
.topbar { background: #0369a1; color: #e0f2fe; font-size: 11px; font-weight: 600; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.topbar .t-extra { display: none; }
.topbar a { color: inherit; text-decoration: none; }

.navbar { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { height: 44px; width: auto; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 16px; font-weight: 800; color: #0369a1; letter-spacing: 0.6px; line-height: 1.1; }
.brand-text span { display: block; font-size: 10px; font-weight: 600; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-spacer { flex: 1; }
.nav-auth { display: none; align-items: center; gap: 8px; }
.nav-auth form { display: inline; }

.hamburger {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px;
    border: 1px solid rgba(2, 132, 199, 0.28); background: #fff;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    cursor: pointer; padding: 0;
}
.hamburger span { display: block; width: 20px; height: 2px; background: #0369a1; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Drawer menu (di luar <header> supaya position:fixed tidak terpotong) ---------- */
.nav-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 70;
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.nav-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 86vw); z-index: 80;
    background: #fff; display: flex; flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.14);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
}
.menu-open { overflow: hidden; }
.menu-open .nav-overlay { opacity: 1; visibility: visible; }
.menu-open .nav-drawer { transform: none; visibility: visible; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: linear-gradient(135deg, #0369a1, #0284c7); color: #fff; }
.drawer-head .who { font-size: 12px; font-weight: 600; line-height: 1.35; min-width: 0; }
.drawer-head .who b { display: block; font-size: 15px; font-weight: 800; }
.drawer-close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.drawer-links { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.drawer-links a {
    display: block; padding: 12px 14px; border-radius: 10px;
    font-size: 14px; font-weight: 700; color: #334155; text-decoration: none;
}
.drawer-links a:hover { background: #f0f9ff; color: #0284c7; }
.drawer-links a.active { background: #e0f2fe; color: #0369a1; box-shadow: inset 3px 0 0 #0284c7; }
.drawer-foot { padding: 14px 16px 18px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 8px; }
.drawer-foot form { display: block; }
.drawer-foot .btn-auth { display: block; width: 100%; text-align: center; padding: 11px 16px; }

/* ---------- Tombol umum ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 22px; border-radius: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
    text-transform: uppercase; text-decoration: none; cursor: pointer; border: 0; font-family: inherit;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-white { background: #fff; color: #0369a1; box-shadow: 0 8px 20px rgba(3, 105, 161, 0.3); }
.btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }

/* ---------- Hero ---------- */
.hero {
    position: relative; color: #fff; overflow: hidden;
    background:
        linear-gradient(120deg, rgba(3, 105, 161, 0.94) 0%, rgba(2, 132, 199, 0.82) 55%, rgba(14, 165, 233, 0.7) 100%),
        var(--hero-img) center / cover no-repeat;
    padding: 56px 0 92px;
}
.hero-grid { display: grid; gap: 24px; align-items: center; }
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #bae6fd; }
.hero h1 { font-size: 48px; line-height: 1.05; font-weight: 800; margin-top: 10px; letter-spacing: -0.5px; }
.hero-desc { margin-top: 14px; max-width: 520px; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.92); }
.hero-logo { display: none; justify-self: center; }
.hero-logo div { width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); display: flex; align-items: center; justify-content: center; box-shadow: 0 20px 50px rgba(3, 60, 100, 0.35); }
.hero-logo img { height: 72%; width: auto; }

/* ---------- Kartu statistik (menumpuk di bawah hero) ---------- */
.stats { margin-top: -52px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: 16px; padding: 16px 8px; text-align: center; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1); border: 1px solid rgba(2, 132, 199, 0.1); }
.stat b { display: block; font-size: 26px; font-weight: 800; color: #0284c7; line-height: 1.1; }
.stat span { display: block; margin-top: 4px; font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.8px; }

/* ---------- Section ---------- */
.section { padding: 40px 0 8px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: #0284c7; }
.section h2 { font-size: 24px; font-weight: 800; color: #0f172a; margin-top: 4px; letter-spacing: -0.3px; }
.section .lead { font-size: 13px; color: #64748b; margin-top: 6px; line-height: 1.6; }
.card { background: #fff; border-radius: 18px; border: 1px solid rgba(2, 132, 199, 0.12); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }

/* Sambutan */
.sambutan { display: grid; gap: 22px; padding: 20px; margin-top: 18px; }
.sambutan-foto { width: 100%; max-width: 260px; margin: 0 auto; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: #e0f2fe; border: 3px solid #e0f2fe; }
.sambutan-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sambutan-teks p { font-size: 14px; line-height: 1.8; color: #475569; margin-bottom: 12px; }
.sambutan-teks .ttd { margin-top: 18px; padding-top: 14px; border-top: 1px dashed #bae6fd; }
.sambutan-teks .ttd b { display: block; font-size: 15px; color: #0f172a; font-weight: 800; }
.sambutan-teks .ttd span { font-size: 12px; color: #0284c7; font-weight: 700; }

/* Profil */
.profil { display: grid; gap: 16px; margin-top: 18px; }
.profil .card { padding: 22px; }
.profil h3, .vm h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #0369a1; margin-bottom: 12px; }
.profil p { font-size: 14px; line-height: 1.8; color: #475569; margin-bottom: 10px; }
.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed #e2e8f0; font-size: 13px; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: #94a3b8; font-weight: 700; flex-shrink: 0; }
.info-list b { color: #0f172a; font-weight: 700; text-align: right; }

/* Visi misi */
.vm { display: grid; gap: 16px; margin-top: 18px; }
.vm .card { padding: 22px; }
.visi-box { background: linear-gradient(135deg, #0369a1, #0284c7); color: #fff; border: 0 !important; }
.visi-box h3 { color: #bae6fd; }
.visi-box p { font-size: 18px; font-weight: 800; line-height: 1.5; font-style: italic; }
.misi-list { list-style: none; display: grid; gap: 12px; }
.misi-list li { display: flex; gap: 12px; font-size: 14px; line-height: 1.6; color: #475569; font-weight: 500; }
.misi-list i { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #0284c7; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.jitu-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.jitu-item { background: #fff; border: 1px solid rgba(2, 132, 199, 0.14); border-radius: 14px; padding: 14px 10px; text-align: center; }
.jitu-item b { display: block; font-size: 22px; font-weight: 800; color: #0284c7; }
.jitu-item span { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; }

/* Countdown (sederhana, satu warna) */
.cd-grid { display: grid; gap: 14px; margin-top: 18px; }
.cd-card { background: #fff; border-radius: 18px; border: 1px solid rgba(2, 132, 199, 0.16); border-left: 5px solid #0284c7; padding: 18px 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.cd-date { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #0284c7; text-transform: uppercase; }
.cd-card h3 { font-size: 16px; font-weight: 800; color: #0f172a; margin-top: 4px; }
.cd-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.cd-num { font-weight: 800; color: #0284c7; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-num.sm { font-size: 26px; color: #0369a1; }
.cd-unit { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; }
.cd-sep { color: #cbd5e1; font-size: 22px; }
.cd-sub { margin-top: 8px; font-size: 12px; font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ukk { margin-top: 14px; padding: 18px; }
.ukk-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: #0369a1; margin-bottom: 12px; }
.ukk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ukk-item { display: flex; align-items: center; gap: 10px; background: #f0f9ff; border: 1px solid #e0f2fe; border-radius: 12px; padding: 12px; font-size: 12px; font-weight: 700; color: #0c4a6e; }
.ukk-item svg { width: 20px; height: 20px; flex-shrink: 0; stroke: #0284c7; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Terbaru */
.terbaru { display: grid; gap: 16px; margin-top: 18px; }
.terbaru .card { padding: 20px; }
.terbaru h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #0369a1; margin-bottom: 8px; }
.t-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed #e2e8f0; text-decoration: none; }
.t-item:last-of-type { border-bottom: 0; }
.t-date { flex-shrink: 0; width: 48px; text-align: center; background: #e0f2fe; border-radius: 10px; padding: 6px 0; color: #0369a1; }
.t-date b { display: block; font-size: 17px; font-weight: 800; line-height: 1.1; }
.t-date span { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.t-item p { font-size: 13px; font-weight: 700; color: #1e293b; line-height: 1.4; }
.more { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; color: #0284c7; text-decoration: none; }
.mini-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-gal a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e0f2fe; }
.mini-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Sosial */
.sosial { display: grid; gap: 14px; margin-top: 18px; }
.sosial a { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: #1e293b; text-decoration: none; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14); transition: transform 0.2s; }
.sosial a:hover { transform: translateY(-3px); }
.sosial img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.sosial .cap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1) 60%, transparent); color: #fff; }
.sosial .cap small { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.85; }
.sosial .cap strong { font-size: 18px; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; background: #0c4a6e; color: #bae6fd; }
.footer-grid { display: grid; gap: 28px; padding: 40px 0 28px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 44px; width: auto; background: #fff; border-radius: 10px; padding: 4px; }
.footer-brand b { display: block; color: #fff; font-size: 16px; font-weight: 800; }
.footer-brand span { font-size: 11px; font-weight: 600; }
.site-footer p { font-size: 13px; line-height: 1.7; margin-top: 12px; }
.site-footer h4 { color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; font-size: 13px; line-height: 1.5; }
.site-footer a { color: #e0f2fe; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(186, 230, 253, 0.2); padding: 16px 0 90px; font-size: 12px; text-align: center; color: #7dd3fc; }


/* ==========================================================================
 * Tablet ke atas
 * ========================================================================== */
@media (min-width: 640px) {
    .ukk-grid { grid-template-columns: repeat(4, 1fr); }
    .jitu-row { grid-template-columns: repeat(4, 1fr); }
    .sosial, .cd-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar .t-extra { display: inline; }
    .hero h1 { font-size: 60px; }
}

@media (min-width: 900px) {
    .nav-auth { display: inline-flex; }
    .navbar { height: 72px; }
    .brand img { height: 50px; }
    .brand-text strong { font-size: 18px; }
    .brand-text span { font-size: 11px; }

    .hero { padding: 80px 0 124px; }
    .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 48px; }
    .hero h1 { font-size: 76px; }
    .hero-logo { display: block; }
    .stats { margin-top: -64px; }
    .stat b { font-size: 36px; }
    .stat span { font-size: 11px; }

    .section { padding-top: 64px; }
    .section h2 { font-size: 30px; }

    .sambutan { grid-template-columns: 280px 1fr; gap: 36px; padding: 32px; align-items: center; }
    .sambutan-foto { max-width: none; margin: 0; }
    .sambutan-teks p { font-size: 15px; }

    .profil { grid-template-columns: 1.5fr 1fr; align-items: start; }
    .profil .card { padding: 28px; }
    .vm { grid-template-columns: 1fr 1.3fr; align-items: stretch; }
    .vm .card { padding: 28px; }
    .visi-box p { font-size: 21px; }
    .terbaru { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-top: 56px; }
}

/* ==========================================================================
 * Halaman dalam (selain beranda): header halaman, panel, tabel, form, tombol
 * ========================================================================== */
.hidden { display: none !important; }

.page-head { background: linear-gradient(120deg, #0369a1 0%, #0284c7 60%, #0ea5e9 100%); color: #fff; padding: 26px 0 30px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #bae6fd; }
.crumb a { color: #fff; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head h1 { font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: -0.3px; }
.page-head p { font-size: 13px; margin-top: 4px; color: #e0f2fe; line-height: 1.6; }
.page-body { padding-top: 24px; padding-bottom: 8px; }
.narrow { max-width: 640px; margin: 0 auto; }
.stack { display: grid; gap: 16px; }
.two-col { display: grid; gap: 16px; }

.panel { background: #fff; border: 1px solid rgba(2, 132, 199, 0.12); border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; background: #f0f9ff; border-bottom: 1px solid #e0f2fe; font-size: 13px; font-weight: 800; color: #0369a1; }
.panel-body { padding: 18px; }
.panel-note { font-size: 12px; color: #64748b; line-height: 1.6; }
.back { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: #0369a1; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* Tabel */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 18px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px; color: #64748b; background: #f8fafc; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.tbl td { padding: 12px 18px; border-bottom: 1px solid #f1f5f9; color: #475569; font-weight: 500; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #f0f9ff; }
.tbl .num { width: 90px; font-weight: 800; color: #0369a1; white-space: nowrap; }
.tbl .strong { color: #0f172a; font-weight: 700; }
.tbl small { color: #94a3b8; font-weight: 600; }

/* Tab segmented */
.seg { display: flex; gap: 4px; padding: 4px; background: #e0f2fe; border-radius: 12px; max-width: 420px; margin: 0 auto 20px; }
.tab-btn { flex: 1; padding: 10px 8px; border: 0; border-radius: 9px; background: transparent; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: #0369a1; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tab-btn.active { background: #0284c7; color: #fff; box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25); }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; background: #e0f2fe; color: #0369a1; }
.badge-ok { background: #d1fae5; color: #047857; }

/* Tombol */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.b-primary { background: #0284c7; color: #fff; }
.b-primary:hover { background: #0369a1; }
.b-outline { background: #fff; color: #0369a1; border-color: #bae6fd; }
.b-outline:hover { background: #f0f9ff; }
.b-danger { background: #fff; color: #be123c; border-color: #fecdd3; }
.b-danger:hover { background: #be123c; color: #fff; border-color: #be123c; }
.b-sm { padding: 7px 12px; font-size: 11px; }
.b-block { display: flex; width: 100%; }
.b:disabled { opacity: 0.6; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.actions form { display: inline; }

/* Form */
.searchbar { display: flex; gap: 8px; margin-bottom: 18px; }
.searchbar .form-control { flex: 1; }
.hint { font-size: 11px; color: #94a3b8; margin-top: 6px; font-weight: 500; line-height: 1.5; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 8px; border-top: 1px solid #e2e8f0; }
.err-list { margin: 0 0 16px 18px; list-style: disc; }
.thumb-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.thumb-pick label { text-transform: none !important; font-weight: 600 !important; color: #475569 !important; }
.thumb-pick img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid #e2e8f0; display: block; margin-bottom: 6px; }

/* Daftar tugas */
.item { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid #f1f5f9; }
.item:last-child { border-bottom: 0; }
.item:hover { background: #f8fcff; }
.item-info { flex: 1; min-width: 220px; }
.item-title { margin-top: 6px; font-size: 15px; font-weight: 700; color: #0f172a; white-space: pre-line; word-break: break-word; line-height: 1.5; }
.empty { text-align: center; padding: 36px 18px; font-size: 13px; font-weight: 600; color: #94a3b8; }
.pager { margin-top: 18px; }

/* Galeri */
.gal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gal-card { background: #fff; border: 1px solid rgba(2, 132, 199, 0.12); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05); }
.gal-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e0f2fe; cursor: zoom-in; display: block; }
.gal-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.gal-cap { font-size: 13px; font-weight: 700; color: #0f172a; white-space: pre-line; word-break: break-word; line-height: 1.5; }
.lampiran { display: grid; gap: 14px; grid-template-columns: 1fr; }
.lampiran img { width: 100%; height: auto; max-height: 360px; object-fit: cover; border-radius: 12px; border: 1px solid #e2e8f0; display: block; }
.fab { bottom: 95px !important; }

/* Struktur kelas */
.org { max-width: 920px; margin: 0 auto; }
.org-card { background: #fff; border: 1px solid rgba(2, 132, 199, 0.16); border-radius: 14px; padding: 14px 16px; text-align: center; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04); }
.org-role { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: #0284c7; margin-bottom: 4px; }
.org-name { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.org-top { background: linear-gradient(135deg, #0369a1, #0284c7); border: 0; max-width: 300px; margin: 0 auto; }
.org-top .org-role { color: #bae6fd; }
.org-top .org-name { color: #fff; font-size: 16px; }
.org-line { width: 2px; height: 24px; background: #bae6fd; margin: 0 auto; }
.org-row { display: grid; gap: 12px; margin: 0 auto; grid-template-columns: repeat(2, 1fr); }
.org-row.r2 { max-width: 560px; }
.org-seksi { background: #f0f9ff; border: 1px solid #e0f2fe; border-radius: 18px; padding: 18px; }
.org-seksi h3 { text-align: center; margin-bottom: 14px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #0369a1; }
.org-cols { display: grid; gap: 12px; grid-template-columns: 1fr; }
.org-cols > div { display: grid; gap: 12px; align-content: start; }

/* Murid */
.murid-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.s-card { background: #fff; border: 1px solid rgba(2, 132, 199, 0.12); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04); transition: transform 0.15s, box-shadow 0.15s; }
.s-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(2, 132, 199, 0.12); }
.s-card.wali { border: 1.5px solid #0284c7; background: linear-gradient(180deg, #fff, #f0f9ff); }
.s-photo { aspect-ratio: 4 / 5; background: #e0f2fe; }
.s-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-info { padding: 12px 10px 14px; text-align: center; }
.s-info .badge { margin-bottom: 8px; }
.s-card.wali .badge { background: #0284c7; color: #fff; }
.s-name { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: #0f172a; line-height: 1.35; min-height: 32px; display: flex; align-items: center; justify-content: center; }

/* Piket & jadwal */
.day-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.name-list { list-style: none; counter-reset: n; }
.name-list li { counter-increment: n; display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid #f1f5f9; font-size: 13px; font-weight: 600; color: #0f172a; }
.name-list li:last-child { border-bottom: 0; }
.name-list li::before { content: counter(n); width: 24px; height: 24px; border-radius: 50%; background: #e0f2fe; color: #0369a1; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Kelompok */
.kel-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.kel-status b { display: block; font-size: 13px; color: #0f172a; }
.kel-status span { font-size: 12px; color: #64748b; line-height: 1.5; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; margin-right: 6px; animation: dotPulse 1.6s infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap; }
.kel-ctrl { display: grid; gap: 14px; grid-template-columns: 1fr; padding: 18px; }
.kel-display { padding: 22px 18px; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.kel-wait { font-size: 13px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1.2px; }
.kel-wait-sub { font-size: 12px; color: #94a3b8; margin-top: 6px; line-height: 1.6; max-width: 380px; }
.kel-spin { padding: 18px 0; }
.kel-spin .name { font-size: 26px; font-weight: 800; color: #0284c7; text-transform: uppercase; letter-spacing: 0.5px; }
.kel-spin .by { font-size: 11px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; }
.kel-result { width: 100%; text-align: left; }
.kel-result-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #e2e8f0; }
.kel-result-head b { display: block; font-size: 13px; font-weight: 800; color: #0369a1; text-transform: uppercase; letter-spacing: 0.6px; }
.kel-result-head span.by { font-size: 11px; color: #94a3b8; }
.kel-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.kel-card { border: 1px solid rgba(2, 132, 199, 0.14); border-radius: 14px; overflow: hidden; background: #fff; }
.kel-card-head { display: flex; justify-content: space-between; padding: 10px 14px; background: #f0f9ff; font-size: 12px; font-weight: 800; color: #0369a1; }
.kel-card-head small { font-weight: 600; color: #94a3b8; }
.kel-card ol { margin: 0; padding: 12px 14px 12px 34px; font-size: 13px; font-weight: 600; color: #0f172a; line-height: 1.9; }

/* Login / error */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #0369a1 0%, #0284c7 55%, #38bdf8 100%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 32px 28px; box-shadow: 0 30px 60px rgba(3, 60, 100, 0.35); }
.auth-card .logo { display: block; max-height: 80px; width: auto; margin: 0 auto 8px; }
.auth-card h1 { text-align: center; font-size: 20px; font-weight: 800; color: #0f172a; }
.auth-card .sub { text-align: center; font-size: 12px; color: #64748b; margin: 4px 0 22px; }
.auth-card .back-link { display: block; text-align: center; margin-top: 18px; font-size: 12px; font-weight: 700; color: #64748b; text-decoration: none; }
.auth-card .back-link:hover { color: #0284c7; }
.errorbox { text-align: center; padding: 48px 20px; }
.errorbox .code { font-size: 64px; font-weight: 800; color: #0284c7; line-height: 1; }
.errorbox h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin-top: 10px; }
.errorbox p { font-size: 14px; color: #64748b; margin: 6px 0 22px; }

@media (min-width: 640px) {
    .gal-grid { grid-template-columns: repeat(3, 1fr); }
    .lampiran { grid-template-columns: repeat(2, 1fr); }
    .thumb-pick { grid-template-columns: repeat(3, 1fr); }
    .murid-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .org-row { grid-template-columns: repeat(4, 1fr); }
    .org-row.r2 { grid-template-columns: repeat(2, 1fr); }
    .org-cols { grid-template-columns: repeat(2, 1fr); }
    .day-grid, .kel-grid { grid-template-columns: repeat(2, 1fr); }
    .kel-ctrl { grid-template-columns: 1.2fr 1fr 1fr; align-items: end; }
}

@media (min-width: 900px) {
    .page-head { padding: 40px 0 44px; }
    .page-head h1 { font-size: 36px; }
    .page-body { padding-top: 32px; }
    .gal-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .murid-grid { grid-template-columns: repeat(5, 1fr); }
    .org-cols { grid-template-columns: repeat(4, 1fr); }
    .day-grid.piket { grid-template-columns: repeat(3, 1fr); }
}
.muted { color: #64748b; }

/* ---------- Halaman login ---------- */
.lg { position: relative; min-height: 100vh; min-height: 100svh; background: #fff; overflow-x: hidden; }
.lg-reveal { display: none; position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 0; background: #f3f7fa; }
.lg-reveal.on { display: block; }

.lg-photo {
    position: absolute; left: 0; right: 0; top: 0; height: 40vh; height: 40svh; z-index: 1; overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
    background: linear-gradient(140deg, rgba(3, 105, 161, 0.82) 0%, rgba(2, 132, 199, 0.5) 55%, rgba(56, 189, 248, 0.28) 100%), var(--hero-img) center 30% / cover no-repeat;
    transition: transform 0.95s cubic-bezier(0.77, 0, 0.18, 1);
}
.lg-photo-brand { position: absolute; left: 22px; top: 20px; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: -0.2px; text-shadow: 0 2px 10px rgba(3, 60, 100, 0.4); }
.lg-photo-brand img { height: 34px; width: auto; }

.lg-panel {
    position: relative; z-index: 2; background: #fff; margin-top: 34vh; margin-top: 34svh; min-height: 66vh; min-height: 66svh;
    clip-path: polygon(0 0, 100% 6vh, 100% 100%, 0 100%);
    display: flex; align-items: flex-start; justify-content: center; padding: calc(6vh + 8px) 22px 28px;
    transition: transform 0.95s cubic-bezier(0.77, 0, 0.18, 1);
}
.lg-card { width: 100%; max-width: 400px; }
.lg-logo { display: block; height: 72px; width: auto; margin: 0 auto 10px; }
.lg-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #0f172a; text-align: center; margin-bottom: 22px; }

.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 7px; }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > svg { position: absolute; left: 15px; width: 19px; height: 19px; fill: none; stroke: #94a3b8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke 0.15s; }
.lg-input input { width: 100%; height: 52px; padding: 0 48px 0 46px; font: inherit; font-size: 14px; font-weight: 500; color: #0f172a; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.lg-input input::placeholder { color: #94a3b8; font-weight: 400; }
.lg-input input:focus { background: #fff; border-color: #0284c7; box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14); }
.lg-input:focus-within > svg { stroke: #0284c7; }
.lg-eye { position: absolute; right: 7px; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lg-eye svg { position: static; width: 20px; height: 20px; fill: none; stroke: #94a3b8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lg-eye:hover svg { stroke: #0284c7; }
.lg-eye .i-hide { display: none; }
.lg-eye.on .i-hide { display: block; } .lg-eye.on .i-show { display: none; }

.lg-err { display: none; font-size: 12px; font-weight: 600; color: #be123c; margin-top: 6px; padding-left: 2px; }
.lg-err:not(:empty) { display: block; }
.lg-field.has-error .lg-input input { border-color: #fb7185; background: #fff1f2; }
.lg-field.has-error .lg-input input:focus { box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14); }
.lg-field.has-error .lg-input > svg { stroke: #fb7185; }
.lg-card.shake { animation: lg-shake 0.4s; }
@keyframes lg-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* Tombol: Masuk -> memutar -> centang hijau */
.lg-btn {
    position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; margin: 10px auto 0; border: 0; border-radius: 15px; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 800; letter-spacing: 0.4px; color: #fff; background: linear-gradient(135deg, #0369a1, #0284c7);
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.35);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.4s, background 0.3s, box-shadow 0.3s, transform 0.15s;
}
.lg-btn:hover { transform: translateY(-1px); }
.lg-btn .t { transition: opacity 0.15s; }
.lg-btn .spin, .lg-btn .tick { position: absolute; width: 26px; height: 26px; opacity: 0; transition: opacity 0.2s; }
.lg-btn.is-loading, .lg-btn.is-ok { width: 54px; border-radius: 50%; pointer-events: none; transform: none; }
.lg-btn.is-loading .t, .lg-btn.is-ok .t { opacity: 0; }
.lg-btn.is-loading .spin { opacity: 1; animation: lg-spin 0.8s linear infinite; }
.lg-btn.is-ok { background: #16a34a; box-shadow: 0 10px 24px rgba(22, 163, 74, 0.42); animation: lg-pop 0.45s; }
.lg-btn.is-ok .spin { opacity: 0; animation: none; }
.lg-btn.is-ok .tick { opacity: 1; }
.lg-btn .tick path { stroke-dasharray: 26; stroke-dashoffset: 26; }
.lg-btn.is-ok .tick path { animation: lg-draw 0.4s 0.12s ease forwards; }
@keyframes lg-spin { to { transform: rotate(360deg); } }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }

.lg-back { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto 0; width: max-content; max-width: 100%; padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #475569; text-decoration: none; background: #f1f5f9; transition: background 0.15s, color 0.15s; }
.lg-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-back:hover { background: #e0f2fe; color: #0369a1; }

/* Animasi keluar: mobile = gambar ke atas, form ke bawah */
.lg.is-leaving { overflow: hidden; height: 100vh; height: 100svh; min-height: 0; }
.lg.is-leaving .lg-photo { transform: translateY(-110%); }
.lg.is-leaving .lg-panel { transform: translateY(110%); }

/* Desktop: gambar di kiri (miring), form di kanan */
@media (min-width: 900px) {
    .lg { height: 100vh; overflow: hidden; min-height: 0; background: #f3f7fa; }
    .lg-photo { left: 0; right: auto; top: 0; bottom: 0; width: 58%; height: auto; clip-path: polygon(0 0, 100% 0, 79.3% 100%, 0 100%); background-position: center; }
    .lg-photo-brand { left: 40px; top: 34px; font-size: 18px; }
    .lg-photo-brand img { height: 40px; }
    .lg-panel { position: absolute; top: 0; bottom: 0; right: 0; left: 46%; margin: 0; min-height: 0; align-items: center; padding: 40px 6% 40px 14%; clip-path: polygon(21.9% 0, 100% 0, 100% 100%, 0 100%); }
    .lg-card { max-width: 380px; }
    .lg-title { font-size: 30px; }
    .lg.is-leaving .lg-photo { transform: translateX(-110%); }
    .lg.is-leaving .lg-panel { transform: translateX(110%); }
}
@media (prefers-reduced-motion: reduce) { .lg-photo, .lg-panel { transition: none; } }

/* ---------- Halaman Materi ---------- */
.materi-card { max-width: 640px; margin: 0 auto; padding: 36px 28px; text-align: center; }
.materi-ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; color: #0369a1; background: #e0f2fe; }
.materi-card h2 { margin: 0 0 10px; font-size: 1.5rem; color: #0c4a6e; }
.materi-desc { margin: 0 auto 22px; color: #475569; line-height: 1.7; max-width: 52ch; }
.materi-by { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border: 1px solid #bae6fd; background: #f0f9ff; border-radius: 999px; text-align: left; }
.materi-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #0284c7, #0369a1); color: #fff; font-weight: 800; }
.materi-by small { display: block; color: #64748b; font-size: .72rem; }
.materi-by strong { color: #0c4a6e; font-size: .95rem; }
.materi-note { margin: 20px 0 14px; color: #64748b; font-size: .85rem; }
.materi-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.materi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: .95rem; text-decoration: none; transition: transform .2s, background .2s; }
.materi-btn:hover { transform: translateY(-2px); }
.materi-btn-main { background: #0369a1; color: #fff; box-shadow: 0 8px 18px rgba(3, 105, 161, .28); }
.materi-btn-main:hover { background: #075985; }
.materi-btn-alt { background: #e0f2fe; color: #0369a1; }
@media (max-width: 480px) { .materi-card { padding: 28px 18px; } .materi-btn { width: 100%; } }

/* ---------- Loader awal (sekali per sesi) ---------- */
.ld { display: none; position: fixed; inset: 0; z-index: 9999; place-items: center;
      background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f0f9ff 55%, #e0f2fe 100%);
      transition: opacity .7s cubic-bezier(.4, 0, .2, 1), visibility .7s; }
.ld.on { display: grid; }
.ld.out { opacity: 0; visibility: hidden; }
html.ld-lock { overflow: hidden; }
.ld-box { display: flex; flex-direction: column; align-items: center; transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.ld.out .ld-box { transform: scale(1.06); }
.ld-mark { position: relative; width: 150px; height: 150px; display: grid; place-items: center; animation: ld-in .7s cubic-bezier(.22, 1, .36, 1) both; }
.ld-logo { height: 92px; width: auto; animation: ld-pulse 1.8s ease-in-out infinite; filter: drop-shadow(0 8px 16px rgba(3, 105, 161, .25)); }
.ld-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: ld-spin 1.4s linear infinite; }
.ld-ring circle { fill: none; stroke-width: 3; }
.ld-ring-bg { stroke: #bae6fd; opacity: .55; }
.ld-ring-fg { stroke: #0284c7; stroke-linecap: round; stroke-dasharray: 90 200; }
.ld-text { margin-top: 18px; font-weight: 800; letter-spacing: .08em; font-size: 1.05rem; color: #075985; animation: ld-up .7s .15s cubic-bezier(.22, 1, .36, 1) both; }
.ld-sub { margin-top: 4px; font-size: .75rem; color: #64748b; animation: ld-up .7s .3s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
@keyframes ld-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes ld-in { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ld-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .ld-logo, .ld-mark, .ld-text, .ld-sub { animation: none; }
    .ld-ring { animation-duration: 2.4s; }
    .ld, .ld-box { transition-duration: .2s; }
}
@media (max-width: 480px) { .ld-mark { width: 130px; height: 130px; } .ld-logo { height: 80px; } }
