/* ==========================================================================
   SDIRBINDIKLAT PUSPOMAD — TNI AD Design System
   Warna Tentara: Hijau Militer · Khaki · Emas TNI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ─── TNI AD COLOR TOKENS ─────────────────────────────────────────────────── */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* TNI AD Primary Palette */
  --tni-dark:        #0D1F12;  /* Hitam hijau — sidebar utama */
  --tni-green-900:   #162A1B;  /* Hijau tua paling gelap */
  --tni-green-800:   #1E3D26;  /* Sidebar body */
  --tni-green-700:   #275233;  /* Hover sidebar */
  --tni-green-600:   #2E6639;  /* Active sidebar / primary button */
  --tni-green-500:   #3A7D44;  /* Lighter action green */
  --tni-green-400:   #52A05E;  /* Progress bar / badge */
  --tni-green-100:   #D1EDDB;  /* Success background */
  --tni-green-50:    #EBF6EE;  /* Very light green surface */

  /* Gold/Emas — aksen militer */
  --tni-gold:        #C4963A;  /* Emas TNI */
  --tni-gold-light:  #DEB96A;  /* Light gold */
  --tni-gold-50:     #FBF3E0;  /* Gold tint background */

  /* Status Colors */
  --status-success:  #2E6639;
  --status-warning:  #C4963A;
  --status-danger:   #8B1F1F;
  --status-info:     #1A4A6B;

  /* Neutrals */
  --gray-50:   #F8F9FA;
  --gray-100:  #F1F3F5;
  --gray-200:  #E8EAED;
  --gray-300:  #CDD1D6;
  --gray-400:  #9AA0A8;
  --gray-500:  #6B7280;
  --gray-600:  #4B5563;
  --gray-700:  #374151;
  --gray-800:  #1F2937;
  --gray-900:  #111827;

  /* Surface */
  --bg:        #F0F2F0;  /* Slight olive tint on background */
  --card:      #FFFFFF;
  --border:    #DDE1DC;
  --border-2:  #EEF0ED;

  /* Sidebar */
  --sidebar-bg:     var(--tni-dark);
  --sidebar-active: var(--tni-green-600);
  --sidebar-hover:  rgba(255,255,255,0.06);
  --sidebar-width:  230px;
  --sidebar-text:   #8BA892;

  /* Header */
  --header-height: 56px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 3px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-lg:  0 8px 20px rgba(0,0,0,0.09), 0 3px 8px rgba(0,0,0,0.05);
  --shadow-xl:  0 16px 32px rgba(0,0,0,0.11), 0 6px 12px rgba(0,0,0,0.06);

  /* Radius */
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --transition: 0.18s ease;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ─── PAGE LOADER ─────────────────────────────────────────────────────────── */
#pageLoader {
  position: fixed;
  inset: 0;
  background: var(--tni-dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#pageLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  width: 96px;
  height: auto;
  max-height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(196,150,58,0.7));
  animation: logoPulse 1.8s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { transform: scale(1);    filter: drop-shadow(0 0 20px rgba(196,150,58,0.5)); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 34px rgba(196,150,58,0.85)); }
}

.loader-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--tni-gold-light);
}

.loader-bar-track {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tni-green-500), var(--tni-gold));
  border-radius: 99px;
  animation: loaderBar 1.6s ease-in-out infinite;
}
@keyframes loaderBar {
  0%   { width: 0%;   margin-left: 0; }
  50%  { width: 70%;  margin-left: 0; }
  100% { width: 0%;   margin-left: 100%; }
}

.loader-dots {
  display: flex;
  gap: 6px;
}
.loader-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tni-green-400);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.18s; }
.loader-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes dotBounce {
  0%,80%,100% { transform: scale(0.7); opacity: 0.4; }
  40%          { transform: scale(1.2); opacity: 1; }
}

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
body.sidebar-collapsed .app-sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .app-main    { margin-left: 0; }

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  scrollbar-width: none;
}
.app-sidebar::-webkit-scrollbar { display: none; }

/* Sidebar top accent line */
.app-sidebar::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--tni-gold), var(--tni-green-500), var(--tni-gold));
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.sidebar-brand-logo {
  width: 84px;
  height: auto;
  max-height: 92px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(196,150,58,0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.sidebar-brand-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 6px 22px rgba(196,150,58,0.7));
}
.sidebar-brand-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #ECEDE8;
  line-height: 1.2;
  letter-spacing: 0.2px;
}
.sidebar-brand-sub {
  font-size: 9px;
  color: var(--sidebar-text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4A6652;
  padding: 10px 8px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--sidebar-text);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: #D8EDDB;
}
.nav-link .nav-icon {
  width: 16px;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0.65;
}
.nav-item.active .nav-link {
  background: var(--tni-green-700);
  color: #ECEDE8;
  font-weight: 600;
}
.nav-item.active .nav-link .nav-icon { opacity: 1; }
.nav-link:hover .nav-icon { opacity: 0.9; }

.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.03);
}
.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tni-green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #D0DDD3;
}
.sidebar-user-role {
  font-size: 9.5px;
  color: var(--sidebar-text);
}
.sidebar-logout-btn {
  background: none;
  border: none;
  color: #8B5555;
  font-size: 13px;
  padding: 4px;
  border-radius: 5px;
  margin-left: auto;
  flex-shrink: 0;
  transition: all var(--transition);
}
.sidebar-logout-btn:hover { background: rgba(139,85,85,0.15); color: #C47070; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* ─── HEADER ──────────────────────────────────────────────────────────────── */
.app-header {
  height: var(--header-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 13px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.header-toggle-btn:hover { background: var(--gray-100); color: var(--gray-800); }

.header-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-400);
}
.header-breadcrumb .page-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 12px;
  transition: all var(--transition);
}
.header-icon-btn:hover { background: var(--gray-100); color: var(--gray-800); }

/* Header clock */
.header-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  padding: 0 4px;
}
.header-clock-date {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--gray-400);
}
.header-clock-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}

/* User dropdown */
.header-user-menu { position: relative; }
.header-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  transition: all var(--transition);
}
.header-user-btn:hover { background: var(--gray-100); }
.header-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tni-green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
}
.header-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
}
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: 190px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 5px;
  display: none;
  z-index: 200;
}
.header-user-dropdown.open { display: block; animation: fadeIn 0.12s ease; }

.user-dropdown-info {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 3px;
}
.user-dropdown-info-name { font-size: 12px; font-weight: 700; color: var(--gray-800); }
.user-dropdown-info-email { font-size: 10.5px; color: var(--gray-500); }
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--gray-700);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition);
}
.user-dropdown-item:hover { background: var(--gray-100); }
.user-dropdown-item.danger { color: var(--status-danger); }
.user-dropdown-item.danger:hover { background: #FEF2F2; }

/* ─── CONTENT ─────────────────────────────────────────────────────────────── */
.content-body {
  flex: 1;
  padding: 14px 16px 12px;
  overflow-x: hidden;
}
/* Dashboard page: comfortable scroll — 1.2x viewport, no cramping */
body.page-dashboard .content-body {
  padding: 12px 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
}
/* Footer tetap tampil tapi compact */
body.page-dashboard .app-footer {
  padding: 8px 20px;
}
body.page-dashboard .app-main {
  overflow-y: auto;
}

/* ─── PAGE HEADER ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-header-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}
.page-header-text p {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  max-width: 600px;
}

/* ─── CARDS ───────────────────────────────────────────────────────────────── */
/* ─── CARDS (Mixed White & TNI Military Palette) ──────────────────────────── */
.card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFCFA 100%);
  border: 1px solid rgba(46, 102, 57, 0.16);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(30, 61, 38, 0.05);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  border-color: rgba(46, 102, 57, 0.3);
  box-shadow: 0 6px 20px rgba(30, 61, 38, 0.09);
}
.card-padded { padding: 16px; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, #F0F6F1 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(46, 102, 57, 0.12);
  border-left: 3.5px solid var(--tni-green-600);
  gap: 12px;
}
.card-header.header-gold {
  background: linear-gradient(90deg, #FAF6EE 0%, #FFFFFF 100%);
  border-left-color: var(--tni-gold);
  border-bottom-color: rgba(196, 150, 58, 0.16);
}
.card-header.header-blue {
  background: linear-gradient(90deg, #EEF4F8 0%, #FFFFFF 100%);
  border-left-color: #1A4A6B;
  border-bottom-color: rgba(26, 74, 107, 0.16);
}
.card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1E3D26;
  letter-spacing: 0.1px;
}
.card-action {
  font-size: 11px;
  font-weight: 700;
  color: var(--tni-green-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: opacity var(--transition);
}
.card-action:hover { opacity: 0.75; }

/* ─── KPI CARDS (Mixed White + TNI Accent Tones) ──────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.kpi-card {
  background: linear-gradient(135deg, #FFFFFF 50%, var(--kpi-bg, #F2F8F4) 100%);
  border: 1px solid var(--kpi-border, rgba(46, 102, 57, 0.18));
  border-top: 3.5px solid var(--kpi-color, var(--tni-green-600));
  border-radius: var(--r-lg);
  padding: 16px 18px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  transition: box-shadow var(--transition), transform var(--transition);
}
.kpi-card:hover {
  box-shadow: 0 6px 20px rgba(46,102,57,0.1);
  transform: translateY(-2px);
}
.kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #4A6652;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: #1E3D26;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.kpi-sub {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.4;
}
.kpi-progress-track {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
}
.kpi-progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--kpi-color, var(--tni-green-500));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* ─── RINGKASAN BIDANG (User Provided Reference Component) ───────────────── */
.ringkasan-bidang-section {
  background: var(--card);
  border: 1px solid rgba(46, 102, 57, 0.16);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(30, 61, 38, 0.04);
}
.ringkasan-bidang-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1E3A8A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.ringkasan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ringkasan-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  position: relative;
}
.ringkasan-card:hover {
  border-color: var(--rk-color, #2E6639);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.ringkasan-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}
.ringkasan-icon {
  font-size: 16px;
  color: var(--rk-color);
}
.ringkasan-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--rk-color);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.ringkasan-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ringkasan-stats {
  display: flex;
  flex-direction: column;
}
.ringkasan-stat-lbl {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 2px;
}
.ringkasan-stat-val-main {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1;
  margin-bottom: 8px;
}
.ringkasan-stat-val-sub {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}

/* Circular Progress Ring */
.ringkasan-ring-wrap {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ringkasan-ring-svg {
  transform: rotate(-90deg);
  width: 70px;
  height: 70px;
}
.ringkasan-ring-pct {
  position: absolute;
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

/* Button Lihat Detail */
.ringkasan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
  width: 100%;
}
.ringkasan-btn:hover {
  background: #F8FAFC;
  border-color: var(--rk-color);
  color: var(--rk-color);
}
.ringkasan-btn i {
  font-size: 11px;
  transition: transform 0.18s ease;
}
.ringkasan-btn:hover i {
  transform: translateX(3px);
}

/* ─── DASHBOARD GRID (Symmetrical & Balanced) ────────────────────────────── */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.dash-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

/* Grid Baris 3: Peta (diperkecil tapi panjang) & Status Kesiapan */
.dash-grid-map {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.card-stretch {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-stretch > .card-body-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dash-row         { display: grid; gap: 12px; margin-bottom: 14px; }
.dash-row-2-3     { grid-template-columns: 2fr 1.2fr; }
.dash-row-3       { grid-template-columns: 1fr 1fr 1fr; }
.dash-row-2-equal { grid-template-columns: 1fr 1fr; }

/* ─── ALERT STRIP ─────────────────────────────────────────────────────────── */
.alert-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-strip-warning {
  background: var(--tni-gold-50);
  border-color: #E8C87A;
  color: #7A5C1E;
}
.alert-strip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tni-gold);
  flex-shrink: 0;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ─── TW BOXES ────────────────────────────────────────────────────────────── */
.tw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.tw-box {
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.tw-box-label { font-size: 9.5px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.tw-box-value { font-size: 20px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; line-height: 1; }
.tw-box-sub   { font-size: 10px; color: var(--gray-400); margin-top: 2px; }

/* ─── CHART ───────────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 180px; }

/* ─── TABLES ──────────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table thead th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border-2); transition: background var(--transition); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--tni-green-50); }
.data-table tbody td { padding: 10px 14px; vertical-align: middle; }
.data-table td.font-medium { font-weight: 600; color: var(--gray-800); }
.data-table td.text-muted  { font-size: 11.5px; color: var(--gray-500); }
.data-table td.text-center { text-align: center; }
.data-table td.text-right  { text-align: right; }

/* ─── BADGES ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-green  { background: var(--tni-green-50);  color: var(--tni-green-600);  }
.badge-gold   { background: var(--tni-gold-50);   color: #7A5C1E; }
.badge-red    { background: #FEF2F2;               color: #8B1F1F; }
.badge-blue   { background: #EFF6FF;               color: #1D4ED8; }
.badge-gray   { background: var(--gray-100);       color: var(--gray-600); }
.badge-violet { background: #F5F3FF;               color: #6D28D9; }
.badge-amber  { background: var(--tni-gold-50);   color: var(--tni-gold); }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--tni-green-600);
  color: #fff;
  border-color: var(--tni-green-600);
}
.btn-primary:hover {
  background: var(--tni-green-500);
  border-color: var(--tni-green-500);
}
.btn-secondary {
  background: var(--card);
  color: var(--gray-700);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--gray-100); }
.btn-sm { padding: 4px 10px; font-size: 11.5px; }
.btn-icon {
  width: 28px; height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: 12px;
}
.btn-edit   { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.btn-edit:hover { background: #DBEAFE; }
.btn-delete { background: #FEF2F2; color: #8B1F1F; border-color: #FCA5A5; }
.btn-delete:hover { background: #FEE2E2; }

/* ─── FORMS ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 8px 11px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--tni-green-500);
  box-shadow: 0 0 0 3px rgba(46,102,57,0.1);
}
.form-control::placeholder { color: var(--gray-300); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ─── MODALS ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.active { display: flex; animation: fadeIn 0.15s ease; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.18s ease;
  border: 1px solid var(--border);
}
.modal-lg { max-width: 560px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-2);
  flex-shrink: 0;
}
.modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
/* Green accent on modal header top */
.modal::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--tni-green-600), var(--tni-gold));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  flex-shrink: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 17px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-2);
  flex-shrink: 0;
}

/* ─── TOOLBAR ─────────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.search-box { position: relative; width: 200px; }
.search-box-icon {
  position: absolute;
  left: 9px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 11px;
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 6px 9px 6px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition);
}
.search-box input:focus { border-color: var(--tni-green-500); }
.search-box input::placeholder { color: var(--gray-300); }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  padding: 2px;
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.filter-tab {
  padding: 4px 11px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-tab.active {
  background: var(--card);
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

/* ─── ACTION BUTTONS ──────────────────────────────────────────────────────── */
.action-group { display: flex; align-items: center; gap: 3px; }

/* ─── ALERTS ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-success {
  background: var(--tni-green-50);
  border-color: var(--tni-green-100);
  color: var(--tni-green-600);
}
.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 13px;
}

/* ─── PROGRESS BAR ────────────────────────────────────────────────────────── */
.progress-track { height: 5px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.progress-bar   { height: 100%; border-radius: 99px; transition: width 0.6s ease; }

/* ─── ACTIVITY / TIMELINE ─────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--transition);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--tni-green-50); }
.activity-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.activity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tni-green-500);
  flex-shrink: 0;
}
.activity-line { width: 1px; flex: 1; background: var(--border); margin-top: 4px; }
.activity-content { flex: 1; min-width: 0; }
.activity-text  { font-size: 12px; font-weight: 500; color: var(--gray-700); line-height: 1.35; }
.activity-meta  { font-size: 10.5px; color: var(--gray-400); margin-top: 1px; }

/* ─── PROGRAM LIST ────────────────────────────────────────────────────────── */
.program-list { display: flex; flex-direction: column; }
.program-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--transition);
}
.program-item:last-child { border-bottom: none; }
.program-item:hover { background: var(--tni-green-50); }
.program-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}
.program-info { flex: 1; min-width: 0; }
.program-name { font-size: 12px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.program-meta { font-size: 10.5px; color: var(--gray-500); margin-top: 1px; }
.program-status { flex-shrink: 0; text-align: right; }

/* ─── DONUT ───────────────────────────────────────────────────────────────── */
.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.donut-svg { transform: rotate(-90deg); }
.donut-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.donut-pct { font-size: 19px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.donut-lbl { font-size: 9px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.3px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; }
.donut-legend-label { display: flex; align-items: center; gap: 7px; color: var(--gray-600); font-weight: 500; }
.donut-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.donut-legend-val { font-weight: 700; color: var(--gray-800); }

/* ─── TOGGLE CHECK ────────────────────────────────────────────────────────── */
.toggle-check {
  width: 24px; height: 24px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--gray-300);
}
.toggle-check.checked {
  background: var(--tni-green-50);
  border-color: var(--tni-green-100);
  color: var(--tni-green-600);
}
.toggle-check:hover { border-color: var(--tni-green-500); color: var(--tni-green-500); }

/* ─── SUMMARY STRIP (Stats row below page header) ─────────────────────────── */
.stat-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.stat-strip-item {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.stat-strip-label { font-size: 9.5px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.stat-strip-val   { font-size: 20px; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; line-height: 1; }

/* ─── MINI STAT (inline in cards) ────────────────────────────────────────── */
.mini-stat-row { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border-2); }
.mini-stat { display: flex; flex-direction: column; gap: 1px; }
.mini-stat-val { font-size: 15px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.mini-stat-label { font-size: 10px; color: var(--gray-500); font-weight: 500; }

/* ─── DIVIDER ─────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border-2); margin: 12px 0; }

/* ─── EMPTY STATE ─────────────────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--gray-400); text-align: center; }
.empty-state i { font-size: 28px; margin-bottom: 10px; }
.empty-state p { font-size: 12.5px; }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.app-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-text { font-size: 11px; color: var(--gray-400); }

/* ─── FLOATING REALTIME NOTIFICATION ────────────────────────────────────────── */
.float-notif {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.float-notif-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tni-green-600);
  border: 2px solid var(--tni-gold);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(46,102,57,0.4);
  transition: all 0.2s ease;
  position: relative;
}
.float-notif-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(46,102,57,0.5);
}
.float-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tni-gold);
  color: #1E3D26;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: blink 2s ease-in-out infinite;
}

.float-notif-panel {
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
  animation: slideUp 0.2s ease;
}
.float-notif-panel.open { display: block; }

.float-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--tni-green-900);
  color: #D8EDDB;
}
.float-notif-header-title {
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.float-notif-refresh {
  font-size: 10.5px;
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.float-notif-refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52A05E;
  animation: blink 1.5s ease-in-out infinite;
}
.float-notif-countdown {
  font-size: 10.5px;
  color: var(--tni-gold-light);
  font-weight: 600;
}

.float-notif-body { padding: 6px 0; max-height: 280px; overflow-y: auto; }
.float-notif-item {
  display: flex;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.15s;
  cursor: pointer;
}
.float-notif-item:last-child { border-bottom: none; }
.float-notif-item:hover { background: var(--tni-green-50); }
.float-notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.float-notif-item-text { flex: 1; min-width: 0; }
.float-notif-item-title { font-size: 11.5px; font-weight: 600; color: var(--gray-800); }
.float-notif-item-desc  { font-size: 10.5px; color: var(--gray-500); margin-top: 1px; line-height: 1.4; }
.float-notif-item-time  { font-size: 10px; color: var(--gray-400); white-space: nowrap; }

.float-notif-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-50);
}
.float-notif-footer-text { font-size: 10px; color: var(--gray-500); }

/* ─── COMMAND CENTER TACTICAL ALERT STRIP ───────────────────────────────────── */
.tactical-alert-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(13, 31, 18, 0.95) 0%, rgba(22, 42, 27, 0.95) 100%);
  border: 1px solid rgba(196, 150, 58, 0.35);
  border-left: 4px solid var(--tni-gold);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  color: #ECEDE8;
  flex-wrap: wrap;
}
.tactical-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tactical-beacon {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(46, 102, 57, 0.4);
  border: 1px solid rgba(82, 160, 94, 0.5);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #8CE89E;
  text-transform: uppercase;
}
.tactical-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  animation: tniPulseBeacon 1.5s infinite;
}
@keyframes tniPulseBeacon {
  0% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.8; }
}
.tactical-alert-text {
  font-size: 12px;
  font-weight: 500;
  color: #D2DDD5;
}
.tactical-alert-text strong {
  color: var(--tni-gold-light);
  font-weight: 700;
}
.tactical-alert-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tactical-meta-chip {
  font-size: 10px;
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 3px 8px;
  border-radius: 4px;
  color: #9AA0A8;
  border: 1px solid rgba(255,255,255,0.06);
}
.tactical-meta-chip span {
  color: var(--tni-gold-light);
  font-weight: 700;
}

/* ─── OPENSTREETMAP LEAFLET TACTICAL HERO ─────────────────────────────────── */
.osm-command-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.osm-hud-header {
  background: linear-gradient(90deg, #0D1F12 0%, #162A1B 100%);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(196, 150, 58, 0.25);
  color: #ECEDE8;
}

.osm-hud-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #F0F2EE;
  text-transform: uppercase;
}
.osm-hud-badge {
  background: rgba(196, 150, 58, 0.2);
  border: 1px solid var(--tni-gold);
  color: var(--tni-gold-light);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.osm-hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.osm-btn-group {
  display: flex;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2px;
}
.osm-hud-btn {
  background: none;
  border: none;
  color: #8BA892;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.osm-hud-btn:hover {
  color: #FFFFFF;
  background: rgba(255,255,255,0.08);
}
.osm-hud-btn.active {
  background: var(--tni-green-600);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.osm-map-container {
  position: relative;
  width: 100%;
  height: 330px;
  min-height: 330px;
  background: #0D1F12;
  overflow: hidden;
}
#osmMap {
  width: 100%;
  height: 100%;
  min-height: 330px;
  z-index: 10;
}

/* ─── KESIAPAN & DIREKTORI CARD (MATCHING HEIGHT) ────────────────────────── */
.kesiapan-dir-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FCFA 100%);
  border: 1px solid rgba(46, 102, 57, 0.16);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(30, 61, 38, 0.05);
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.kesiapan-dir-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  overflow: hidden;
}
.satuan-dir-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 185px;
  border: 1px solid rgba(46, 102, 57, 0.15);
  border-radius: var(--r-md);
  margin-top: 6px;
  background: #FFFFFF;
}

/* Coordinates overlay HUD */
.osm-coord-hud {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 400;
  background: rgba(13, 31, 18, 0.88);
  border: 1px solid rgba(196, 150, 58, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: monospace;
  font-size: 10px;
  color: #A7C4AE;
  backdrop-filter: blur(4px);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.osm-coord-hud span {
  color: var(--tni-gold-light);
  font-weight: 700;
}

/* Quick Legend Bar */
.osm-legend-bar {
  background: #F8F9FA;
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
}
.osm-legend-items {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.osm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--gray-700);
  font-size: 11px;
}
.osm-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.osm-legend-summary {
  font-size: 11px;
  color: var(--gray-500);
}
.osm-legend-summary strong {
  color: var(--tni-green-600);
}

/* ─── CUSTOM TACTICAL MAP MARKERS ─────────────────────────────────────────── */
.tni-pulse-pin {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tni-pulse-core {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px rgba(0,0,0,0.45);
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tni-pulse-pin:hover .tni-pulse-core {
  transform: scale(1.3);
  box-shadow: 0 0 12px #C4963A;
}
.tni-pulse-wave {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  opacity: 0.8;
  animation: tniRadarSweep 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: 1;
  pointer-events: none;
}
@keyframes tniRadarSweep {
  0%   { transform: scale(0.3); opacity: 0.9; }
  60%  { transform: scale(1.5); opacity: 0.15; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* HQ Special Marker */
.tni-pulse-pin.is-hq .tni-pulse-core {
  width: 16px;
  height: 16px;
  border-color: #FEF3C7;
  box-shadow: 0 0 12px #C4963A;
}

/* ─── LEAFLET POPUP OVERRIDE (Tactical Dark & Gold) ───────────────────────── */
.leaflet-popup-content-wrapper {
  background: rgba(13, 31, 18, 0.97) !important;
  border: 1px solid var(--tni-gold) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6) !important;
  color: #ECEDE8 !important;
  padding: 0 !important;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  width: 250px !important;
}
.leaflet-popup-tip-container {
  overflow: visible;
}
.leaflet-popup-tip {
  background: #0D1F12 !important;
  border-right: 1px solid var(--tni-gold) !important;
  border-bottom: 1px solid var(--tni-gold) !important;
  box-shadow: none !important;
}
.leaflet-container a.leaflet-popup-close-button {
  color: var(--tni-gold-light) !important;
  padding: 6px 8px !important;
  font-size: 16px !important;
  top: 4px !important;
  right: 4px !important;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  color: #FFFFFF !important;
}

.tni-popup-card {
  padding: 14px;
}
.tni-popup-header {
  border-bottom: 1px solid rgba(196, 150, 58, 0.3);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.tni-popup-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--tni-gold-light);
  display: inline-block;
  margin-bottom: 2px;
}
.tni-popup-name {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}
.tni-popup-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.tni-popup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #A7C4AE;
}
.tni-popup-val {
  font-weight: 700;
  color: #FFFFFF;
}
.tni-popup-btn {
  margin-top: 10px;
  display: block;
  width: 100%;
  text-align: center;
  background: var(--tni-green-600);
  color: #FFFFFF;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.18s;
}
.tni-popup-btn:hover {
  background: var(--tni-green-500);
  color: #FFFFFF;
}

/* ─── DIRECTORY LIST OF SATUAN (Interactive Pomdam sidebar list) ───────────── */
.satuan-dir-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.satuan-dir-list {
  max-height: 310px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.satuan-dir-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-2);
  transition: all 0.15s ease;
  cursor: pointer;
}
.satuan-dir-item:last-child {
  border-bottom: none;
}
.satuan-dir-item:hover {
  background: var(--tni-green-50);
  padding-left: 17px;
}
.satuan-dir-info {
  flex: 1;
  min-width: 0;
}
.satuan-dir-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.satuan-dir-sub {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 1px;
}
.satuan-dir-action {
  font-size: 10px;
  font-weight: 700;
  color: var(--tni-green-600);
  background: var(--tni-green-50);
  border: 1px solid var(--tni-green-100);
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.satuan-dir-item:hover .satuan-dir-action {
  background: var(--tni-green-600);
  color: #FFFFFF;
  border-color: var(--tni-green-600);
}

/* ─── TACTICAL RADAR & BAR CHARTS (Side by Side Below Map) ─────────────────── */
.chart-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.command-center-layout {
  display: grid;
  grid-template-columns: 1.95fr 1.05fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

/* ─── NOTIF WIDGET ────────────────────────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--tni-green-50); }
.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 12px; font-weight: 600; color: var(--gray-800); }
.notif-desc  { font-size: 11px; color: var(--gray-500); margin-top: 1px; line-height: 1.4; }
.notif-time  { font-size: 10.5px; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .ringkasan-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-grid-map { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .command-center-layout { grid-template-columns: 1fr; }
  .chart-subgrid { grid-template-columns: 1fr; }
  .dash-row-2-3 { grid-template-columns: 1fr; }
  .dash-row-3   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0 !important; }
  .ringkasan-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-grid-map { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row-3   { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tw-grid { grid-template-columns: repeat(2, 1fr); }
  .osm-map-container { min-height: 360px; height: 360px; }
  #osmMap { min-height: 360px; }
}
@media (max-width: 600px) {
  .content-body { padding: 14px; }
  .ringkasan-grid { grid-template-columns: 1fr; }
  .dash-grid-4 { grid-template-columns: 1fr; }
  .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-grid-map { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .tw-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .dash-row-2-equal { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .stat-strip { flex-direction: row; }
  .osm-map-container { min-height: 280px; height: 280px; }
  #osmMap { min-height: 280px; }
  .osm-hud-header { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════════
   COMPACT SINGLE-PAGE DASHBOARD SYSTEM — db-* namespace
   Design: Military Command Center · Padat · Satu Layar Penuh
   ══════════════════════════════════════════════════════════════════════ */

/* ─── ALERT TICKER ───────────────────────────────────────────────────────── */
.db-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0D1F12 0%, #162A1B 100%);
  border: 1px solid rgba(196,150,58,0.3);
  border-left: 3px solid #C4963A;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 12px;
  color: #D2DDD5;
  font-size: 11.5px;
  overflow: hidden;
}
/* Titik merah hidup — tanpa tulisan LIVE */
.db-ticker-dot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.db-ticker-dot {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.7);
  animation: dbDotPulse 1.8s ease-in-out infinite;
}
.db-ticker-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(239,68,68,0.25);
  animation: dbDotPulse 1.8s ease-in-out infinite 0.3s;
}
@keyframes dbDotPulse {
  0%   { transform: scale(0.85); opacity: 0.9; box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50%  { transform: scale(1.15); opacity: 1;   box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { transform: scale(0.85); opacity: 0.9; box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* Titik merah di header peta (kecil) */
.db-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.8);
  animation: dbDotPulse 1.8s ease-in-out infinite;
}
.db-ticker-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #34D399;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  animation: tniPulseBeacon 1.5s infinite;
}
.db-ticker-text {
  flex: 1;
  font-size: 11.5px;
  color: #B8C9BB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-ticker-text strong { color: #DEB96A; }
.db-ticker-chips {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.db-chip {
  font-size: 9px;
  font-weight: 700;
  font-family: monospace;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
  letter-spacing: 0.3px;
}
.db-chip.green { color: #34D399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.db-chip.gold  { color: #DEB96A; border-color: rgba(196,150,58,0.3); background: rgba(196,150,58,0.08); }

/* ─── METRIC STRIP ROW 1 ─────────────────────────────────────────────────── */
.db-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.db-metric-card {
  background: #FFFFFF;
  border: 1px solid rgba(46,102,57,0.15);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  transition: all 0.18s ease;
}
.db-metric-card:hover {
  border-color: rgba(46,102,57,0.4) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.db-metric-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.db-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.db-metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6B7280;
  margin-bottom: 1px;
  line-height: 1.2;
}
.db-metric-val {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1;
  margin-bottom: 1px;
}
.db-metric-sub {
  font-size: 10px;
  color: #9AA0A8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  margin-top: 1px;
}
.db-metric-ring {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.db-metric-ring-pct {
  position: absolute;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* ─── MAIN 3-COLUMN GRID ─────────────────────────────────────────────────── */
.db-main-grid {
  display: grid;
  /* Map 45% lebih lebar · Charts auto lebih kecil · Right sidebar fixed */
  grid-template-columns: 45% 1fr 236px;
  grid-template-rows: 1fr;
  gap: 10px;
  height: calc(100vh - 148px);
  min-height: 460px;
  max-height: none;
  overflow: hidden;
}
.db-col-map    { grid-column: 1; display: flex; flex-direction: column; overflow: hidden; }
.db-col-charts { grid-column: 2; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.db-col-right  { grid-column: 3; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.h100 { height: 100%; }

/* ─── DB CARD ─────────────────────────────────────────────────────────────── */
.db-card {
  background: #FFFFFF;
  border: 1px solid rgba(46,102,57,0.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}
.db-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #F0F6F1, #FFFFFF);
  border-bottom: 1px solid rgba(46,102,57,0.1);
  border-left: 3px solid #2E6639;
  flex-shrink: 0;
}
.db-card-header.dark {
  background: linear-gradient(90deg, #0D1F12, #162A1B);
  border-left-color: #C4963A;
  border-bottom-color: rgba(196,150,58,0.25);
}
.db-card-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.db-card-title-group > i { font-size: 11px; flex-shrink: 0; }
.db-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1E3D26;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-card-header.dark .db-card-title { color: #ECEDE8; }
.db-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.db-badge.green { background: rgba(46,102,57,0.12); color: #2E6639; border: 1px solid rgba(46,102,57,0.25); }
.db-badge.gold  { background: rgba(196,150,58,0.12); color: #B27D25; border: 1px solid rgba(196,150,58,0.3); }
.db-badge.blue  { background: rgba(37,99,235,0.1); color: #2563EB; border: 1px solid rgba(37,99,235,0.25); }
.db-link {
  font-size: 9.5px;
  font-weight: 700;
  color: #2E6639;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.db-link:hover { opacity: 0.7; }

/* ─── FLOATING HUD MAP CONTROLS (DI DALAM PETA) ─────────────────────────── */
.db-map-hud-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(13, 31, 18, 0.88);
  border: 1px solid rgba(196, 150, 58, 0.4);
  border-radius: 7px;
  padding: 4px 6px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  pointer-events: auto;
}
.db-btn-grp { display: flex; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; padding: 1px; }
.db-map-btn {
  background: none; border: none; color: #8BA892;
  font-size: 9.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.db-map-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.db-map-btn.active { background: #2E6639; color: #fff; font-weight: 700; }
.db-map-btn-hq {
  background: rgba(196,150,58,0.2);
  border: 1px solid rgba(196,150,58,0.4);
  color: #DEB96A;
  font-size: 9.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}
.db-map-btn-hq:hover { background: rgba(196,150,58,0.35); }

/* ─── COORDINATE HUD ─────────────────────────────────────────────────────── */
.db-coord-hud {
  position: absolute;
  bottom: 8px; left: 8px; z-index: 400;
  background: rgba(13,31,18,0.88);
  border: 1px solid rgba(196,150,58,0.35);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: monospace;
  font-size: 9px;
  color: #A7C4AE;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ─── POMDAM CHIP STRIP ──────────────────────────────────────────────────── */
.db-pomdam-strip {
  background: #F8FAF8;
  border-top: 1px solid rgba(46,102,57,0.1);
  padding: 4px 8px;
  flex-shrink: 0;
}
.db-pomdam-list {
  display: flex;
  flex-wrap: nowrap;         /* TIDAK wrap — scroll horizontal */
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* IE */
  padding-bottom: 1px;
}
.db-pomdam-list::-webkit-scrollbar { display: none; }
.db-pomdam-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: 2px solid var(--chip-color, #2E6639);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 8.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.db-pomdam-chip:hover {
  background: #F0F6F1;
  border-color: var(--chip-color, #2E6639);
  color: #1E3D26;
}
.db-pomdam-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── PROGRAM DIKLAT ROWS ─────────────────────────────────────────────────── */
.db-prog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(46,102,57,0.07);
  transition: background 0.15s;
}
.db-prog-row:last-child { border-bottom: none; }
.db-prog-row:hover { background: #F7FBF8; }
.db-prog-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.db-prog-info { flex: 1; min-width: 0; }
.db-prog-name { font-size: 11.5px; font-weight: 600; color: #1E3D26; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-prog-date { font-size: 10px; color: #9AA0A8; margin-top: 1px; }
.db-prog-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

/* ─── SATUAN LIST ROWS ───────────────────────────────────────────────────── */
.db-satuan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 3px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.db-satuan-row:hover { background: rgba(46,102,57,0.06); }

/* ─── RESPONSIVE: COMPACT DASHBOARD ─────────────────────────────────────── */
@media (max-width: 1400px) {
  .db-main-grid { grid-template-columns: 44% 1fr 218px; }
}
@media (max-width: 1200px) {
  .db-main-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 420px auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  body.page-dashboard .content-body { overflow-y: auto; }
  .db-col-map    { grid-column: 1 / 3; }
  .db-col-charts { grid-column: 1; }
  .db-col-right  { grid-column: 2; }
  .db-metric-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .db-main-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .db-col-map, .db-col-charts, .db-col-right { grid-column: 1; }
  .db-metric-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .db-metric-strip { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .db-ticker-chips { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   MODUL OPERASIONAL PENDIDIKAN — TNI AD MILITARY DATA TABLE & KPI
   ══════════════════════════════════════════════════════════════════════ */

/* ─── KPI SUMMARY CARDS ─────────────────────────────────────────────────── */
.kpi-diklat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-diklat-card {
  background: #FFFFFF;
  border: 1px solid rgba(46, 102, 57, 0.16);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.kpi-diklat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.kpi-diklat-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.kpi-diklat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.kpi-diklat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  line-height: 1.2;
}
.kpi-diklat-val {
  font-size: 22px;
  font-weight: 800;
  color: #0D1F12;
  line-height: 1;
}
.kpi-diklat-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ─── DATA TABLE CARD & TOOLBAR ─────────────────────────────────────────── */
.diklat-table-card {
  background: #FFFFFF;
  border: 1px solid rgba(46, 102, 57, 0.18);
  border-radius: 10px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.04);
  overflow: hidden;
}
.diklat-toolbar {
  padding: 12px 16px;
  background: linear-gradient(90deg, #FAFDFB 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(46, 102, 57, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.diklat-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F2;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(46, 102, 57, 0.1);
}
.diklat-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.diklat-tab-btn:hover {
  color: #1E3D26;
  background: rgba(255,255,255,0.6);
}
.diklat-tab-btn.active {
  background: #FFFFFF;
  color: #1E3D26;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.diklat-tab-count {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: #E5EBE6;
  color: #374151;
}
.diklat-tab-btn.active .diklat-tab-count {
  background: #EBF6EE;
  color: #2E6639;
}

.diklat-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.diklat-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.diklat-search-box i {
  position: absolute;
  left: 10px;
  color: #9AA0A8;
  font-size: 12px;
}
.diklat-search-input {
  padding: 7px 12px 7px 30px;
  border: 1px solid #DDE1DC;
  border-radius: 6px;
  font-size: 11.5px;
  width: 220px;
  background: #FFFFFF;
  color: #1F2937;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.diklat-search-input:focus {
  outline: none;
  border-color: #2E6639;
  box-shadow: 0 0 0 3px rgba(46, 102, 57, 0.12);
}

/* ─── DATA TABLE ROWS & CELLS ─────────────────────────────────────────────── */
.table-diklat-military {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table-diklat-military thead th {
  background: #F4F7F4;
  color: #385E3E;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  border-bottom: 2px solid rgba(46, 102, 57, 0.18);
  white-space: nowrap;
}
.table-diklat-military tbody tr {
  border-bottom: 1px solid #EEF1ED;
  transition: background 0.15s ease;
}
.table-diklat-military tbody tr:last-child {
  border-bottom: none;
}
.table-diklat-military tbody tr:hover {
  background: #F4F8F5;
}
.table-diklat-military tbody td {
  padding: 11px 14px;
  vertical-align: middle;
}

.diklat-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #F1F4F1;
  color: #4B5563;
  font-size: 10.5px;
  font-weight: 700;
}
.diklat-name-title {
  font-weight: 700;
  color: #112616;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 2px;
}
.diklat-name-desc {
  font-size: 11px;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 5px;
}
.diklat-siswa-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EBF6EE;
  color: #1E3D26;
  border: 1px solid rgba(46, 102, 57, 0.2);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.diklat-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}
.diklat-date-chip i {
  font-size: 10px;
  color: #9AA0A8;
}

/* ─── DURASI AUTO CONVERSION BADGES ─────────────────────────────────────── */
.durasi-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.durasi-badge-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #FBF6EC 0%, #F5E8CB 100%);
  color: #7D5714;
  border: 1px solid rgba(196, 150, 58, 0.35);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.durasi-detail-sub {
  font-size: 9px;
  color: #78716C;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* ─── STATUS PILL WITH PULSE DOT ─────────────────────────────────────────── */
.status-pill-tni {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill-tni.selesai {
  background: #EBF6EE;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.25);
}
.status-pill-tni.berjalan {
  background: #FEF9C3;
  color: #854D0E;
  border-color: rgba(133, 77, 14, 0.25);
}
.status-pill-tni.rencana {
  background: #F3F4F6;
  color: #4B5563;
  border-color: rgba(75, 85, 99, 0.2);
}
.status-dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pill-tni.selesai .status-dot-mini {
  background: #16A34A;
  box-shadow: 0 0 5px #16A34A;
}
.status-pill-tni.berjalan .status-dot-mini {
  background: #EAB308;
  box-shadow: 0 0 5px #EAB308;
  animation: dbDotPulse 1.6s infinite;
}
.status-pill-tni.rencana .status-dot-mini {
  background: #9CA3AF;
}

/* ─── TABLE FOOTER / PAGINATION ─────────────────────────────────────────── */
.diklat-table-footer {
  padding: 10px 16px;
  background: #FAFDFB;
  border-top: 1px solid rgba(46, 102, 57, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #6B7280;
  flex-wrap: wrap;
}

/* ─── LIVE DURATION CONVERTER BOX IN MODAL ───────────────────────────────── */
.durasi-calc-preview {
  background: linear-gradient(135deg, #0D1F12 0%, #1A3521 100%);
  border: 1px solid rgba(196, 150, 58, 0.35);
  border-left: 4px solid var(--tni-gold);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  color: #ECEDE8;
}
.durasi-calc-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #DEB96A;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.durasi-calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.durasi-chip {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #D2DDD5;
}
.durasi-chip strong {
  color: #34D399;
}
.durasi-chip.highlight {
  background: rgba(196, 150, 58, 0.2);
  border-color: rgba(196, 150, 58, 0.5);
  color: #FDF3D8;
}
.durasi-chip.highlight strong {
  color: #FBBF24;
}

/* ─── RESPONSIVE PENDIDIKAN TABLE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-diklat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .kpi-diklat-grid { grid-template-columns: repeat(2, 1fr); }
  .diklat-toolbar { flex-direction: column; align-items: stretch; }
  .diklat-search-input { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════
   MODUL PROGRAM KERJA — TNI AD MILITARY STYLE
   ══════════════════════════════════════════════════════════════════════ */
.progja-bidang-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EAF0EB;
  padding: 4px;
  border-radius: 9px;
  border: 1px solid rgba(46, 102, 57, 0.15);
  margin-bottom: 16px;
  width: fit-content;
}
.progja-bidang-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #4B5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}
.progja-bidang-btn:hover {
  color: #1E3D26;
  background: rgba(255,255,255,0.6);
}
.progja-bidang-btn.active {
  background: #1E3D26;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(30, 61, 38, 0.25);
}
.progja-bidang-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.2);
  color: inherit;
}
.progja-bidang-btn:not(.active) .progja-bidang-pill {
  background: #D5DFD7;
  color: #374151;
}

.progja-cat-card {
  background: #FFFFFF;
  border: 1px solid rgba(46, 102, 57, 0.18);
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}
.progja-cat-header {
  padding: 10px 16px;
  background: linear-gradient(90deg, #F5FAF6 0%, #FFFFFF 100%);
  border-bottom: 1px solid rgba(46, 102, 57, 0.12);
  border-left: 4px solid var(--tni-green-600);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.progja-cat-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #1E3D26;
  letter-spacing: 0.3px;
}
.progja-cat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progja-tw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 5px;
  background: #F1F5F2;
  color: #1E3D26;
  border: 1px solid rgba(46, 102, 57, 0.15);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.progja-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  background: none;
}
.progja-toggle-pill.sudah {
  background: #EBF6EE;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.25);
}
.progja-toggle-pill.sudah:hover {
  background: #DCFCE7;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.15);
}
.progja-toggle-pill.belum {
  background: #FEF9C3;
  color: #854D0E;
  border-color: rgba(133, 77, 14, 0.25);
}
.progja-toggle-pill.belum:hover {
  background: #FEF08A;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(133, 77, 14, 0.15);
}

/* ══════════════════════════════════════════════════════════════════════
   SMARTPHONE & MOBILE RESPONSIVE SYSTEM (<= 768px & <= 480px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 1. Header Smartphone */
  .app-header {
    height: 48px !important;
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .header-breadcrumb {
    font-size: 11px !important;
  }
  .breadcrumb-prefix,
  .breadcrumb-separator,
  .header-breadcrumb span:first-child,
  .header-breadcrumb span:nth-child(2) {
    display: none !important;
  }
  .header-breadcrumb .page-title {
    font-size: 12.5px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }
  .header-clock {
    display: none !important; /* Jam sudah ada di status bar HP */
  }
  #fullscreenToggleBtn {
    display: none !important;
  }
  .header-user-btn {
    padding: 2px 6px !important;
    gap: 4px !important;
  }
  .header-user-name {
    display: none !important;
  }
  .header-user-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }
  .header-user-btn .fa-chevron-down {
    display: none !important;
  }

  /* 2. Content Body & Spacing */
  .content-body,
  body.page-dashboard .content-body {
    padding: 8px 10px 24px 10px !important;
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  /* 3. Alert Ticker */
  .db-ticker {
    padding: 6px 10px !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    border-radius: 6px !important;
  }
  .db-ticker-text {
    font-size: 10px !important;
  }
  .db-ticker-chips {
    display: none !important;
  }

  /* 4. Metric Strip (Grid 2x2 Kompak & Rapi) */
  .db-metric-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .db-metric-card {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    gap: 6px !important;
  }
  .db-metric-left {
    gap: 8px !important;
  }
  .db-metric-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
  }
  .db-metric-title {
    font-size: 8.5px !important;
    letter-spacing: 0.5px !important;
  }
  .db-metric-val {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }
  .db-metric-sub {
    font-size: 8.5px !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95px;
  }
  .db-metric-right {
    margin-left: 2px !important;
  }
  .db-ring-svg {
    width: 32px !important;
    height: 32px !important;
  }
  .db-ring-val {
    font-size: 8px !important;
  }

  /* 5. Main Grid 1 Kolom Penuh */
  .db-main-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 8px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .db-col-map,
  .db-col-charts,
  .db-col-right {
    grid-column: 1 !important;
    width: 100% !important;
  }

  /* 6. Peta Situasi Mobile */
  .db-map-card {
    border-radius: 8px !important;
  }
  .db-card-header {
    padding: 6px 10px !important;
  }
  .db-card-title {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .db-card-header .db-chip {
    display: none !important; /* Sembunyikan badge LIVE GIS / 16 POMDAM agar judul peta tidak terpotong */
  }

  /* Tinggi Peta Pas di Layar HP */
  .db-map-wrap,
  #osmMap {
    height: 260px !important;
    min-height: 260px !important;
  }

  /* Tombol Kontrol Peta Mengambang di HP */
  .db-map-hud-overlay {
    top: 5px !important;
    right: 5px !important;
    padding: 2px 4px !important;
    gap: 3px !important;
    flex-wrap: wrap !important;
    max-width: calc(100% - 40px) !important;
    justify-content: flex-end !important;
  }
  .db-btn-grp {
    padding: 1px !important;
  }
  .db-map-btn {
    font-size: 8.5px !important;
    padding: 2px 5px !important;
  }
  .db-map-btn-hq {
    font-size: 8.5px !important;
    padding: 2px 5px !important;
  }
  /* Sembunyikan OSM di HP agar tidak sesak, cukup Taktis & Satelit */
  .db-btn-grp:nth-child(2) button:nth-child(3) {
    display: none !important;
  }

  /* Strip Radar Horisontal Geser (Swipeable) */
  .db-radar-strip {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 5px 8px !important;
    gap: 4px !important;
  }
  .db-radar-strip::-webkit-scrollbar {
    display: none !important;
  }
  .db-radar-chip {
    flex-shrink: 0 !important;
    padding: 2px 7px !important;
    font-size: 9px !important;
  }

  /* 7. Charts Responsif */
  .db-charts-subgrid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .db-chart-canvas-wrap {
    height: 160px !important;
  }

  /* 8. Modul-Modul Data Table (Pendidikan, Latihan, Progja, Eldata, Dokumen) */
  .kpi-diklat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  .kpi-diklat-card {
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }
  .kpi-diklat-val {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }
  .kpi-diklat-label {
    font-size: 8.5px !important;
  }
  .kpi-diklat-badge {
    font-size: 8px !important;
    padding: 2px 6px !important;
  }

  /* Page Header Mobile */
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
  .page-header-text h1 {
    font-size: 17px !important;
  }
  .page-header-text p {
    font-size: 11px !important;
  }
  .page-header .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Toolbar Filter & Pencarian Mobile */
  .diklat-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .diklat-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 3px !important;
    width: 100% !important;
  }
  .diklat-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .diklat-tab-btn {
    flex-shrink: 0 !important;
    padding: 4px 9px !important;
    font-size: 11px !important;
  }
  .diklat-actions-right {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
  }
  .diklat-search-box {
    flex: 1 !important;
    width: 100% !important;
  }
  .diklat-search-input {
    width: 100% !important;
    font-size: 11.5px !important;
  }

  /* Progja Tabs Mobile */
  .progja-bidang-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .progja-bidang-btn {
    justify-content: center !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
  }
  .progja-toggle-pill {
    padding: 3px 7px !important;
    font-size: 10px !important;
  }

  /* Footer Mobile */
  .app-footer {
    flex-direction: column !important;
    gap: 3px !important;
    text-align: center !important;
    padding: 10px !important;
  }
}

