/* ── Reset & variables ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #2563eb; --blue-dk: #1d4ed8; --blue-lt: #eff6ff;
  --amber:   #d97706; --green: #16a34a; --red: #dc2626;
  --slate:   #0f172a; --muted: #64748b; --border: #e2e8f0;
  --bg:      #f8fafc; --white: #ffffff;
  --radius:  1rem;
  --shadow:  0 4px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--slate);
  background: var(--bg);
  line-height: 1.6;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Loader ───────────────────────────────────────────────── */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Animated background dots */
#page-loader::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: bgshift 8s linear infinite;
}
@keyframes bgshift { to { background-position: 32px 32px; } }

.loader-card {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem;
  padding: 2.5rem 2.5rem 2rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
  min-width: 320px; max-width: 380px; width: 90%;
  text-align: center;
}

.loader-logo {
  width: 72px; height: 72px; object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.4));
  margin-bottom: .5rem;
  animation: logopulse 2s ease-in-out infinite;
}
@keyframes logopulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 16px rgba(0,0,0,.4)); }
  50%       { transform: scale(1.06); filter: drop-shadow(0 6px 24px rgba(96,165,250,.5)); }
}

.loader-app-name {
  font-size: 1.8rem; font-weight: 900; color: #fff;
  letter-spacing: .04em; line-height: 1;
}
.loader-app-sub {
  font-size: .75rem; color: rgba(255,255,255,.55);
  font-weight: 500; margin-bottom: .75rem;
  line-height: 1.4;
}

/* Progress bar */
.loader-progress-wrap {
  width: 100%;
  display: flex; align-items: center; gap: .75rem;
  margin-top: .5rem;
}
.loader-progress-bar {
  flex: 1; height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 999px; overflow: hidden;
}
.loader-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 10px rgba(96,165,250,.6);
}
.loader-pct {
  font-size: .82rem; font-weight: 800; color: #93c5fd;
  min-width: 36px; text-align: right; font-variant-numeric: tabular-nums;
}

/* Step text */
.loader-step {
  font-size: .78rem; color: rgba(255,255,255,.5);
  font-weight: 500; margin-top: .25rem;
  min-height: 1.2em;
  transition: opacity .3s ease;
}

/* Error state */
.loader-card.is-error .loader-progress-fill {
  background: linear-gradient(90deg, #f87171, #fb923c);
  box-shadow: 0 0 10px rgba(248,113,113,.6);
}
.loader-card.is-error .loader-pct { color: #fca5a5; }
.loader-card.is-error .loader-step { color: #fca5a5; }

/* ── Navbar — fixed di atas ───────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(15,23,42,.06);
}
.navbar__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 1.5rem; height: 60px;
  display: flex; align-items: center; gap: 1.5rem;
}
.navbar__logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.navbar__brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; text-decoration: none; }
.navbar__brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.navbar__brand-title { font-size: 1rem; font-weight: 800; color: var(--blue); letter-spacing: .02em; }
.navbar__brand-sub { font-size: .7rem; color: var(--muted); font-weight: 600; }
.navbar__tabs { display: flex; gap: .25rem; flex: 1; }
.nav-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem 1rem; border: none; border-radius: .6rem;
  background: transparent; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.nav-tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-tab:hover { background: #f1f5f9; color: var(--slate); }
.nav-tab.is-active { background: var(--blue-lt); color: var(--blue); }
.navbar__actions { display: flex; gap: .5rem; margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.25rem; border-radius: .7rem; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; border: none; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm { padding: .38rem .85rem; font-size: .82rem; border-radius: .55rem; }
.btn--outline-dark { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--outline-dark:hover { background: #f1f5f9; color: var(--slate); }
.btn--primary-nav { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.3); }
.btn--primary-nav:hover { background: var(--blue-dk); }

/* ── Nav user dropdown ────────────────────────────────────── */
.nav-user-wrap {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem .35rem .35rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.nav-user-btn:hover { border-color: #93c5fd; background: var(--blue-lt); }

.nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #0ea5e9);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  display: grid; place-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.nav-user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: .85rem;
  box-shadow: 0 12px 40px rgba(15,23,42,.14);
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-user-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-user-info {
  padding: .85rem 1rem;
  background: var(--blue-lt);
}
.nav-user-info__name { font-size: .88rem; font-weight: 700; color: var(--slate); }
.nav-user-info__role {
  font-size: .72rem; font-weight: 700;
  color: var(--blue);
  margin-top: .15rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.nav-user-divider { height: 1px; background: var(--border); }

.nav-user-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .7rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-user-item:hover { background: #f8fafc; color: var(--slate); }
.nav-user-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-user-item--danger:hover { background: #fef2f2; color: var(--red); }

/* ── Page wrapper — mengisi ruang antara navbar dan footer ── */
.page {
  flex: 1;                    /* dorong footer ke bawah */
  padding-top: 60px;          /* offset navbar fixed */
}

/* Offset hero agar tidak tertutup navbar */
#page-dashboard .hero { margin-top: 0; }

/* Halaman data — tambah padding atas untuk main */
#page-data .main { padding-top: 2.5rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 420px;
  display: flex; flex-direction: column;
  color: #fff;
}
/* Background slideshow */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-bg__slide.is-active { opacity: 1; }
.hero-bg__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(15,23,66,.82) 0%, rgba(37,99,235,.65) 60%, rgba(14,165,233,.5) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto;
  padding: 3rem 2rem 2.5rem;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 2rem; flex-wrap: wrap; flex: 1;
}
.hero__brand { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.25rem; }
.hero__logo { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); flex-shrink: 0; }
.hero__eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; opacity: .85; margin-bottom: .35rem;
}
.hero__title { font-size: clamp(2.2rem,5vw,3.5rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; margin-bottom: .3rem; }
.hero__subtitle-app { font-size: .95rem; opacity: .9; line-height: 1.4; }
.hero__desc { font-size: .92rem; opacity: .8; max-width: 480px; margin-bottom: 1.5rem; line-height: 1.6; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn--hero-primary { background: #fff; color: var(--blue); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn--hero-primary:hover { background: #f0f9ff; }
.btn--hero-outline { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn--hero-outline:hover { background: rgba(255,255,255,.25); }
.hero__stats { display: flex; gap: 1rem; flex-wrap: wrap; align-self: flex-end; }
.hero__stat {
  text-align: center; background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22); border-radius: .85rem;
  padding: .85rem 1.2rem; min-width: 100px;
  backdrop-filter: blur(6px);
}
.hero__stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; display: block; }
.hero__stat-label { font-size: .72rem; opacity: .8; margin-top: .2rem; display: block; }
/* Slide indicators */
.hero-indicators {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: 6px;
  padding-bottom: 1.25rem;
}
.hero-ind {
  width: 24px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.35);
  transition: background .3s, width .3s;
  cursor: pointer;
}
.hero-ind.is-active { background: #fff; width: 36px; }

/* ── Main ─────────────────────────────────────────────────── */
.main { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }

/* ── Section ──────────────────────────────────────────────── */
.section-header { margin-bottom: 1.5rem; }
.section-title {
  font-size: 1.15rem; font-weight: 800; color: var(--slate);
  margin-bottom: .35rem; display: flex; align-items: center; gap: .6rem;
}
.section-title::before { content: ''; display: block; width: 4px; height: 1.15rem; background: var(--blue); border-radius: 2px; }
.section-sub { font-size: .85rem; color: var(--muted); }
.section-sub code { background: #f1f5f9; padding: .1rem .4rem; border-radius: .3rem; font-size: .8rem; }

/* ── KPI ──────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .45rem;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi-card__icon { width: 38px; height: 38px; border-radius: .7rem; display: grid; place-items: center; flex-shrink: 0; }
.kpi-card__icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-card__value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.kpi-card__label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-card__accent { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; border-radius: 0 0 var(--radius) var(--radius); }
.kpi--blue  .kpi-card__icon { background: #eff6ff; color: var(--blue); }   .kpi--blue  .kpi-card__value { color: var(--blue); }   .kpi--blue  .kpi-card__accent { background: var(--blue); }
.kpi--green .kpi-card__icon { background: #f0fdf4; color: var(--green); }  .kpi--green .kpi-card__value { color: var(--green); }  .kpi--green .kpi-card__accent { background: var(--green); }
.kpi--amber .kpi-card__icon { background: #fffbeb; color: var(--amber); }  .kpi--amber .kpi-card__value { color: var(--amber); }  .kpi--amber .kpi-card__accent { background: var(--amber); }
.kpi--red   .kpi-card__icon { background: #fef2f2; color: var(--red); }    .kpi--red   .kpi-card__value { color: var(--red); }    .kpi--red   .kpi-card__accent { background: var(--red); }
.kpi--slate .kpi-card__icon { background: #f1f5f9; color: #475569; }       .kpi--slate .kpi-card__value { color: #334155; }       .kpi--slate .kpi-card__accent { background: #94a3b8; }

/* ── Two-col ──────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ── Card ─────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); }
.card__title { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }

/* ── Pie Chart — Izin per Kecamatan ──────────────────────── */
.pie-wrap { width: 100%; }

.pie-chart-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* SVG pie */
.pie-svg {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  overflow: visible;   /* agar slice explode tidak terpotong */
}

.pie-slice {
  cursor: pointer;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .2s;
  transform-origin: 100px 100px;  /* center SVG */
  outline: none;
}
.pie-slice:hover   { opacity: .88; }
.pie-slice.is-active { opacity: 1; }

/* Teks di tengah pie */
.pie-center-val {
  font-size: 22px;
  font-weight: 800;
  fill: #0f172a;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  transition: font-size .2s;
}
.pie-center-lbl {
  font-size: 9px;
  font-weight: 600;
  fill: #64748b;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

/* Legend */
.pie-legend {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .5rem;
  border-radius: .5rem;
  cursor: pointer;
  transition: background .15s;
  border: 1.5px solid transparent;
}
.pie-legend-item:hover { background: #f8fafc; }
.pie-legend-item.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.pie-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pie-legend-name {
  flex: 1;
  font-size: .78rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pie-legend-val {
  font-size: .78rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.pie-legend-val small { color: #94a3b8; font-weight: 500; }

/* ── Bar chart (jenis) ────────────────────────────────────── */
.bar-list { display: flex; flex-direction: column; gap: .65rem; }
.bar-item { display: flex; flex-direction: column; gap: .2rem; }
.bar-item__header { display: flex; justify-content: space-between; font-size: .85rem; }
.bar-item__label { font-weight: 600; color: var(--slate); }
.bar-item__count { font-weight: 700; color: var(--muted); }
.bar-track { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--blue); width: 0; transition: width 1s cubic-bezier(.4,0,.2,1); }

/* ── Donut ────────────────────────────────────────────────── */
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.donut { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: var(--slate); line-height: 1; }
.donut__center small { font-size: .65rem; color: var(--muted); font-weight: 600; }
.legend { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.legend-item { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-item__label { flex: 1; color: var(--slate); font-weight: 600; }
.legend-item__val { color: var(--muted); font-weight: 700; }

/* ── Ticker ───────────────────────────────────────────────── */
.ticker-card { display: flex; flex-direction: column; }
.ticker-dots { display: flex; gap: 4px; align-items: center; }
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; transition: background .2s, transform .2s; }
.ticker-dot.is-active { background: var(--blue); transform: scale(1.3); }
.ticker-viewport { flex: 1; position: relative; overflow: hidden; min-height: 140px; }
.ticker-track { position: relative; height: 100%; }
.ticker-slide {
  position: absolute; inset: 0; padding: .75rem 0;
  opacity: 0; transform: translateX(36px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.ticker-slide.is-active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.ticker-slide.is-prev { opacity: 0; transform: translateX(-36px); }
.ticker-slide__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.ticker-slide__no { font-size: .72rem; font-weight: 700; color: var(--blue); background: var(--blue-lt); padding: .15rem .5rem; border-radius: 999px; }
.ticker-slide__name { font-size: 1rem; font-weight: 800; color: var(--slate); margin-bottom: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker-slide__meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.ticker-slide__meta span::before { content: '· '; }
.ticker-slide__meta span:first-child::before { content: ''; }
.ticker-slide__detail { display: flex; gap: .75rem; font-size: .82rem; font-weight: 700; color: #334155; }
.ticker-controls { display: flex; align-items: center; justify-content: center; gap: .75rem; padding-top: .5rem; border-top: 1px solid #f1f5f9; margin-top: .5rem; }
.ticker-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--muted); cursor: pointer; font-size: .9rem; display: grid; place-items: center; transition: background .15s, color .15s; }
.ticker-btn:hover { background: var(--blue-lt); color: var(--blue); }
.ticker-counter { font-size: .78rem; color: var(--muted); font-weight: 600; min-width: 40px; text-align: center; }

/* ── Status badges ────────────────────────────────────────── */
.timeline-badge { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; flex-shrink: 0; align-self: center; }
.badge-disetujui  { background: #dcfce7; color: #166534; }
.badge-proses     { background: #fef9c3; color: #854d0e; }
.badge-perbaikan  { background: #e0f2fe; color: #075985; }
.badge-ditolak    { background: #fee2e2; color: #991b1b; }
.badge-default    { background: #f1f5f9; color: #475569; }

/* ── Filter bar & table ───────────────────────────────────── */
.filter-bar { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { padding: .55rem .9rem; border: 1px solid var(--border); border-radius: .65rem; font: inherit; font-size: .88rem; background: var(--white); color: var(--slate); outline: none; transition: border-color .15s; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue); }
.filter-bar input { flex: 1; min-width: 180px; }
.record-count { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: .85rem; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 700px; }
.data-table thead th {
  background: #eff6ff; color: #1e3a8a; font-weight: 700; font-size: .78rem;
  text-align: left; padding: .7rem 1rem; position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
  border-right: 1px solid #dbeafe;
  border-bottom: 2px solid #bfdbfe;
}
.data-table thead th:last-child { border-right: none; }
.data-table tbody tr { transition: background .12s, box-shadow .12s; cursor: pointer; }
.data-table tbody tr:hover { background: #f0f9ff; }
.data-table tbody tr.is-selected {
  background: #dbeafe;
  box-shadow: inset 3px 0 0 #2563eb;
}
.data-table tbody tr.is-selected td {
  color: #1e3a8a; font-weight: 600;
  border-bottom-color: #bfdbfe; border-right-color: #bfdbfe;
}
.data-table td {
  padding: .65rem 1rem; border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9; color: #334155; vertical-align: middle;
}
.data-table td:last-child { border-right: none; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Skeleton ─────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: .5rem; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Tombol WA — di dalam footer, kolom kanan ────────────── */
.footer__wa {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
}

.wa-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}

.wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(37,211,102,.5);
}

.wa-btn svg {
  width: 26px;
  height: 26px;
}

/* ── Footer compact ───────────────────────────────────────── */
.footer {
  background: #0f172a;
  color: #94a3b8;
  /* Tidak sticky — ikut flow halaman */
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #1e293b;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}

.footer__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: .85;
  flex-shrink: 0;
}

.footer__title {
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  line-height: 1.2;
}

.footer__sub {
  font-size: .72rem;
  color: #64748b;
  line-height: 1.3;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: #64748b;
  text-decoration: none;
  padding: .3rem .65rem;
  border-radius: .5rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.footer__link:hover {
  background: #1e293b;
  color: #94a3b8;
}

.footer__link--wa {
  color: #4ade80;
}

.footer__link--wa:hover {
  background: rgba(37,211,102,.1);
  color: #86efac;
}

.footer__bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: .65rem 1.5rem;
  font-size: .72rem;
  color: #334155;
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer__inner { gap: .75rem; }
}
@media (max-width: 600px) {
  .hero__inner { padding: 2rem 1rem 1.5rem; }
  .hero__stats { gap: .6rem; }
  .hero__stat { min-width: 85px; padding: .65rem .85rem; }
  .hero__stat-value { font-size: 1.5rem; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .main { padding: 1.25rem 1rem 2rem; }
  .navbar__brand-sub { display: none; }
}
