/* SIPRAMUKA — sistem desain. Cokelat Pramuka + aksen emas, mendukung mode gelap. */
:root {
  --sp-brand: #8a5a2b; --sp-brand-rgb: 138, 90, 43; --sp-brand-dark: #5e3b17;
  --sp-gold: #e7a93b; --sp-green: #2f8f5b;
  --sp-side: #2a1b0f; --sp-side-2: #3b2614; --sp-side-text: #d9c9b6;
  --sp-bg: #f7f4ef; --sp-surface: #ffffff; --sp-border: #ece5da; --sp-text: #2a2118; --sp-muted: #7b6f62;
  --sp-radius: 16px; --sp-shadow: 0 1px 2px rgba(42, 27, 15, .05), 0 8px 24px rgba(42, 27, 15, .06);
  --bs-primary: #8a5a2b; --bs-primary-rgb: 138, 90, 43; --bs-link-color: #8a5a2b; --bs-link-hover-color: #5e3b17;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-bg: var(--sp-bg); --bs-body-color: var(--sp-text); --bs-border-color: var(--sp-border);
  --bs-border-radius: 10px; --bs-border-radius-lg: var(--sp-radius);
}
[data-bs-theme="dark"] {
  --sp-bg: #14100c; --sp-surface: #1e1812; --sp-border: #35291f; --sp-text: #efe7db; --sp-muted: #a39583;
  --sp-side: #0f0b08; --sp-side-2: #1c130b; --sp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --bs-body-bg: var(--sp-bg); --bs-body-color: var(--sp-text); --bs-border-color: var(--sp-border);
  --bs-link-color: #e7a93b; --bs-link-hover-color: #f3c26b; --bs-secondary-bg: #261e16; --bs-tertiary-bg: #231b14;
}
body { background: var(--sp-bg); font-feature-settings: 'ss01'; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { letter-spacing: -.015em; font-weight: 700; }
.text-muted, .text-body-secondary { color: var(--sp-muted) !important; }

/* Tombol */
.btn { font-weight: 600; border-radius: 10px; }
.btn-primary { --bs-btn-bg: var(--sp-brand); --bs-btn-border-color: var(--sp-brand); --bs-btn-hover-bg: var(--sp-brand-dark); --bs-btn-hover-border-color: var(--sp-brand-dark);
  --bs-btn-active-bg: var(--sp-brand-dark); --bs-btn-active-border-color: var(--sp-brand-dark); --bs-btn-disabled-bg: var(--sp-brand); --bs-btn-focus-shadow-rgb: 138, 90, 43; }
.btn-outline-primary { --bs-btn-color: var(--sp-brand); --bs-btn-border-color: var(--sp-brand); --bs-btn-hover-bg: var(--sp-brand); --bs-btn-hover-border-color: var(--sp-brand); --bs-btn-active-bg: var(--sp-brand); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #e7a93b; --bs-btn-border-color: #6b5233; --bs-btn-hover-bg: #e7a93b; --bs-btn-hover-color: #1a120a; }
.btn-gold { background: var(--sp-gold); border-color: var(--sp-gold); color: #2a1b0f; }
.btn-gold:hover { background: #f0b956; border-color: #f0b956; color: #2a1b0f; }
.form-control, .form-select { border-radius: 10px; border-color: var(--sp-border); background-color: var(--sp-surface); padding: .55rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--sp-brand); box-shadow: 0 0 0 .22rem rgba(var(--sp-brand-rgb), .16); }
.form-label { font-weight: 600; font-size: .84rem; margin-bottom: .3rem; }
.form-text { font-size: .78rem; }
.req::after { content: ' *'; color: #dc3545; }

/* Layout */
.sp-shell { display: flex; min-height: 100vh; }
.sp-sidebar { width: 272px; flex: 0 0 272px; background: linear-gradient(180deg, var(--sp-side), var(--sp-side-2)); color: var(--sp-side-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 1040; scrollbar-width: thin; }
.sp-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; text-decoration: none; color: #fff; }
.sp-brand img { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.sp-brand b { display: block; font-size: 1.05rem; letter-spacing: .04em; line-height: 1.1; }
.sp-brand small { color: #b9a58d; font-size: .68rem; }
.sp-nav { padding: .25rem .75rem 1rem; flex: 1; }
.sp-nav .sect { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #8d7960; padding: 1rem .75rem .35rem; font-weight: 700; }
.sp-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 10px; color: var(--sp-side-text); text-decoration: none; font-size: .9rem; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.sp-nav a i { font-size: 1.05rem; opacity: .85; width: 1.25rem; text-align: center; }
.sp-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sp-nav a.active { background: rgba(231, 169, 59, .16); color: #fff; font-weight: 600; }
.sp-nav a.active::before { content: ''; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--sp-gold); }
.sp-nav a.active i { color: var(--sp-gold); opacity: 1; }
.sp-side-foot { padding: .9rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .72rem; color: #8d7960; }
.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-top { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; padding: .7rem 1.5rem;
  background: color-mix(in srgb, var(--sp-bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--sp-border); }
.sp-content { padding: 1.6rem 1.5rem 3rem; max-width: 1480px; width: 100%; margin: 0 auto; }
.sp-foot { padding: 1.25rem 1.5rem; color: var(--sp-muted); font-size: .78rem; text-align: center; }
.sp-scrim { display: none; }
@media (max-width: 991.98px) {
  .sp-sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  body.sp-open .sp-sidebar { transform: none; }
  body.sp-open .sp-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 1035; }
  .sp-top, .sp-content { padding-left: 1rem; padding-right: 1rem; }
}

/* Kartu */
.card { background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius); box-shadow: var(--sp-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--sp-border); font-weight: 700; padding: .95rem 1.25rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.page-head h1 { font-size: 1.55rem; margin: 0; }
.page-head .crumb { color: var(--sp-muted); font-size: .82rem; margin-top: .25rem; }
.stat { position: relative; overflow: hidden; padding: 1.15rem 1.25rem; transition: transform .18s, box-shadow .18s; height: 100%; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42, 27, 15, .06), 0 16px 32px rgba(42, 27, 15, .10); }
.stat .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; }
.stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.stat .lbl { font-size: .78rem; color: var(--sp-muted); font-weight: 600; }
.stat a.stretched-link::after { border-radius: var(--sp-radius); }
.tone-brown { background: rgba(138, 90, 43, .13); color: #8a5a2b; } .tone-gold { background: rgba(231, 169, 59, .2); color: #b97b08; }
.tone-green { background: rgba(47, 143, 91, .15); color: #2f8f5b; } .tone-blue { background: rgba(37, 112, 200, .14); color: #2570c8; }
.tone-red { background: rgba(220, 53, 69, .13); color: #dc3545; } .tone-purple { background: rgba(124, 77, 190, .14); color: #7c4dbe; }
[data-bs-theme="dark"] .tone-brown { color: #d8a56a; } [data-bs-theme="dark"] .tone-gold { color: #f3c26b; }

/* Tabel */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-muted); font-weight: 700; border-bottom: 1px solid var(--sp-border); white-space: nowrap; padding: .85rem 1rem; background: var(--bs-tertiary-bg, rgba(138,90,43,.04)); }
.table > tbody td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--sp-border); font-size: .9rem; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(var(--sp-brand-rgb), .045); }
.table-responsive { border-radius: 0 0 var(--sp-radius) var(--sp-radius); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-ini { display: inline-grid; place-items: center; color: #fff; font-weight: 700; }
.badge { font-weight: 600; letter-spacing: .01em; padding: .38em .65em; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--sp-muted); }
.empty i { font-size: 2.6rem; opacity: .5; display: block; margin-bottom: .5rem; }

/* Form */
.form-section { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sp-brand); font-weight: 800; margin: .5rem 0 .25rem; }
.file-box { border: 1.5px dashed var(--sp-border); border-radius: 12px; padding: .75rem; background: var(--bs-tertiary-bg, transparent); }
.file-box .cur { font-size: .8rem; margin-bottom: .4rem; }
.invalid-msg { color: #dc3545; font-size: .78rem; margin-top: .25rem; }
.is-invalid { border-color: #dc3545 !important; }
.progress-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--sp-gold) calc(var(--p) * 1%), var(--sp-border) 0); position: relative; }
.progress-ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--sp-surface); }
.progress-ring span { position: relative; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.step { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border-radius: 12px; text-decoration: none; color: inherit; border: 1px solid var(--sp-border); transition: background .15s, border-color .15s; }
.step:hover { background: rgba(var(--sp-brand-rgb), .06); border-color: rgba(var(--sp-brand-rgb), .4); color: inherit; }
.step .bar { height: 5px; border-radius: 5px; background: var(--sp-border); overflow: hidden; } .step .bar i { display: block; height: 100%; background: var(--sp-green); }
dl.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .55rem 1rem; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--sp-muted); font-weight: 600; } dl.kv dd { margin: 0; word-break: break-word; }
@media (max-width: 575.98px) { dl.kv { grid-template-columns: 1fr; gap: .1rem; } dl.kv dd { margin-bottom: .6rem; } }

/* Toast */
.sp-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.sp-toast { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; background: var(--sp-surface); border: 1px solid var(--sp-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18); border-left: 5px solid var(--c, var(--sp-brand)); animation: spIn .3s ease; font-size: .88rem; }
.sp-toast i { font-size: 1.2rem; color: var(--c); margin-top: 1px; } .sp-toast.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes spIn { from { opacity: 0; transform: translateX(24px); } }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero { position: relative; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(900px 500px at 0% 0%, #a56a2f 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #c58a1e 0%, transparent 55%), linear-gradient(135deg, #3b2614, #5e3b17 55%, #2a1b0f); }
.auth-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.2px); background-size: 26px 26px; mask-image: linear-gradient(135deg, #000 0%, transparent 70%); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .logos img { height: 64px; background: #fff; border-radius: 16px; padding: 6px; margin-right: .6rem; }
.auth-hero h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.1; }
.auth-hero ul { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .8rem; }
.auth-hero li { display: flex; gap: .7rem; align-items: center; color: #f0e2cf; } .auth-hero li i { color: var(--sp-gold); font-size: 1.15rem; }
.auth-pane { display: grid; place-items: center; padding: 2rem 1.25rem; background: var(--sp-bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 640px; }
@media (max-width: 991.98px) { .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.pw-meter { height: 5px; border-radius: 5px; background: var(--sp-border); overflow: hidden; } .pw-meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }

@media print { .sp-sidebar, .sp-top, .sp-foot, .no-print, .sp-toasts { display: none !important; } .sp-content { padding: 0; } .card { box-shadow: none; border: 1px solid #ccc; } body { background: #fff; } }
