/* ==========================================================================
   TSB — SISTEM INFORMASI TERINTEGRASI
   Perumda Air Minum Tirta Sako Batuah Sarolangun
   Tema: Modern Corporate Enterprise SaaS (navy / blue / gold)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0B1F3A;
  --navy-2: #123B63;
  --navy-3: #0E2A4C;
  --blue: #0878CF;
  --blue-600: #0668b4;
  --blue-lt: #E8F4FF;
  --gold: #C9A227;
  --gold-lt: #FBF3D8;
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --ink: #0B1F3A;
  --ink-2: #24344C;
  --muted: #64748B;
  --line: #E3EAF3;
  --line-2: #EEF3F9;
  --ok: #16A34A;
  --ok-lt: #E7F7EE;
  --warn: #F59E0B;
  --warn-lt: #FEF4E2;
  --danger: #DC2626;
  --danger-lt: #FDECEC;
  --info-lt: #E8F4FF;
  --r-sm: 9px;
  --r: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06);
  --shadow: 0 4px 18px rgba(11, 31, 58, .07), 0 1px 3px rgba(11, 31, 58, .05);
  --shadow-lg: 0 18px 50px rgba(11, 31, 58, .18);
  --sidebar-w: 266px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
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); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0 0 10px; }
img { max-width: 100%; }
::selection { background: #cfe6ff; }

/* ------------------------------- utilities ------------------------------- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------- buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: .16s ease; white-space: nowrap;
}
.btn:hover { border-color: #cdd9e7; background: #fafcff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #0f8be6 0%, var(--blue) 55%, #0668b4 100%);
  border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(8, 120, 207, .24);
}
.btn-primary:hover { background: linear-gradient(135deg, #0f8be6, #055da6); color: #fff; }
.btn-navy { background: var(--navy); border-color: transparent; color: #fff; }
.btn-navy:hover { background: #081729; color: #fff; }
.btn-gold { background: var(--gold); border-color: transparent; color: #2a2200; }
.btn-gold:hover { background: #b8931f; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef3f9; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-soft-danger { background: var(--danger-lt); color: var(--danger); border-color: transparent; }
.btn-soft { background: var(--blue-lt); color: var(--blue-600); border-color: transparent; }
.btn-soft:hover { background: #d8ebff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; gap: 5px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2); transition: .15s; position: relative;
}
.icon-btn:hover { background: #f7fafd; border-color: #cfdbe9; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }

/* --------------------------------- forms --------------------------------- */
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8, 120, 207, .12); }
.input::placeholder, .textarea::placeholder { color: #9aa8bb; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.field { margin-bottom: 14px; }
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .col-span-2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: #cfd9e6; position: relative; transition: .18s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* password toggle */
.pw-wrap { position: relative; display: block; }
.pw-wrap > .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px;
}
.pw-toggle:hover { background: #eef3f9; color: var(--ink); }

/* -------------------------------- surface -------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 18px;
}
.card.pad-lg { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.section { margin-bottom: 22px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.section-desc { font-size: 13px; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* ------------------------------- page head ------------------------------- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 5px; max-width: 720px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb b { color: var(--ink-2); font-weight: 600; }

/* --------------------------------- badges -------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  background: #eef3f9; color: var(--ink-2); white-space: nowrap;
}
.badge.ok { background: var(--ok-lt); color: #12803c; }
.badge.warn { background: var(--warn-lt); color: #a16207; }
.badge.danger { background: var(--danger-lt); color: #b91c1c; }
.badge.info { background: var(--info-lt); color: var(--blue-600); }
.badge.navy { background: #e6edf7; color: var(--navy); }
.badge.gold { background: var(--gold-lt); color: #8a6d0b; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.demo-tag { background: var(--gold-lt); color: #8a6d0b; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; font-weight: 800; letter-spacing: .04em; }

/* -------------------------------- tables --------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.dt thead th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 10px 12px; background: #f8fafd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.dt thead th:first-child { border-top-left-radius: 9px; }
table.dt thead th:last-child { border-top-right-radius: 9px; }
table.dt tbody td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt tbody tr:hover { background: #fafcff; }
table.dt td.num, table.dt th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dt .actions { display: flex; gap: 6px; justify-content: flex-end; }
.cell-main { font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; min-width: 0; overflow-wrap: anywhere; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-2), var(--blue));
  color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  flex: none; overflow: hidden; text-transform: uppercase;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 46px; height: 46px; font-size: 15px; }
.avatar.xl { width: 76px; height: 76px; font-size: 24px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ------------------------------- toolbar --------------------------------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 380px; }
.toolbar .search .input { padding-left: 36px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .select { width: auto; min-width: 140px; }
.spacer { flex: 1 1 auto; }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--muted); }
.pager .pages { display: flex; gap: 6px; align-items: center; }
.pager .pages button {
  min-width: 33px; height: 33px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.pager .pages button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .pages button[disabled] { opacity: .45; cursor: not-allowed; }

/* -------------------------------- stats ---------------------------------- */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 17px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .lbl { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 7px; line-height: 1.1; }
.stat .val small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat .meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stat .ic {
  position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--blue-lt); color: var(--blue-600);
}
.stat.ok .ic { background: var(--ok-lt); color: var(--ok); }
.stat.warn .ic { background: var(--warn-lt); color: #b45309; }
.stat.danger .ic { background: var(--danger-lt); color: var(--danger); }
.stat.navy { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); border-color: transparent; color: #fff; }
.stat.navy .lbl, .stat.navy .meta { color: #a9c2de; }
.stat.navy .val { color: #fff; }
.stat.navy .ic { background: rgba(255,255,255,.12); color: #fff; }
.stat.gold { background: linear-gradient(135deg, #1b2b45, #2b3a55); }
.stat.gold .ic { background: rgba(201,162,39,.18); color: #E7C25A; }

/* -------------------------------- charts --------------------------------- */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* -------------------------------- empty ---------------------------------- */
.empty { text-align: center; padding: 42px 18px; color: var(--muted); }
.empty .ic { width: 54px; height: 54px; border-radius: 16px; background: var(--blue-lt); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.empty h4 { font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.empty p { font-size: 13px; max-width: 420px; margin: 0 auto 14px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); font-size: 13px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #dbe6f3; border-top-color: var(--blue);
  animation: spin .7s linear infinite; flex: none;
}
.spinner.lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--danger-lt); color: #991b1b; border: 1px solid #f6cfcf; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.info-box { background: var(--blue-lt); color: #0b5a96; border: 1px solid #cde6fb; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; }
.warn-box { background: var(--warn-lt); color: #92400e; border: 1px solid #f6e0b5; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; }
.ok-box { background: var(--ok-lt); color: #14532d; border: 1px solid #c8ecd6; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; }

/* --------------------------------- shell --------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #0A1B31 0%, #0B2140 55%, #0C2748 100%);
  color: #cfe0f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 60;
}
.sidebar::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 190px; pointer-events: none;
  background: radial-gradient(120% 90% at 20% 100%, rgba(8, 120, 207, .28), transparent 70%);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; }
.sidebar-brand img, .sidebar-brand .logo-fallback { width: 40px; height: 40px; border-radius: 11px; background: #fff; object-fit: contain; padding: 4px; flex: none; }
.sidebar-brand .t1 { font-size: 14.5px; font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.2; }
.sidebar-brand .t2 { font-size: 10px; color: #8fb0cf; letter-spacing: .06em; font-weight: 600; margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px 18px; position: relative; z-index: 1; scrollbar-width: thin; scrollbar-color: #22456c transparent; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #22456c; border-radius: 3px; }
.nav-group { margin-bottom: 14px; }
.nav-group-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: #6d8fb2; font-weight: 700; padding: 8px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  color: #c3d6eb; font-size: 13px; font-weight: 500; margin-bottom: 2px; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(8,120,207,.30), rgba(8,120,207,.08)); color: #fff; font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav-item svg { flex: none; opacity: .9; }
.nav-item .nav-badge { margin-left: auto; background: var(--gold); color: #2a2200; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); position: relative; z-index: 1; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.sidebar-user .n { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.sidebar-user .r { font-size: 10.5px; color: #8fb0cf; }
.sidebar-foot .logout { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; color: #ffb4b4; font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.sidebar-foot .logout:hover { background: rgba(220,38,38,.14); text-decoration: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 0 22px; height: 62px; display: flex; align-items: center; gap: 14px;
}
.topbar .menu-btn { display: none; }
.topbar-search { flex: 1 1 auto; max-width: 420px; position: relative; }
.topbar-search .input { height: 38px; background: #f5f8fc; border-color: transparent; padding-left: 36px; font-size: 13px; }
.topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.company-chip { display: flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 9px; background: #f5f8fc; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); max-width: 260px; }
.company-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.profile-btn { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.profile-btn .nm { font-size: 12.5px; font-weight: 600; max-width: 130px; }

.dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-lg); min-width: 220px; z-index: 80; overflow: hidden; }
.dropdown .dd-head { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.dropdown a, .dropdown button.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; font-size: 13px;
  color: var(--ink-2); background: none; border: 0; text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button.dd-item:hover { background: #f6faff; text-decoration: none; }
.dropdown .dd-sep { height: 1px; background: var(--line-2); }
.notif-panel { width: min(380px, calc(100vw - 28px)); max-height: 460px; overflow: auto; }
.notif-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.notif-item:hover { background: #f8fbff; }
.notif-item.unread { background: #f2f8ff; }
.notif-item .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--blue-lt); color: var(--blue-600); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.notif-item .t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.notif-item .b { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.notif-item .tm { font-size: 10.5px; color: #94a3b8; margin-top: 4px; }

.content { padding: 24px 24px 40px; flex: 1; min-width: 0; }
.content-inner { max-width: 1560px; margin: 0 auto; }

.backdrop { position: fixed; inset: 0; background: rgba(11,31,58,.42); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.show { opacity: 1; pointer-events: auto; }

/* -------------------- bottom nav mobile: IKON minimalis ------------------ */
.bottom-nav {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 70; padding: 7px;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(227, 234, 243, .9);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(11, 31, 58, .16), 0 1px 2px rgba(11, 31, 58, .06);
}
.bottom-nav .items { display: flex; align-items: center; justify-content: space-around; gap: 4px; overflow: visible; }
.bottom-nav .bn-item {
  flex: 1 1 0; max-width: 62px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  color: #7A8798; background: none; border: 0; border-radius: 15px; cursor: pointer; position: relative;
  text-decoration: none; transition: background .18s ease, color .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav .bn-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bottom-nav .bn-item:hover { color: var(--ink-2); background: #f3f7fc; }
.bottom-nav .bn-item.active {
  color: var(--blue-600);
  background: linear-gradient(180deg, #EAF5FF 0%, #DCEEFF 100%);
  box-shadow: inset 0 0 0 1px rgba(8, 120, 207, .16);
}
.bottom-nav .bn-item.active::after {
  content: ''; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
}
.bottom-nav .bn-item.active svg { stroke-width: 2.1; }
.bottom-nav .bn-more { color: #7A8798; }

/* sheet "Menu Aplikasi" */
.sheet-back {
  position: fixed; inset: 0; background: rgba(11, 31, 58, .42); z-index: 88; opacity: 0;
  transition: opacity .18s ease; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sheet-back.show { opacity: 1; }
.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 44px rgba(11, 31, 58, .26); padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  z-index: 90; max-height: 78vh; overflow: auto; transform: translateY(14px); opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.more-sheet.show { transform: translateY(0); opacity: 1; }
.more-sheet .grab { width: 40px; height: 4px; border-radius: 99px; background: #dbe5f0; margin: 8px auto 6px; }
.more-sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 8px; }
.more-sheet .sheet-head span { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.more-sheet .sheet-group { margin-bottom: 6px; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sheet-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 8px;
  border-radius: 14px; background: #F7FAFD; border: 1px solid var(--line-2);
  font-size: 9.5px; font-weight: 600; color: var(--ink-2); text-align: center; text-decoration: none;
  transition: background .15s, transform .15s, border-color .15s;
}
.sheet-tile:hover, .sheet-tile:active { background: #EDF6FF; border-color: #cfe4f7; text-decoration: none; transform: translateY(-1px); }
.sheet-tile .tile-ic {
  width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--blue-600); box-shadow: 0 1px 3px rgba(11, 31, 58, .08);
}
.sheet-tile .tile-label { line-height: 1.2; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sheet-tile.danger .tile-ic { color: var(--danger); background: #fff; }
.sheet-tile.danger { color: var(--danger); }

/* --------------------------------- modal --------------------------------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,31,58,.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; animation: fadein .16s ease; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease; }
.modal.lg { max-width: 820px; }
.modal.xl { max-width: 1060px; }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h3 { font-size: 16px; }
.modal-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 20px; overflow: auto; flex: 1; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fbfdff; flex-wrap: wrap; }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: min(400px, calc(100vw - 32px)); }
.toast {
  background: #0f2440; color: #fff; padding: 12px 15px; border-radius: 11px; font-size: 13px;
  box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: slidein .2s ease;
}
.toast.ok { background: #0f5132; }
.toast.err { background: #7f1d1d; }
.toast .ic { flex: none; margin-top: 1px; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------- timeline -------------------------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 2px #dbe9f8; }
.tl-item.ok::before { background: var(--ok); box-shadow: 0 0 0 2px #d6f0e0; }
.tl-item.warn::before { background: var(--warn); box-shadow: 0 0 0 2px #fbeccf; }
.tl-item.danger::before { background: var(--danger); box-shadow: 0 0 0 2px #f8dada; }
.tl-item .t { font-size: 13px; font-weight: 600; }
.tl-item .d { font-size: 11.5px; color: var(--muted); }

/* --------------------------------- tabs ---------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted); background: none;
  border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button.active { color: var(--blue-600); border-bottom-color: var(--blue); }
.tabs button:hover { color: var(--ink); }

/* ------------------------------ progress --------------------------------- */
.progress { height: 7px; border-radius: 99px; background: #e9eff7; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #35b8f2); }
.progress.ok > span { background: linear-gradient(90deg, #16a34a, #4ade80); }
.progress.warn > span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* --------------------------------- misc ---------------------------------- */
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; word-break: break-word; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 4px 9px; border-radius: 7px; background: #f1f5fa; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.hero-strip {
  border-radius: var(--r); padding: 22px 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(115deg, #0B1F3A 0%, #123B63 60%, #0B4A7E 100%);
  margin-bottom: 22px;
}
.hero-strip::after {
  content: ''; position: absolute; right: -40px; top: -70px; width: 290px; height: 290px; border-radius: 50%;
  background: radial-gradient(circle, rgba(8,120,207,.5), transparent 65%);
}
.hero-strip h2 { color: #fff; font-size: 19px; }
.hero-strip p { color: #bcd4ea; font-size: 13px; margin: 6px 0 0; max-width: 620px; }
.hero-strip .waves { position: absolute; left: 0; right: 0; bottom: -4px; opacity: .35; }

/* ---------------------- hero profil dashboard (foto) --------------------- */
.hero-strip.hero-profile { padding: 20px 24px 26px; }
.hero-flex { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; }
.hero-avatar {
  position: relative; width: 86px; height: 86px; border-radius: 50%; flex: none; padding: 0; cursor: pointer;
  border: 2px solid rgba(201, 162, 39, .9); background: linear-gradient(150deg, #1b3a5c, #0d2338);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28); overflow: visible; transition: transform .18s ease;
}
.hero-avatar:hover { transform: scale(1.03); }
.hero-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.hero-avatar .ini {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 800; color: #dbeafe; letter-spacing: .02em;
}
.hero-avatar .cam {
  position: absolute; right: -3px; bottom: -3px; width: 29px; height: 29px; border-radius: 50%;
  background: var(--gold); color: #2a2200; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #0B1F3A; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.hero-eyebrow { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #9cc9ec; font-weight: 700; }
.hero-name { color: #fff; font-size: clamp(18px, 2.4vw, 25px); font-weight: 800; letter-spacing: -.02em; margin-top: 5px; line-height: 1.2; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 6px; font-size: 12px; color: #bcd4ea; }
.hero-meta span { position: relative; }
.hero-meta span + span::before { content: '·'; position: absolute; left: -9px; color: #6f93b5; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18);
  color: #e6f1fb; font-size: 11.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  backdrop-filter: blur(6px);
}
.hero-chip:hover { background: rgba(255, 255, 255, .22); color: #fff; text-decoration: none; }
.hero-chip.ok { background: rgba(22, 163, 74, .24); border-color: rgba(74, 222, 128, .38); color: #d7f7e3; }
.hero-chip.warn { background: rgba(245, 158, 11, .22); border-color: rgba(251, 191, 36, .4); color: #fdefc9; }
.hero-chip.act { background: rgba(201, 162, 39, .2); border-color: rgba(231, 194, 90, .45); color: #fae9b6; }
@media (max-width: 900px) {
  .hero-strip.hero-profile { padding: 16px 16px 22px; }
  .hero-flex { gap: 14px; align-items: flex-start; }
  .hero-avatar { width: 68px; height: 68px; }
  .hero-avatar .ini { font-size: 21px; }
  .hero-avatar .cam { width: 25px; height: 25px; right: -2px; bottom: -2px; }
  .hero-name { font-size: 17.5px; }
  .hero-eyebrow { font-size: 9.5px; letter-spacing: .1em; }
  .hero-meta { font-size: 11px; gap: 4px 10px; }
  .hero-chips { gap: 6px; margin-top: 10px; }
  .hero-chip { font-size: 10.5px; padding: 4px 8px; }
}
@media (max-width: 420px) {
  .hero-avatar { width: 58px; height: 58px; }
  .hero-meta span:nth-child(n + 3) { display: none; }
}

/* upload dropzone */
.dropzone {
  border: 1.5px dashed #c8d8ea; border-radius: 12px; padding: 18px; text-align: center;
  background: #f8fbff; cursor: pointer; transition: .15s; font-size: 12.5px; color: var(--muted);
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eef7ff; }
.dropzone .ic { width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f3f7fc; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* ------------------------ SPLASH SCREEN (dynamic) ------------------------ */
.splash {
  position: fixed; inset: 0; z-index: 999; display: flex; align-items: flex-end; justify-content: center;
  background: var(--navy); color: #fff; overflow: hidden;
}
.splash-media { position: absolute; inset: 0; }
.splash-media img, .splash-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.splash-media.contain img, .splash-media.contain video { object-fit: contain; background: #061426; }
.splash-media.mobile-only { display: none; }
.splash-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,20,38,.35) 0%, rgba(6,20,38,.55) 55%, rgba(6,20,38,.92) 100%); }
.splash-glow { position: absolute; width: 620px; height: 620px; border-radius: 50%; filter: blur(10px); opacity: .5;
  background: radial-gradient(circle, rgba(8,120,207,.55), transparent 62%); top: -180px; right: -160px; }
.splash-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; opacity: .5; pointer-events: none; }
.splash-inner {
  position: relative; z-index: 3; width: min(1180px, 100%); padding: 30px 30px 34px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: end;
}
.splash-brand { display: flex; flex-direction: column; gap: 16px; }
.splash-logo { display: flex; align-items: center; gap: 14px; }
.splash-logo img { width: 62px; height: 62px; border-radius: 15px; background: #fff; padding: 6px; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.splash-logo .co { font-size: 16px; font-weight: 800; letter-spacing: .01em; line-height: 1.25; }
.splash-logo .rg { font-size: 11px; letter-spacing: .18em; color: #8fc4ee; font-weight: 700; margin-top: 3px; }
.splash-greeting { font-size: clamp(22px, 3.2vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; max-width: 620px; }
.splash-welcome { color: #cfe3f5; font-size: 14px; max-width: 560px; line-height: 1.6; }
.splash-tagline { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #E7C25A; font-weight: 700; }
.splash-official { justify-self: end; text-align: center; }
.splash-official .photo {
  width: 190px; height: 230px; border-radius: 16px; overflow: hidden; border: 2px solid rgba(201,162,39,.7);
  box-shadow: 0 22px 50px rgba(0,0,0,.4); background: linear-gradient(160deg, #1b3a5c, #0d2338); margin: 0 auto;
}
.splash-official .photo img { width: 100%; height: 100%; object-fit: cover; }
.splash-official .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 800; color: #6b9cc4; }
.splash-official .nm { font-size: 14px; font-weight: 700; margin-top: 12px; }
.splash-official .ps { font-size: 11.5px; color: #a9c7e0; }
.splash-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 30px 16px; }
.splash-progress .bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.splash-progress .bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #E7C25A, #35b8f2); transition: width .25s linear; }
.splash-progress .txt { display: flex; justify-content: space-between; gap: 14px; font-size: 11px; color: #b7d0e6; margin-top: 8px; }
.splash-skip {
  position: absolute; right: 22px; top: 22px; z-index: 6; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28); color: #fff; padding: 8px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px);
}
.splash-skip:hover { background: rgba(255,255,255,.24); }
.splash .dots { display: flex; gap: 6px; }
.splash .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); animation: pulse 1s infinite alternate; }
.splash .dots i:nth-child(2) { animation-delay: .2s; }
.splash .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { background: #fff; transform: scale(1.25); } }
.splash.anim-fade-up .splash-inner { animation: fadeup .8s ease both; }
.splash.anim-fade .splash-inner { animation: fadein .8s ease both; }
.splash.anim-slide-up .splash-inner { animation: slideup .8s ease both; }
.splash.anim-zoom .splash-inner { animation: zoomin .9s ease both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } }
@keyframes slideup { from { opacity: 0; transform: translateY(60px); } }
@keyframes zoomin { from { opacity: 0; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) {
  .splash-inner, .splash-inner * { animation: none !important; }
  .splash-progress .bar > i { transition: none; }
}

/* --------------------------- LOGIN PAGE (dynamic) ------------------------ */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  background: var(--navy); position: relative; overflow: hidden;
}
.auth-visual { position: relative; color: #fff; padding: 40px 46px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 100vh; }
.auth-visual .bg, .auth-visual .bg-mobile { position: absolute; inset: 0; z-index: 0; }
.auth-visual .bg img, .auth-visual .bg-mobile img { width: 100%; height: 100%; object-fit: cover; }
.auth-visual .bg-mobile { display: none; }
.auth-visual::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(155deg, rgba(11,31,58,.86) 0%, rgba(12,49,86,.66) 45%, rgba(8,86,140,.55) 100%);
}
.auth-visual > * { position: relative; z-index: 2; }
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand img { width: 54px; height: 54px; border-radius: 14px; background: #fff; padding: 6px; object-fit: contain; }
.auth-brand .co { font-size: 14.5px; font-weight: 800; line-height: 1.3; letter-spacing: .01em; }
.auth-brand .rg { font-size: 10.5px; letter-spacing: .16em; color: #9cc9ec; font-weight: 700; margin-top: 2px; }
.auth-hero { margin: 32px 0; max-width: 560px; }
.auth-hero .hi { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.auth-hero .sub { font-size: 15px; color: #cfe4f6; margin-top: 14px; line-height: 1.65; white-space: pre-line; }
.auth-sys { margin-top: 22px; display: inline-block; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.auth-sys .t { font-size: 13.5px; font-weight: 700; color: #fff; }
.auth-sys .d { font-size: 11.5px; color: #b6d4ea; margin-top: 2px; }
.auth-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.auth-feature { display: flex; flex-direction: column; gap: 7px; }
.auth-feature .ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.auth-feature .t { font-size: 12px; font-weight: 700; color: #fff; }
.auth-feature .d { font-size: 10.5px; color: #a9c9e2; line-height: 1.4; }
.auth-waves { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; opacity: .55; }
.auth-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 34px 26px; position: relative; }
.auth-panel::before {
  content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(8,120,207,.09), transparent 65%);
}
.auth-card { width: 100%; max-width: 420px; position: relative; }
.auth-mobile-brand { display: none; }
.auth-head .auth-sys { margin-top: 14px; border-color: #dbe7f4; background: #f5f9fe; }
.auth-head .auth-sys .t { color: #0B1F3A; font-size: 12.5px; }
.auth-head .auth-sys .d { color: var(--muted); font-size: 11px; }
.auth-mobile-bg { display: none; }
.auth-card h1 { font-size: clamp(23px, 2.4vw, 29px); letter-spacing: -.02em; }
.auth-card .subhead { font-size: 14px; color: var(--muted); margin-top: 8px; white-space: pre-line; line-height: 1.55; }
.auth-form { margin-top: 24px; }
.auth-form .field { margin-bottom: 15px; }
.auth-form .input { height: 46px; font-size: 14px; }
.auth-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.auth-submit { height: 48px; border-radius: 11px; font-size: 15px; }
.auth-foot { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 26px; line-height: 1.6; }
.demo-hint { margin-top: 20px; padding: 13px 14px; border-radius: 11px; background: #f7fafd; border: 1px dashed #cfe0f0; font-size: 11.5px; color: var(--muted); }
.demo-hint b { color: var(--ink-2); }
.demo-hint .acc { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin-top: 8px; }
.demo-hint .acc button { text-align: left; background: none; border: 0; padding: 0; font-size: 11.5px; color: var(--blue-600); cursor: pointer; font-family: inherit; }
.auth-error { display: none; margin-bottom: 14px; }
.auth-error.show { display: block; }

/* ------------------------------ misc pages ------------------------------- */
.checkin-cam { position: relative; border-radius: 14px; overflow: hidden; background: #0b1f3a; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.checkin-cam video, .checkin-cam canvas, .checkin-cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkin-cam .placeholder { color: #8fb0cf; text-align: center; font-size: 12.5px; padding: 20px; }
.checkin-cam .rec { position: absolute; top: 10px; left: 10px; background: rgba(220,38,38,.9); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.att-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gps-box { background: #f7fafd; border: 1px solid var(--line); border-radius: 11px; padding: 12px; font-size: 12px; }
.gps-box .row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.gps-box .row span:first-child { color: var(--muted); }

/* preview device frames */
.preview-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0b1f3a; position: relative; }
.preview-frame .ratio-16-9 { position: relative; padding-top: 56.25%; }
.preview-frame .ratio-9-16 { position: relative; padding-top: 177%; }
.preview-frame iframe, .preview-frame .pv { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tpl-panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #fff; }
.tpl-panel > h4 { font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }

/* ------------------------------- responsive ------------------------------ */
@media (max-width: 1400px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }

  /* ---------- LOGIN MOBILE: gambar latar di belakang kartu form ---------- */
  .auth { display: block; grid-template-columns: none; min-height: 100vh; background: #0B1F3A; position: relative; overflow: visible; }
  .auth-visual { display: none; }

  .auth-mobile-bg {
    display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: linear-gradient(155deg, #071527 0%, #0B2A4A 48%, #0B4A7E 100%);
  }
  .auth-mobile-bg img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .auth-mobile-bg img:not([src]), .auth-mobile-bg img[src=""] { display: none; }
  .auth-mobile-bg .veil {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(6, 20, 38, .58) 0%, rgba(6, 20, 38, .40) 42%, rgba(6, 20, 38, .72) 100%);
  }
  .auth-mobile-bg .waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; opacity: .55; }

  .auth-panel {
    position: relative; z-index: 1; min-height: 100vh; background: transparent !important;
    display: flex; align-items: center; justify-content: center;
    /* 'safe center' mencegah bagian atas form terpotong saat konten lebih tinggi
       dari layar (ponsel kecil) — halaman tetap bisa digulir. */
    padding: calc(22px + env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
    backdrop-filter: none !important;
    align-items: safe center;
  }
  .auth-panel::before { display: none; }

  /* kartu form transparan elegan di atas gambar */
  .auth-card {
    width: 100%; max-width: 430px; padding: 26px 22px 22px; border-radius: 24px;
    background: var(--login-card-bg, rgba(255, 255, 255, .93));
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 0 26px 60px rgba(3, 12, 24, .34), 0 2px 8px rgba(3, 12, 24, .12);
  }

  /* brand: logo BESAR di tengah */
  .auth-mobile-brand {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; margin: 2px 0 18px; text-align: center;
  }
  .auth-mobile-brand .logo-tile {
    width: var(--login-logo-mobile, 88px); height: var(--login-logo-mobile, 88px);
    border-radius: 26px; background: #fff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 30px rgba(11, 31, 58, .20), inset 0 0 0 1px rgba(8, 120, 207, .10);
    padding: 12px; flex: none;
  }
  .auth-mobile-brand .logo-tile img {
    width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 16px; background: transparent;
  }
  .auth-mobile-brand .ident { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .auth-mobile-brand .co {
    font-size: 11.5px; font-weight: 800; line-height: 1.35; letter-spacing: .01em;
    color: #0B1F3A; max-width: 300px;
  }
  .auth-mobile-brand .rg { font-size: 9.5px; letter-spacing: .18em; color: var(--blue-600); font-weight: 800; }

  /* judul & subjudul rata tengah */
  .auth-head { text-align: center; }
  .auth-head h1 { font-size: clamp(22px, 6.2vw, 28px); letter-spacing: -.025em; }
  .auth-head .subhead {
    font-size: 13px; color: var(--ink-2); margin-top: 7px; white-space: pre-line; line-height: 1.55;
    opacity: .82; max-width: 320px; margin-left: auto; margin-right: auto;
  }
  .auth-head .auth-sys {
    display: inline-flex; flex-direction: column; align-items: center; margin: 14px auto 0;
    padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(8, 120, 207, .16);
    background: rgba(8, 120, 207, .07); backdrop-filter: none;
  }
  .auth-head .auth-sys .t { color: var(--blue-600); font-size: 11.5px; font-weight: 800; }
  .auth-head .auth-sys .d { color: var(--muted); font-size: 10.5px; margin-top: 1px; }

  .auth-form { margin-top: 20px; }
  .auth-form .input { height: 44px; background: rgba(255, 255, 255, .96); }
  .auth-tools { margin: 2px 0 16px; }
  .auth-submit { height: 46px; }
  .auth-foot { margin-top: 16px; font-size: 10.5px; text-align: center; }
  .demo-hint { margin-top: 14px; padding: 10px 12px; border-radius: 12px; }
  .demo-hint > div:first-child { font-size: 10.5px; line-height: 1.45; }
  .demo-hint .acc {
    display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .demo-hint .acc::-webkit-scrollbar { display: none; }
  .demo-hint .acc button {
    flex: none; white-space: nowrap; padding: 5px 10px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); font-size: 10.5px; line-height: 1.3;
  }

  /* isi rata kiri bila admin memilih perataan kiri */
  .auth.align-left .auth-mobile-brand,
  .auth.align-left .auth-mobile-brand .ident { align-items: flex-start; text-align: left; }
  .auth.align-left .auth-head { text-align: left; }
  .auth.align-left .auth-head .subhead { margin-left: 0; }
  .auth.align-left .auth-head .auth-sys { margin-left: 0; }
  .splash-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 26px 22px 40px; }
  .splash-official { justify-self: start; display: flex; align-items: center; gap: 14px; text-align: left; }
  .splash-official .photo { width: 74px; height: 74px; border-radius: 50%; margin: 0; }
  .splash-official .nm { margin-top: 0; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 282px; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .topbar .menu-btn { display: inline-flex; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .content { padding: 18px 16px 118px; }
  .topbar { padding: 0 14px; height: 58px; gap: 10px; }
  .topbar-search { display: none; }
  .company-chip { display: none; }
  .bottom-nav { display: block; }
  .page-head h1 { font-size: 19px; }
  .page-head { margin-bottom: 16px; gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 13px 14px; }
  .stat .val { font-size: 21px; }
  .stat .ic { width: 30px; height: 30px; right: 11px; top: 11px; border-radius: 9px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .col-span-2 { grid-column: span 1; }
  .modal { max-width: 100%; max-height: 94vh; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 3px 0; }
  .kv dd { margin-bottom: 8px; }
  .att-actions { grid-template-columns: 1fr; }
  .auth-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-card { max-width: 400px; padding: 22px 18px 18px; border-radius: 22px; }
  .auth-mobile-brand .logo-tile { border-radius: 22px; padding: 10px; }
  .splash-progress { padding: 0 18px 14px; }
  /* tabel → kartu */
  table.dt thead { display: none; }
  table.dt, table.dt tbody, table.dt tr, table.dt td { display: block; width: 100%; }
  table.dt tbody tr {
    border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; background: #fff;
  }
  table.dt tbody td { border: 0; padding: 7px 0; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
  table.dt tbody td > * { min-width: 0; max-width: 100%; }
  table.dt tbody td::before {
    content: attr(data-label); flex: 0 0 40%; font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
    color: var(--muted); font-weight: 700; padding-top: 2px;
  }
  table.dt tbody td[data-label=""]::before, table.dt td.no-label::before { display: none; }
  table.dt tbody td.actions { justify-content: flex-start; padding-top: 10px; border-top: 1px dashed var(--line-2); }
  table.dt tbody td.actions::before { display: none; }
  .table-wrap { overflow: visible; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .toolbar .search { max-width: 100%; }
  .auth-panel { padding: calc(16px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)); }
  .auth-card { max-width: 100%; padding: 20px 16px 16px; }
  .auth-head h1 { font-size: 22px; }
  .auth-mobile-brand { gap: 10px; margin-bottom: 14px; }
  .splash-greeting { font-size: 21px; }
  .splash-official .photo { width: 62px; height: 62px; }
  .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-actions, .no-print, .toast-wrap { display: none !important; }
  body { background: #fff; }
  .shell { display: block; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* ------------------------- pratinjau (embed) & util ---------------------- */
.min-w-0 { min-width: 0; }
.pv-host { position: relative; overflow: hidden; }
.pv-host .splash { position: absolute; inset: 0; }
.pv-host .splash-skip { display: none; }
.card .preview-frame { background: #061426; }

/* --------------------------- fitur & modul (toggle) ---------------------- */
.mod-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.mod-row:last-child { border-bottom: 0; }
.mod-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mod-row .switch { flex: none; }
.mod-row .track { width: 44px; height: 25px; }
.mod-row .track::after { width: 19px; height: 19px; }
.mod-row .switch input:checked + .track::after { transform: translateX(19px); }
.mod-row .switch input:disabled + .track { opacity: .55; cursor: not-allowed; }
@media (max-width: 560px) {
  .mod-row { align-items: flex-start; }
  .mod-row .switch { margin-top: 2px; }
}
