/* SPP Sekolah - gaya aplikasi (Bootstrap 5.3) */
:root {
  --spp-primary: #0f766e; --spp-primary-dark: #115e59; --spp-primary-soft: #e6f4f2;
  --spp-sidebar: #0b3b37; --spp-sidebar-text: #cde7e3; --spp-bg: #f4f6f8;
  --bs-primary: #0f766e; --bs-primary-rgb: 15,118,110; --bs-link-color: #0f766e; --bs-link-color-rgb: 15,118,110; --bs-link-hover-color: #115e59;
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-bs-theme="dark"] { --spp-bg: #0f1418; --spp-primary-soft: #12302d; --spp-sidebar: #0a1f1d; }
body { background: var(--spp-bg); font-size: .95rem; }
.btn-primary { --bs-btn-bg: var(--spp-primary); --bs-btn-border-color: var(--spp-primary); --bs-btn-hover-bg: var(--spp-primary-dark); --bs-btn-hover-border-color: var(--spp-primary-dark); --bs-btn-active-bg: var(--spp-primary-dark); --bs-btn-disabled-bg: var(--spp-primary); --bs-btn-disabled-border-color: var(--spp-primary); }
.btn-outline-primary { --bs-btn-color: var(--spp-primary); --bs-btn-border-color: var(--spp-primary); --bs-btn-hover-bg: var(--spp-primary); --bs-btn-hover-border-color: var(--spp-primary); --bs-btn-active-bg: var(--spp-primary); }
.text-primary { color: var(--spp-primary) !important; }
.bg-primary { background-color: var(--spp-primary) !important; }
.bg-primary-soft { background: var(--spp-primary-soft) !important; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #5eb5ab; box-shadow: 0 0 0 .2rem rgba(15,118,110,.18); }
.form-check-input:checked { background-color: var(--spp-primary); border-color: var(--spp-primary); }
.nav-pills .nav-link.active { background: var(--spp-primary); }
.page-link { color: var(--spp-primary); } .active > .page-link { background: var(--spp-primary); border-color: var(--spp-primary); }

/* Layout admin */
.spp-shell { display: flex; min-height: 100vh; }
.spp-sidebar { width: 250px; flex: none; background: var(--spp-sidebar); color: var(--spp-sidebar-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.spp-sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.spp-sidebar .brand img, .spp-sidebar .brand .logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.spp-sidebar .brand .name { font-weight: 700; line-height: 1.15; font-size: .95rem; }
.spp-sidebar .brand small { color: var(--spp-sidebar-text); font-weight: 400; font-size: .75rem; }
.spp-sidebar .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 1rem 1.2rem .35rem; }
.spp-sidebar .nav-link { color: var(--spp-sidebar-text); display: flex; align-items: center; gap: .7rem; padding: .5rem 1.2rem; border-left: 3px solid transparent; font-size: .92rem; }
.spp-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.spp-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.09); border-left-color: #5eead4; font-weight: 600; }
.spp-sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.spp-sidebar .pay-cta { margin: 1rem; }
.spp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.spp-topbar { background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); padding: .6rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1020; }
.spp-content { padding: 1.5rem; flex: 1; }
.spp-footer { padding: 1rem 1.5rem; color: var(--bs-secondary-color); font-size: .8rem; }
@media (max-width: 991.98px) {
  .spp-sidebar { position: fixed; left: -260px; z-index: 1045; transition: left .2s; }
  .spp-sidebar.show { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .spp-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1040; }
  .spp-backdrop.show { display: block; }
  .spp-content { padding: 1rem; }
}

/* Komponen */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--bs-secondary-color); }
.card { border: 1px solid var(--bs-border-color-translucent); box-shadow: 0 1px 2px rgba(16,24,40,.04); border-radius: .8rem; }
.card-header { background: transparent; font-weight: 600; padding: .85rem 1.1rem; }
.stat-card { padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: center; height: 100%; }
.stat-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.stat-card .label { color: var(--bs-secondary-color); font-size: .82rem; }
.stat-card .value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.ic-teal { background: #ccfbf1; color: #0f766e; } .ic-blue { background: #dbeafe; color: #1d4ed8; }
.ic-amber { background: #fef3c7; color: #b45309; } .ic-red { background: #fee2e2; color: #b91c1c; } .ic-violet { background: #ede9fe; color: #6d28d9; }
[data-bs-theme="dark"] .ic-teal, [data-bs-theme="dark"] .ic-blue, [data-bs-theme="dark"] .ic-amber, [data-bs-theme="dark"] .ic-red, [data-bs-theme="dark"] .ic-violet { background: rgba(255,255,255,.08); }
.help-box { background: var(--spp-primary-soft); border: 1px solid #b7e0da; border-radius: .7rem; padding: .85rem 1rem; display: flex; gap: .75rem; font-size: .9rem; }
.help-box i { color: var(--spp-primary); font-size: 1.2rem; }
[data-bs-theme="dark"] .help-box { border-color: #1f4d48; }
.table > :not(caption) > * > * { padding: .6rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600; background: var(--bs-tertiary-bg); white-space: nowrap; }
.table-card { margin: 0; } .table-card td, .table-card th { vertical-align: middle; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-soft-success { background: #dcfce7; color: #15803d; } .badge-soft-danger { background: #fee2e2; color: #b91c1c; }
.badge-soft-warning { background: #fef3c7; color: #a16207; } .badge-soft-secondary { background: #e5e7eb; color: #4b5563; }
.badge-soft-info { background: #dbeafe; color: #1d4ed8; } .badge-soft-primary { background: #ccfbf1; color: #0f766e; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: .5rem; opacity: .5; }
.steps { display: flex; gap: .5rem; flex-wrap: wrap; counter-reset: step; }
.step-pill { flex: 1 1 150px; border: 1px solid var(--bs-border-color); border-radius: .7rem; padding: .7rem .85rem; background: var(--bs-body-bg); text-decoration: none; color: inherit; display: flex; gap: .6rem; align-items: center; }
.step-pill .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bs-tertiary-bg); font-weight: 700; flex: none; font-size: .85rem; }
.step-pill.done .num { background: #16a34a; color: #fff; } .step-pill.current { border-color: var(--spp-primary); box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
.step-pill.current .num { background: var(--spp-primary); color: #fff; }
.step-pill .t { font-weight: 600; font-size: .88rem; line-height: 1.2; } .step-pill small { color: var(--bs-secondary-color); }
.invoice-pick { cursor: pointer; } .invoice-pick.selected { background: var(--spp-primary-soft); }
.pay-summary { position: sticky; top: 80px; }
.big-total { font-size: 1.9rem; font-weight: 800; color: var(--spp-primary); }
.search-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: 360px; overflow-y: auto; }
.progress { height: .55rem; }
.spp-card-matrix td, .spp-card-matrix th { text-align: center; font-size: .8rem; padding: .35rem !important; }
.cell-lunas { background: #dcfce7 !important; color: #166534; } .cell-sebagian { background: #fef3c7 !important; color: #92400e; } .cell-belum { background: #fee2e2 !important; color: #991b1b; }
.row-error td { background: #fef2f2 !important; } .row-warn td { background: #fffbeb !important; } .row-skip td { color: var(--bs-secondary-color); }
[data-bs-theme="dark"] .row-error td { background: #3b1414 !important; } [data-bs-theme="dark"] .row-warn td { background: #33280b !important; }

/* Halaman publik */
.public-nav { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e5e7eb; }
[data-bs-theme="dark"] .public-nav { background: rgba(15,20,24,.9); border-color: #222; }
.hero { background: linear-gradient(135deg, #0b3b37 0%, #0f766e 60%, #14b8a6 100%); color: #fff; padding: 4.5rem 0 5rem; }
.hero h1 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.02em; }
.hero .lead { color: #d1f2ec; }
.feature-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--spp-primary-soft); color: var(--spp-primary); }
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.wide { max-width: 760px; }
.mock { border: 1px solid var(--bs-border-color); border-radius: .7rem; background: var(--bs-body-bg); box-shadow: 0 8px 24px rgba(16,24,40,.08); overflow: hidden; font-size: .78rem; }
.mock .bar { background: var(--bs-tertiary-bg); padding: .35rem .6rem; display: flex; gap: .3rem; align-items: center; border-bottom: 1px solid var(--bs-border-color); }
.mock .bar span { width: 9px; height: 9px; border-radius: 50%; background: #d1d5db; display: inline-block; }
.mock .bar em { font-style: normal; margin-left: .5rem; color: var(--bs-secondary-color); font-size: .72rem; }
.mock .body { padding: .75rem; }
.mock .hl { outline: 2px dashed #f59e0b; outline-offset: 2px; border-radius: 4px; }
.guide-step { counter-increment: g; }
.guide-num { width: 36px; height: 36px; border-radius: 50%; background: var(--spp-primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }

/* Cetak */
@media print {
  .no-print, .spp-sidebar, .spp-topbar, .spp-footer, .public-nav { display: none !important; }
  body { background: #fff !important; }
  .spp-content { padding: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  a { text-decoration: none; color: inherit; }
}
