/* ==========================================================================
   Sambung Rasa - korporat biru-putih, tabel padat untuk entri data cepat.
   ========================================================================== */

:root {
  --blue-900: #16296b;
  --blue-800: #1E3A8A;
  --blue-700: #24479e;
  --blue-600: #2B4BA8;
  --blue-500: #3B5BDB;
  --blue-300: #8FA6E8;
  --blue-100: #e8edfb;
  --blue-50: #f2f5fd;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e2e7f2;
  --line-2: #d3daea;
  --bg: #f4f6fb;
  --white: #fff;
  --green: #1a7f4b;
  --green-bg: #e7f6ee;
  --amber: #a35c00;
  --amber-bg: #fff4e2;
  --red: #b42318;
  --red-bg: #fdeceb;
  --violet: #5b21b6;
  --violet-bg: #f0e9ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 36px rgba(16, 24, 40, .16);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .93em; }
.muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.no-print { }

/* ------------------------------------------------------------------ kerangka */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: linear-gradient(185deg, var(--blue-900), #101f52 60%, #0d1a45);
  color: #dbe3f8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.brand .logo { flex: 0 0 auto; border-radius: 10px; }
.brand-text { min-width: 0; }
.brand-text b { display: block; color: #fff; font-size: 15px; line-height: 1.2; }
.brand-text span { display: block; color: #9fb0dd; font-size: 10.6px; text-transform: uppercase; letter-spacing: .07em; }

.nav { flex: 1 1 auto; overflow-y: auto; padding: 10px 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  color: #c6d1ee; font-size: 13.2px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--blue-500); color: #fff; box-shadow: 0 2px 10px rgba(59, 91, 219, .45); }
.nav-item .ic { flex: 0 0 18px; }
.nav-logout { color: #ffb4b4; }
.nav-logout:hover { background: rgba(255, 80, 80, .16); }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .09); padding: 10px 8px 12px; }
.who { display: flex; gap: 9px; align-items: center; padding: 4px 6px 10px; }
.who-avatar {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.who-name { display: block; font-size: 12.6px; color: #fff; font-weight: 600; line-height: 1.25; }
.who-mail { display: block; font-size: 10.8px; color: #9fb0dd; }

.scrim { display: none; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-title { font-size: 19px; line-height: 1.25; }
.page-sub { font-size: 12.4px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.content { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.content-wide { max-width: 1560px; width: 100%; }
.app-foot { margin-top: auto; padding: 14px 22px 20px; font-size: 11.4px; color: var(--muted); }

.bottom-nav { display: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff; color: var(--ink-2); cursor: pointer;
  font-size: 17px; line-height: 1; text-decoration: none;
}
.icon-btn:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }

/* -------------------------------------------------------------------- tombol */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 13px; min-height: 36px;
  border-radius: 9px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--blue-50); text-decoration: none; color: var(--blue-800); }
.btn-primary { background: linear-gradient(180deg, var(--blue-600), var(--blue-800)); border-color: var(--blue-800); color: #fff; }
.btn-primary:hover { background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-700); border-color: var(--blue-300); }
.btn-plain { background: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #981b12; color: #fff; }
.btn-sm { min-height: 30px; padding: 5px 10px; font-size: 12.2px; }
.btn-xs { min-height: 26px; padding: 3px 8px; font-size: 11.6px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: inline; }

/* --------------------------------------------------------------------- kartu */

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcff, #f7f9fe);
}
.card-head h2 { font-size: 14.4px; }
.card-head p { font-size: 11.8px; color: var(--muted); margin-top: 2px; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-danger { border-color: #f2c2bf; }
.card-danger .card-head { background: linear-gradient(180deg, #fff6f5, #fdeceb); border-bottom-color: #f2c2bf; }
.card-danger .card-head h2 { color: var(--red); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-form { gap: 16px; }
.grid-detail { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

/* ----------------------------------------------------------------- permisahan */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-grid-sm { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat {
  display: flex; align-items: flex-start; gap: 11px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; position: relative;
}
.stat:hover { border-color: var(--blue-300); text-decoration: none; }
.stat-ic {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700);
}
.stat-ic.green { background: var(--green-bg); color: var(--green); }
.stat-ic.amber { background: var(--amber-bg); color: var(--amber); }
.stat-ic.red { background: var(--red-bg); color: var(--red); }
.stat-ic.blue { background: var(--blue-100); color: var(--blue-700); }
.stat-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stat-label { font-size: 11.4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-num { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.stat-hint { font-size: 11.2px; color: var(--muted); }
.stat-delta {
  position: absolute; right: 10px; top: 10px; font-size: 10.6px; font-weight: 700;
  display: inline-flex; gap: 2px; align-items: center; padding: 2px 6px; border-radius: 999px;
}
.stat-delta .ic { width: 11px; height: 11px; }
.stat-delta.up { background: var(--green-bg); color: var(--green); }
.stat-delta.down { background: var(--red-bg); color: var(--red); }

.mini-stat {
  border-radius: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.mini-stat span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.mini-stat b { font-size: 14.5px; }
.mini-stat.green { border-left: 3px solid var(--green); }
.mini-stat.amber { border-left: 3px solid var(--amber); }
.mini-stat.red { border-left: 3px solid var(--red); }

/* -------------------------------------------------------------------- tabel */

.table-wrap { width: 100%; overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 12.6px; }
table.grid thead th {
  position: sticky; top: 0; z-index: 1;
  background: #f5f7fc; color: var(--ink-2);
  text-align: left; font-size: 10.8px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.grid tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr:hover td { background: #fafcff; }
table.grid tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.grid tfoot td {
  padding: 9px 10px; background: #f5f7fc; border-top: 2px solid var(--line-2);
  font-weight: 700; font-size: 12.4px;
}
table.grid .ta-right, table.grid th.ta-right { text-align: right; }
.table-empty { text-align: center; color: var(--muted); padding: 26px 10px !important; font-size: 12.8px; }
.cell-main { font-weight: 600; color: var(--ink); display: block; }
.cell-sub { font-size: 11.2px; color: var(--muted); }
.cell-tag {
  display: inline-block; font-size: 10.4px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: var(--blue-100); color: var(--blue-700); vertical-align: 1px; margin-left: 4px;
}
.row-actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
table.grid-input { font-size: 12.8px; }
table.grid-input td { padding: 6px 8px; }
table.grid-input .input { min-height: 32px; }

/* ------------------------------------------------------------------- badge */

.badge {
  display: inline-block; padding: 2.5px 8px; border-radius: 999px;
  font-size: 10.8px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.b-green { background: var(--green-bg); color: var(--green); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-grey { background: #eef1f6; color: #55607a; }
.b-blue { background: var(--blue-100); color: var(--blue-700); }
.b-violet { background: var(--violet-bg); color: var(--violet); }

/* -------------------------------------------------------------------- form */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.span-2, .span-2 { grid-column: span 2; }
.field-label { font-size: 11.6px; font-weight: 600; color: var(--ink-2); }
.field-label em { color: var(--red); font-style: normal; }
.field-hint { font-size: 10.8px; color: var(--muted); }
.input {
  width: 100%; min-height: 36px; padding: 7px 10px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: #fff; color: var(--ink); font: inherit; font-size: 13px;
}
.input:focus { outline: 2px solid rgba(59, 91, 219, .28); outline-offset: 0; border-color: var(--blue-500); }
textarea.input { min-height: 60px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
.input-prefix-wrap { display: flex; align-items: stretch; }
.input-prefix {
  display: grid; place-items: center; padding: 0 9px;
  background: #f3f5fb; border: 1px solid var(--line-2); border-right: 0;
  border-radius: 9px 0 0 9px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.input-prefix-wrap .input { border-radius: 0 9px 9px 0; }
.check, .check-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 12.6px; color: var(--ink-2); cursor: pointer; }
.check input, .check-inline input { width: 15px; height: 15px; accent-color: var(--blue-600); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.field-inline { flex: 0 0 auto; }
.field-inline .input { min-width: 130px; }

.toolbar, .period-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; box-shadow: var(--shadow);
}
.toolbar .search-box { position: relative; flex: 1 1 230px; display: flex; align-items: center; }
.toolbar .search-box .ic { position: absolute; left: 10px; color: var(--muted); }
.toolbar .search-box .input { padding-left: 33px; }
.period-bar { align-items: flex-end; }
.period-bar .btn { margin-bottom: 1px; }
.quick-select { min-width: 150px; }
.calc-note { background: var(--blue-50); border: 1px dashed var(--blue-300); border-radius: 9px; padding: 8px 10px; font-size: 12px; color: var(--blue-800); }
.customer-info { font-size: 12px; color: var(--ink-2); background: var(--blue-50); border-radius: 9px; padding: 8px 10px; }
.customer-info:empty { display: none; }
.items-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-top: 1px solid var(--line); background: #fbfcff; flex-wrap: wrap;
  font-size: 11.8px;
}

.totals-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.totals-table td { padding: 5px 0; }
.totals-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.totals-table tr.grand td { border-top: 2px solid var(--blue-800); font-weight: 800; font-size: 15px; padding-top: 8px; }
.totals-table tr.due td { color: var(--red); font-weight: 700; }

.detail-list { margin: 14px 0 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.8px; }
.detail-list > div { display: flex; gap: 10px; }
.detail-list dt { flex: 0 0 128px; color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; min-width: 0; }
.detail-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }

/* -------------------------------------------------------------------- tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.6px; font-weight: 600; text-decoration: none;
}
.tab:hover { border-color: var(--blue-300); color: var(--blue-700); text-decoration: none; }
.tab.active { background: var(--blue-800); border-color: var(--blue-800); color: #fff; }
.tab .ic { width: 16px; height: 16px; }

/* ------------------------------------------------------------- laporan P&L */

.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pl-block h3 {
  font-size: 11.4px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin-bottom: 6px;
}
.pl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pl-table td { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.pl-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pl-table tr.strong td { font-weight: 700; }
.pl-table tr.highlight td { background: var(--blue-50); font-size: 14px; padding: 7px 6px; }
.report-table { padding: 0; }
.report-card .card-body.flush { padding: 0; }

/* ------------------------------------------------------------------ chart */

.chart { width: 100%; height: 160px; display: block; }
.chart-legend { display: flex; gap: 16px; font-size: 11.4px; color: var(--muted); margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot-blue { background: var(--blue-600); }
.dot-light { background: var(--blue-300); }

/* --------------------------------------------------------------- daftar info */

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 12.6px; }
.alert-list li:last-child { border-bottom: 0; }
.alert-list small { display: block; color: var(--muted); font-size: 11.2px; }
.alert-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 26px; }
.alert-ic.amber { background: var(--amber-bg); color: var(--amber); }
.alert-ic.red { background: var(--red-bg); color: var(--red); }

.bulk-doc-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 12px; box-shadow: var(--shadow); font-size: 12.2px;
}
.bulk-doc-bar .input { min-height: 32px; padding: 4px 26px 4px 9px; font-size: 12.4px; width: auto; }
.bulk-doc-bar .btn { margin-left: 0; }

/* ------------------------------------------------------------------- modal */

dialog.modal {
  border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 28px));
  box-shadow: var(--shadow-lg); background: #fff; color: var(--ink);
}
dialog.modal.modal-wide { width: min(860px, calc(100vw - 28px)); }
dialog.modal::backdrop { background: rgba(16, 24, 40, .48); backdrop-filter: blur(2px); }
.modal-form { display: flex; flex-direction: column; max-height: min(88vh, 900px); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line); background: #fbfcff;
}
.modal-note { font-size: 12.6px; color: var(--ink-2); background: var(--blue-50); border-radius: 9px; padding: 9px 11px; }
.danger-box { background: var(--red-bg); border: 1px solid #f2c2bf; border-radius: 10px; padding: 11px 12px; font-size: 12.6px; color: #7a1a12; }

/* -------------------------------------------------------------------- flash */

.flash {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px; border-radius: 10px; font-size: 13px; border: 1px solid transparent;
}
.flash-ok { background: var(--green-bg); color: #14663c; border-color: #bfe6d1; }
.flash-err { background: var(--red-bg); color: #8f1d14; border-color: #f2c2bf; }
.flash .ic { flex: 0 0 18px; margin-top: 1px; }
.flash span { flex: 1 1 auto; }
.flash-x { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }

/* ------------------------------------------------------------------- kosong */

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-ic {
  width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px;
  display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700);
}
.empty h3 { font-size: 14.6px; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 12.6px; margin-bottom: 12px; }

/* ------------------------------------------------------------------- pager */

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pager-info { font-size: 12px; color: var(--muted); }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 30px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 7px; background: #fff;
  font-size: 12.4px; color: var(--ink-2); text-decoration: none;
}
.page-btn.active { background: var(--blue-800); border-color: var(--blue-800); color: #fff; }
.page-gap { padding: 0 4px; color: var(--muted); }

.print-actions { display: flex; justify-content: flex-end; }

/* -------------------------------------------------------------- halaman auth */

body.simple {
  background:
    radial-gradient(900px 480px at 12% 0%, rgba(59, 91, 219, .16), transparent 62%),
    radial-gradient(800px 500px at 92% 8%, rgba(30, 58, 138, .14), transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}
.simple-wrap { width: 100%; max-width: 440px; }
.simple-card {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.simple-brand { display: flex; align-items: center; gap: 11px; }
.simple-brand b { display: block; font-size: 16px; }
.simple-brand span { display: block; font-size: 11.6px; color: var(--muted); }
.simple-foot { text-align: center; font-size: 11.4px; color: var(--muted); margin-top: 14px; }
.auth-title { font-size: 19px; }
.auth-sub { font-size: 12.8px; color: var(--muted); }
.auth-demo { border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); background: var(--blue-50); }
.auth-demo b { display: block; margin-bottom: 4px; font-size: 11.4px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-800); }
.auth-demo div { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-demo code { font-family: ui-monospace, monospace; }
.auth-demo div span { color: var(--muted); }

/* --------------------------------------------------------------- responsif */

@media (max-width: 1280px) {
  .stat-grid, .stat-grid-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .grid-2, .grid-detail { grid-template-columns: 1fr; }
  .pl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; transform: translateX(-100%);
    transition: transform .22s ease; width: 264px; flex-basis: 264px;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .44); z-index: 35; }
  .nav-toggle { display: inline-grid !important; }
  .main { padding-bottom: 62px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 34;
    background: #fff; border-top: 1px solid var(--line);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 14px rgba(16, 24, 40, .07);
  }
  .bn-item {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px; font-size: 10.2px; font-weight: 600; color: var(--muted);
    text-decoration: none; border: 0; background: transparent; border-radius: 8px;
  }
  .bn-item .ic { width: 19px; height: 19px; }
  .bn-item.active { color: var(--blue-700); background: var(--blue-50); }
  .topbar { padding: 10px 14px; }
  .content { padding: 14px 12px 32px; }
  .app-foot { padding: 12px 14px 76px; }
}

@media (max-width: 640px) {
  .stat-grid, .stat-grid-sm, .stat-grid-5 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 11px; gap: 8px; }
  .stat-num { font-size: 15.5px; }
  .stat-ic { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
  .stat-ic .ic { width: 16px; height: 16px; }
  .stat-hint { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2, .span-2 { grid-column: span 1; }
  .detail-2 { grid-template-columns: 1fr; }
  .detail-list dt { flex-basis: 104px; }
  .toolbar, .period-bar { padding: 9px; }
  .toolbar .search-box { flex-basis: 100%; }
  .field-inline { flex: 1 1 calc(50% - 8px); }
  .field-inline .input { min-width: 0; width: 100%; }
  .card-body { padding: 13px; }
  .page-title { font-size: 16.5px; }
  .btn { font-size: 12.4px; padding: 7px 11px; }
  .topbar-actions { width: 100%; }
  .topbar { flex-wrap: wrap; }
  table.grid { font-size: 12px; }
  table.grid thead th, table.grid tbody td { padding: 7px 8px; }
  dialog.modal, dialog.modal.modal-wide { width: calc(100vw - 20px); }
}

@media (max-width: 420px) {
  .stat-grid, .stat-grid-sm, .stat-grid-5 { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------- cetak */

@media print {
  .sidebar, .topbar, .bottom-nav, .scrim, .app-foot, .no-print, .toolbar, .period-bar, .tabs { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; gap: 10px; }
  .card { border-color: #ccc; box-shadow: none; break-inside: avoid; }
  .stat { box-shadow: none; }
  a { color: #000; }
}
