/* =====================================================================
   ADT Lux v1  -  SRAYA EduPlatform
   Standar premium ADT (enterprise/dashboard/SaaS). Bukan Claymorphism.
   Prinsip: restraint, whitespace, padat-data-rapi, anti AI-tell, jujur.
   ===================================================================== */

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

:root {
    --navy:        #0B1F3A;   /* sidebar + teks utama */
    --biru:        #2F80ED;   /* aksi tunggal */
    --biru-tekan:  #256fd6;
    --green:       #16A34A;
    --orange:      #F59E0B;
    --purple:      #7C3AED;   /* penanda AI Engine */
    --bg:          #F5F7FB;
    --card:        #FFFFFF;
    --border:      #E7EBF1;
    --text:        #0B1F3A;
    --text-2:      #5A6B8A;
    --radius-card: 16px;
    --radius-btn:  11px;
    --shadow:      0 1px 2px rgba(15,34,66,.04), 0 2px 8px rgba(15,34,66,.05);
    --shadow-lg:   0 4px 16px rgba(15,34,66,.06);
    --sidebar-w:   248px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* teks paragraf panjang rata kanan-kiri */
p, .justify { text-align: justify; }

a { color: var(--biru); text-decoration: none; }

/* ---------- LAYOUT SHELL ---------- */
.shell { display: flex; min-height: 100%; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .2px;
    padding: 4px 10px 18px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.sidebar .brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--biru); }
.sidebar .brand small { display: block; font-size: 11px; font-weight: 500; color: #93a6c9; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav a {
    color: #cdd8ec;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--biru); color: #fff; }
.nav a .soon {
    font-size: 10px;
    font-weight: 600;
    color: #93a6c9;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 6px;
    padding: 1px 6px;
}
.sidebar .foot { margin-top: auto; font-size: 11px; color: #7f92b6; padding: 8px 10px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 60px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar .title { font-weight: 600; font-size: 15px; }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.topbar .who .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy); color: #fff;
    display: grid; place-items: center; font-weight: 600; font-size: 12px;
}

.content { padding: 24px; }

/* ---------- KOMPONEN ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 20px;
}
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat .label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat .est { font-size: 11px; color: var(--orange); font-weight: 500; }

.btn {
    background: var(--biru);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: var(--biru-tekan); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--biru); border: 1px solid var(--border); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff;
}
.input:focus { outline: none; border-color: var(--biru); box-shadow: 0 0 0 3px rgba(47,128,237,.12); }

/* tabel lebih diutamakan daripada tembok chip */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.tbl th { color: var(--text-2); font-weight: 600; font-size: 12px; }

.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.badge.ai { color: var(--purple); background: rgba(124,58,237,.10); }
.badge.ok { color: var(--green); background: rgba(22,163,74,.10); }

/* banner error jujur */
.banner {
    border-radius: var(--radius-btn);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.banner.err { display: block; background: rgba(220,53,69,.08); color: #b02a37; border: 1px solid rgba(220,53,69,.2); }

/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .sub { color: var(--text-2); font-size: 13px; margin-bottom: 22px; }

/* ---------- RESPONSIF (mobile first 375px+) ---------- */
@media (max-width: 860px) {
    .sidebar { position: fixed; left: -260px; transition: left .2s ease; z-index: 20; }
    .sidebar.open { left: 0; }
    .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .content { padding: 16px; }
}
