/* Kas Keluarga — NIWIFI CONNECTION */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #8b93a1;
  --line: #e6e9ef;
  --line-2: #f0f2f6;
  --primary: #0f7b6c;
  --primary-ink: #ffffff;
  --primary-soft: #e7f4f1;
  --green: #12805c;
  --green-soft: #e7f6ef;
  --red: #c0392b;
  --red-soft: #fdeeec;
  --amber: #b7791f;
  --amber-soft: #fdf4e3;
  --blue: #2563eb;
  --blue-soft: #eaf0fe;
  --violet: #6d28d9;
  --violet-soft: #f2ecfd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --sidebar-w: 232px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0e1116;
  --card: #161b22;
  --ink: #e8ecf2;
  --ink-2: #b6bfcc;
  --muted: #8b95a5;
  --line: #262d38;
  --line-2: #20262f;
  --primary: #2bb3a0;
  --primary-ink: #06201c;
  --primary-soft: #12312c;
  --green: #34c98e;
  --green-soft: #113226;
  --red: #f87171;
  --red-soft: #3a1d1d;
  --amber: #e5b567;
  --amber-soft: #382d17;
  --blue: #7aa2ff;
  --blue-soft: #1a2744;
  --violet: #b794f6;
  --violet-soft: #2a2144;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; }
p { margin: 0; }
img { max-width: 100%; }
.ico { flex: none; display: inline-block; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-primary { color: var(--primary); }
.strong { font-weight: 650; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line-2); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--primary); color: var(--primary-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .3px;
}
.brand-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text span { font-size: 10px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.sidebar .sidebar-close { display: none; margin-left: auto; }
.topbar .menu-btn { display: none; }
.nav { padding: 10px 10px 16px; overflow-y: auto; flex: 1; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px;
}
.nav-item:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav-item.active .ico { stroke-width: 2; }
.nav-item .ico { color: currentColor; opacity: .9; }
.sidebar-foot { border-top: 1px solid var(--line-2); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.mini-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.mini-user > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mini-user strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-user span:not(.avatar) { font-size: 11px; color: var(--muted); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.sidebar-overlay { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 17px; letter-spacing: -.2px; }
.page-head p { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.today { font-size: 12px; color: var(--muted); margin-right: 4px; }
.menu-btn { display: none; }
.content { padding: 20px 24px 32px; width: 100%; max-width: 1240px; margin: 0 auto; flex: 1; }
.app-foot { padding: 14px 24px 22px; font-size: 11px; color: var(--muted); text-align: center; }
.print-head { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: #cfd5df; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
[data-theme="dark"] .btn:hover { border-color: #3a4352; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .btn-primary { color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--primary); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { height: 31px; padding: 0 10px; font-size: 12.5px; }
.btn-xs { height: 27px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  border-radius: 8px; cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.btn-group { display: inline-flex; gap: 6px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 14px; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 12px 14px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats.stats-2 { grid-template-columns: repeat(2, 1fr); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); min-width: 0;
}
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 21px; font-weight: 700; letter-spacing: -.4px; margin-top: 5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat .chip { font-size: 11px; }
.stat-accent { border-left: 3px solid var(--primary); }
.stat-green { border-left: 3px solid var(--green); }
.stat-red { border-left: 3px solid var(--red); }
.stat-blue { border-left: 3px solid var(--blue); }
.stat-amber { border-left: 3px solid var(--amber); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: 1.65fr 1fr; gap: 14px; }
.grid-main-side { display: grid; grid-template-columns: 1.8fr 1fr; gap: 14px; align-items: start; }
.stack > * + * { margin-top: 14px; }

/* Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650; background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table-wide { min-width: 760px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--card);
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--line-2) 55%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form + form, .table .actions a + form, .table .actions form + a { margin-left: 4px; }
.table-empty { padding: 26px 14px !important; text-align: center; color: var(--muted); }
.tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--line-2); }
.cat-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cat-cell .name { display: flex; flex-direction: column; min-width: 0; }
.cat-cell .name small { color: var(--muted); font-size: 11px; }
.cat-badge { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 13.5px; outline: none;
}
.textarea { height: auto; min-height: 74px; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.select { appearance: auto; }
.input-file { font-size: 12.5px; padding: 7px; height: auto; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.input-group { display: flex; align-items: stretch; }
.input-group .prefix { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--line-2); color: var(--muted); font-size: 12.5px; }
.input-group .input { border-radius: 0 8px 8px 0; }
.segmented { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.segmented input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:checked + span.inc { color: var(--green); }
.segmented input:checked + span.exp { color: var(--red); }
.segmented input:checked + span.trf { color: var(--blue); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.checkbox input { accent-color: var(--primary); width: 15px; height: 15px; }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filters .field { flex: 0 0 auto; }
.filters .input, .filters .select { height: 34px; font-size: 12.5px; }
.filters .btn { height: 34px; }
.filters .quick-links { display: flex; gap: 6px; margin-left: auto; }
.search-field { position: relative; flex: 1 1 180px; min-width: 160px; }
.search-field .ico { position: absolute; left: 9px; top: 9px; color: var(--muted); }
.search-field .input { padding-left: 31px; }

/* Alerts */
.alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 13px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--line); background: var(--card); margin-bottom: 14px;
}
.alert-success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.alert-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); }
.alert-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 22%, transparent); color: var(--blue); }
.alert-warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 25%, transparent); color: var(--amber); }
.alert .ico { margin-top: 1px; }

/* Section header */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 15px; }
.section-head p { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Empty */
.empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .em-icon { width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 8px; display: grid; place-items: center; background: var(--line-2); color: var(--muted); }

/* Charts */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-axis { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
  width: 148px; height: 148px; border-radius: 50%; flex: none; position: relative;
  display: grid; place-items: center;
}
.donut-hole {
  width: 104px; height: 104px; border-radius: 50%; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.donut-hole strong { font-size: 15px; letter-spacing: -.3px; }
.donut-label { font-size: 10px; color: var(--muted); }
.donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.legend-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.legend-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; }

/* List rows */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.row-item:last-child { border-bottom: 0; }
.row-item .amount { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-item .meta { min-width: 0; flex: 1; }
.row-item .meta strong { display: block; font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .meta span { font-size: 11.5px; color: var(--muted); }
.row-item:hover { background: color-mix(in srgb, var(--line-2) 45%, transparent); }
.tx-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 9px 12px; font-size: 13px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Account chip */
.account-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }

/* Goal cards */
.goal-card { padding: 15px 16px; }
.goal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.goal-name { font-weight: 650; font-size: 13.5px; }
.goal-nums { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin: 10px 0 5px; }
.goal-nums strong { color: var(--ink); font-size: 12.5px; }
.goal-deadline { font-size: 11px; color: var(--muted); margin-top: 7px; }

/* Backup dropzone */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12.5px; text-align: center; background: var(--line-2);
}
.dropzone .ico { color: var(--primary); }

/* Login / install */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: 0 8px 30px rgba(16,24,40,.05); }
.auth-card.wide { max-width: 620px; }
.auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.auth-brand .brand-mark { width: 32px; height: 32px; }
.auth-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.auth-brand strong { font-size: 14px; }
.auth-brand span { font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.auth-card h1 { font-size: 19px; margin-bottom: 2px; }
.auth-card .lead { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.auth-card .form-grid { grid-template-columns: 1fr 1fr; }
.auth-card .form-grid .full { grid-column: 1 / -1; }
.auth-foot { margin-top: 16px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.7; }
.install-steps { display: flex; gap: 6px; margin-bottom: 16px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.install-steps span { padding: 3px 9px; border-radius: 999px; background: var(--line-2); }
.install-steps span.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.driver-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.driver-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; font-size: 12.5px; }
.driver-opt input { accent-color: var(--primary); margin-right: 5px; }
.driver-opt strong { display: block; font-size: 13px; margin-bottom: 2px; }
.driver-opt span { color: var(--muted); font-size: 11.5px; }
.driver-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.mysql-fields { display: none; }
.mysql-fields.show { display: grid; }
details.db-adv { margin-top: 12px; font-size: 12px; color: var(--ink-2); }
details.db-adv summary { cursor: pointer; color: var(--primary); font-weight: 600; }

/* Utils */
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 5px 0; }
.kv span { color: var(--muted); }
.kv strong { text-align: right; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pager { display: flex; gap: 4px; padding: 12px 14px; justify-content: center; }
.pager a, .pager span { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; font-size: 12.5px; border: 1px solid var(--line); color: var(--ink-2); padding: 0 8px; }
.pager a:hover { background: var(--line-2); text-decoration: none; }
.pager .on { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .pager .on { color: var(--primary-ink); }
.attach-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; }
.receipt-preview { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; }

/* QRIS */
.qris-sheet { max-width: 520px; margin: 0 auto; }
.qris-brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.qris-brand .brand-mark { width: 34px; height: 34px; font-size: 11px; flex: 0 0 auto; }
.qris-brand strong { display: block; font-size: 14px; line-height: 1.3; }
.qris-brand span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.qris-amount-wrap { margin: 2px 0 10px; }
.qris-amount { font-size: 30px; font-weight: 750; letter-spacing: -.8px; line-height: 1.2; }
.qris-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 14px; }
.qris-code { width: min(300px, 100%); padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qris-code svg { display: block; width: 100%; height: auto; }
.qris-code:empty { min-height: 200px; }
.qris-scan-note { font-size: 11px; color: var(--muted); text-align: center; }
.qris-state { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 16px; margin: 10px 0 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--line-2); }
.qris-state strong { font-size: 16px; }
.qris-state span { font-size: 12px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.qris-state-paid { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.qris-state-cancel { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.bank-kv { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.bank-kv:last-child { border-bottom: 0; }
.bank-kv > span { color: var(--muted); flex: none; }
.bank-kv > strong { text-align: right; font-weight: 600; min-width: 0; }
.bank-kv .break { word-break: break-all; max-width: 62%; font-size: 12px; line-height: 1.45; }
.bank-code { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--line-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto; }
.token-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.token-row .input { flex: 1; min-width: 200px; }
.bank-advanced { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 14px; background: var(--bg); }
.bank-advanced summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.qris-meta { border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 6px; }
.qris-meta .kv { padding: 4px 0; }
.qris-actions { display: grid; gap: 8px; margin-top: 14px; }
.qris-actions form { margin: 0; }
.qris-foot-note { margin: 12px 0 0; line-height: 1.5; }
.input-mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 11.5px; line-height: 1.5; }
.field .hint[data-state="ok"] { color: var(--green); }
.field .hint[data-state="warn"] { color: var(--amber); }
.field .hint[data-state="err"] { color: var(--red); }

/* Responsive */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-1, .grid-main-side { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.18); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(10,15,20,.4); z-index: 35; }
  .sidebar-close, .menu-btn { display: inline-grid; }
  .sidebar .sidebar-close { display: inline-grid; }
  .topbar .menu-btn { display: inline-grid; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 14px; }
  .content { padding: 16px 14px 26px; }
  .today { display: none; }
  .topbar-actions .btn span { display: inline; }
}
@media (max-width: 620px) {
  .stats, .stats.stats-3 { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { padding: 11px 12px; }
  .stat .value { font-size: 17px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card .form-grid { grid-template-columns: 1fr; }
  .card-pad { padding: 14px; }
  .card-body { padding: 13px 14px; }
  .topbar-actions .btn-primary { padding: 0 10px; font-size: 12px; }
  .topbar-actions .btn-primary .ico { display: none; }
  .filters { gap: 6px; }
  .filters .field { flex: 1 1 calc(50% - 6px); }
  .filters .field:first-child, .filters .search-field { flex-basis: 100%; }
  .filters .btn { flex: 0 0 auto; }
  .filters .quick-links { margin-left: 0; width: 100%; }
  .row-item { padding: 10px 13px; }
  .donut { width: 128px; height: 128px; }
  .donut-hole { width: 90px; height: 90px; }
  .driver-cards { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 15px; }
  .page-head p { display: none; }
}

/* Print */
.print-only { display: none; }
@media print {
  :root { --bg: #fff; --card: #fff; --ink: #000; --line: #ccc; --line-2: #eee; --muted: #555; }
  body { background: #fff; color: #000; font-size: 12px; }
  .sidebar, .topbar, .app-foot, .sidebar-overlay, .no-print, .filters, .btn, .icon-btn, .tabs, .pager { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  .print-head { display: flex !important; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px; }
  .print-head div { display: flex; flex-direction: column; }
  .print-head strong { font-size: 16px; }
  .print-head span { font-size: 11px; color: #333; }
  .print-only { display: block !important; }
  .card { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
  .stat { border: 1px solid #ddd; box-shadow: none; }
  .badge { border: 1px solid #ddd; }
  .table th { background: #f3f3f3; }
  .table tbody tr:hover td { background: transparent; }
  a { color: #000; text-decoration: none; }
  .row-item { break-inside: avoid; }
  .alert { display: none; }
  .qris-sheet { max-width: none; border: 0; box-shadow: none; }
  .qris-code { width: 290px; margin: 0 auto; }
  .qris-amount { font-size: 26px; }
  .grid-2, .grid-2-1, .grid-main-side, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  @page { margin: 14mm; }
}
