:root {
    --spmb-primary: #0f766e;
    --spmb-primary-dark: #0b4f4a;
    --spmb-primary-soft: #e6f4f1;
    --spmb-accent: #f59e0b;
    --spmb-bg: #f5f7f8;
}

body {
    background-color: var(--spmb-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

a { color: var(--spmb-primary); }
a:hover { color: var(--spmb-primary-dark); }

.btn-primary {
    --bs-btn-bg: var(--spmb-primary);
    --bs-btn-border-color: var(--spmb-primary);
    --bs-btn-hover-bg: var(--spmb-primary-dark);
    --bs-btn-hover-border-color: var(--spmb-primary-dark);
    --bs-btn-active-bg: var(--spmb-primary-dark);
    --bs-btn-active-border-color: var(--spmb-primary-dark);
    --bs-btn-disabled-bg: #6c9d99;
    --bs-btn-disabled-border-color: #6c9d99;
}

.btn-outline-primary {
    --bs-btn-color: var(--spmb-primary);
    --bs-btn-border-color: var(--spmb-primary);
    --bs-btn-hover-bg: var(--spmb-primary);
    --bs-btn-hover-border-color: var(--spmb-primary);
    --bs-btn-active-bg: var(--spmb-primary-dark);
}

.text-primary { color: var(--spmb-primary) !important; }
.bg-primary { background-color: var(--spmb-primary) !important; }
.bg-soft { background-color: var(--spmb-primary-soft); }

.navbar-spmb {
    background: linear-gradient(120deg, var(--spmb-primary-dark), var(--spmb-primary));
}

.navbar-spmb .navbar-brand,
.navbar-spmb .nav-link { color: #fff; }
.navbar-spmb .nav-link:hover { color: #d9f2ee; }

.hero {
    background: linear-gradient(135deg, var(--spmb-primary-dark), var(--spmb-primary));
    color: #fff;
    border-radius: 1.25rem;
    padding: 2.5rem 1.5rem;
}

.hero .display-5 { font-weight: 700; letter-spacing: -0.5px; }

.card { border: 0; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1); border-radius: .9rem; }
.card-header { background: #fff; border-bottom: 1px solid #eef1f2; font-weight: 600; }

.stat-card { border-left: 4px solid var(--spmb-primary); }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: #667085; font-size: .85rem; }

.section-title { font-weight: 700; letter-spacing: -0.2px; }
.muted { color: #667085; }
.small-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #98a2b3; font-weight: 600; }

/* ---------- Progres ---------- */
.progress-steps { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .25rem; }
.progress-step { flex: 1 0 auto; min-width: 92px; text-align: center; font-size: .72rem; color: #98a2b3; }
.progress-step .dot {
    width: 30px; height: 30px; border-radius: 50%; margin: 0 auto .35rem;
    display: flex; align-items: center; justify-content: center;
    background: #e4e7ec; color: #667085; font-weight: 700; font-size: .8rem;
}
.progress-step.done .dot { background: var(--spmb-primary); color: #fff; }
.progress-step.active .dot { background: var(--spmb-accent); color: #1f2937; box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.progress-step.done, .progress-step.active { color: #344054; font-weight: 600; }

/* ---------- Layout admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; flex: 0 0 250px; background: #0b3b38; color: #cfe9e5;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1rem .75rem;
}
.admin-sidebar .brand { color: #fff; font-weight: 700; text-decoration: none; display: flex; gap: .5rem; align-items: center; padding: .5rem .5rem 1rem; }
.admin-sidebar .nav-link { color: #b7d8d3; border-radius: .55rem; padding: .5rem .75rem; font-size: .92rem; }
.admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--spmb-primary); color: #fff; }
.admin-sidebar .nav-section { color: #6fa7a0; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; padding: 1rem .75rem .35rem; }
.admin-main { flex: 1 1 auto; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e9edf0; padding: .65rem 1rem; position: sticky; top: 0; z-index: 20; }

@media (max-width: 991.98px) {
    .admin-sidebar { display: none; }
}

/* ---------- Bottom nav siswa ---------- */
.student-body { padding-bottom: 78px; }
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
    border-top: 1px solid #e4e7ec; display: flex; z-index: 1030;
    padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
}
.bottom-nav a {
    flex: 1; text-align: center; font-size: .68rem; color: #667085;
    text-decoration: none; padding: .25rem 0;
}
.bottom-nav a.active { color: var(--spmb-primary); font-weight: 700; }
.bottom-nav a .bn-icon { display: block; font-size: 1.15rem; line-height: 1.2; }

@media (min-width: 992px) {
    .bottom-nav { display: none; }
    .student-body { padding-bottom: 1rem; }
}

/* ---------- Tabel responsif ---------- */
.table-responsive-card { overflow-x: auto; }

/* ---------- Dokumen ---------- */
.doc-item { border: 1px solid #e9edf0; border-radius: .75rem; padding: .85rem; }
.doc-item + .doc-item { margin-top: .6rem; }

/* ---------- Print ---------- */
@media print {
    body { background: #fff; }
    .no-print, .navbar, .admin-sidebar, .admin-topbar, .bottom-nav { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    a[href]:after { content: ""; }
}

.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.35rem; border-left: 2px solid #e4e7ec; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li:before {
    content: ""; position: absolute; left: -6px; top: .15rem; width: 10px; height: 10px;
    border-radius: 50%; background: var(--spmb-primary);
}

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.login-card { width: 100%; max-width: 430px; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .15); color: #fff; font-weight: 800;
}

.form-control:focus, .form-select:focus {
    border-color: #5ab3aa;
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
}
