/* Digital Smart School — design system
   Brand: hijau (diturunkan dari hijau logo SD IT Cordova #298C3C), aksen emas. */
:root {
  --brand: #0E7A46;
  --brand-600: #0B683B;
  --brand-700: #084B2C;
  --brand-50: #ECF7F0;
  --brand-100: #D2EDDC;
  --gold: #E9B200;

  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --border: #E6E8EC;
  --border-strong: #D5D8DE;
  --text: #111827;
  --text-2: #4B5563;
  --muted: #6B7280;
  --faint: #9CA3AF;

  --success: #16A34A;  --success-bg: #ECFDF3;
  --warning: #D97706;  --warning-bg: #FFF7E6;
  --info: #2563EB;     --info-bg: #EEF4FF;
  --danger: #DC2626;   --danger-bg: #FEF2F2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 40px -8px rgba(16, 24, 40, .22);
  --sidebar: 260px;
  --topbar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand-100); }

.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 14px; height: 14px; flex: none; }
.ic-lg { width: 22px; height: 22px; flex: none; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-brand { color: var(--brand); }
.sm { font-size: 13px; }
.xs { font-size: 12px; }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-1 { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ shell */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar);
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .2s ease;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sb-brand { display: flex; align-items: center; gap: 10px; height: var(--topbar); padding: 0 20px; border-bottom: 1px solid var(--border); flex: none; }
.sb-brand img { height: 36px; width: 36px; border-radius: 9px; }
.sb-brand b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); line-height: 1.15; letter-spacing: -.01em; }
.sb-brand b span { color: var(--brand); }
.sb-brand small { display: block; font-size: 11px; color: var(--muted); line-height: 1.25; }
.nav { padding: 18px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 0 12px 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500;
}
.nav a .ic { color: var(--faint); }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav a.active .ic { color: var(--brand); }
.nav .nav-label + a { margin-top: 0; }
.nav .group + .group { margin-top: 20px; }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex: none; }
.side-foot .flex-1 b { display: block; font-size: 13px; }
.side-foot .flex-1 span { display: block; font-size: 12px; color: var(--muted); }
.scrim { position: fixed; inset: 0; background: rgba(17, 24, 39, .4); z-index: 39; }

.main { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); flex: none;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .title { min-width: 0; flex: 1; }
.topbar h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 16px 32px; }
.page.narrow { max-width: 880px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.bordered { border-color: var(--border); background: var(--surface); }
.icon-btn[aria-disabled=true] { opacity: .35; pointer-events: none; }

.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: 11px; font-weight: 500; color: var(--muted); }
.bottom-nav a .ic { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--brand); font-weight: 700; }

.child-select { display: flex; align-items: center; gap: 8px; }
.child-select .lbl { font-size: 12px; color: var(--muted); display: none; }

@media (min-width: 640px) { .child-select .lbl { display: inline; } }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .scrim, .menu-btn { display: none !important; }
  .main { margin-left: var(--sidebar); padding-bottom: 0; }
  .bottom-nav { display: none; }
  .topbar { padding: 0 32px; }
  .page { padding: 28px 32px 48px; }
}

/* ------------------------------------------------------------ components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
a.card:hover { border-color: var(--border-strong); }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .g-side { grid-template-columns: minmax(0, 1fr) 340px; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { font-size: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 32px 0 14px; }
.section-title h2 { font-size: 16px; }

.link { color: var(--brand); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

.avatar {
  --h: 250; display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: hsl(var(--h) 60% 94%); color: hsl(var(--h) 45% 36%);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.xl { width: 76px; height: 76px; font-size: 26px; }
.avatar.sm { width: 34px; height: 34px; font-size: 12.5px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--text-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.present, .badge.ok { background: var(--success-bg); color: var(--success); }
.badge.sick, .badge.warn { background: var(--warning-bg); color: var(--warning); }
.badge.permit, .badge.info { background: var(--info-bg); color: var(--info); }
.badge.absent, .badge.bad { background: var(--danger-bg); color: var(--danger); }
.badge.brand { background: var(--brand-50); color: var(--brand); }

.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--bg); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.tag.brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand); }
.tag.gold { background: #FFF8E1; border-color: #FBE7A1; color: #8A6500; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ic-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; margin: 0 auto 14px; color: var(--faint); }
.empty .ic-wrap .ic { width: 24px; height: 24px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto; font-size: 13.5px; }

.stat { padding: 18px 20px; display: block; }
.stat .label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .ic-box { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.stat .ic-box.ok { background: var(--success-bg); color: var(--success); }
.stat .ic-box.gold { background: #FFF8E1; color: #A57A00; }
.stat .ic-box.info { background: var(--info-bg); color: var(--info); }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 14px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.stat .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.progress { height: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress.ok > i { background: var(--success); }
.progress.bad > i { background: var(--danger); }

.list > * { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.list > *:last-child { border-bottom: 0; }
.list > a:hover { background: var(--surface-2); }
.list .meta { font-size: 12.5px; color: var(--muted); }
.list .chev { color: var(--faint); }

.time-box { width: 58px; flex: none; font-variant-numeric: tabular-nums; }
.time-box b { display: block; font-size: 13.5px; }
.time-box span { font-size: 12px; color: var(--muted); }
.v-line { width: 3px; align-self: stretch; border-radius: 3px; background: var(--brand-100); flex: none; }

.score-chip { min-width: 48px; padding: 6px 8px; border-radius: 8px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--bg); color: var(--muted); }
.score-chip.ok { background: var(--success-bg); color: var(--success); }
.score-chip.bad { background: var(--danger-bg); color: var(--danger); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .c { text-align: center; }
.table .r { text-align: right; }
.table td.num { font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: var(--surface-2); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; padding: 8px 14px; border-radius: 7px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--bg); }
.tabs a.active { background: var(--brand); color: #fff; }
.tabs a.today:not(.active)::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); white-space: nowrap; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.input.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 4px var(--danger-bg); }
.field .error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }
.field .help { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; border-radius: 6px; }
.pw-toggle:hover { color: var(--text); background: var(--bg); }
.pw-toggle .hide-ic, .pw-toggle.on .show-ic { display: none; }
.pw-toggle.on .hide-ic { display: block; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.input-icon .input { padding-left: 42px; }
select.select {
  appearance: none; height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-weight: 600; font-size: 13px; cursor: pointer; max-width: 200px;
}
select.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--brand-600); }
.btn.block { width: 100%; }
.btn.lg { height: 46px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--bg); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #B91C1C; }
.btn.white { background: #fff; color: var(--brand); }
.btn.white:hover { background: var(--brand-50); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* toast & modal */
.toast-wrap { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); display: grid; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; width: 100%; max-width: 400px; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius); background: #111827; color: #fff; box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease-out;
}
.toast .dot { width: 20px; height: 20px; border-radius: 50%; background: #22C55E; display: grid; place-items: center; flex: none; margin-top: 1px; }
.toast .dot .ic { width: 12px; height: 12px; stroke-width: 3; }
.toast.error .dot { background: #EF4444; }
.toast b { display: block; font-size: 13.5px; }
.toast span { font-size: 13px; opacity: .8; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@media (min-width: 1024px) { .toast-wrap { left: auto; right: 24px; bottom: 24px; justify-items: end; } }

dialog.modal { border: 0; padding: 0; border-radius: 16px; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(17, 24, 39, .45); }
.modal-head { padding: 22px 24px 0; }
.modal-head h3 { font-size: 17px; }
.modal-head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.modal-body { padding: 20px 24px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; margin-top: 12px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.option-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; font-weight: 500; }
.option-list a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.option-list a.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); font-weight: 600; }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; background: var(--surface); }
.auth-aside { display: none; }
.auth-main { display: flex; flex-direction: column; padding: 24px 20px; min-height: 100vh; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand img { height: 40px; width: 40px; border-radius: 10px; }
.auth-brand b { display: block; font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.15; letter-spacing: -.01em; }
.auth-brand b span { color: var(--brand); }
.auth-brand small { display: block; font-size: 11.5px; color: var(--muted); }
.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth-form h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-form .lead { color: var(--muted); margin: 6px 0 28px; }
.auth-copy { font-size: 12px; color: var(--faint); text-align: center; }
.divider { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 24px; }
.demo { margin-top: 24px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-2); background: var(--surface-2); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; background: var(--surface); padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang-switch button.on { background: var(--brand-50); color: var(--brand); }
@media (min-width: 1024px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth-aside {
    display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #fff; position: relative; overflow: hidden;
    background: radial-gradient(110% 80% at 100% 0%, #22A866 0%, transparent 55%), linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
  }
  .auth-aside::after { content: ''; position: absolute; inset: 0; background: url('../assets/brand/school-pattern.png') repeat; background-size: 260px auto; opacity: .09; }
  .auth-aside > * { position: relative; z-index: 1; }
  .auth-aside .school { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; }
  .auth-aside .school img { width: 104px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
  .auth-aside .app { display: flex; align-items: center; gap: 14px; }
  .auth-aside .app img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 24px -8px rgba(0,0,0,.35); }
  .auth-aside .app b { font-size: 22px; letter-spacing: -.01em; display: block; }
  .auth-aside .app small { opacity: .75; font-size: 13px; }
  .auth-aside h2 { font-size: 36px; line-height: 1.15; max-width: 480px; letter-spacing: -.02em; }
  .auth-aside p { opacity: .8; margin-top: 16px; max-width: 440px; font-size: 15px; line-height: 1.6; }
  .auth-aside ul { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
  .auth-aside li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
  .auth-aside li span { width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
  .auth-aside .copy { font-size: 12.5px; opacity: .6; }
  .auth-main { padding: 32px 56px; }
  .auth-main .auth-brand { visibility: hidden; }
}

/* ------------------------------------------------------------------ pages */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 16px; padding: 24px;
  background: radial-gradient(120% 140% at 100% 0%, #22A866 0%, transparent 50%), linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  box-shadow: 0 10px 30px -12px rgba(14, 122, 70, .5);
}
.hero::after { content: ''; position: absolute; right: -20px; top: -24px; width: 230px; height: 270px; background: url('../assets/brand/app-icon-mono.svg') no-repeat center / contain; opacity: .08; }
.hero > * { position: relative; z-index: 1; }
.hero .hello { opacity: .75; font-size: 13.5px; }
.hero h2 { font-size: 22px; margin-top: 2px; }
.hero .date { opacity: .75; font-size: 13px; margin-top: 4px; }
.hero .student { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); flex-wrap: wrap; }
.hero .student .avatar { background: rgba(255, 255, 255, .16); color: #fff; }
.hero .student b { display: block; font-size: 16px; }
.hero .student .info span { font-size: 13px; opacity: .8; }
.hero .facts { display: flex; gap: 28px; flex-wrap: wrap; width: 100%; }
.hero .facts span { display: block; font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hero .facts b { font-size: 14px; font-weight: 600; }
@media (min-width: 720px) { .hero { padding: 28px 32px; } .hero .facts { width: auto; margin-left: auto; } }

.news-card { overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card .thumb { aspect-ratio: 16 / 9; background: var(--brand-50); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 14px 16px 16px; }
.news-card h3 { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card time { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.ring { --p: 0; --c: var(--success); width: 136px; aspect-ratio: 1; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg) 0); }
.ring > div { width: 108px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring span { display: block; font-size: 12px; color: var(--muted); }
.legend { display: grid; gap: 12px; flex: 1; min-width: 200px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar .dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0 6px; }
.calendar .d { position: relative; display: grid; place-items: center; height: 46px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.calendar a.d { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; }
.calendar a.d:hover { border-color: var(--brand); }
.calendar a.d::after { content: ''; position: absolute; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.calendar .today { box-shadow: inset 0 0 0 2px var(--gold); }
.calendar a.d.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.calendar a.d.sel::after { background: #fff; }
@media (min-width: 720px) { .calendar .d { height: 58px; } }

.video-card { overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.video-card .thumb { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 60%); }
.video-card .thumb .play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow); }
.video-card .body { padding: 14px 16px 16px; }
.video-card h3 { font-size: 14px; margin: 8px 0 4px; }
.player { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; display: block; }

.article { padding: 24px; }
.article h1 { font-size: 22px; line-height: 1.35; }
.article p { color: var(--text-2); line-height: 1.8; margin-bottom: 16px; font-size: 15px; }
.article-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: var(--brand-50); }
@media (min-width: 720px) { .article { padding: 32px 40px; } }

.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px 16px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.note { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--brand-50); border-left: 3px solid var(--brand); color: var(--text-2); line-height: 1.6; }
.chart-box { position: relative; height: 280px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: #1E40AF; font-size: 13px; }
.callout.gold { background: #FFF8E1; color: #7A5B00; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis > div { padding: 16px 20px; border-right: 1px solid var(--border); }
.kpis > div:last-child { border-right: 0; }
.kpis span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.kpis b { display: block; font-size: 22px; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.settings-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.settings-row:last-child { border-bottom: 0; }
button.settings-row:hover { background: var(--surface-2); }
.settings-row .ic-box { width: 36px; height: 36px; border-radius: 9px; background: var(--bg); color: var(--text-2); display: grid; place-items: center; flex: none; }
.settings-row b { display: block; font-size: 14px; }
.settings-row span.d { display: block; font-size: 12.5px; color: var(--muted); }
.settings-row.danger b, .settings-row.danger .ic-box { color: var(--danger); }
.settings-row.danger .ic-box { background: var(--danger-bg); }

/* responsif */
.only-mobile { display: block; }
.only-desktop { display: none; }
@media (min-width: 720px) { .only-mobile { display: none !important; } .only-desktop { display: block; } }
@media (max-width: 1023px) { .page-head h2 { display: none; } .page-head .tag + h2 { display: block; } .page-head { margin-bottom: 16px; } }
.textarea { height: auto; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.check { display: inline-flex !important; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.seg-radio { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: block; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-right: 1px solid var(--border); background: var(--surface); }
.seg-radio label:last-child span { border-right: 0; }
.seg-radio input:checked + span.present { background: var(--success-bg); color: var(--success); }
.seg-radio input:checked + span.sick { background: var(--warning-bg); color: var(--warning); }
.seg-radio input:checked + span.permit { background: var(--info-bg); color: var(--info); }
.seg-radio input:checked + span.absent { background: var(--danger-bg); color: var(--danger); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.input.sm { height: 36px; font-size: 13.5px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { margin: 0; }

/* identitas sekolah */
.school-chip { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 12px 12px; margin: 0 12px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.school-chip img { width: 136px; height: 70px; flex: none; object-fit: contain; }
.school-chip b { display: block; font-size: 13px; line-height: 1.25; }
.school-chip span { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; }
.hero .school-badge { position: absolute; right: 28px; top: 20px; width: 190px; height: 98px; z-index: 2; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero .school-badge img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 719px) { .hero .school-badge { width: 116px; height: 60px; right: 14px; top: 14px; } }
.news-art { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.18), transparent 55%), linear-gradient(135deg, var(--tone-a, #1A9F62), var(--tone-b, #0A5536)); }
.news-art .ic { width: 44px; height: 44px; stroke-width: 1.6; opacity: .95; }
.news-art::after { content: ''; position: absolute; right: -24px; bottom: -30px; width: 140px; height: 140px; background: url('../assets/brand/app-icon-mono.svg') no-repeat center / contain; opacity: .12; }
.news-art.lg { aspect-ratio: 16 / 7; border-radius: var(--radius) var(--radius) 0 0; }
.news-art.lg .ic { width: 64px; height: 64px; }

/* agenda sekolah */
.cat-akademik { --cat: #2563EB; --cat-bg: #EEF4FF; }
.cat-keislaman { --cat: #0E7A46; --cat-bg: #E3F3EA; }
.cat-libur { --cat: #DC2626; --cat-bg: #FEF2F2; }
.cat-kegiatan { --cat: #B7791F; --cat-bg: #FFF6DB; }
.cat-rapat { --cat: #7C3AED; --cat-bg: #F3EEFF; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); display: inline-block; flex: none; }
.chip .cat-dot { margin-right: 6px; }
.chip.active .cat-dot { box-shadow: 0 0 0 2px #fff; }
.cat-tag { background: var(--cat-bg); color: var(--cat); border-color: transparent; }
.agenda-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.agenda-cal .dow { padding: 10px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; border-bottom: 1px solid var(--border); }
.agenda-cal .cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.agenda-cal .cell:nth-child(7n) { border-right: 0; }
.agenda-cal .cell.out { background: var(--surface-2); }
.agenda-cal .cell.out .num { color: var(--faint); }
.agenda-cal .cell.off .num { color: var(--danger); }
.agenda-cal .num { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.agenda-cal .cell.is-today .num { background: var(--brand); color: #fff; }
.agenda-cal .ev { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; padding: 3px 6px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--cat-bg); color: var(--cat); border-left: 3px solid var(--cat); }
.agenda-cal .ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-cal .ev:hover { filter: brightness(.96); }
.agenda-cal .more { font-size: 11px; color: var(--muted); padding-left: 4px; }
@media (max-width: 719px) {
  .agenda-cal .cell { min-height: 54px; padding: 4px 2px; align-items: center; flex-direction: row; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 2px; }
  .agenda-cal .num { width: 100%; height: 22px; font-size: 12px; }
  .agenda-cal .is-today .num { width: 22px; }
  .agenda-cal .ev { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--cat); }
  .agenda-cal .ev span, .agenda-cal .more { display: none; }
}
.agenda-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 20px; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; }
.list > .agenda-item:last-child { border-bottom: 0; }
.agenda-item:hover { background: var(--surface-2); }
.date-box { width: 46px; flex: none; text-align: center; border-radius: 10px; padding: 6px 0; background: var(--cat-bg); color: var(--cat); line-height: 1.1; }
.date-box b { display: block; font-size: 17px; }
.date-box span { font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* profil guru */
.teacher-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 3px; }
.teacher-link:hover { text-decoration-color: var(--brand); }
.teacher-contact { display: grid; gap: 10px; margin-top: 20px; text-align: left; }
.teacher-contact a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.teacher-contact a[href]:hover { border-color: var(--brand); background: var(--brand-50); }
.teacher-contact .ic-box { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.teacher-contact small { display: block; font-size: 12px; color: var(--muted); }
.teacher-contact b { display: block; font-size: 14px; word-break: break-all; }

/* foto profil */
img.avatar { object-fit: cover; background: var(--bg); }
.avatar-edit { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; border: 3px solid var(--surface); }
.avatar-edit .cam .ic { width: 14px; height: 14px; }
.avatar-edit:hover .cam { background: var(--brand-600); }
.photo-preview { display: flex; justify-content: center; }
.photo-preview .avatar.xl, .photo-preview img { width: 132px; height: 132px; font-size: 40px; border-radius: 50%; object-fit: cover; }
.photo-field { display: flex; align-items: center; gap: 16px; }
.photo-field .avatar { width: 72px; height: 72px; font-size: 24px; }

/* SPP */
.mb-4 { margin-bottom: 16px; }
.callout.ok { background: var(--success-bg); color: #166534; }
.callout.danger { background: var(--danger-bg); color: #991B1B; }
.callout .ic { flex: none; margin-top: 1px; }
.callout .btn { flex: none; align-self: center; }
.kpis small { display: block; margin-top: 4px; font-weight: 500; }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.bill-list { display: flex; flex-direction: column; }
.bill-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); color: inherit; }
.bill-row:first-child { border-top: 0; }
.bill-row:hover { background: var(--surface-2); }
.bill-row b { display: block; font-size: 14px; }
.bill-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.bill-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.bill-amount b { font-variant-numeric: tabular-nums; }
.month-box { width: 48px; height: 52px; flex: none; border-radius: 10px; display: grid; place-content: center; text-align: center; background: var(--bg); color: var(--text-2); }
.month-box b { font-size: 13px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; }
.month-box small { font-size: 11px !important; margin: 0 !important; color: inherit !important; opacity: .75; }
.month-box.st-lunas { background: var(--success-bg); color: var(--success); }
.month-box.st-menunggu { background: var(--info-bg); color: var(--info); }
.month-box.st-belum_bayar { background: var(--warning-bg); color: var(--warning); }
.month-box.st-terlambat { background: var(--danger-bg); color: var(--danger); }
.bill-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; border-left: 4px solid var(--border-strong); }
.bill-hero.st-lunas { border-left-color: var(--success); }
.bill-hero.st-menunggu { border-left-color: var(--info); }
.bill-hero.st-belum_bayar { border-left-color: var(--warning); }
.bill-hero.st-terlambat { border-left-color: var(--danger); }
.bill-total { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.bank-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.bank-card + .bank-card { margin-top: 10px; }
.bank-card .ic-box { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.bank-card small { display: block; font-size: 12px; color: var(--muted); }
.bank-card b { display: block; font-size: 16px; letter-spacing: .02em; margin: 1px 0; }
.bank-card.total { background: var(--brand-50); border-color: var(--brand-100); }
.bank-card .btn.done { color: var(--success); }
.file-drop { position: relative; display: grid; place-items: center; min-height: 150px; padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: center; overflow: hidden; }
.file-drop:hover, .file-drop:focus-within { border-color: var(--brand); background: var(--brand-50); }
.file-drop.is-invalid { border-color: var(--danger); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; pointer-events: none; }
.file-drop-empty .ic { width: 26px; height: 26px; color: var(--brand); margin-bottom: 4px; }
.file-drop-empty b { color: var(--text); font-size: 14px; }
.file-drop img { max-height: 220px; border-radius: 8px; pointer-events: none; }
.file-drop-name { font-weight: 600; font-size: 13px; pointer-events: none; word-break: break-all; }
.pay-list { display: flex; flex-direction: column; }
.pay-item { display: flex; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.pay-item:first-child { border-top: 0; }
.proof-thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proof-thumb span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.verify-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); overflow: hidden; }
.proof-big { display: grid; place-items: center; background: var(--surface-2); border-right: 1px solid var(--border); min-height: 220px; }
.proof-big img { width: 100%; height: 100%; max-height: 300px; object-fit: cover; object-position: top; }
.proof-big span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.verify-info { padding: 16px 18px; min-width: 0; }
@media (max-width: 520px) { .verify-card { grid-template-columns: minmax(0, 1fr); } .proof-big { border-right: 0; border-bottom: 1px solid var(--border); max-height: 240px; } }
.class-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.class-pick { position: relative; cursor: pointer; }
.class-pick input { position: absolute; opacity: 0; }
.class-pick span { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.class-pick b { display: block; font-size: 14px; }
.class-pick small { font-size: 12px; color: var(--muted); }
.class-pick input:checked + span { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.class-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sb-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* Kantin */
.pos { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .pos { grid-template-columns: minmax(0, 1fr) 340px; } .pos-cart { position: sticky; top: 76px; } }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px; }
.product-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 12px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; min-height: 112px; transition: border-color .15s, box-shadow .15s; }
.product-card:hover:not(:disabled) { border-color: var(--brand); box-shadow: 0 4px 14px -8px rgba(14,122,70,.45); }
.product-card:disabled { opacity: .45; cursor: not-allowed; }
.product-card b { font-size: 13.5px; line-height: 1.25; }
.product-card small { font-size: 11px; color: var(--muted); margin-top: auto; }
.pc-price { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.pc-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ctg-minuman .pc-cat { color: var(--info); } .ctg-snack .pc-cat { color: #A57A00; } .ctg-makanan .pc-cat { color: var(--brand); }
.pc-badge { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cart-list { max-height: 46vh; overflow: auto; }
.cart-empty { padding: 18px 20px; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); }
.cart-row:first-child { border-top: 0; }
.cart-row b { display: block; font-size: 13px; }
.cart-row small { font-size: 11.5px; color: var(--muted); }
.cart-row .qty { display: flex; align-items: center; gap: 6px; }
.cart-row .qty span { min-width: 18px; text-align: center; font-weight: 700; }
.cart-row .icon-btn { width: 28px; height: 28px; font-size: 16px; }
.cart-foot { padding: 14px 16px 16px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.cart-total { font-size: 22px; font-variant-numeric: tabular-nums; }
.btn.block { width: 100%; justify-content: center; }
.btn.lg { height: 48px; font-size: 15px; }
.scan-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.scan-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 6px; }
.scan-cam { position: relative; width: 100%; margin-top: 12px; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-cam video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
[data-scan-camera].on { background: var(--brand); color: #fff; border-color: var(--brand); }
dialog.pay-modal { width: min(480px, calc(100vw - 32px)); }
.pay-result { padding: 28px 24px 12px; text-align: center; }
.pay-result .pay-ic { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; margin-bottom: 10px; }
.pay-result.ok .pay-ic { background: var(--success-bg); color: var(--success); }
.pay-result.bad .pay-ic { background: var(--danger-bg); color: var(--danger); }
.pay-result h3 { font-size: 18px; }
.pay-result p { margin-top: 4px; }
.c { text-align: center; }
.ic-box-lg { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.wallet-card { display: flex; flex-wrap: wrap; gap: 20px; padding: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #22A866 0%, transparent 50%), linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%); border: 0; }
.wallet-info { flex: 1 1 220px; }
.wallet-info small { display: block; opacity: .8; font-size: 12.5px; }
.wallet-balance { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.wallet-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wallet-qr small { font-size: 11px; opacity: .85; }
.qr-box { width: 150px; height: 150px; padding: 8px; background: #fff; border-radius: 12px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.tx-row:first-child { border-top: 0; }
.tx-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tx-ic.purchase { background: var(--danger-bg); color: var(--danger); }
.tx-ic.topup { background: var(--success-bg); color: var(--success); }
.tx-ic.refund { background: var(--warning-bg); color: var(--warning); }

/* Atribut hidden selalu menang atas display komponen. */
[hidden] { display: none !important; }

/* Cek saldo */
.balance-big { font-size: 40px; font-weight: 800; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.15; margin: 2px 0 4px; }
.callout.danger:not([hidden]) + .card { margin-top: 16px; }
