/* ============================================================
   Data Siswa — portal data akademik
   Palette: deep indigo institutional + amber accent + paper
   Type: Georgia (display, records-ledger feel) + system sans (UI)
   ============================================================ */

:root {
    --ink:        #1a1f36;   /* teks utama */
    --indigo:     #2d3561;   /* brand */
    --indigo-800: #232a4d;
    --amber:      #e8a13a;   /* accent */
    --amber-600:  #c9821f;
    --paper:      #f6f5f1;   /* background halaman */
    --card:       #ffffff;
    --line:       #e3e1d8;   /* garis / border */
    --muted:      #6b7086;
    --success-bg: #e6f4ea; --success-fg:#1e6b3a;
    --error-bg:   #fbe9e7; --error-fg:  #b3261e;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(26,31,54,.06), 0 4px 16px rgba(26,31,54,.05);
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.topbar {
    background: var(--indigo);
    color: #fff;
    border-bottom: 3px solid var(--amber);
}
.topbar-inner {
    max-width: 960px; margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
    font-family: var(--serif); font-size: 20px; letter-spacing: .3px;
}
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--amber); color: var(--indigo-800);
    font-family: var(--sans); font-weight: 800; font-size: 14px;
}
.topnav { display: flex; align-items: center; gap: 12px; }
.nav-user { color: #cdd2ec; font-size: 14px; }

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.footer {
    text-align: center; color: var(--muted); font-size: 13px;
    padding: 24px; border-top: 1px solid var(--line);
}
.footer p { margin: 0; }

.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 22px;
}
.page-head h1 { font-family: var(--serif); font-size: 28px; margin: 0 0 4px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Card ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
    margin-bottom: 18px;
}
.card-title {
    font-family: var(--serif); font-size: 15px; letter-spacing: .5px;
    text-transform: uppercase; color: var(--indigo);
    margin: 0 0 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

/* ---------- Data list (dashboard) ---------- */
.datalist { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.datalist-row {
    display: grid; grid-template-columns: 150px 1fr; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: baseline;
}
.datalist-row dt { color: var(--muted); font-size: 13px; }
.datalist-row dd { margin: 0; font-weight: 500; word-break: break-word; }
.empty { color: #b8b6ac; }

/* ---------- Data table (dashboard admin) ---------- */
.datatable { width: 100%; border-collapse: collapse; font-size: 14px; }
.datatable th {
    text-align: left; font-size: 12.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .4px;
    padding: 0 12px 10px; border-bottom: 1px solid var(--line);
}
.datatable td { padding: 10px 12px; border-bottom: 1px dashed var(--line); }
.datatable tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-fg); }
.badge-pending { background: var(--error-bg); color: var(--error-fg); }

/* ---------- Progress bar ---------- */
.progress {
    display: inline-block; width: 100px; height: 8px; border-radius: 999px;
    background: var(--line); overflow: hidden; vertical-align: middle;
}
.progress-bar { height: 100%; background: var(--amber); border-radius: 999px; }
.progress-bar-full { background: var(--success-fg); }
.progress-label { margin-left: 8px; font-size: 12.5px; color: var(--muted); vertical-align: middle; }

/* ---------- Forms ---------- */
.form { display: block; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field-label { font-size: 13px; color: var(--indigo); font-weight: 600; }
.field input, .field select, .field textarea {
    font-family: var(--sans); font-size: 15px; color: var(--ink);
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(45,53,97,.12);
}
.field input:disabled {
    background: #f0efe9; color: var(--muted); cursor: not-allowed;
}
.err { color: var(--error-fg); font-size: 12.5px; }
.sep { border: none; border-top: 1px solid var(--line); margin: 8px 0 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--sans); font-size: 14px; font-weight: 600;
    padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
    cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--indigo-800); }
.btn-primary:hover { background: var(--amber-600); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: #fff; border-color: var(--muted); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-block { width: 100%; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: var(--success-bg); color: var(--success-fg); }
.alert-error   { background: var(--error-bg);   color: var(--error-fg); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 60vh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-title { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.auth-hint { color: var(--muted); font-size: 12.5px; margin: 16px 0 0; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .datalist { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .datalist-row { grid-template-columns: 130px 1fr; }
    .page-head { flex-direction: column; }
    .brand span:last-child { display: none; }
}
