/* ALPHA MANAGEMENT SYSTEM — stylesheet
   Tema: sidebar dark navy (#0E2340) + aksen electric blue (#2563EB), konten terang.
   Prinsip: minimal, bersih, profesional, tanpa animasi dekoratif. */

:root {
  --navy: #0E2340;
  --navy-2: #12294A;
  --navy-3: #1B355C;
  --blue: #2563EB;
  --blue-600: #1D4ED8;
  --blue-50: #EFF5FF;
  --sky: #38BDF8;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #5B6B85;
  --line: #E2E8F0;
  --line-2: #EEF2F7;
  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --green: #047857;
  --green-50: #ECFDF5;
  --amber: #B45309;
  --amber-50: #FFF7ED;
  --red: #B91C1C;
  --red-50: #FEF2F2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -16px rgba(15, 23, 42, .18);
  --sidebar-w: 254px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: #F1F5F9; padding: 1px 5px; border-radius: 5px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.center { text-align: center; }
.wrapany { overflow-wrap: anywhere; }

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

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy) 0%, #0B1C34 100%);
  color: #D7E1F0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}
.side-brand { display: flex; gap: 10px; align-items: center; padding: 20px 18px 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--sky) 100%);
  color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 17px;
  flex: 0 0 34px;
}
.brand-mark.lg { width: 46px; height: 46px; font-size: 22px; border-radius: 12px; flex-basis: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: #fff; font-size: 15px; letter-spacing: .06em; }
.brand-text small { color: #93A5C0; font-size: 10.5px; letter-spacing: .04em; }

.sidenav { list-style: none; margin: 6px 0 0; padding: 0 10px; }
.sidenav-item { margin: 2px 0; }
.sidenav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; color: #C9D6E8; font-size: 13.4px; font-weight: 500;
}
.sidenav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sidenav-item.is-active > .sidenav-link { background: rgba(37, 99, 235, .22); color: #fff; box-shadow: inset 2px 0 0 var(--sky); }
.icon { width: 17px; height: 17px; flex: 0 0 17px; }
.sidenav-kids { list-style: none; margin: 2px 0 6px; padding: 0 0 0 38px; }
.sidenav-kids a { display: block; padding: 5px 0; color: #93A5C0; font-size: 12.6px; }
.sidenav-kids a:hover { color: #fff; }
.side-note { margin-top: auto; padding: 16px 18px 22px; color: #7F93B0; font-size: 11.5px; line-height: 1.5; border-top: 1px solid rgba(255,255,255,.07); }
.side-note strong { color: #C9D6E8; }

.app-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: center; gap: 14px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-title h1 { font-size: 19px; }
.topbar-title .sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.side-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 7px; color: var(--ink); cursor: pointer; }
.topuser { display: flex; align-items: center; gap: 9px; }
.topuser-text { display: flex; flex-direction: column; line-height: 1.2; }
.topuser-text strong { font-size: 13px; }
.topuser-text small { color: var(--muted); font-size: 11px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.logout { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.logout:hover { background: #F8FAFC; text-decoration: none; }
.logout span { display: inline; }

.content { padding: 22px 24px 32px; width: 100%; max-width: 1440px; margin: 0 auto; }
.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px 26px; color: var(--muted); font-size: 11.5px; border-top: 1px solid var(--line); }

/* ---------------- komponen dasar ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 15px; }
.card-head .sub { margin: 3px 0 0; color: var(--muted); font-size: 12.2px; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px 18px 18px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow); min-width: 0;
}
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-label { color: var(--muted); font-size: 11.6px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.kpi-value { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; overflow-wrap: anywhere; }
.kpi-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.kpi-note { font-size: 11.4px; color: var(--muted); margin-top: 2px; }
.delta { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px; background: #F1F5F9; color: var(--muted); white-space: nowrap; }
.delta.up { background: var(--green-50); color: var(--green); }
.delta.down { background: var(--red-50); color: var(--red); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.8px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: #F1F5F9; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--green-50); color: #046C4E; }
.badge.warn { background: var(--amber-50); color: #92400E; }
.badge.demo { background: #FEF3C7; color: #92400E; letter-spacing: .04em; }
.badge.info { background: var(--blue-50); color: var(--blue-600); }
.src-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; background: #F1F5F9; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #F8FAFC; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn.danger { color: var(--red); border-color: #FECACA; background: #fff; }
.btn.danger:hover { background: var(--red-50); }
.btn.sm { font-size: 12px; padding: 5px 10px; }
.btn.block { width: 100%; }

.flash { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.flash.ok { background: var(--green-50); border-color: #A7F3D0; color: #065F46; }
.flash.err { background: var(--red-50); border-color: #FECACA; color: #991B1B; }
.flash.info { background: var(--blue-50); border-color: #BFDBFE; color: #1E3A8A; }
.demobar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; font-size: 12.6px; }
.demobar a { color: #92400E; text-decoration: underline; }

.empty { padding: 26px 18px; text-align: center; color: var(--muted); background: #FAFBFC; border: 1px dashed var(--line); border-radius: var(--radius-sm); margin: 4px 0; }
.empty .icon { width: 26px; height: 26px; color: #CBD5E1; margin-bottom: 6px; }
.note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.subhead { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 8px; }

/* ---------------- form ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin-bottom: 12px; }
.field label, .field > span { font-size: 12.4px; font-weight: 500; color: var(--ink-2); }
.field .req { color: var(--red); }
.field input, .field select, .field textarea, select, input[type="date"], input[type="text"], input[type="password"], input[type="number"], input[type="email"] {
  font: inherit; font-size: 13.4px; color: var(--ink);
  background: #fff; border: 1px solid #D6DEE9; border-radius: 9px;
  padding: 8px 10px; width: 100%; min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus, select:focus, input:focus {
  outline: 2px solid rgba(37, 99, 235, .25); border-color: var(--blue); outline-offset: 0;
}
.field small { color: var(--muted); font-size: 11.4px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.formgrid .field { margin-bottom: 8px; }
.formactions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.8px; color: var(--ink-2); margin: 4px 0 10px; grid-column: 1 / -1; }
.check input { width: auto; margin-top: 2px; }
.check.tiny { font-size: 11.6px; margin: 0; }

.inlineform { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-input { width: 150px; }
.inline-num { width: 70px; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12.4px; color: var(--ink-2); }
.inline-field input { width: 138px; }
.compactform { padding: 8px 0 0; }

/* ---------------- filter ---------------- */
.filterbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; box-shadow: var(--shadow); }
.pillrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pill { font-size: 12.4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.pill:hover { background: #F8FAFC; text-decoration: none; }
.pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.filterform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filterform select { width: auto; min-width: 150px; }
.filter-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

.tabbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 13px; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--blue); text-decoration: none; }
.tab.is-active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ---------------- tabel ---------------- */
.tablewrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.table th { font-size: 11.4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: #FAFBFD; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FBFCFE; }
.table.compact th, .table.compact td { padding: 7px 8px; }
.table .rowactions { display: flex; gap: 6px; flex-wrap: wrap; }
.pltable .strong td { font-weight: 600; background: #FAFBFD; }
.pltable .total td { font-weight: 700; background: var(--blue-50); color: var(--ink); }
.permmatrix td { vertical-align: middle; }
.permmatrix .menuhead td { background: #F8FAFC; font-weight: 600; font-size: 11.6px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px; }
.permmatrix input[type="checkbox"] { width: 16px; height: 16px; }
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }

/* ---------------- dashboard ---------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .grid-2 { margin-top: 20px; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.split-chart { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.split-table { min-width: 0; }
.donut { width: 100%; max-width: 200px; height: auto; }
.chart { width: 100%; height: auto; display: block; }
.chart-wrap { width: 100%; overflow: hidden; }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.2px; width: 100%; }
.legend li { display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; display: inline-block; }
.sublist { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.sublist li { display: flex; gap: 8px; justify-content: space-between; padding: 1px 0; }
.sublist b { font-weight: 600; white-space: nowrap; }

.opgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.optile { position: relative; background: #FAFBFD; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 13px; min-width: 0; }
.op-label { font-size: 11.6px; color: var(--muted); font-weight: 500; padding-right: 40px; }
.op-value { font-size: 20px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.op-sub { font-size: 11.4px; color: var(--ink-2); margin-top: 2px; }
.optile .src-tag { position: absolute; top: 10px; right: 10px; }
.fitness-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.fs-block { background: #FAFBFD; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 13px 14px; }
.fs-head { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.fs-num { font-size: 22px; font-weight: 700; margin: 6px 0 0; }
.fs-sub { font-size: 11.6px; color: var(--ink-2); margin: 4px 0 0; }

/* business units */
.groupgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.groupcard { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); min-width: 0; }
.groupcard.lifestyle { border-top-color: #0EA5E9; }
.groupcard.fitness { border-top-color: var(--green); }
.groupcard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.groupcard-head h3 { font-size: 14px; letter-spacing: .04em; }
.groupcard-num { font-size: 21px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; }
.groupcard-sub { font-size: 11.8px; color: var(--muted); margin-top: 2px; }
.groupcard-units { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line-2); font-size: 12.4px; }
.groupcard-units li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.groupcard-units li span:first-child { flex: 1 1 auto; min-width: 0; }
.groupcard-units b { white-space: nowrap; font-weight: 600; }

/* reports */
.reporthead { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.reportmeta { display: flex; gap: 22px; flex-wrap: wrap; }
.reportmeta div { display: flex; flex-direction: column; }
.reportmeta span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.reportmeta strong { font-size: 14px; }
.reportnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; font-size: 12.6px; }
.report .chart-wrap { margin-top: 12px; }

/* integrations */
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checklist { list-style: none; margin: 0; padding: 0; font-size: 12.8px; }
.checklist li { position: relative; padding: 3px 0 3px 20px; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.checklist li.pending::before { content: '○'; color: #94A3B8; }
.numlist { font-size: 12.8px; margin: 6px 0 10px 18px; padding: 0; }
.numlist li { margin: 3px 0; }
.statusline { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.statusline > div { display: flex; flex-direction: column; gap: 2px; background: #FAFBFD; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; min-width: 0; }
.statusline span { font-size: 10.8px; text-transform: uppercase; letter-spacing: .04em; }
.statusline strong { font-size: 13px; overflow-wrap: anywhere; }

/* settings */
.demo-box { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: #FAFBFD; }
.demo-box.is-on { border-color: #FDE68A; background: #FFFBEB; }
.demo-state { font-weight: 600; margin-bottom: 4px; }
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.logtail { background: #0B1C34; color: #C9D6E8; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 11.6px; line-height: 1.55; overflow-x: auto; max-height: 260px; margin: 0; }

/* error */
.errorbox { max-width: 520px; margin: 8vh auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.errcode { font-size: 42px; font-weight: 700; color: var(--blue); letter-spacing: -0.03em; }
.errorbox h1 { font-size: 20px; margin: 4px 0 10px; }

/* ---------------- auth ---------------- */
.auth-body { background: linear-gradient(135deg, #0B1C34 0%, #14305A 60%, #1B3E6F 100%); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-height: 100vh; max-width: 1180px; margin: 0 auto; }
.auth-brand { color: #E6EEF9; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.auth-logo { margin-bottom: 18px; }
.auth-eyebrow { color: var(--sky); font-size: 12px; letter-spacing: .22em; font-weight: 600; margin: 0 0 10px; }
.auth-brand h1 { font-size: 40px; line-height: 1.06; letter-spacing: -0.02em; color: #fff; margin-bottom: 16px; }
.auth-brand h1 span { color: var(--sky); }
.auth-tag { color: #B7C7DC; font-size: 14px; max-width: 400px; margin-bottom: 18px; }
.auth-points { list-style: none; margin: 0 0 24px; padding: 0; font-size: 13px; color: #C9D6E8; }
.auth-points li { padding: 4px 0 4px 22px; position: relative; }
.auth-points li::before { content: ''; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.auth-foot { color: #7F93B0; font-size: 11.5px; margin: 0; }
.auth-panel { background: #fff; padding: 56px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h2 { font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.auth-form { display: flex; flex-direction: column; }
.auth-form .field { margin-bottom: 12px; }
.auth-form .btn { margin-top: 8px; padding: 11px 14px; font-size: 14px; }
.auth-help { font-size: 12.4px; color: var(--muted); margin-top: 16px; }
.auth-copyright { margin: 26px 0 0; font-size: 11.4px; color: #556070; }


/* ---------------- Phase 2: daftar, form, payroll, laporan ---------------- */
.brand-mark.has-img { background: #fff; border: 1px solid rgba(255,255,255,.25); padding: 3px; overflow: hidden; }
.brand-mark.has-img .brand-img { width: 100%; height: 100%; object-fit: contain; display: block; }

.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.searchbar input[type="search"] { flex: 1 1 220px; min-width: 140px; }
.searchbar select { width: auto; min-width: 130px; }
.listmeta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; }
.pagebtn { padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: #fff; }
.pagebtn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.card-form { padding: 2px 0 0; }
.field.span2 { grid-column: 1 / -1; }
.footrow td { font-weight: 700; background: #F8FAFC; border-top: 1px solid var(--line); }
.table tfoot td { font-size: 12.6px; }
.deptform { margin-top: 12px; }
.attendhead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.attform { gap: 5px; }
.attform input[type="time"] { width: 104px; }
.attform select { width: auto; min-width: 96px; }
.attnote { width: 130px; }
.weekgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payrollform select { width: auto; min-width: 150px; }
.reportgroup { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 12px; }
.reportnav a.is-active { color: var(--blue); font-weight: 600; }
.reportmeta { display: flex; gap: 24px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; }
.reportmeta > div { display: flex; flex-direction: column; }
.reportmeta span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.reportmeta strong { font-size: 15px; }
.logocard { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.logopreview { width: 132px; height: 96px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; place-items: center; background: #FAFBFD; padding: 8px; }
.logopreview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logobody { flex: 1 1 260px; min-width: 0; }
.logoform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.logoform input[type="file"] { flex: 1 1 200px; min-width: 0; }


/* ---------------- Phase 3: integrasi & impor ---------------- */
.testresult { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: #FAFBFD; }
.testresult.is-ok { border-color: #A7F3D0; background: var(--green-50); }
.testresult.is-err { border-color: #FECACA; background: var(--red-50); }
.testresult p { margin: 0 0 6px; }
.testresult details { margin-top: 8px; }
.testresult summary { cursor: pointer; font-size: 12.5px; color: var(--blue); }
.jsonbox { background: #0B1C34; color: #C9D6E8; padding: 10px 12px; border-radius: 8px; font-size: 11.5px; overflow-x: auto; max-height: 240px; margin: 8px 0 0; }
.errlist { margin: 6px 0 0 18px; padding: 0; font-size: 12.4px; color: #991B1B; }
.warnline { color: #92400E; font-size: 12.4px; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 8px 10px; }
.importform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.importform .formactions { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .importform { grid-template-columns: 1fr; }
  .jsonbox { font-size: 11px; }
}

/* ---------------- responsif ---------------- */
@media (max-width: 1180px) {
  .kpi-grid, .kpi-grid.four, .kpi-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .split-chart { flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }
  .legend { width: auto; }
  .reportnav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; transform: translateX(-102%);
    transition: transform .18s ease; box-shadow: 0 0 0 100vmax rgba(11, 28, 52, 0);
  }
  body.side-open .sidebar { transform: translateX(0); box-shadow: 24px 0 60px rgba(11, 28, 52, .35); }
  .side-toggle { display: inline-flex; }
  .backdrop { display: none; }
  body.side-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(11, 28, 52, .35); z-index: 35; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .grid-2 + .grid-2 { margin-top: 16px; }
  .groupgrid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .fitness-split { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px 8px; }
  .auth-brand h1 { font-size: 28px; }
  .auth-points { display: none; }
  .auth-panel { padding: 24px 24px 40px; }
}

@media (max-width: 720px) {
  .content { padding: 16px 14px 28px; }
  .topbar { padding: 11px 14px; gap: 10px; flex-wrap: nowrap; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title .sub { display: none; }
  .topuser-text { display: none; }
  .logout span { display: none; }
  .app-foot { padding: 14px 14px 24px; }
  .kpi-grid, .kpi-grid.four, .kpi-grid.three { grid-template-columns: 1fr; gap: 12px; }
  .weekgrid { grid-template-columns: 1fr; }
  .searchbar input[type="search"], .searchbar select { width: 100%; }
  .attform input[type="time"] { width: 100%; }
  .attnote { width: 100%; }
  .logoform input[type="file"] { width: 100%; }
  .opgrid { grid-template-columns: 1fr; }
  .formgrid { grid-template-columns: 1fr; }
  .reportnav { grid-template-columns: 1fr; }
  .filterform { gap: 8px; }
  .filterform select, .inline-field input { width: 100%; min-width: 0; }
  .inline-field { width: 100%; }
  .inline-field span { width: 46px; flex: 0 0 46px; }
  .statusline { grid-template-columns: 1fr; }

  /* tabel menjadi kartu bertumpuk */
  .tablewrap { overflow-x: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; overflow: hidden; }
  .table td { border: 0; border-bottom: 1px solid var(--line-2); padding: 8px 11px; text-align: left; }
  .table td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); display: block; font-size: 10.4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
  .table td:empty { display: none; }
  .table td.num { text-align: left; }
  .table td[data-label=""]::before { display: none; }
  .permmatrix td.center { text-align: left; }
  .permmatrix input[type="checkbox"] { width: 20px; height: 20px; }
  .inline-input { width: 100%; }
}

@media print {
  .sidebar, .topbar, .filterbar, .app-foot, .btn, .reportnav, .demobar { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #CBD5E1; break-inside: avoid; }
  body { background: #fff; }
}
