/* =========================================================
   Keuangan Komite MTsN 3 Kediri — Modern SaaS UI
   ========================================================= */
:root {
  --g-950: #06341d;
  --g-900: #0a4a2a;
  --g-800: #0c5c33;
  --g-700: #0f6e3c;
  --g-600: #148a4a;
  --g-500: #1fa35a;
  --g-400: #4cc07c;
  --g-100: #dcf3e4;
  --g-50: #effaf3;
  --gold: #d6a93c;
  --gold-2: #f2d27a;
  --gold-50: #fff8e6;
  --red: #e0474c;
  --red-50: #fff1f1;
  --amber: #e2a316;
  --amber-50: #fff7e6;
  --blue: #3b82f6;
  --ink: #0f1f17;
  --ink-2: #344a3e;
  --muted: #6b7c73;
  --line: #e5ece8;
  --bg: #f4f7f5;
  --card: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .04), 0 4px 16px rgba(16, 40, 28, .05);
  --shadow-lg: 0 10px 40px rgba(16, 40, 28, .16);
  --sb-w: 262px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--g-700); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.ic { flex-shrink: 0; }
.text-danger { color: var(--red) !important; }
.text-success { color: var(--g-600) !important; }
.text-muted { color: var(--muted) !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.nowrap { white-space: nowrap; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: 8px } .gap-2 { gap: 12px }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.print-only { display: none; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40;
  background:
    radial-gradient(circle at 0 0, rgba(242, 210, 122, .22) 0, transparent 120px),
    radial-gradient(circle at 100% 100%, rgba(242, 210, 122, .12) 0, transparent 200px),
    linear-gradient(180deg, var(--g-700) 0%, var(--g-800) 45%, var(--g-950) 100%);
  color: #fff; display: flex; flex-direction: column; overflow-y: auto;
  transition: transform .25s ease;
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M24 4l6 14 14 6-14 6-6 14-6-14-14-6 14-6z'/%3E%3C/g%3E%3C/svg%3E");
}
.sb-brand { position: relative; text-align: center; padding: 26px 18px 10px; }
.sb-logo { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.sb-name { font-weight: 800; font-size: 21px; margin-top: 10px; letter-spacing: .02em; }
.sb-sub { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.sb-divider { margin: 14px auto 4px; height: 1px; width: 70%; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); position: relative; }
.sb-divider span { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; background: var(--gold-2); transform: translate(-50%, -50%) rotate(45deg); }
.sb-nav { position: relative; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.sb-nav a {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px;
  color: rgba(255,255,255,.9); font-weight: 600; font-size: 15.5px; transition: background .15s, transform .15s;
}
.sb-nav a:hover { background: rgba(255,255,255,.08); }
.sb-nav a.active { background: linear-gradient(90deg, var(--g-500), var(--g-600)); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.15); }
.sb-foot { margin-top: auto; position: relative; padding: 0 12px 16px; }
.sb-mosque {
  height: 120px; opacity: .18; margin: 0 -12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 120'%3E%3Cg fill='%23fff'%3E%3Cpath d='M130 20c-22 12-34 28-34 46h68c0-18-12-34-34-46z'/%3E%3Crect x='96' y='66' width='68' height='54'/%3E%3Crect x='60' y='40' width='10' height='80'/%3E%3Cpath d='M65 22l7 18H58z'/%3E%3Crect x='190' y='40' width='10' height='80'/%3E%3Cpath d='M195 22l7 18h-14z'/%3E%3Cpath d='M30 120V84c0-10 10-18 20-22 10 4 20 12 20 22v36zM190 120V84c0-10 10-18 20-22 10 4 20 12 20 22v36z'/%3E%3Crect x='0' y='112' width='260' height='8'/%3E%3C/g%3E%3C/svg%3E") bottom center / contain no-repeat;
}
.sb-logout { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 10px; border-radius: 10px; color: #fff; background: rgba(0,0,0,.18); font-weight: 600; }
.sb-logout:hover { background: rgba(0,0,0,.3); }
.sb-overlay { display: none; }

.main { flex: 1; margin-left: var(--sb-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 72px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 18px; padding: 0 28px; border-bottom: 1px solid var(--line);
}
.tb-sep { width: 2px; height: 34px; background: linear-gradient(var(--gold), var(--gold-2)); border-radius: 2px; }
.tb-title { font-size: 24px; font-weight: 800; color: var(--g-950); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn { position: relative; border: 0; background: transparent; color: var(--ink-2); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--g-50); color: var(--g-700); }
.bell .dot { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.user-btn { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 14px; font: inherit; color: var(--ink); text-align: left; }
.user-btn:hover { background: var(--g-50); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--g-500), var(--g-800)); box-shadow: 0 0 0 3px var(--g-100); }
.user-meta b { display: block; font-size: 15.5px; }
.user-meta small { color: var(--muted); font-size: 13px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.dropdown.open .dropdown-menu { display: block; animation: pop .15s ease; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.dropdown-menu a:hover { background: var(--g-50); }

.content { padding: 24px 28px 28px; flex: 1; }
.app-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 0 0; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; position: relative; }
.page-head h2 { font-size: 26px; font-weight: 800; color: var(--g-950); }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.date-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--ink-2); font-weight: 500; }
.welcome-bg { position: absolute; right: 230px; bottom: -8px; width: 260px; height: 70px; opacity: .1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 70'%3E%3Cg fill='%23148a4a'%3E%3Cpath d='M130 4c-18 10-28 22-28 36h56c0-14-10-26-28-36z'/%3E%3Crect x='102' y='40' width='56' height='30'/%3E%3Crect x='70' y='18' width='8' height='52'/%3E%3Crect x='182' y='18' width='8' height='52'/%3E%3Cpath d='M40 70V52c0-8 8-14 16-17 8 3 16 9 16 17v18zM188 70V52c0-8 8-14 16-17 8 3 16 9 16 17v18z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 8px; }
.card-head .ttl { display: flex; gap: 12px; align-items: flex-start; }
.card-head .ttl .ic { color: var(--g-700); margin-top: 2px; }
.card-head h3 { font-size: 18px; font-weight: 800; }
.card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 14px 22px 20px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--g-700); white-space: nowrap; }
.link-more:hover { gap: 9px; }

.grid { display: grid; gap: 18px; }
.grid-stats { grid-template-columns: 1.1fr 1fr 1fr 1fr; }
.grid-2 { grid-template-columns: 1.55fr 1fr; }
.grid-2e { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.mt-grid { margin-top: 18px; }

/* Stat cards */
.stat { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); min-height: 112px; }
.stat .s-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.stat .s-lbl { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.stat .s-val { font-size: 26px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; white-space: nowrap; }
.stat .s-sub { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat .trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.stat-primary { background: linear-gradient(135deg, var(--g-700), var(--g-900)); border: 0; color: #fff; }
.stat-primary .s-lbl { color: rgba(255,255,255,.9); }
.stat-primary .s-ic { background: rgba(255,255,255,.1); color: var(--gold-2); border: 1px solid rgba(242,210,122,.35); }
.stat-primary::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(242,210,122,.35) 0 2px, transparent 2px 10px); opacity: .7; }
.stat-green { background: linear-gradient(180deg, #fff, var(--g-50)); }
.stat-green .s-ic { background: var(--g-100); color: var(--g-700); }
.stat-green .s-val { color: var(--g-800); }
.stat-green .trend { color: var(--g-600); }
.stat-red { background: linear-gradient(180deg, #fff, var(--red-50)); }
.stat-red .s-ic { background: #ffe0e0; color: var(--red); }
.stat-red .s-val, .stat-red .trend { color: var(--red); }
.stat-amber { background: linear-gradient(180deg, #fff, var(--amber-50)); }
.stat-amber .s-ic { background: #ffecc2; color: #b77d06; }
.stat-amber .s-val { color: var(--ink); }
.stat-blue { background: linear-gradient(180deg, #fff, #eef5ff); }
.stat-blue .s-ic { background: #dbeafe; color: var(--blue); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { background: var(--g-50); color: var(--ink); font-weight: 700; text-align: left; padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid var(--g-100); }
.table th:first-child { border-top-left-radius: 10px; } .table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: #fafcfb; }
.table tfoot td { font-weight: 800; background: #fafcfb; border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .act { white-space: nowrap; text-align: right; }
.table-sm td, .table-sm th { padding: 9px 12px; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { text-align: center; padding: 40px 10px !important; color: var(--muted); }
.empty .ic { display: block; margin: 0 auto 8px; color: #b8c6be; }
.person { display: flex; align-items: center; gap: 10px; }
.person .av { width: 34px; height: 34px; border-radius: 50%; background: var(--g-100); color: var(--g-800); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-success { background: var(--g-100); color: var(--g-700); }
.badge-danger { background: #ffe3e3; color: #c4282e; }
.badge-warning { background: #ffefc7; color: #9a6a00; }
.badge-muted { background: #eef1ef; color: var(--muted); }
.badge-info { background: #e0edff; color: #1d5fd1; }
.badge-gold { background: var(--gold-50); color: #9a6a00; border: 1px solid #f3dfa5; }
.dot-c { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-primary { background: linear-gradient(180deg, var(--g-500), var(--g-600)); color: #fff; box-shadow: 0 4px 12px rgba(20,138,74,.28); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #3d2c00; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-light:hover { border-color: var(--g-400); color: var(--g-700); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-soft { background: var(--red-50); color: var(--red); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; background: #f3f6f4; color: var(--ink-2); border: 0; }
.btn-icon:hover { background: var(--g-100); color: var(--g-700); }
.btn-icon.danger:hover { background: #ffe3e3; color: var(--red); }
.btn-block { width: 100%; }
button[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.fg label, .lbl { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid #d9e3dd; border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--ink); transition: border .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; }
.input:focus { outline: 0; border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(31,163,90,.13); }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.input-prefix .input { padding-left: 40px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.filters .fg { min-width: 140px; }
.filters .fg.grow { flex: 1; min-width: 200px; }
.filters .input { height: 40px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 38px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; background: #e9efeb; border-radius: 13px; width: fit-content; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; border-radius: 10px; font-weight: 700; color: var(--ink-2); display: flex; gap: 8px; align-items: center; font-size: 14px; }
.tabs a.active { background: #fff; color: var(--g-700); box-shadow: var(--shadow); }

/* ---------- Modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 20px; width: min(560px, calc(100% - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal.lg { width: min(760px, calc(100% - 32px)); }
dialog.modal::backdrop { background: rgba(6, 30, 18, .45); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 20px 24px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: #fafcfb; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.toasts { position: fixed; top: 86px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 300px; max-width: 420px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); border-left: 4px solid var(--g-500); animation: pop .25s ease; font-weight: 600; }
.toast-success .ic { color: var(--g-600); }
.toast-error { border-left-color: var(--red); } .toast-error .ic { color: var(--red); }
.toast-x { margin-left: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; flex-wrap: wrap; }
.pg-info { color: var(--muted); font-size: 13px; }
.pg-links { display: flex; gap: 4px; }
.pg-links a, .pg-links span { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }
.pg-links a:hover { border-color: var(--g-400); color: var(--g-700); }
.pg-links .active { background: var(--g-600); border-color: var(--g-600); color: #fff; }
.pg-links .disabled { opacity: .4; } .pg-links .dots { border: 0; background: none; }

/* ---------- Charts / misc ---------- */
.chart-box { position: relative; height: 290px; }
.donut-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.donut { position: relative; height: 220px; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 16px; font-weight: 800; display: block; }
.donut-center small { color: var(--muted); font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.legend li:last-child { border-bottom: 0; }
.legend .v { font-weight: 700; white-space: nowrap; } .legend .p { color: var(--muted); width: 50px; text-align: right; }
.progress { height: 8px; background: #edf2ef; border-radius: 99px; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--g-400), var(--g-600)); border-radius: 99px; }
.progress.warn > span { background: linear-gradient(90deg, #f6c453, var(--amber)); }
.progress.bad > span { background: linear-gradient(90deg, #f28b8e, var(--red)); }
.summary-box { padding: 16px; border-radius: 14px; background: var(--g-50); border: 1px dashed var(--g-400); }
.kv { display: flex; justify-content: space-between; padding: 6px 0; gap: 10px; }
.kv b { font-weight: 800; }
.alert { display: flex; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--amber-50); border: 1px solid #f7dc9c; color: #7a5400; font-size: 13.5px; }
.alert-info { background: #eef5ff; border-color: #c9dcff; color: #1d4f9c; }

/* Matrix rekap */
.matrix td, .matrix th { text-align: center; padding: 8px 6px; }
.matrix td:nth-child(2), .matrix th:nth-child(2) { text-align: left; }
.mx { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; }
.mx-l { background: var(--g-100); color: var(--g-700); }
.mx-s { background: #ffefc7; color: #9a6a00; }
.mx-b { background: #ffe3e3; color: #c4282e; }
.mx-n { background: #f1f4f2; color: #b6c2bb; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-hero { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(circle at 15% 10%, rgba(242,210,122,.25), transparent 300px), linear-gradient(160deg, var(--g-600), var(--g-900) 60%, var(--g-950)); }
.login-hero::before { content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23fff'%3E%3Cpath d='M32 6l8 18 18 8-18 8-8 18-8-18-18-8 18-8z'/%3E%3C/g%3E%3C/svg%3E"); }
.login-hero > * { position: relative; }
.login-hero h1 { font-size: 40px; font-weight: 800; line-height: 1.15; max-width: 460px; }
.login-hero p { opacity: .85; font-size: 16px; max-width: 440px; line-height: 1.6; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 480px; }
.login-feats div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-weight: 600; font-size: 13.5px; }
.login-feats .ic { color: var(--gold-2); }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.login-card h2 { font-size: 26px; font-weight: 800; }
.login-card .fg { margin-top: 16px; }
.login-card .btn { height: 48px; margin-top: 22px; font-size: 15px; }

/* ---------- Kuitansi ---------- */
.receipt { max-width: 720px; margin: 24px auto; background: #fff; border-radius: 16px; padding: 32px 36px; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kop { display: flex; align-items: center; gap: 18px; border-bottom: 3px double var(--g-800); padding-bottom: 14px; margin-bottom: 18px; }
.kop img { width: 70px; height: 70px; object-fit: contain; }
.kop h2 { font-size: 19px; font-weight: 800; color: var(--g-900); }
.kop p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ttd { display: flex; justify-content: space-between; margin-top: 36px; text-align: center; font-size: 13.5px; }
.ttd div { min-width: 200px; } .ttd .sp { height: 70px; }
.stamp { position: absolute; right: 40px; top: 120px; border: 3px solid var(--g-600); color: var(--g-600); font-weight: 800; font-size: 26px; padding: 6px 18px; border-radius: 10px; transform: rotate(-12deg); opacity: .35; letter-spacing: .1em; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .donut-wrap { grid-template-columns: 1fr; }
  .donut { height: 200px; max-width: 240px; margin: 0 auto; width: 100%; }
}
@media (max-width: 1100px) {
  .grid-2, .grid-2e { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .welcome-bg { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .login-page { grid-template-columns: 1fr; } .login-hero { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .content { padding: 16px; } .topbar { padding: 0 12px; gap: 10px; }
  .tb-title { font-size: 17px; } .hide-sm { display: none !important; }
  .grid-stats, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 21px; }
  .stat .s-val { font-size: 22px; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11.5pt; }
  .sidebar, .topbar, .no-print, .toasts, .filters, .pagination, .tabs, .app-foot, .sb-overlay { display: none !important; }
  .main { margin: 0; } .content { padding: 0; }
  .print-only { display: block !important; }
  .card, .stat { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .stat-primary { background: #fff !important; color: #000 !important; }
  .stat-primary .s-lbl { color: #333 !important; }
  .stat::after { display: none; }
  .table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt { box-shadow: none; border: 1px solid #999; margin: 0 auto; }
  a { color: inherit; }
}

/* Sidebar collapse (desktop) */
@media (min-width: 901px) {
  body.sb-collapsed .sidebar { transform: translateX(-100%); }
  body.sb-collapsed .main { margin-left: 0; }
}
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; top: 80px; } .toast { min-width: 0; max-width: none; } }
