/* Kartu Siswa Dapodik — tampilan aplikasi */
:root { --brand: #0b5ed7; --brand-2: #0f766e; --side: #0f172a; --sidebar-w: 250px; }
body { background: #f3f5f9; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #0f172a, #172554); color: #cbd5e1; flex: none; display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; } }
@media (max-width: 991.98px) { .sidebar.offcanvas-lg { --bs-offcanvas-width: 270px; background: #0f172a; } }
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; flex: none; }
.sidebar-nav { padding: 10px; overflow-y: auto; flex: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: .93rem; margin-bottom: 2px; }
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(11,94,215,.35); }
.sidebar-nav i { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 12px 6px; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; }

.brand-mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f766e); box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.brand-mark.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; flex: none; }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e5e7eb; }
.content { padding: 20px; flex: 1; }
@media (max-width: 575.98px) { .content { padding: 12px; } .topbar { padding: 10px 12px; } }
.footer { padding: 14px 20px; }
.card { border-radius: 14px; }
.card-header:first-child { border-radius: 14px 14px 0 0; }

/* Stat */
.stat { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 3px rgba(15,23,42,.06); height: 100%; }
.stat > i { font-size: 22px; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #e8f0fe; color: var(--brand); flex: none; }
.stat.warn > i { background: #fff4e5; color: #d97706; }
.stat-v { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-l { font-size: .8rem; color: #6b7280; }

.hero { background: linear-gradient(135deg, #1d4ed8, #0f766e); color: #fff; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .35rem; }

/* Card type tiles */
.card-type { --c: #0b5ed7; display: block; height: 100%; padding: 16px; border-radius: 14px; background: #fff; border: 2px solid transparent;
  color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgba(15,23,42,.06); cursor: pointer; transition: .15s; position: relative; overflow: hidden; }
.card-type::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--c); opacity: .08; }
.card-type i { font-size: 26px; color: var(--c); display: block; margin-bottom: 6px; }
.card-type:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.1); }
.btn-check:checked + .card-type { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.btn-check:checked + .card-type::before { content: "\F26E"; font-family: bootstrap-icons; position: absolute; right: 10px; top: 8px; color: var(--c); font-size: 18px; }

/* Dropzone */
.dropzone { display: block; text-align: center; padding: 34px 16px; border: 2px dashed #cbd5e1; border-radius: 14px; background: #f8fafc; cursor: pointer; transition: .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #eef4ff; }
.dropzone > i { font-size: 44px; color: var(--brand); display: block; margin-bottom: 8px; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f1f5f9; border-radius: 8px; margin-bottom: 6px; }

/* Tabel siswa */
.thumb { width: 38px; height: 50px; object-fit: cover; border-radius: 6px; background: #e2e8f0; }
.thumb.ph { display: grid; place-items: center; color: #94a3b8; font-weight: 700; }
.foto-box { width: 150px; height: 200px; border-radius: 12px; overflow: hidden; background: #e2e8f0; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(15,23,42,.12); }
.foto-box img { width: 100%; height: 100%; object-fit: cover; }
.foto-box .ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; }
.foto-box .ph i { font-size: 64px; }
.rombel-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; cursor: pointer; background: #fff; }
.rombel-pick:has(input:checked) { border-color: var(--brand); background: #f0f6ff; }

.asset-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.asset-row:last-of-type { border-bottom: 0; }
.asset-prev { width: 64px; height: 64px; border-radius: 10px; display: grid; place-items: center; flex: none; overflow: hidden; border: 1px solid #e5e7eb; }
.asset-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.checker { background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.min-w-0 { min-width: 0; }

.scroll-400 { max-height: 420px; overflow: auto; }
.scroll-600 { max-height: 620px; overflow: auto; }
.preview-frame { width: 100%; height: 820px; border: 0; border-radius: 10px; background: #eef1f5; }
.empty-state { text-align: center; padding: 36px 16px; }
.empty-state > i { font-size: 40px; color: #94a3b8; }

/* Auth */
.auth-bg { min-height: 100vh; background: radial-gradient(circle at 20% 10%, #2563eb 0, transparent 45%), radial-gradient(circle at 90% 90%, #0f766e 0, transparent 40%), #0f172a; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 410px; border-radius: 18px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: #64748b; z-index: 5; }
