/* =========================================================
   SIPPMU — SMA Muhammadiyah 2 Bandar Lampung
   Palet: hijau Muhammadiyah + aksen emas matahari
   Font: Plus Jakarta Sans (judul) / Inter (UI) / JetBrains Mono (data)
   ========================================================= */

:root {
    --green-900: #12345A;
    --green-800: #1B4B7D;
    --green-700: #12345A;
    --green-600: #2878D0;
    --green-500: #5797E3;
    --green-100: #E7F0FB;
    --gold-500:  #2878D0;
    --gold-100:  #E7F0FB;
    --red-600:   #C0392B;
    --red-100:   #FBE7E4;
    --blue-600:  #2563EB;
    --blue-100:  #DDE8FC;
    --bg:        #F5F8F6;
    --surface:   #FFFFFF;
    --ink:       #16241C;
    --ink-muted: #64766D;
    --border:    #E4EAE6;

    --shadow-sm: 0 1px 2px rgba(18, 52, 90, 0.06);
    --shadow-md: 0 4px 14px rgba(18, 52, 90, 0.08), 0 1px 3px rgba(18, 52, 90, 0.06);
    --shadow-lg: 0 16px 40px rgba(18, 52, 90, 0.14), 0 4px 10px rgba(18, 52, 90, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -0.01em; }
a { color: var(--green-700); }
.mono { font-family: 'JetBrains Mono', monospace; }

/* =========================================================
   LOGIN — foto full-bleed + kartu mengambang, mirip referensi
   ========================================================= */
.login-page { margin: 0; }
.login-bg {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}
/* Motif geometris 8-titik, samar, di atas foto/gradient */
.login-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Crect x='22' y='22' width='40' height='40'/%3E%3Crect x='22' y='22' width='40' height='40' transform='rotate(45 42 42)'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 84px 84px;
}

.login-content {
    position: relative; z-index: 1;
    width: 100%; max-width: 1080px;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem;
    align-items: center;
}

.login-info { color: #fff; padding: 1rem; }
.login-info-logo { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem; }
.login-info-logo img { height: 34px; width: 34px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.login-info-logo span { font-size: .82rem; font-weight: 600; color: rgba(255,255,255,0.85); max-width: 220px; line-height: 1.3; }

.login-info h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.18; margin: 0 0 1rem; }
.login-info h1 .accent { color: var(--gold-500); }
.login-info-tagline { font-size: 1.02rem; color: rgba(255,255,255,0.8); font-style: italic; margin: 0 0 2rem; }

.login-dots { display: flex; gap: .4rem; margin-bottom: 2rem; }
.login-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: all .3s; }
.login-dots .dot.active { width: 22px; background: var(--gold-500); }

.login-badges { display: flex; gap: .8rem; }
.login-badge {
    display: flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,0.12); backdrop-filter: blur(4px);
    padding: .5rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.18);
}
.login-badge svg { width: 15px; height: 15px; }

.login-card-wrap { display: flex; justify-content: center; }
.login-card {
    background: var(--surface);
    padding: 2.3rem 2.2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 380px;
}
.login-card h2 { margin: 0 0 .3rem; font-size: 1.5rem; color: var(--green-900); }
.login-subtitle { color: var(--ink-muted); font-size: .88rem; margin: 0 0 1.4rem; }

.login-tabs { display: flex; background: var(--bg); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 1.3rem; }
.login-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem .5rem; border: none; background: transparent; border-radius: 7px;
    font-size: .82rem; font-weight: 600; color: var(--ink-muted); cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
}
.login-tab svg { width: 16px; height: 16px; }
.login-tab.active { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-sm); }

.login-card form label { display: block; margin-top: 1rem; font-size: .82rem; font-weight: 600; color: var(--ink); }
.login-card form label:first-of-type { margin-top: 0; }
.login-card form input {
    width: 100%; padding: .7rem .9rem; margin-top: .35rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .9rem; transition: border-color .15s, box-shadow .15s;
}
.login-card form input:focus {
    outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--green-100);
}
.login-submit {
    width: 100%; margin-top: 1.6rem; padding: .8rem;
    background: var(--green-700); color: #fff; border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: .92rem; letter-spacing: .01em;
    box-shadow: var(--shadow-md);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.login-submit:hover { background: var(--green-600); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); }
.login-footnote { text-align: center; font-size: .78rem; color: var(--ink-muted); margin: 1.2rem 0 0; }
.alert-error { background: var(--red-100); color: var(--red-600); padding: .65rem .9rem; border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 1rem; }
.alert-success { background: var(--green-100); color: var(--green-800); padding: .65rem .9rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm); }

@media (max-width: 860px) {
    .login-content { grid-template-columns: 1fr; }
    .login-info { display: none; }
    .login-bg { padding: 1.2rem; }
}

/* =========================================================
   LAYOUT UTAMA (dashboard)
   ========================================================= */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px; flex-shrink: 0;
    background: linear-gradient(180deg, var(--green-900) 0%, var(--green-800) 100%);
    color: #fff;
    display: flex; flex-direction: column;
    padding: 1.4rem 1rem;
    position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 0 .5rem 1.5rem; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    background: var(--gold-500); color: var(--green-900);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.brand-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: .68rem; color: rgba(255,255,255,0.55); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }

.sidebar nav { flex: 1; overflow-y: auto; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.nav-logout-item { border-top: 1px solid rgba(255,255,255,0.12); margin-top: .6rem; padding-top: .6rem; }
.sidebar nav a {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .7rem; border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.72); text-decoration: none;
    font-size: .87rem; font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff; font-weight: 600;
    border-left: 3px solid var(--gold-500);
}
.sidebar nav a .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.logout-link { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,0.65); text-decoration: none; font-size: .85rem; padding: .5rem .7rem; border-radius: var(--radius-sm); transition: background .15s, color .15s; }
.logout-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.logout-link .nav-icon { width: 18px; height: 18px; }

.content { flex: 1; min-width: 0; }
.content-inner { padding: 1.6rem 2rem 3rem; max-width: 1100px; overflow-x: hidden; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem; background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 5;
}
.topbar-greeting { font-size: .82rem; color: var(--ink-muted); }
.topbar-user { display: flex; align-items: center; gap: .7rem; }
.role-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    background: var(--gold-100); color: #8A5E10; padding: .3rem .7rem; border-radius: 999px;
}
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--green-700); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-sm);
}
.user-name { font-size: .87rem; font-weight: 600; color: var(--ink); }

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .sidebar nav ul { flex-direction: row; flex-wrap: wrap; }
    .sidebar nav a span, .logout-link span { display: none; }
    .nav-logout-item { border-top: none; margin-top: 0; padding-top: 0; }
    .content-inner { padding: 1.2rem; }
    .topbar { padding: .8rem 1.2rem; }
    .user-name { display: none; }
}

/* =========================================================
   KOMPONEN: kartu, form, tabel, tab, badge
   ========================================================= */
h2.page-title, .content-inner > h2:first-child {
    font-size: 1.4rem; font-weight: 700; color: var(--green-900); margin: 0 0 1.2rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { margin: 0 0 1rem; font-size: 1rem; color: var(--green-800); font-weight: 700; }
.muted { color: var(--ink-muted); font-size: .85rem; }

label { display: block; margin-top: .9rem; font-size: .82rem; font-weight: 600; color: var(--ink); }
input[type=text], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=file], select, textarea {
    width: 100%; max-width: 420px; padding: .55rem .75rem; margin-top: .35rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .88rem; font-family: inherit; background: var(--surface); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--green-100);
}
textarea { resize: vertical; }

button { font-family: inherit; cursor: pointer; border: none; }
button[type=submit], button[name=simpan], button[name=simpan_manual], button[name=simpan_jadwal],
button[name=tambah_libur], button[name=import], button[name=arsip] {
    margin-top: 1.2rem; padding: .6rem 1.4rem;
    background: var(--green-700); color: #fff;
    border-radius: var(--radius-sm); font-weight: 700; font-size: .87rem;
    box-shadow: var(--shadow-sm);
    transition: background .15s, box-shadow .15s, transform .1s;
}
button[type=submit]:hover, button[name=simpan]:hover, button[name=simpan_manual]:hover,
button[name=simpan_jadwal]:hover, button[name=tambah_libur]:hover, button[name=import]:hover {
    background: var(--green-600); box-shadow: var(--shadow-md); transform: translateY(-1px);
}
button[name=arsip] { background: var(--red-600); }
button[name=arsip]:hover { background: #A5311F; }

.btn-danger-small {
    background: var(--red-100); color: var(--red-600);
    border-radius: 6px; padding: .35rem .7rem; font-size: .78rem; font-weight: 600;
    transition: background .15s;
}
.btn-danger-small:hover { background: #F5CFC9; }

.filter-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filter-form label { margin-top: 0; }
.filter-form input, .filter-form select { max-width: 190px; margin-top: .3rem; }
.filter-form button {
    margin-top: 0; padding: .55rem 1.2rem; background: var(--green-700); color: #fff;
    border-radius: var(--radius-sm); font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-sm);
}
.filter-form button:hover { background: var(--green-600); }

/* ---- Tabel ---- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 1rem; font-size: .84rem; }
.data-table th {
    background: var(--green-100); color: var(--green-900);
    text-align: left; padding: .6rem .8rem; font-weight: 700;
    font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: #FAFCFA; }
.data-table tfoot td { border-top: 2px solid var(--border); font-weight: 700; }

/* ---- Tab ---- */
.tabs { display: flex; gap: .4rem; margin-bottom: 1.2rem; border-bottom: 2px solid var(--border); }
.tabs a {
    padding: .6rem 1.1rem; text-decoration: none; color: var(--ink-muted);
    font-size: .87rem; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.tabs a:hover { color: var(--green-700); }
.tabs a.active { color: var(--green-700); border-bottom-color: var(--green-700); }

/* ---- Tombol mode scan sholat ---- */
#btn-hadir, #btn-halangan {
    padding: .45rem .9rem; border: 1.5px solid var(--green-600); background: var(--surface);
    color: var(--green-700); border-radius: var(--radius-sm); font-weight: 600; font-size: .82rem;
}
.btn-active { background: var(--green-700) !important; color: #fff !important; border-color: var(--green-700) !important; }

/* ---- Statistik dashboard ---- */
.stat-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-box {
    flex: 1; min-width: 110px; background: var(--green-100);
    border-radius: var(--radius-md); padding: 1.1rem; text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.7rem; font-weight: 800; color: var(--green-800); }
.stat-box-danger { background: var(--red-100); }
.stat-box-danger .stat-num { color: var(--red-600); }

/* ---- Badge status presensi/kehadiran ---- */
.badge-status {
    display: inline-block; padding: .25rem .65rem; border-radius: 999px;
    font-size: .76rem; font-weight: 700;
}
.badge-hadir { background: var(--green-100); color: var(--green-800); }
.badge-izin  { background: var(--blue-100); color: var(--blue-600); }
.badge-sakit { background: var(--gold-100); color: #8A5E10; }
.badge-alpa  { background: var(--red-100); color: var(--red-600); }

/* ---- Kartu Murid (ID card) ---- */
.id-card-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.id-card-grid .id-card { flex: 0 0 auto; }
.id-card {
    max-width: 400px; border-radius: var(--radius-lg); padding: 1.3rem;
    background: linear-gradient(160deg, var(--surface) 0%, var(--green-100) 130%);
    border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.id-card-header { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid var(--border); padding-bottom: .8rem; margin-bottom: .9rem; }
.id-card-header img { height: 40px; }
.id-card-school { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--green-900); font-size: .92rem; }
.id-card-address { font-size: .74rem; color: var(--ink-muted); }
.id-card-body { display: flex; gap: 1.1rem; align-items: center; }
.id-card-info div { margin-bottom: .3rem; font-size: .9rem; }

/* ---- Autocomplete pencarian (Siswa / Jenis Pelanggaran) — list ke bawah, konsisten di semua browser ---- */
.autocomplete-wrap { position: relative; max-width: 420px; }
.autocomplete-list {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; margin-top: .3rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); max-height: 240px; overflow-y: auto; z-index: 50;
}
.autocomplete-item { padding: .6rem .8rem; cursor: pointer; font-size: .88rem; border-bottom: 1px solid var(--border); }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--green-100); }
.autocomplete-empty { padding: .6rem .8rem; font-size: .85rem; color: var(--ink-muted); }

input[type=color] {
    width: 60px; height: 40px; padding: 3px; margin-top: .35rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface);
}
.color-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.color-row label { margin-top: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table.compact th, .data-table.compact td { padding: .4rem .5rem; text-align: center; white-space: nowrap; }
.data-table.compact td:first-child, .data-table.compact th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.data-table.compact td.symbol-hadir { color: var(--green-700); font-weight: 700; }
.data-table.compact td.symbol-halangan { color: var(--gold-500); font-weight: 700; }
.data-table.compact td.symbol-tidak { color: var(--ink-muted); }
/* ---- Kop sekolah (muncul cuma saat dicetak) ---- */
.print-only { display: none; }
.kop-sekolah { display: flex; align-items: center; gap: .8rem; margin-bottom: .4rem; }
.kop-sekolah img { height: 56px; width: 56px; object-fit: contain; }
.kop-sekolah-nama { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--green-900); }
.kop-sekolah-alamat { font-size: .82rem; color: var(--ink-muted); }
.kop-sekolah-garis { border: none; border-top: 2px solid var(--green-700); margin: .5rem 0 1rem; }

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .layout { display: block; }
    .content-inner { padding: 0; max-width: none; }
    body { background: #fff; }
    .card { box-shadow: none; border: none; }
    .id-card-grid .id-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
    .print-only { display: block; }
    .kop-sekolah img { height: 64px; width: 64px; }
}


/* SIPPMU modern monthly/semester recap */
.recap-card { border: 1px solid #e1eaf5; border-radius: 18px; padding: 1.35rem; background: linear-gradient(145deg,#fff 0%,#fbfdff 100%); box-shadow: 0 10px 28px rgba(18,55,96,.06); }
.recap-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.recap-heading h3 { margin:0 0 .35rem; color:#17365d; font-size:1.08rem; }
.recap-period { white-space:nowrap; border-radius:999px; background:#eaf2ff; color:#1556a6; padding:.4rem .7rem; font-size:.7rem; font-weight:800; letter-spacing:.07em; }
.recap-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.8rem; margin:1rem 0 1.2rem; }
.recap-stat { border:1px solid transparent; border-radius:14px; padding:.9rem 1rem; display:flex; flex-direction:column; gap:.35rem; }
.recap-stat span { font-size:.78rem; font-weight:700; }
.recap-stat strong { font-size:1.65rem; line-height:1.15; }
.stat-present { background:#e9f9f0; border-color:#c7f0d8; color:#087443; }
.stat-sick { background:#fff7e5; border-color:#f8e6b4; color:#996000; }
.stat-permission { background:#eaf4ff; border-color:#cfe4ff; color:#1759a6; }
.stat-absent { background:#fff0f0; border-color:#ffd5d5; color:#c52c37; }
.table-wrap { width:100%; overflow-x:auto; border:1px solid #e4ebf4; border-radius:12px; }
.recap-table { margin:0; min-width:760px; font-size:.82rem; }
.recap-table th { background:#f0f5fb; color:#264766; padding:.75rem .8rem; border-bottom:1px solid #e0e9f3; }
.recap-table td { padding:.68rem .8rem; vertical-align:middle; }
.recap-table tbody tr:nth-child(even) { background:#fbfdff; }
.recap-table tbody tr:hover { background:#f0f7ff; }
.recap-table .student-name { font-weight:650; color:#183b61; }
.status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:.24rem .58rem; font-size:.72rem; font-weight:750; white-space:nowrap; }
.pill-present { background:#d9f7e7; color:#087443; }
.pill-sick { background:#fff0c7; color:#895900; }
.pill-permission { background:#dcecff; color:#1759a6; }
.pill-absent { background:#ffe0e0; color:#b4232d; }
.pill-late { background:#fff0d8; color:#9b5200; border:1px solid #f8d8a7; }
.recap-note { margin:.9rem 0 0; padding:.8rem .9rem; background:#f2f7fd; border:1px solid #e0ebf8; color:#536b84; border-radius:10px; font-size:.78rem; }
@media (max-width:700px) { .recap-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .recap-heading { flex-direction:column; } .recap-card { padding:1rem; } }
@media print { .recap-card { box-shadow:none; border:1px solid #ccc; } .recap-stats { break-inside:avoid; } }


/* SIPPMU Professional Navy theme (default) */
a { color: var(--green-700); }
button, .btn, input[type="submit"] { transition: filter .15s ease, transform .15s ease; }
button:hover, .btn:hover, input[type="submit"]:hover { filter: brightness(1.06); }
.sidebar { box-shadow: 8px 0 28px rgba(18,52,90,.08); }
.card { border-color: #e2eaf4; }
input:focus, select:focus, textarea:focus { outline-color: var(--green-600); border-color: var(--green-600); }
@media (max-width: 760px) { .content-inner { padding: 1rem; } .recap-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .filter-form { gap: .75rem; } }


/* SIPPMU UI alignment pass — all modules */
:root { --bg:#f4f7fb; --surface:#fff; --ink:#172b42; --ink-muted:#64758b; --border:#e1e9f2; --shadow-sm:0 2px 5px rgba(18,52,90,.045); --shadow-md:0 8px 22px rgba(18,52,90,.075); --shadow-lg:0 18px 46px rgba(18,52,90,.13); }
body { background:var(--bg); color:var(--ink); }
.content { min-width:0; flex:1; }
.content-inner { width:100%; max-width:1440px; margin-inline:auto; }
.content-inner > h2:first-child { margin-top:.15rem; margin-bottom:1.25rem; }
.card,.recap-card { border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow-sm); }
.card { padding:clamp(1rem,2vw,1.5rem); margin-bottom:1.15rem; }
.card h3 { line-height:1.4; }
.muted { color:var(--ink-muted); line-height:1.6; }
label { color:var(--ink); font-weight:600; }
input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea { border:1px solid #d4dfeb; border-radius:9px; background:#fff; color:var(--ink); min-height:40px; padding:.62rem .75rem; max-width:100%; }
input[type=checkbox],input[type=radio] { accent-color:var(--green-700); }
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible { outline:3px solid color-mix(in srgb,var(--green-600) 35%,transparent); outline-offset:2px; }
button,.btn,input[type=submit] { border-radius:9px; font-weight:700; min-height:40px; }
.data-table { border-spacing:0; }
.data-table th,.data-table td { line-height:1.45; }
.data-table tbody tr:hover td { background-color:#f5f9fe; }
.table-scroll,.table-wrap { max-width:100%; }
.filter-form { padding:.9rem; background:#fff; border:1px solid var(--border); border-radius:12px; }
.stat-box { border:1px solid #e1eaf4; }
.topbar { border-bottom:1px solid var(--border); background:rgba(255,255,255,.94); backdrop-filter:blur(12px); }
.sidebar { background:linear-gradient(180deg,var(--green-900) 0%,var(--green-800) 100%); }
.sidebar nav a { border-radius:10px; margin-block:2px; }
.sidebar nav a.active { box-shadow:inset 3px 0 0 var(--gold-500); }
.alert-success,.alert-error { border:1px solid transparent; border-radius:11px; line-height:1.55; }
.alert-success { border-color:color-mix(in srgb,var(--green-700) 16%,white); }
.alert-error { border-color:#f4c9c4; }
.recap-card { padding:clamp(1rem,2vw,1.4rem); }
.recap-table th { position:sticky; top:0; z-index:1; }
.recap-table tbody tr:nth-child(even) { background:#fafcff; }
.recap-note { line-height:1.55; }
.color-row { gap:1rem; }
.color-row label { min-width:145px; }
@media(max-width:900px) {
 .layout { display:block; }
 .sidebar { width:100%; position:relative; padding:.85rem 1rem; }
 .sidebar-brand { padding:0 .25rem .75rem; }
 .sidebar nav { overflow-x:auto; overflow-y:hidden; }
 .sidebar nav ul { flex-direction:row; flex-wrap:nowrap; width:max-content; min-width:100%; gap:.35rem; }
 .sidebar nav li { flex:0 0 auto; }
 .sidebar nav a { padding:.65rem .75rem; }
 .sidebar nav a span,.logout-link span { display:inline; }
 .content-inner { max-width:none; padding:1rem; }
 .topbar { padding:.75rem 1rem; }
 .topbar-greeting { display:none; }
 .data-table { font-size:.8rem; }
 .data-table th,.data-table td { padding:.6rem .65rem; }
}
@media(max-width:560px) {
 .topbar-user { gap:.45rem; }
 .user-name { max-width:125px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .role-badge { font-size:.68rem; }
 .content-inner { padding:.75rem; }
 .card { padding:.9rem; border-radius:13px; }
 .filter-form { align-items:stretch; }
 .filter-form label,.filter-form input,.filter-form select { width:100%; max-width:none; }
 .filter-form button { width:100%; }
 .recap-stats { gap:.55rem; }
 .recap-stat { padding:.75rem; }
 .recap-stat strong { font-size:1.35rem; }
 .table-wrap { border-radius:9px; }
 .color-row { display:grid; grid-template-columns:1fr; }
 .login-card { padding:1.4rem; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; } }
@media print { .filter-form,.sidebar nav,.sidebar-brand { display:none!important; } .content-inner { max-width:none!important; } }

/* =========================================================
   SIPPMU UI REBUILD — Reference: dashboard collage supplied by school
   Consistent navy sidebar, white topbar, airy cards, responsive tables
   ========================================================= */
:root{
  --navy-950:#062744;--navy-900:#082f55;--navy-800:#0b3d6d;--navy-700:#124f8c;
  --blue-600:#1769c2;--blue-500:#2878d0;--blue-100:#e8f2ff;
  --bg:#f3f7fc;--surface:#fff;--ink:#152c46;--ink-muted:#6f8197;--border:#e2ebf5;
  --green-900:#082f55;--green-800:#0b3d6d;--green-700:#1769c2;--green-600:#2878d0;
  --gold-500:#8ab9f1;--gold-100:#e8f2ff;
  --shadow-sm:0 2px 8px rgba(16,55,95,.045);--shadow-md:0 8px 22px rgba(16,55,95,.075);--shadow-lg:0 18px 48px rgba(16,55,95,.13);
  --radius-sm:8px;--radius-md:12px;--radius-lg:16px;
}
html{background:var(--bg)} body{background:var(--bg);color:var(--ink);font-size:13px}
.layout{min-height:100vh;align-items:stretch}
.sidebar{width:238px;padding:16px 12px 14px;background:linear-gradient(180deg,var(--navy-950),var(--navy-900));height:100vh;position:sticky;top:0;box-shadow:5px 0 22px rgba(5,32,58,.06)}
.sidebar-brand{padding:4px 7px 20px;gap:10px;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:13px}
.brand-mark{width:39px;height:39px;border-radius:9px;background:#fff;box-shadow:none;padding:2px}
.brand-mark img{padding:1px;border-radius:7px}
.brand-title{font-size:16px;letter-spacing:.01em;color:#fff}
.brand-sub{font-size:9px;letter-spacing:.02em;text-transform:none;color:#b9cee3;line-height:1.4}
.sidebar nav ul{gap:4px}
.sidebar nav a,.logout-link{font-size:12px;min-height:35px;padding:8px 10px;border:0;border-radius:8px;color:#c4d5e7;gap:10px}
.sidebar nav a:hover,.logout-link:hover{background:rgba(255,255,255,.09);color:#fff}
.sidebar nav a.active{background:linear-gradient(90deg,#1769c2,#2878d0);border:0;color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.12);font-weight:650}
.sidebar nav a .nav-icon,.logout-link .nav-icon{width:16px;height:16px}
.nav-logout-item{margin-top:9px;padding-top:9px;border-top:1px solid rgba(255,255,255,.12)}
.content{min-width:0;flex:1}
.topbar{min-height:58px;padding:10px 24px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--border);box-shadow:0 2px 7px rgba(22,57,90,.025);gap:16px}
.topbar-title:before{content:'☰';display:inline-flex;align-items:center;justify-content:center;color:#355b80;border:1px solid #e3ebf4;border-radius:7px;width:29px;height:29px;margin-right:12px;font-size:14px}
.topbar-title{display:flex;align-items:center;color:#244a70;font-size:12px;font-weight:650}
.topbar-greeting{font-size:12px;color:#244a70;font-weight:650}
.topbar-greeting:after{content:'SMA Muhammadiyah 2 Bandar Lampung';margin-left:10px;color:#31516f;font-weight:600}
.topbar-user{gap:8px}
.role-badge{font-size:10px;text-transform:none;background:#eef5fc;color:#365878;padding:5px 9px}
.user-avatar{width:30px;height:30px;background:#e7f1fc;color:#164b80;box-shadow:none}
.user-name{font-size:11px;color:#314c68}
.content-inner{max-width:none;width:100%;padding:22px 24px 32px;overflow:visible}
h1,h2,h3{color:#143a60}
h2.page-title,.content-inner>h2:first-child{font-size:22px;line-height:1.3;letter-spacing:-.45px;color:#12375d;margin:0 0 5px;font-weight:750}
.content-inner>h2:first-child:after{display:block;color:#8091a5;font-size:11px;font-weight:400;letter-spacing:0;margin-top:5px}
.card,.recap-card{background:#fff;border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow-sm);padding:17px 18px;margin-bottom:15px}
.card:hover{box-shadow:var(--shadow-md)}
.card h3{font-size:13px;color:#193e63;margin:0 0 14px;font-weight:700}
.stat-grid{gap:10px}
.stat-box{background:#fff;border:1px solid #e1ebf6;border-radius:11px;padding:14px;min-height:86px;color:#6c8096;box-shadow:0 2px 6px rgba(19,61,101,.025)}
.stat-num{font-size:25px;font-weight:750;line-height:1.25;color:#1268bd;letter-spacing:-.5px}
.stat-box:nth-child(2) .stat-num{color:#169a6a}.stat-box:nth-child(3) .stat-num{color:#e39a18}.stat-box:nth-child(4) .stat-num{color:#e05260}
.data-table{width:100%;border-collapse:separate;border-spacing:0;font-size:11px}
.data-table th{background:#f4f8fd;color:#617b96;font-weight:700;text-transform:none;border-top:1px solid #e6edf5;border-bottom:1px solid #e6edf5;padding:10px 11px;white-space:nowrap}
.data-table td{padding:9px 11px;border-bottom:1px solid #edf2f8;color:#334e69;vertical-align:middle}
.data-table tbody tr:hover{background:#f8fbff}
.data-table tr:last-child td{border-bottom:0}
.table-scroll,.table-wrap{max-width:100%;overflow-x:auto;border-radius:10px}
input,select,textarea{border:1px solid #dce6f1!important;border-radius:8px!important;background:#fff;color:#28445f;min-height:36px;padding:8px 10px;font:inherit}
input:focus,select:focus,textarea:focus{outline:0!important;border-color:#6ca7e9!important;box-shadow:0 0 0 3px #e8f2ff!important}
button,.btn,.button,input[type=submit]{border-radius:8px!important;transition:background .15s,transform .15s,box-shadow .15s}
button[type=submit],.btn-primary,.button-primary,input[type=submit]{background:#1769c2;color:#fff;border:1px solid #1769c2}
button[type=submit]:hover,.btn-primary:hover,.button-primary:hover,input[type=submit]:hover{background:#0c559f;box-shadow:0 4px 12px rgba(23,105,194,.18)}
.badge-status{border-radius:999px;padding:3px 8px;font-size:10px;font-weight:700;white-space:nowrap}
.muted{color:#7b8da2}
form{max-width:100%}
img,canvas,svg{max-width:100%}
@media(min-width:1400px){.content-inner{padding:26px 30px 38px}.card{padding:19px 21px}.sidebar{width:248px}}
@media(max-width:1000px){.sidebar{width:205px}.content-inner{padding:18px}.topbar{padding:10px 18px}.topbar-greeting:after{display:none}}
@media(max-width:760px){
 .layout{display:block}.sidebar{width:100%;height:auto;position:relative;padding:10px 12px;box-shadow:none}
 .sidebar-brand{padding:0 4px 10px;margin-bottom:9px}.sidebar nav{max-height:150px;overflow:auto}
 .sidebar nav ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .sidebar nav a,.logout-link{font-size:11px;padding:8px;min-height:34px}.sidebar nav a span,.logout-link span{display:inline}
 .nav-logout-item{border:0;margin:0;padding:0}.content-inner{padding:14px 12px 24px}.topbar{position:relative;padding:10px 12px;min-height:48px}
 .topbar-title:before{margin-right:7px}.topbar-user{gap:6px}.role-badge{display:none}.user-name{display:inline;font-size:10px}
 h2.page-title,.content-inner>h2:first-child{font-size:19px}.card{padding:13px;margin-bottom:12px;border-radius:11px}.card h3{font-size:12px}
 .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-num{font-size:22px}
 .data-table{min-width:560px}.table-scroll .data-table{min-width:560px}
}
@media(max-width:390px){.sidebar nav ul{grid-template-columns:1fr 1fr}.sidebar nav a{font-size:10px}.content-inner{padding:10px}.topbar-greeting{font-size:10px}}
@media print{.sidebar,.topbar{display:none!important}.content-inner{padding:0!important}.card{box-shadow:none!important}}
.topbar-date{font-size:10px;color:#8092a7;white-space:nowrap;margin-right:8px}
@media(max-width:760px){.topbar-date{display:none}}
.topbar-greeting:after{content:none!important;margin:0!important}
