/* ===== Portal Akun (akunsso) — profesional, Roboto ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1a237e;
    --primary2: #3949ab;
    --accent: #f59e0b;
    --ink: #111827;
    --mut: #6b7280;
    --line: #e5e7eb;
    --bg: #f3f4f6;
    --card: #fff;
    --ok: #16a34a;
    --bad: #dc2626;
    --sbw: 250px;
}

html, body { height: 100%; }
body {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    background: var(--bg); color: var(--ink);
    font-size: 14px; line-height: 1.5;
}
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }

.app { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sbw); flex-shrink: 0;
    background: linear-gradient(180deg, var(--primary), #10154f);
    color: #fff; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; z-index: 60;
}
.sb-head { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sb-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; background:#fff; }
.sb-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.sb-sub { font-size: 11px; opacity: .75; }
.sb-close { display: none; margin-left: auto; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; }
.sb-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin-bottom: 4px; border-radius: 10px; color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: 14px; }
.sb-item .sb-ic { font-size: 18px; width: 22px; text-align: center; }
.sb-item:hover { background: rgba(255,255,255,.08); color:#fff; }
.sb-item.on { background: rgba(255,255,255,.16); color:#fff; font-weight:700; box-shadow: inset 3px 0 0 var(--accent); }
.sb-foot { padding: 12px 16px; font-size: 10px; opacity: .7; border-top: 1px solid rgba(255,255,255,.12); line-height:1.5; }

/* overlay mobile */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }
.overlay.show { display: block; }

/* ===== MAIN ===== */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 0 18px; height: 58px; position: sticky; top: 0; z-index: 40;
}
.burger { font-size: 22px; background: none; border: none; cursor: pointer; display: none; color: var(--primary); }
.top-title { font-weight: 700; font-size: 16px; }
.top-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-name { font-weight: 500; color: #374151; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-out { background: #fee2e2; color: var(--bad); text-decoration: none; font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 8px; }
.top-out:hover { background: #fecaca; }

.content { flex: 1; padding: 22px; max-width: 1080px; width: 100%; margin: 0 auto; }

/* FAB mobile */
.fab {
    display: none; position: fixed; right: 16px; bottom: 16px; z-index: 70;
    width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--primary); color: #fff; font-size: 22px; box-shadow: 0 8px 20px rgba(26,35,126,.35);
}

.footer { text-align: center; padding: 16px; color: #9ca3af; font-size: 12px; background: var(--card); border-top: 1px solid var(--line); }

/* ===== komponen ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(17,24,39,.05); }
.card h2 { margin-bottom: 6px; }
.muted { color: var(--mut); font-size: 13.5px; line-height: 1.6; }
.small { font-size: 12.5px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.alert-bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* profile akun siswa */
.profile-card {
    display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff;
    border-radius: 16px; padding: 22px; margin-bottom: 18px;
    box-shadow: 0 10px 26px rgba(26,35,126,.22);
}
.avatar { width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.22); border: 3px solid rgba(255,255,255,.65); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-info h1 { font-size: 22px; margin-bottom: 2px; }
.prof-info .mail { opacity: .92; font-size: 14px; word-break: break-word; }
.prof-info .role { display: inline-block; margin-top: 8px; background: rgba(255,255,255,.18); padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* detail akun (tabel kecil) */
.detail { width: 100%; border-collapse: collapse; }
.detail td { padding: 9px 6px; border-bottom: 1px dashed var(--line); font-size: 14px; vertical-align: top; }
.detail td:first-child { color: var(--mut); width: 38%; }

/* banner 2FA */
.security-cta {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    border: 1px solid; border-radius: 14px; padding: 16px 18px; margin: 16px 0;
}
.security-cta.good { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.security-cta.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.security-cta .big { font-size: 26px; }

/* menu grid (siswa) */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; margin-top: 6px; }
.menu-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(17,24,39,.05); transition: transform .12s ease, box-shadow .18s ease; }
.menu-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(17,24,39,.1); }
.menu-ic { font-size: 26px; }
.menu-t { font-weight: 700; font-size: 14.5px; }
.menu-d { font-size: 12px; color: var(--mut); }
.menu-go { margin-left: auto; color: #d1d5db; font-size: 22px; }

/* chips (nav admin tambahan) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { background: var(--card); border: 1px solid var(--line); color: #374151; text-decoration: none; border-radius: 10px; padding: 7px 12px; font-weight: 500; font-size: 12px; }
.chip.on { background: var(--primary); color:#fff; border-color: var(--primary); }

/* forms */
.form { display: grid; gap: 4px; margin-top: 12px; }
.form label { font-size: 13px; font-weight: 500; color: #374151; }
.form input[type=text], .form input[type=password], .form input[type=file] {
    width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit;
    border: 1px solid #d1d5db; border-radius: 9px; margin-bottom: 12px; background: #fff;
}
.form input:focus { outline: none; border-color: var(--primary2); box-shadow: 0 0 0 3px rgba(57,73,171,.12); }
.btn-primary { width:100%; padding: 12px; border:none; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--primary2)); color:#fff; font-size:15px; font-weight:700; font-family:inherit; cursor:pointer; }
.btn-secondary { display:block; text-align:center; padding: 11px; margin-top: 10px; background: var(--accent); color:#fff; text-decoration:none; border-radius: 9px; font-weight: 700; font-size: 14px; }
.btn-ghost-danger { width:100%; padding: 10px; background: transparent; color: var(--bad); border: 1px solid #fecaca; border-radius: 9px; font-weight: 600; font-family: inherit; cursor: pointer; }
.form-inline { margin-top: 12px; }
.back { display: inline-block; color: var(--primary2); text-decoration: none; font-weight: 600; font-size: 14px; margin: 2px 0 10px; }

/* stat dashboard admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 1px 3px rgba(17,24,39,.05); }
.stat .num { font-size: 28px; font-weight: 900; color: var(--primary); }
.stat .lbl { font-size: 12.5px; color: var(--mut); }

/* tabel */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--card); }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
table.tbl th { background: #f8fafc; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: #475569; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-yes { background: #dcfce7; color: #166534; }
.badge-no { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0e7ff; color: #3730a3; }
.btn-sm { display: inline-block; padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; }
.btn-sm-blue { background: #e0e7ff; color: #3730a3; }
.btn-sm-red { background: #fee2e2; color: #991b1b; }
.pager { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }
.content select {
    font-family: inherit; font-size: 13px; padding: 6px 8px;
    border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
}
.mono { font-family: Consolas, monospace; font-size: 12.5px; }
.pill { display: inline-block; padding: 5px 15px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.pill-on { background: #dcfce7; color: #166534; }
.pill-off { background: #fee2e2; color: #991b1b; }

/* login page */
.login-body { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg,#eef2ff,#e0e7ff); }
.login-card { background: #fff; border-radius: 18px; padding: 32px 26px; text-align: center; border: 1px solid var(--line); max-width: 430px; margin: 24px auto; box-shadow: 0 14px 40px rgba(17,24,39,.1); }
.login-logo { height: 76px; margin-bottom: 12px; border-radius: 16px; }
.logo-badge { font-size: 44px; margin-bottom: 8px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px; font-weight: 600; font-size: 15px; text-decoration: none; color: #111; margin-top: 18px; transition: box-shadow .15s; }
.btn-google:hover { box-shadow: 0 6px 16px rgba(17,24,39,.12); }
.btn-google svg { width: 20px; height: 20px; }
.demo-box { margin-top: 22px; padding: 16px; border-radius: 13px; text-align: left; background: #fffbeb; border: 1px dashed #fcd34d; }
.demo-title { font-weight: 700; font-size: 13px; color: #92400e; margin-bottom: 4px; }
.note { color: var(--mut); font-size: 12px; text-align: center; margin-top: 14px; line-height: 1.6; }
.login-body .foot { margin: 0 0 20px; }

.foot { text-align: center; color: #9ca3af; font-size: 12px; padding: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .sidebar { position: fixed; left: calc(-1 * var(--sbw)); transition: left .25s ease; height: 100vh; }
    .sidebar.open { left: 0; }
    .burger { display: block; }
    .fab { display: flex; align-items: center; justify-content: center; }
    .content { padding: 16px; }
    .top-name { display: none; }
}
