/* ============================================================
   ORBIT — Custom CSS v2
   Bakesbangpol Kabupaten Karawang
   Redesign: Modern Intelligence Dashboard
   ============================================================ */

/* ── Local Font: Plus Jakarta Sans ──────────────────────────── */
@import url('/node_modules/@fontsource/plus-jakarta-sans/400.css');
@import url('/node_modules/@fontsource/plus-jakarta-sans/500.css');
@import url('/node_modules/@fontsource/plus-jakarta-sans/600.css');
@import url('/node_modules/@fontsource/plus-jakarta-sans/700.css');
@import url('/node_modules/@fontsource/plus-jakarta-sans/800.css');

:root {
  --orbit-navy:         #0B1628;
  --orbit-navy-mid:     #0f1e38;
  --orbit-navy-light:   #1a2f52;
  --orbit-navy-hover:   rgba(255,255,255,0.07);
  --orbit-gold:         #F5A623;
  --orbit-gold-dark:    #D4891C;
  --orbit-orange:       #C05A00;
  --orbit-orange-light: #D96800;
  --orbit-accent:       #3B7BF5;
  --orbit-sidebar-w:    240px;
  --orbit-sidebar-col:  60px;
  --orbit-topbar-h:     52px;
  --orbit-border:       rgba(255,255,255,0.07);
  --orbit-trans:        0.2s ease;
  --content-bg:         #F0F2F8;
  --card-bg:            #ffffff;
  --card-border:        rgba(11,22,40,0.06);
  --card-shadow:        0 1px 2px rgba(11,22,40,0.04), 0 4px 16px rgba(11,22,40,0.06);
  --text-primary:       #0f1e38;
  --text-secondary:     #5a6a88;
  --text-muted:         #8a9bbb;
  --radius-sm:          8px;
  --radius-md:          12px;
  --radius-lg:          16px;
}

/* ── Scrollbar hide globally ─────────────────────────────────── */
html { scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; max-width: 100%; }
html::-webkit-scrollbar { display: none; }

#orbit-wrapper { max-width: 100%; overflow-x: hidden; }

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.orbit-body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--content-bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(59, 123, 245, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(11, 22, 40, 0.04) 0%, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-size: 14px;
  line-height: 1.5;
}
body.orbit-body::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
.orbit-sidebar {
  width: var(--orbit-sidebar-w);
  height: 100vh;
  background: var(--orbit-navy);
  background-image:
    linear-gradient(180deg, rgba(59,123,245,0.08) 0%, transparent 30%),
    linear-gradient(to bottom, #0B1628 0%, #0a1525 100%);
  border-right: 1px solid var(--orbit-border);
  position: fixed;
  top: 0; left: 0;
  z-index: 1050;
  transition: width var(--orbit-trans), transform var(--orbit-trans);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.orbit-sidebar-scroll {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}
.orbit-sidebar-scroll::-webkit-scrollbar { display: block; width: 3px; }
.orbit-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.orbit-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }
.orbit-sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); }

/* ── Brand ───────────────────────────────────────────────────── */
.orbit-brand {
  background: rgba(255,255,255,0.03);
  padding: 0 12px;
  height: var(--orbit-topbar-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--orbit-border);
  flex-shrink: 0;
  gap: 9px;
}

.orbit-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(245,166,35,0.25), rgba(245,166,35,0.1));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(245,166,35,0.3);
  flex-shrink: 0;
}

.orbit-brand-text {
  flex-grow: 1;
  overflow: hidden;
  transition: opacity var(--orbit-trans), width var(--orbit-trans);
  white-space: nowrap;
}
.orbit-brand-text .fw-bold {
  color: #fff;
  font-size: 0.70rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.orbit-brand-text .sub { color: rgba(255,255,255,0.38); font-size: 0.56rem; letter-spacing: 0.01em; }

#sidebarCollapseBtn {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 6px;
  color: rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--orbit-trans), color var(--orbit-trans);
}
#sidebarCollapseBtn:hover { background: rgba(255,255,255,0.10); color: #fff; }

/* ── User Info ───────────────────────────────────────────────── */
.orbit-user-info {
  padding: 10px 12px;
  border-bottom: 1px solid var(--orbit-border);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}

.orbit-user-info .avatar-wrap { display: flex; align-items: center; gap: 9px; }

.avatar-circle {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--orbit-gold-dark), var(--orbit-gold));
  color: var(--orbit-navy);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem;
  flex-shrink: 0;
}

.orbit-user-info .user-name {
  color: #fff;
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orbit-user-info .user-role {
  font-size: 0.64rem;
  color: var(--orbit-gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.orbit-user-info .user-text { overflow: hidden; }

/* ── Nav Labels ──────────────────────────────────────────────── */
.nav-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase;
  padding: 10px 12px 3px;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Nav Links ───────────────────────────────────────────────── */
.orbit-nav-link {
  color: rgba(255,255,255,0.58) !important;
  padding: 0.38rem 9px !important;
  border-radius: 7px !important;
  font-size: 0.81rem !important;
  font-weight: 500;
  display: flex !important;
  align-items: center;
  gap: 9px;
  transition: background var(--orbit-trans), color var(--orbit-trans);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
}
.orbit-nav-link:hover {
  background: rgba(255,255,255,0.07) !important;
  color: rgba(255,255,255,0.92) !important;
}
.orbit-nav-link.active {
  background: rgba(245,166,35,0.12) !important;
  color: #fff !important;
  border-left: 2px solid var(--orbit-gold);
  padding-left: calc(9px - 2px) !important;
}

.nav-icon {
  width: 18px;
  font-size: 0.95rem;
  text-align: center;
  flex-shrink: 0;
}

/* Icon per menu */
.icon-dashboard  { color: #60b5ff; }
.icon-ormas      { color: #4ADE80; }
.icon-laporan    { color: #FBBF24; }
.icon-verifikasi { color: #34D399; }
.icon-analitik   { color: #A78BFA; }
.icon-peta       { color: #67E8F9; }
.icon-ews        { color: #F87171; }
.icon-pembinaan  { color: #2DD4BF; }
.icon-helpdesk   { color: #F472B6; }
.icon-users      { color: #FCD34D; }
.icon-audit      { color: #86EFAC; }
.icon-param      { color: #93C5FD; }
.icon-konfigurasi{ color: #C4B5FD; }
.icon-backup     { color: #FDA4AF; }
.icon-profil     { color: #C4B5FD; }
.icon-logout     { color: #FCA5A5; }

.sidebar-footer {
  border-top: 1px solid var(--orbit-border);
  padding: 7px 9px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   COLLAPSED STATE (desktop)
══════════════════════════════════════════════════════════════ */
@media (min-width: 992px) {
  .orbit-sidebar.collapsed { width: var(--orbit-sidebar-col); }
  .orbit-sidebar.collapsed .orbit-brand-text,
  .orbit-sidebar.collapsed .orbit-user-info .user-text,
  .orbit-sidebar.collapsed .nav-label,
  .orbit-sidebar.collapsed .nav-link-text,
  .orbit-sidebar.collapsed .ms-auto { display: none !important; }
  .orbit-sidebar.collapsed .orbit-nav-link {
    justify-content: center; padding: 0.45rem !important; border-left: none !important;
  }
  .orbit-sidebar.collapsed .orbit-nav-link.active { background: rgba(245,166,35,0.18) !important; }
  .orbit-sidebar.collapsed .orbit-user-info { padding: 9px 0; display: flex; justify-content: center; }
  .orbit-sidebar.collapsed .orbit-brand { justify-content: center; padding: 0; }
  .orbit-sidebar.collapsed #sidebarCollapseBtn { position: absolute; top: 13px; right: 7px; }
  .orbit-sidebar.collapsed .nav-icon { font-size: 1.1rem; width: 22px; }
  .orbit-sidebar.collapsed .sidebar-footer { padding: 7px 4px; }
  .orbit-main { transition: margin-left var(--orbit-trans); }
  .orbit-main.sidebar-collapsed { margin-left: var(--orbit-sidebar-col); }
  .orbit-sidebar.collapsed .orbit-nav-link { position: relative; }
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════ */
.orbit-main {
  margin-left: var(--orbit-sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;     /* CRITICAL: allow flex item to shrink below content's intrinsic width (e.g. wide tables) instead of forcing the whole page to overflow horizontally */
  width: 100%;
  overflow-x: hidden;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.orbit-topbar {
  height: var(--orbit-topbar-h);
  background: var(--orbit-navy);
  background-image: linear-gradient(90deg, #0B1628, #0f1e38);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--orbit-border), 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
}

.orbit-topbar .breadcrumb-item a {
  color: rgba(255,255,255,0.55) !important;
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 500;
}
.orbit-topbar .breadcrumb-item a:hover { color: rgba(255,255,255,0.9) !important; }
.orbit-topbar .breadcrumb-item.active { color: rgba(255,255,255,0.85) !important; font-size: 0.79rem; }
.orbit-topbar .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.25) !important; }
.orbit-topbar .btn-link { color: rgba(255,255,255,0.7) !important; }
.orbit-topbar .btn-link:hover { color: #fff !important; }
#sidebarToggle { color: rgba(255,255,255,0.8) !important; }

.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--orbit-gold);
  border-radius: 50%;
  border: 2px solid var(--orbit-navy);
}

#orbit-clock {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.orbit-content { flex: 1; min-width: 0; max-width: 100%; }

/* ══════════════════════════════════════════════════════════════
   STAT CARDS — Compact & Refined
══════════════════════════════════════════════════════════════ */
.stat-card {
  border-radius: var(--radius-md);
  border: none;
  padding: 1rem 1.1rem 0.9rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  cursor: default;
  color: #fff;
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -45px; right: -30px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -30px; right: 20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-card.sc-navy {
  background: linear-gradient(135deg, #0B1628 0%, #1c3a72 100%);
  box-shadow: 0 4px 16px rgba(11,22,40,0.28), 0 1px 4px rgba(11,22,40,0.14);
}
.stat-card.sc-green {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(6,78,59,0.30), 0 1px 4px rgba(6,78,59,0.14);
}
.stat-card.sc-amber {
  background: linear-gradient(135deg, #78350f 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(120,53,15,0.28), 0 1px 4px rgba(120,53,15,0.14);
}
.stat-card.sc-orange {
  background: linear-gradient(135deg, #7c2d12 0%, #c05a00 100%);
  box-shadow: 0 4px 16px rgba(192,90,0,0.30), 0 1px 4px rgba(192,90,0,0.14);
}
.stat-card.sc-red {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
  box-shadow: 0 4px 16px rgba(220,38,38,0.28), 0 1px 4px rgba(220,38,38,0.14);
}

.sc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.sc-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  line-height: 1.3;
}
.sc-icon {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.22);
  flex-shrink: 0;
}
.sc-number {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.04em;
  margin-top: 0.25rem;
}
.sc-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Legacy aliases */
.stat-icon  { display: none; }
.stat-value { font-size: 2.1rem; font-weight: 900; line-height: 1; color: #fff; letter-spacing: -0.04em; }
.stat-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.stat-sub   { font-size: 0.65rem; color: rgba(255,255,255,0.45); font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.orbit-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(11,22,40,0.07);
  box-shadow: 0 1px 2px rgba(11,22,40,0.05), 0 6px 20px rgba(11,22,40,0.08);
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.orbit-card:hover {
  box-shadow: 0 2px 6px rgba(11,22,40,0.08), 0 16px 40px rgba(11,22,40,0.13);
  transform: translateY(-1px);
}
.orbit-card-header,
.orbit-card .card-header {
  background: linear-gradient(135deg, #0B1628 0%, #0e2040 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid var(--orbit-gold);
  padding: 0.58rem 0.9rem 0.58rem 0.85rem;
  font-weight: 600;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.015em;
  gap: 0.5rem;
}
/* Links & action buttons inside dark card headers */
.orbit-card .card-header a:not(.btn-orbit):not(.btn-gold),
.orbit-card .card-header .db-btn-detail {
  color: rgba(255,255,255,0.48) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  background: rgba(255,255,255,0.04) !important;
  border-radius: 5px;
  font-size: 0.67rem;
  padding: 0.14rem 0.55rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.orbit-card .card-header a:not(.btn-orbit):not(.btn-gold):hover,
.orbit-card .card-header .db-btn-detail:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,0.32) !important;
  background: rgba(255,255,255,0.10) !important;
}

/* ══════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════ */
.orbit-table th {
  background: var(--orbit-navy);
  color: rgba(255,255,255,0.80);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  white-space: nowrap;
  padding: 0.6rem 0.85rem;
}
.orbit-table td {
  vertical-align: middle;
  border-color: #f0f4f8;
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
}
.orbit-table tbody tr:hover { background: rgba(59,123,245,0.025); }

/* ══════════════════════════════════════════════════════════════
   RISK & EWS
══════════════════════════════════════════════════════════════ */
.risk-rendah { color: #059669; }
.risk-sedang { color: #d97706; }
.risk-tinggi { color: #dc2626; }
.risk-kritis { color: #7f1d1d; background: rgba(127,29,29,0.07); }

@keyframes pulse-l3 {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127,29,29,0.25); }
  50%       { box-shadow: 0 0 0 5px rgba(127,29,29,0); }
}

/* ══════════════════════════════════════════════════════════════
   FORMS & BUTTONS
══════════════════════════════════════════════════════════════ */
.form-label { font-weight: 600; font-size: 0.79rem; color: #344054; }
.form-control, .form-select {
  font-size: 0.83rem;
  border-radius: var(--radius-sm);
  border-color: #dde3ee;
}
.form-control:focus, .form-select:focus {
  border-color: var(--orbit-gold);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.14);
}
.btn-orbit  { background: var(--orbit-navy); color: #fff; border: none; font-weight: 600; font-size: 0.83rem; }
.btn-orbit:hover { background: var(--orbit-navy-light); color: #fff; }
.btn-xs     { padding: 0.18rem 0.5rem; font-size: 0.72rem; border-radius: 5px; }

/* Score Bar */
.score-bar      { height: 7px; border-radius: 20px; transition: width 1s ease; }

/* Map */
#orbitMap { height: 500px; border-radius: var(--radius-md); z-index: 1; }

/* Notif Dropdown */
.notif-item { padding: 0.55rem 0.9rem; border-bottom: 1px solid #f0f4f8; font-size: 0.80rem; }
.notif-item:hover { background: #f8f9fa; cursor: pointer; }
.notif-item.unread { background: rgba(245,166,35,0.06); }
.notif-dropdown { border-radius: var(--radius-md); border: 1px solid #eef2f7; }

/* Auth */
.orbit-auth-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  background: #ffffff;
  background-image:
    radial-gradient(circle at 50% 20%, rgba(59,123,245,0.05) 0%, transparent 42%),
    radial-gradient(circle at 15% 85%, rgba(245,166,35,0.05) 0%, transparent 42%);
  background-size: 160% 160%;
  animation: orbitBgDrift 26s ease-in-out infinite alternate;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem;
}
/* Blob lembut yang melayang pelan di belakang card (murni CSS, tanpa aset luar) */
.orbit-auth-bg::before,
.orbit-auth-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.orbit-auth-bg::before {
  width: 480px; height: 480px;
  top: -160px; left: -140px;
  background: radial-gradient(circle, rgba(59,123,245,0.24) 0%, rgba(59,123,245,0) 70%);
  animation: orbitBlobFloat1 17s ease-in-out infinite;
}
.orbit-auth-bg::after {
  width: 440px; height: 440px;
  bottom: -150px; right: -120px;
  background: radial-gradient(circle, rgba(245,166,35,0.22) 0%, rgba(245,166,35,0) 70%);
  animation: orbitBlobFloat2 21s ease-in-out infinite;
}
/* Blob ketiga, lebih redup, di tengah-atas — dibuat lewat elemen di dalam card wrapper */
.orbit-auth-card, .orbit-auth-bg .reg-card { position: relative; z-index: 1; }

@keyframes orbitBgDrift {
  0%   { background-position: 35% 15%, 15% 90%; }
  100% { background-position: 65% 35%, 30% 70%; }
}
@keyframes orbitBlobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(50px, 60px) scale(1.12); }
  66%      { transform: translate(-25px, 25px) scale(0.94); }
}
@keyframes orbitBlobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-55px, -35px) scale(1.16); }
}
@keyframes orbitCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes orbitCardGlow {
  0%, 100% { box-shadow: 0 20px 60px rgba(11,22,40,0.28), 0 2px 10px rgba(11,22,40,0.12), 0 0 0 0 rgba(245,166,35,0); }
  50%      { box-shadow: 0 20px 60px rgba(11,22,40,0.28), 0 2px 10px rgba(11,22,40,0.12), 0 0 45px 6px rgba(245,166,35,0.14); }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-auth-bg, .orbit-auth-bg::before, .orbit-auth-bg::after,
  .orbit-auth-card, .orbit-auth-bg .orbit-card { animation: none !important; }
}

.orbit-auth-card {
  background: linear-gradient(135deg, var(--orbit-navy) 0%, var(--orbit-navy-mid) 60%, #0a2447 100%);
  border-radius: var(--radius-lg); padding: 2.25rem 1.75rem;
  box-shadow: 0 20px 60px rgba(11,22,40,0.28), 0 2px 10px rgba(11,22,40,0.12);
  width: 100%; max-width: 400px;
  color: #fff;
  animation: orbitCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1), orbitCardGlow 6s ease-in-out 0.7s infinite;
}
.orbit-auth-logo { font-size: 2.2rem; font-weight: 900; color: #fff; letter-spacing: -2px; }
.orbit-auth-logo span { color: var(--orbit-gold); }


/* Teks & elemen di dalam card auth (navy) dibuat cerah agar kontras */
.orbit-auth-card,
.orbit-auth-bg .reg-card { --text-primary: #fff; }
.orbit-auth-card p.text-muted,
.orbit-auth-card .text-muted { color: rgba(255,255,255,0.65) !important; }
.orbit-auth-card .form-label { color: #eef2f8; }
.orbit-auth-card .form-check-label { color: rgba(255,255,255,0.85); }
.orbit-auth-card .form-control,
.orbit-auth-card .form-select {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.orbit-auth-card .form-control::placeholder { color: rgba(255,255,255,0.45); }
.orbit-auth-card .form-control:focus,
.orbit-auth-card .form-select:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--orbit-gold);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(245,166,35,0.22);
}
.orbit-auth-card .input-group-text {
  background: rgba(255,255,255,0.09) !important;
  border-color: rgba(255,255,255,0.18);
}
.orbit-auth-card .input-group-text i { color: rgba(255,255,255,0.75) !important; }
/* Popup dropdown native selalu berlatar putih, jadi teks option dipaksa gelap */
.orbit-auth-card .form-select option {
  color: #0f1e38;
  background: #ffffff;
}
.orbit-auth-card hr { border-color: rgba(255,255,255,0.15); opacity: 1; }
.orbit-auth-card .btn-outline-secondary {
  color: #fff; border-color: rgba(255,255,255,0.35);
}
.orbit-auth-card .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.12); color: #fff; border-color: #fff;
}
.orbit-auth-card .btn-orbit {
  background: var(--orbit-gold); color: var(--orbit-navy);
}
.orbit-auth-card .btn-orbit:hover { background: var(--orbit-gold-dark); color: var(--orbit-navy); }
.orbit-auth-card .form-check-input {
  background-color: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}
.orbit-auth-card .form-check-input:checked {
  background-color: var(--orbit-gold);
  border-color: var(--orbit-gold);
}
.orbit-auth-card .alert { color: var(--text-primary); }

/* Kartu form registrasi (memakai .orbit-card) di dalam bg putih → navy juga */
.orbit-auth-bg .orbit-card {
  background: linear-gradient(160deg, var(--orbit-navy) 0%, var(--orbit-navy-mid) 65%, #0a2447 100%);
  border-color: rgba(255,255,255,0.08);
  animation: orbitCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.orbit-auth-bg .orbit-card .form-label { color: #eef2f8; }
.orbit-auth-bg .orbit-card .text-muted { color: rgba(255,255,255,0.6) !important; }
.orbit-auth-bg .orbit-card .form-control,
.orbit-auth-bg .orbit-card .form-select {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.orbit-auth-bg .orbit-card .form-control::placeholder { color: rgba(255,255,255,0.45); }
.orbit-auth-bg .orbit-card .form-control:focus,
.orbit-auth-bg .orbit-card .form-select:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--orbit-gold);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(245,166,35,0.22);
}
.orbit-auth-bg .orbit-card .input-group-text {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
}
/* Popup dropdown native selalu berlatar putih, jadi teks option dipaksa gelap */
.orbit-auth-bg .orbit-card .form-select option {
  color: #0f1e38;
  background: #ffffff;
}
.orbit-auth-bg .orbit-card .form-text { color: rgba(255,255,255,0.55); }
.orbit-auth-bg .orbit-card h6 { color: rgba(255,255,255,0.7) !important; }
.orbit-auth-bg .orbit-card .wilayah-badge { color: #0f1e38; }

/* ── Auth — Mobile ───────────────────────────────────────────── */
@media (max-width: 420px) {
  .orbit-auth-bg   { padding: 1rem 0.6rem; }
  .orbit-auth-card { padding: 1.6rem 1.1rem; }
  .orbit-auth-logo { font-size: 1.85rem; }
}

/* ══════════════════════════════════════════════════════════════
   KONFIGURASI SISTEM
══════════════════════════════════════════════════════════════ */
.kfg-banner {
  background: linear-gradient(135deg, #07101f 0%, #0d1e3d 50%, #0a1a30 100%);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem 1.85rem; position: relative; overflow: hidden;
}
.kfg-banner-glow {
  position: absolute; width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(239,68,68,.14) 0%, transparent 70%);
  top: -120px; right: -70px; pointer-events: none;
}
.kfg-banner-glow2 {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,.1) 0%, transparent 70%);
  bottom: -70px; left: 160px; pointer-events: none;
}
.kfg-banner-eyebrow { font-size: .6rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--orbit-gold); margin-bottom: .4rem; }
.kfg-banner-title { font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; margin-bottom: .3rem; }
.kfg-banner-sub { font-size: .79rem; color: rgba(255,255,255,.42); }
.kfg-tab-btn {
  display: inline-flex; align-items: center; gap: .35rem; padding: .33rem .85rem;
  border-radius: 50px; font-size: .76rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid #d5dae8; background: #fff; color: #4a5568; transition: all .16s ease; user-select: none;
}
.kfg-tab-btn:hover { border-color: #94a3b8; background: #f8fafc; }
.kfg-tab-count { font-size: .58rem; font-weight: 700; background: rgba(0,0,0,.1); border-radius: 50px; padding: .04rem .38rem; min-width: 16px; text-align: center; }
.kfg-panel { display: none; }
.kfg-panel.active { display: block; }
.kfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.4rem; }
.kfg-field { display: flex; flex-direction: column; }
.kfg-field.kfg-full { grid-column: 1 / -1; }
.kfg-toggle { width: 38px; height: 21px; appearance: none; -webkit-appearance: none; background: #d1d5db; border-radius: 50px; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.kfg-toggle::after { content: ''; position: absolute; width: 15px; height: 15px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.kfg-toggle:checked { background: #22c55e; }
.kfg-toggle:checked::after { left: 20px; }
.kfg-toggle-label { font-size: .80rem; color: #4b5563; user-select: none; }
.kfg-desc { font-size: .69rem; color: #94a3b8; }
.kfg-env-box { background: #fffbeb; border: 1.5px solid #fcd34d; border-radius: var(--radius-md); padding: .9rem 1.1rem; }
.kfg-danger-zone { background: #fef2f2; border: 1.5px solid #fecaca; border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.kfg-danger-zone h6 { color: #991b1b; font-size: .83rem; font-weight: 700; }
#kfg-toast-wrap { position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 9999; display: flex; flex-direction: column; gap: .45rem; pointer-events: none; }
.kfg-toast { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1rem; border-radius: var(--radius-md); background: #1e293b; color: #fff; font-size: .80rem; font-weight: 500; min-width: 270px; max-width: 360px; box-shadow: 0 8px 28px rgba(0,0,0,.25); animation: kfgSlideIn .22s ease; pointer-events: auto; }
.kfg-toast.kfg-success { border-left: 3px solid #22c55e; }
.kfg-toast.kfg-error   { border-left: 3px solid #ef4444; }
@keyframes kfgSlideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (max-width: 768px) { .kfg-grid { grid-template-columns: 1fr; } .kfg-banner { padding: 1.1rem; } .kfg-banner-title { font-size: 1.25rem; } }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile (< 992px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .orbit-sidebar {
    transform: translateX(-100%);
    width: var(--orbit-sidebar-w) !important;
  }
  .orbit-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .orbit-main { margin-left: 0 !important; }
  .orbit-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
  }
  .orbit-overlay.show { display: block !important; }
  #sidebarCollapseBtn { display: none !important; }
  .orbit-content { padding: 0.75rem !important; }
  .stat-card { padding: 0.9rem 1rem 0.85rem; min-height: 96px; }
  .sc-number { font-size: 1.8rem; }
  .sc-label  { font-size: 0.59rem; }
  .orbit-card .card-header { padding: 0.52rem 0.75rem 0.52rem 0.7rem; font-size: 0.74rem; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (< 576px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
  .orbit-content { padding: 0.5rem !important; }
  .orbit-topbar  { padding: 0 0.6rem; }

  /* Stat cards 2-per-row, super compact */
  .stat-card { padding: 0.75rem 0.8rem 0.7rem; border-radius: 11px; min-height: 86px; }
  .sc-number { font-size: 1.6rem; }
  .sc-label  { font-size: 0.56rem; }
  .sc-sub    { display: none; }
  .sc-icon   { font-size: 1rem; }

  .orbit-card { border-radius: 10px; }
  .orbit-card .card-header {
    padding: 0.48rem 0.65rem 0.48rem 0.6rem; font-size: 0.72rem; flex-wrap: wrap; gap: 3px;
  }
  .orbit-card .card-header a, .orbit-card .card-header .db-btn-detail { font-size: 0.64rem !important; padding: 0.1rem 0.45rem !important; }

  #chartRisk { max-height: 140px; }
  #chartTren { max-height: 160px; }
  .risk-legend-row .col-3 { padding: 0 3px; }
  .risk-legend-row .fw-bold { font-size: 0.9rem; }
  .risk-legend-row .small   { font-size: 0.6rem; }

  .orbit-table th { font-size: 0.65rem; padding: 0.4rem 0.5rem; }
  .orbit-table td { font-size: 0.75rem; padding: 0.4rem 0.5rem; }

  .notif-dropdown {
    width: calc(100vw - 0.8rem) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (576px–767px)
══════════════════════════════════════════════════════════════ */
@media (min-width: 576px) and (max-width: 767.98px) {
  .orbit-content { padding: 0.7rem !important; }
  .stat-card  { padding: 0.85rem 0.9rem; }
  #chartRisk  { max-height: 170px; }
  #chartTren  { max-height: 190px; }
}

/* ══════════════════════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════════════════════ */
@media print {
  .orbit-sidebar, .orbit-topbar, .btn, .alert { display: none !important; }
  .orbit-main { margin-left: 0 !important; }
  .orbit-content { padding: 0 !important; }
  @page { margin: 1.5cm; }
}

/* ── No-transition helper ──────────────────────────────────── */
.no-transition, .no-transition * { transition: none !important; }


/* ══════════════════════════════════════════════════════════════
   DASHBOARD v3 — Premium Bento Grid
   Signature: dark-navy card headers mirror the sidebar chrome,
   gold left-border accent ties every card to the brand.
══════════════════════════════════════════════════════════════ */

/* ── Page wrapper & background refinement ── */
.orbit-content {
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(59,123,245,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 5% 90%, rgba(245,166,35,0.04) 0%, transparent 60%);
}

/* ── Stat-card icon: more visible ── */
.sc-icon { font-size: 1.1rem; color: rgba(255,255,255,0.32); }
.sc-sup  { font-size: 0.9rem; font-weight: 700; vertical-align: super; letter-spacing: 0; line-height: 1; }
.sc-number { font-size: 1.85rem; letter-spacing: -0.05em; }

/* ── Dashboard CSS Grid ── */
.db-wrap   { display: grid; gap: 0.75rem; }
.db-kpi    { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; }
.db-main   { display: grid; grid-template-columns: 270px 1fr; gap: 0.75rem; align-items: stretch; }
.db-main > .orbit-card { display: flex; flex-direction: column; }
.db-main > .orbit-card .db-chart-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.db-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: stretch; }
.db-panels > .orbit-card { display: flex; flex-direction: column; }

/* ── Card body helpers ── */
.db-chart-inner { padding: 0.9rem 1rem 0.8rem; }

/* ── Donut legend ── */
.db-donut-legend {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 0.35rem; margin-top: 0.7rem;
  padding: 0.55rem 0.6rem;
  background: linear-gradient(135deg, rgba(11,22,40,0.03), rgba(11,22,40,0.015));
  border: 1px solid rgba(11,22,40,0.05);
  border-radius: 9px;
}
.db-donut-legend-item { text-align: center; padding: 0.1rem 0; }
.db-donut-legend-dot  { width: 7px; height: 7px; border-radius: 50%; margin: 0 auto 4px; }
.db-donut-legend-val  { font-size: 1.05rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.db-donut-legend-lbl  { font-size: 0.58rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── EWS list ── */
.db-ews-item {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(11,22,40,0.04);
  position: relative;
  transition: background 0.15s;
}
.db-ews-item:last-child { border-bottom: none; }
.db-ews-item:hover      { background: rgba(59,123,245,0.025); }
.db-ews-body   { flex: 1; min-width: 0; }
.db-ews-ormas  { font-size: 0.77rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.db-ews-msg    { font-size: 0.69rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-ews-meta   { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.db-ews-time   { font-size: 0.63rem; color: var(--text-muted); }
.db-ews-empty  { padding: 2.2rem 0; text-align: center; }
.db-ews-empty i { font-size: 1.75rem; color: #22c55e; display: block; margin-bottom: 0.4rem; opacity: 0.7; }
.db-ews-empty span { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; }

/* ── Status badges (custom, non-Bootstrap) ── */
.sb {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  padding: 0.17rem 0.52rem; border-radius: 20px;
  letter-spacing: 0.03em; white-space: nowrap; line-height: 1.4;
}
.sb-draft     { background: #e8ecf2;                     color: #4a5568; }
.sb-diajukan  { background: rgba(59,130,246,0.12);        color: #1d4ed8; }
.sb-review    { background: rgba(6,182,212,0.12);          color: #0c6a7e; }
.sb-disetujui { background: rgba(5,150,105,0.12);          color: #065f46; }
.sb-revisi    { background: rgba(245,158,11,0.13);         color: #854d0e; }
.sb-ditolak   { background: rgba(220,38,38,0.10);          color: #991b1b; }
.sb-tepat     { background: rgba(5,150,105,0.10);          color: #065f46; }
.sb-terlambat { background: rgba(220,38,38,0.10);          color: #991b1b; }

/* ── Risk table ── */
.db-risk-table { width: 100%; border-collapse: collapse; }
.db-risk-table thead th {
  background: #f5f7fc;
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.42rem 0.8rem;
  border-bottom: 1px solid #edf0f7;
  white-space: nowrap;
}
.db-risk-table tbody td {
  padding: 0.42rem 0.8rem; font-size: 0.77rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(11,22,40,0.03);
  vertical-align: middle;
}
.db-risk-table tbody tr:last-child td { border-bottom: none; }
.db-risk-table tbody tr:hover td     { background: rgba(59,123,245,0.025); }
.db-risk-name {
  font-weight: 600; font-size: 0.77rem; color: var(--orbit-accent);
  text-decoration: none; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
.db-risk-name:hover { text-decoration: underline; }
.db-risk-code { font-size: 0.6rem; color: var(--text-muted); margin-top: 1px; }
.db-score-bar  { height: 3px; border-radius: 3px; background: #e8ecf4; overflow: hidden; margin-top: 4px; }
.db-score-fill { height: 3px; border-radius: 3px; background: linear-gradient(90deg, #dc2626, #7f1d1d); transition: width 1s cubic-bezier(.22,.68,0,1.2); }

/* ── Laporan table ── */
.db-laporan-table { width: 100%; border-collapse: collapse; }
.db-laporan-table thead th {
  background: var(--orbit-navy);
  color: rgba(255,255,255,0.7);
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.48rem 0.9rem; border: none; white-space: nowrap;
}
.db-laporan-table thead th:first-child { border-left: 3px solid var(--orbit-gold); padding-left: calc(0.9rem - 1px); }
.db-laporan-table tbody td {
  padding: 0.4rem 0.9rem; font-size: 0.77rem;
  border-bottom: 1px solid rgba(11,22,40,0.035);
  vertical-align: middle; color: var(--text-primary);
}
.db-laporan-table tbody tr:last-child td { border-bottom: none; }
.db-laporan-table tbody tr:nth-child(even) td { background: rgba(11,22,40,0.012); }
.db-laporan-table tbody tr:hover td { background: rgba(59,123,245,0.03) !important; }
.db-ormas-name { font-weight: 600; color: var(--orbit-accent); text-decoration: none; font-size: 0.77rem; }
.db-ormas-name:hover { text-decoration: underline; }
.db-ormas-sub  { font-size: 0.63rem; color: var(--text-muted); }

/* ── Action buttons (light default, auto-dark inside card-header) ── */
.db-btn-detail {
  font-size: 0.67rem; padding: 0.15rem 0.55rem; border-radius: 5px;
  border: 1px solid #d5dce8; color: var(--text-muted); background: #fff;
  text-decoration: none; white-space: nowrap;
  transition: all 0.14s; display: inline-block;
}
.db-btn-detail:hover {
  border-color: var(--orbit-accent); color: var(--orbit-accent);
  background: rgba(59,123,245,0.04);
}

/* ── Critical alert banner ── */
.db-crit-banner {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(127,29,29,0.05);
  border: 1px solid rgba(127,29,29,0.2);
  border-left: 3px solid #7f1d1d;
  border-radius: 10px; padding: 0.6rem 0.9rem;
  animation: pulse-l3 2s infinite;
}
.db-crit-banner-text  { flex: 1; min-width: 0; }
.db-crit-banner-title { font-size: 0.75rem; font-weight: 700; color: #7f1d1d; }
.db-crit-banner-msg   { font-size: 0.69rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Dashboard breakpoints
══════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  .db-main { grid-template-columns: 240px 1fr; }
}

@media (max-width: 991.98px) {
  .db-main   { grid-template-columns: 1fr; }
  .db-panels { grid-template-columns: 1fr; }
  .sc-number { font-size: 1.65rem; }
  .db-wrap, .db-main, .db-panels { gap: 0.6rem; }
}

@media (max-width: 767.98px) {
  .db-kpi    { grid-template-columns: repeat(2,1fr); gap: 0.5rem; }
  .db-wrap   { gap: 0.5rem; }
  .stat-card { padding: 0.7rem 0.8rem 0.65rem; min-height: 82px; border-radius: 10px; }
  .sc-number { font-size: 1.5rem; }
  .sc-sub    { display: none; }
  .sc-label  { font-size: 0.57rem; }
  .db-risk-table td:nth-child(2), .db-risk-table th:nth-child(2),
  .db-risk-table td:nth-child(3), .db-risk-table th:nth-child(3) { display: none; }
}

@media (max-width: 575.98px) {
  .db-kpi  { gap: 0.4rem; }
  .db-wrap { gap: 0.42rem; }
  .stat-card { border-radius: 9px; padding: 0.62rem 0.7rem 0.58rem; min-height: 76px; }
  .sc-number { font-size: 1.35rem; }
  .sc-icon   { font-size: 0.95rem; }
  .db-chart-inner { padding: 0.65rem 0.7rem 0.6rem; }
  .db-laporan-table td:nth-child(3), .db-laporan-table th:nth-child(3),
  .db-laporan-table td:nth-child(4), .db-laporan-table th:nth-child(4) { display: none; }
  .db-crit-banner .btn { display: none; }
}