/* app.css — Dashboard Pesantren MVP (append-only, tidak ubah styles.css) */
#app { min-height: 100svh; }
.app-shell { display: flex; min-height: 100svh; }
.app-side { width: 220px; flex-shrink: 0; background: #0f172a; color: #e2e8f0; padding: 1rem .75rem; position: sticky; top: 0; height: 100svh; }
.app-side .brand { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-weight: 800; color: #fff; padding: .5rem .75rem 1rem; font-size: .95rem; }
.app-side a { display: block; color: #cbd5e1; text-decoration: none; font-size: .9rem; font-weight: 600; padding: .6rem .75rem; border-radius: .6rem; }
.app-side a:hover, .app-side a.active { background: rgba(56,189,248,.15); color: #fff; }
.app-main { flex: 1; min-width: 0; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(15,23,42,.08); position: sticky; top: 0; z-index: 10; }
.app-top .who { font-size: .85rem; color: #475569; }
.app-body { padding: 1.25rem; max-width: 72rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1rem; }
.kpi { background: #fff; border-radius: 1rem; padding: 1rem 1.1rem; box-shadow: 0 10px 15px -3px rgba(15,23,42,.06); }
.kpi .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 700; }
.kpi .v { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 1.35rem; font-weight: 800; color: #0f172a; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem; }
.input, select.input { border: 1px solid #cbd5e1; border-radius: .6rem; padding: .55rem .8rem; font-size: .9rem; background: #fff; color: #0f172a; }
.btn { border: 0; border-radius: 9999px; padding: .55rem 1.1rem; font-size: .88rem; font-weight: 700; cursor: pointer; }
.btn-p { background: #0f172a; color: #fff; }
.btn-p:hover { background: #1e293b; }
.btn-sky { background: #0284c7; color: #fff; }
.btn-ghost { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.dtable { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border-radius: 1rem; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(15,23,42,.06); }
.dtable th, .dtable td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid #e2e8f0; }
.dtable th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; background: #f8fafc; }
.badge-lunas { background: #dcfce7; color: #166534; font-size: .72rem; font-weight: 800; padding: .15rem .6rem; border-radius: 9999px; }
.badge-belum { background: #fef3c7; color: #92400e; font-size: .72rem; font-weight: 800; padding: .15rem .6rem; border-radius: 9999px; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal { background: #fff; border-radius: 1rem; padding: 1.5rem; width: 100%; max-width: 28rem; display: flex; flex-direction: column; gap: .7rem; }
.modal label { font-size: .8rem; font-weight: 700; color: #334155; display: flex; flex-direction: column; gap: .3rem; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: .85rem; font-weight: 600; padding: .7rem 1.2rem; border-radius: 9999px; z-index: 60; box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.login-wrap { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: #fff; border-radius: 1.25rem; padding: 2rem; width: 100%; max-width: 24rem; box-shadow: 0 20px 25px -5px rgba(15,23,42,.12); display: flex; flex-direction: column; gap: .8rem; }
.login-card h1 { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 1.4rem; font-weight: 800; }
.ferr { color: #b91c1c; font-size: .82rem; font-weight: 600; }
.pager { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; font-size: .85rem; color: #475569; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .app-side { width: 100%; height: auto; position: sticky; top: auto; bottom: 0; order: 2; display: flex; overflow-x: auto; padding: .5rem; z-index: 10; }
  .app-side .brand { display: none; }
  .app-side a { white-space: nowrap; }
}
@media print { .app-side, .app-top, .toolbar, .btn { display: none !important; } }
/* R1 append-only: PSB/beasiswa/pengaturan */
.src { font-size: .75rem; color: #64748b; margin-top: .8rem; }
.font-heading { font-family: "Plus Jakarta Sans", Inter, sans-serif; }
.modal h3 { font-family: "Plus Jakarta Sans", Inter, sans-serif; margin: 0 0 .4rem; }
.modal small, h2 small { font-size: .8rem; color: #64748b; font-weight: 600; }
/* Dashboard terintegrasi */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-top: 1rem; }
.dash-card { background: #fff; border-radius: 1rem; padding: 1rem 1.1rem; box-shadow: 0 10px 15px -3px rgba(15,23,42,.06); font-size: .85rem; color: #334155; }
.dash-card .toolbar { margin-bottom: .5rem; }
.dash-card .toolbar b { font-size: .9rem; color: #0f172a; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
/* UI-2026: modernisasi dashboard + komponen bersama (append-only) */
:root {
  --pp-emerald: #0d7a5f; --pp-teal: #0f766e; --pp-gold: #c9a227;
  --pp-ink: #0c1f1a; --pp-bg: #f4f7f5; --pp-card: #ffffff;
  --pp-radius: 1.1rem;
  --pp-shadow: 0 12px 28px -14px rgba(12, 60, 48, .25);
}
#app { background: var(--pp-bg); }
.app-body { max-width: 76rem; }
.app-body h2.font-heading { color: var(--pp-ink); display: flex; align-items: center; gap: .6rem; }
.app-body h2.font-heading::before { content: ""; width: .35rem; height: 1.4em; border-radius: 9999px; background: linear-gradient(180deg, var(--pp-gold), var(--pp-emerald)); }
/* KPI lama ikut nuansa baru tanpa ubah markup lama */
.kpi { border: 1px solid rgba(13, 122, 95, .1); border-top: 4px solid var(--pp-emerald); box-shadow: var(--pp-shadow); }
.kpi:nth-child(2) { border-top-color: var(--pp-gold); }
.kpi .v { color: var(--pp-ink); }
/* Tabel & tombol lama: sentuhan modern */
.dtable { border: 1px solid rgba(13, 122, 95, .1); box-shadow: var(--pp-shadow); }
.dtable th { background: #eef5f1; color: #37584d; }
.btn-sky { background: linear-gradient(135deg, var(--pp-emerald), var(--pp-teal)); }
/* Greeting hero dashboard */
.pp-hero {
  background: linear-gradient(120deg, #0b2e25 0%, #0d7a5f 60%, #0f766e 100%);
  color: #fff; border-radius: var(--pp-radius); padding: 1.3rem 1.4rem;
  margin-bottom: 1rem; box-shadow: var(--pp-shadow); position: relative; overflow: hidden;
}
.pp-hero::after { content: ""; position: absolute; right: -3rem; top: -3rem; width: 11rem; height: 11rem; border-radius: 9999px; border: 2rem solid rgba(201, 162, 39, .25); }
.pp-hero h2 { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 1.25rem; font-weight: 800; margin: 0; }
.pp-hero p { font-size: .83rem; opacity: .85; margin: .2rem 0 0; }
.pp-hero .pp-badge-gold { margin-top: .5rem; }
