/* MPS Bancian Penjaja — style.css v5.0
   Mobile-first, role-themed, futuristic clean design
   Roles: Pegawai (blue), Management (purple), Admin (slate)
   Categories: A=green, B=blue, C=amber, D=red
*/

/* ===================== VARIABLES ===================== */
:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #dbeafe;
  --success:       #16a34a;
  --warning:       #d97706;
  --danger:        #dc2626;
  --info:          #0891b2;

  --role-pegawai:  #2563eb;
  --role-mgmt:     #7c3aed;
  --role-admin:    #475569;

  --cat-a:  #16a34a;
  --cat-b:  #2563eb;
  --cat-c:  #d97706;
  --cat-d:  #dc2626;

  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-md:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
  --shadow-lg:  0 20px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);

  --topbar-h:   56px;
  --sidebar-w:  260px;
  --bottom-nav-h: 64px;

  --transition: .2s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Role-based body themes */
body[data-role="management"] { --primary: #7c3aed; --primary-dark: #6d28d9; --primary-light: #ede9fe; }
body[data-role="admin"]      { --primary: #475569; --primary-dark: #334155; --primary-light: #f1f5f9; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ===================== PAGE SYSTEM ===================== */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }
.hidden { display: none !important; }
.float-right { float: right; }

/* ===================== TOPBAR ===================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-menu-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-size: 18px;
  transition: background var(--transition);
}
.topbar-menu-btn:hover { background: var(--gray-100); }

.topbar-brand { display: flex; align-items: center; gap: 8px; }
.topbar-logo {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.topbar-title-wrap { display: flex; flex-direction: column; }
.topbar-title { font-size: 14px; font-weight: 700; color: var(--gray-800); line-height: 1.2; }
.topbar-sub { font-size: 11px; color: var(--gray-500); line-height: 1.2; }

.topbar-user-chip { display: flex; align-items: center; gap: 6px; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-meta { display: none; }
@media (min-width: 640px) { .user-meta { display: flex; flex-direction: column; } }
.user-name { font-size: 12px; font-weight: 600; color: var(--gray-800); line-height: 1.2; }
.role-badge {
  font-size: 10px; font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}
.topbar-icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  color: var(--gray-500); font-size: 16px;
  transition: all var(--transition);
}
.topbar-icon-btn:hover { background: var(--gray-100); color: var(--danger); }

/* ===================== SIDEBAR ===================== */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: var(--sidebar-w);
  background: var(--gray-900);
  color: #fff;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); box-shadow: none; border-right: 1px solid var(--gray-200); }
  .sidebar-overlay { display: none !important; }
  .app-layout { margin-left: var(--sidebar-w); }
  .topbar { left: var(--sidebar-w); }
  .topbar-menu-btn { display: none; }
}

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: var(--topbar-h);
}
.sidebar-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sidebar-brand { flex: 1; min-width: 0; }
.sidebar-title { font-size: 13px; font-weight: 700; color: #fff; }
.sidebar-role { font-size: 11px; font-weight: 600; margin-top: 1px; }
.sidebar-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-400); font-size: 14px;
  margin-left: auto;
}
.sidebar-close:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (min-width: 1024px) { .sidebar-close { display: none; } }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px; font-weight: 500;
  color: var(--gray-400);
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
  text-decoration: none !important;
  width: 100%;
}
.nav-link i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active {
  background: rgba(37,99,235,.18);
  color: #fff;
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-link-highlight { color: #93c5fd; }
.nav-link-highlight:hover { background: rgba(37,99,235,.2); color: #bfdbfe; }
.nav-link-logout { color: #fca5a5; }
.nav-link-logout:hover { background: rgba(220,38,38,.15); color: #fca5a5; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-ver { font-size: 10px; color: var(--gray-600); text-align: center; }

/* ===================== APP LAYOUT ===================== */
.app-layout {
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}
.main-content {
  flex: 1;
  padding: calc(var(--topbar-h) + 16px) 16px calc(var(--bottom-nav-h) + 16px);
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 768px) { .main-content { padding: calc(var(--topbar-h) + 24px) 24px 32px; } }
@media (min-width: 1024px) { .main-content { padding: calc(var(--topbar-h) + 28px) 32px 32px; max-width: 1100px; } }

/* ===================== BOTTOM NAV ===================== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 190;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--gray-200);
  display: flex; align-items: center;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }

.bottom-nav-item {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  font-size: 10px; font-weight: 500;
  color: var(--gray-500);
  transition: color var(--transition);
}
.bottom-nav-item i { font-size: 18px; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:active { background: var(--primary-light); border-radius: var(--radius); }

/* ===================== SECTION HEADERS ===================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.section-title {
  font-size: 18px; font-weight: 700; color: var(--gray-800);
  display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--primary); }

/* ===================== CARDS ===================== */
.dashboard-card, .form-card, .settings-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 20px;
  margin-bottom: 16px;
}
.dashboard-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-card-title {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px;
}
.dashboard-card-title i { color: var(--primary); }
.form-card-title {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.settings-card-header {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}

/* ===================== STATS GRID ===================== */
.stats-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .stats-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  cursor: default;
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
  position: relative; overflow: hidden;
}
.stat-card:active { transform: scale(.98); }
.stat-icon { font-size: 22px; margin-bottom: 6px; opacity: .8; }
.stat-val { font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; font-weight: 500; color: var(--gray-500); }
.stat-card-primary .stat-icon, .stat-card-primary .stat-val { color: var(--primary); }
.stat-card-primary { border-top: 3px solid var(--primary); }
.stat-card-success .stat-icon, .stat-card-success .stat-val { color: var(--success); }
.stat-card-success { border-top: 3px solid var(--success); }
.stat-card-warning .stat-icon, .stat-card-warning .stat-val { color: var(--warning); }
.stat-card-warning { border-top: 3px solid var(--warning); }
.stat-card-info .stat-icon, .stat-card-info .stat-val { color: var(--info); }
.stat-card-info { border-top: 3px solid var(--info); }
.stat-card-neutral .stat-val { color: var(--gray-500); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.btn:disabled { opacity: .6; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; box-shadow: 0 4px 12px rgba(22,163,74,.35); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b91c1c; }
.btn-outline { border-color: var(--gray-300); color: var(--gray-700); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-danger-outline { border-color: #fca5a5; color: var(--danger); background: #fff; }
.btn-danger-outline:hover { background: #fee2e2; }
.btn-success-outline { border-color: #86efac; color: var(--success); background: #fff; }
.btn-success-outline:hover { background: #dcfce7; }
.btn-ghost { color: var(--gray-600); background: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: var(--radius-sm); }
.btn-new-bancian {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.btn-new-bancian:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-group-xs { display: flex; gap: 4px; }
.w-full { width: 100%; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--gray-700);
  margin-bottom: 6px;
}
.required-label::after { content: ' *'; color: var(--danger); }
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px; color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-control::placeholder { color: var(--gray-400); }
.form-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px; color: var(--gray-800);
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center/16px no-repeat;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--transition);
}
.form-select:focus { outline: none; border-color: var(--primary); }
.form-select-sm { padding: 7px 30px 7px 10px; font-size: 12.5px; }
.form-control-icon { padding-left: 38px; }
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: 14px;
  pointer-events: none;
}
.btn-eye {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: 14px;
  padding: 4px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }
.hint-text { font-size: 11.5px; color: var(--gray-500); margin-top: 4px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.font-mono { font-family: 'Courier New', monospace; font-size: 13px !important; }

/* ===================== ALERTS ===================== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 12px;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ===================== LOGIN PAGE ===================== */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1d4ed8 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='30' cy='30' r='2' fill='rgba(255,255,255,.06)'/%3e%3c/svg%3e");
  pointer-events: none;
}
.login-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.logo-mark {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
}
.login-logo h1 { font-size: 20px; font-weight: 800; color: var(--gray-900); margin-bottom: 2px; }
.login-logo p  { font-size: 13px; color: var(--gray-500); }
.demo-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--gray-100); }
.demo-label { font-size: 11.5px; color: var(--gray-500); text-align: center; margin-bottom: 10px; font-weight: 500; }
.demo-grid { display: grid; gap: 8px; }
.demo-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  transition: all var(--transition);
  text-align: left;
  cursor: pointer;
}
.demo-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.demo-role-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.dot-pegawai { background: var(--role-pegawai); }
.dot-mgmt    { background: var(--role-mgmt); }
.dot-admin   { background: var(--role-admin); }
.demo-role  { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.demo-email { font-size: 11px; color: var(--gray-500); }
.login-footer { text-align: center; font-size: 11px; color: var(--gray-400); margin-top: 20px; }

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar-wrap { flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: 13px;
  pointer-events: none;
}
.search-input { padding-left: 34px !important; }

/* ===================== LIST CARDS ===================== */
.list-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.list-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.list-card-left { flex-shrink: 0; }
.list-card-body { flex: 1; min-width: 0; }
.list-card-name { font-size: 14px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card-sub  { display: flex; gap: 10px; font-size: 12px; color: var(--gray-500); margin-top: 2px; flex-wrap: wrap; }
.list-card-sub span { display: flex; align-items: center; gap: 4px; }
.list-card-meta { display: flex; gap: 10px; font-size: 11px; color: var(--gray-400); margin-top: 4px; flex-wrap: wrap; align-items: center; }
.list-card-arrow { color: var(--gray-400); font-size: 12px; }
.list-card-rank {
  width: 28px; height: 28px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--gray-600);
  flex-shrink: 0;
}
.list-card-score-wrap { flex-shrink: 0; }
.list-count { font-size: 12px; color: var(--gray-500); text-align: center; padding: 8px; }

/* ===================== SCORE BADGES ===================== */
.score-badge {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.score-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.badge-draft {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef3c7; color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.badge-score {
  display: inline-flex; align-items: center;
  background: var(--primary-light); color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
}
.badge-default { background: var(--gray-100); color: var(--gray-600); }
.required-badge { background: #fee2e2; color: var(--danger); font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius-full); }

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-900);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  transform: translateX(110%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s;
  pointer-events: auto;
}
.toast.show { transform: translateX(0); }
.toast-success { background: #15803d; }
.toast-error   { background: #b91c1c; }
.toast-warning { background: #b45309; }
.toast i { flex-shrink: 0; font-size: 15px; }

/* ===================== MODALS ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 20px; }
}
.modal-sheet {
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 540px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp .3s ease;
}
@media (min-width: 640px) {
  .modal-sheet { border-radius: var(--radius-xl); animation: fadeScale .25s ease; }
}
.modal-sheet-sm { max-width: 380px; }
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeScale { from { transform: scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--gray-500); font-size: 14px;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ===================== WIZARD ===================== */
.wizard-wrap { max-width: 680px; margin: 0 auto; }
.wizard-header {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.wizard-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.wizard-main-title { font-size: 16px; font-weight: 700; color: var(--gray-800); }
.wizard-progress-bar-wrap {
  height: 4px; background: var(--gray-200);
  border-radius: var(--radius-full);
  margin-bottom: 10px; overflow: hidden;
}
.wizard-progress-bar {
  height: 100%; background: var(--primary);
  border-radius: var(--radius-full);
  transition: width .4s ease;
}
.wizard-step-row {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 10px;
}
.wizard-step-dot {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--gray-200); color: var(--gray-500);
  transition: all var(--transition);
}
.wizard-step-dot.done { background: #dcfce7; color: var(--success); cursor: pointer; }
.wizard-step-dot.done:hover { background: #bbf7d0; }
.wizard-step-dot.active { background: var(--primary); color: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.wizard-step-label { font-size: 13px; font-weight: 600; color: var(--gray-600); display: flex; align-items: center; gap: 6px; }
.wizard-step-label i { color: var(--primary); }
.wizard-body { margin-bottom: 16px; }
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  position: sticky; bottom: calc(var(--bottom-nav-h) + 8px);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}
@media (min-width: 1024px) { .wizard-nav { bottom: 16px; } }

/* Live Score Preview */
.live-score-preview {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex; gap: 16px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.live-score-left { text-align: center; flex-shrink: 0; }
.live-score-label { font-size: 10px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.live-score-value { font-size: 28px; font-weight: 900; line-height: 1; }
.live-score-pts   { font-size: 11px; color: var(--gray-500); }
.live-score-right { flex: 1; min-width: 0; }
.live-score-kat {
  display: inline-flex; padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; margin-bottom: 6px;
}
.live-score-progress { font-size: 11px; color: var(--gray-500); margin-bottom: 6px; }
.live-section-bars { display: flex; gap: 3px; }
.live-section-bar-item { flex: 1; }
.live-section-bar-bg {
  height: 4px; background: var(--gray-200);
  border-radius: var(--radius-full); overflow: hidden;
}
.live-section-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .3s ease;
}

/* Step sections */
.step-section { display: flex; flex-direction: column; gap: 4px; }
.step-intro {
  background: var(--primary-light);
  color: #1e40af;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 8px;
}
.step-note {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px; color: var(--gray-500);
  margin-top: 8px;
}
.section-score-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.ssh-label { font-size: 14px; font-weight: 700; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
.ssh-score { font-size: 13px; font-weight: 700; color: var(--gray-600); }

/* Question Cards */
.q-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.q-card-answered { border-color: #bbf7d0; background: #f0fdf4; }
.q-card-error { border-color: var(--danger) !important; animation: pulseError .5s; }
@keyframes pulseError {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 0 4px rgba(220,38,38,.15); }
}
.q-header {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
}
.q-no {
  background: var(--gray-100); color: var(--gray-600);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.q-text { font-size: 13.5px; font-weight: 600; color: var(--gray-800); flex: 1; }
.q-done { color: var(--success); font-size: 14px; flex-shrink: 0; margin-left: auto; }
.q-options { display: flex; flex-direction: column; gap: 6px; }
.q-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.q-option input { display: none; }
.q-option:hover { border-color: var(--primary); background: var(--primary-light); }
.q-option.selected { border-color: var(--primary); background: var(--primary-light); }
.q-option-text { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.q-option-score { font-size: 11px; font-weight: 700; color: var(--gray-500); white-space: nowrap; }
.q-option.selected .q-option-score { color: var(--primary); }

/* Radio groups */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-option {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px; font-weight: 500; color: var(--gray-600);
}
.radio-option input { display: none; }
.radio-option:hover { border-color: var(--primary); color: var(--primary); }
.radio-option.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ===================== IC UPLOAD ===================== */
.ic-upload-zone {
  border: 2.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ic-upload-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.ic-upload-placeholder { color: var(--gray-400); }
.ic-upload-placeholder i { font-size: 36px; margin-bottom: 8px; }
.ic-upload-placeholder p { font-size: 13px; }
.ic-preview-img { max-height: 200px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ocr-confidence-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  margin-top: 8px;
}
.ocr-high { background: #dcfce7; color: #166534; }
.ocr-med  { background: #fef3c7; color: #92400e; }
.ocr-low  { background: #fee2e2; color: #991b1b; }

/* ===================== GPS ===================== */
.gps-success-card {
  display: flex; align-items: center; gap: 14px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 16px;
}
.gps-icon-success { font-size: 28px; color: var(--success); flex-shrink: 0; }
.gps-coords { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.gps-accuracy { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.gps-warn { font-size: 12px; color: var(--warning); margin-top: 4px; }
.gps-ts { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.gps-empty-card {
  text-align: center; padding: 32px;
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  color: var(--gray-400);
}
.gps-empty-card p { margin-top: 10px; font-size: 14px; }

/* ===================== PHOTOS ===================== */
.photo-slot {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--gray-50);
}
.photo-required { border-color: #fde68a; background: #fffbeb; }
.photo-slot-label { font-size: 13px; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.photo-slot-hint { font-size: 11.5px; color: var(--gray-400); margin-bottom: 10px; }
.photo-preview-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-preview-item { position: relative; }
.photo-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.photo-remove-btn {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px;
  background: var(--danger); color: #fff;
  border-radius: 50%; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.photo-add-btn {
  width: 80px; height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 10px; color: var(--gray-500);
  transition: all var(--transition);
}
.photo-add-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.photo-add-btn i { font-size: 18px; }

/* ===================== SUBMIT SCORE CARD ===================== */
.submit-score-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.submit-score-title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 8px; font-weight: 600; }
.submit-score-main { font-size: 48px; font-weight: 900; line-height: 1; margin-bottom: 8px; }
.submit-score-kat { display: inline-flex; padding: 4px 16px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.submit-score-pts { font-size: 13px; color: var(--gray-500); }
.section-scores-grid { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.sec-score-item { display: flex; align-items: center; gap: 10px; }
.sec-score-label { font-size: 12px; font-weight: 600; color: var(--gray-700); width: 100px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.sec-score-bar-wrap { flex: 1; height: 6px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.sec-score-bar { height: 100%; border-radius: var(--radius-full); transition: width .5s ease; }
.sec-score-val { font-size: 11px; font-weight: 700; color: var(--gray-600); white-space: nowrap; }

/* Declaration */
.declaration-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px 0;
}
.declaration-check { display: flex; gap: 12px; cursor: pointer; align-items: flex-start; }
.declaration-check input[type="checkbox"] { display: none; }
.checkmark {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.declaration-check input:checked ~ .checkmark, 
.declaration-check:has(input:checked) .checkmark {
  background: var(--primary); border-color: var(--primary);
}
.declaration-check input:checked ~ .checkmark::after,
.declaration-check:has(input:checked) .checkmark::after {
  content: '✓'; color: #fff; font-size: 12px; font-weight: 700;
}
.declaration-text { font-size: 13px; color: var(--gray-700); line-height: 1.5; }

/* ===================== REPORT ===================== */
.report-wrap { max-width: 760px; margin: 0 auto; }
.report-header {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.report-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.report-header-actions { display: flex; gap: 6px; }
.report-org { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.report-org-logo {
  width: 44px; height: 44px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.report-org-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.report-org-sub  { font-size: 12px; color: var(--gray-500); }
.report-meta-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--gray-500); }
.report-meta-row span { display: flex; align-items: center; gap: 4px; }

/* Score Hero */
.report-score-hero {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  margin-bottom: 16px;
  display: flex; gap: 20px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.score-donut-wrap { flex-shrink: 0; }
.score-donut {
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.score-donut-inner {
  width: 74px; height: 74px;
  background: #fff;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-donut-val { font-size: 18px; font-weight: 900; line-height: 1; }
.score-donut-lbl { font-size: 10px; color: var(--gray-500); font-weight: 600; }
.score-hero-info { flex: 1; min-width: 0; }
.score-hero-name { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.score-hero-lokasi { font-size: 13px; color: var(--gray-500); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.score-hero-kat { display: inline-flex; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.score-hero-pts { font-size: 13px; color: var(--gray-600); margin-bottom: 6px; }
.score-hero-desc { font-size: 12.5px; color: var(--gray-600); line-height: 1.5; }

/* Report Sections */
.report-section {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.report-section-title {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.report-section-title i { color: var(--primary); }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-item-full { grid-column: 1/-1; }
.info-label { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .3px; }
.info-val   { font-size: 13px; font-weight: 600; color: var(--gray-800); }

/* Radar */
.radar-chart-wrap {
  max-width: 340px;
  margin: 0 auto;
}

/* Dimension Scores Table */
.dimension-scores-table { display: flex; flex-direction: column; gap: 10px; }
.dim-row { display: flex; align-items: center; gap: 12px; }
.dim-icon { width: 30px; text-align: center; font-size: 16px; flex-shrink: 0; }
.dim-info { flex: 1; min-width: 0; }
.dim-label { font-size: 12.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.dim-bar-wrap { height: 6px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.dim-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.dim-score { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 700; min-width: 70px; }
.dim-score span { font-size: 11px; font-weight: 400; color: var(--gray-500); }

/* S&W */
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .sw-grid { grid-template-columns: 1fr; } }
.sw-card { padding: 14px; border-radius: var(--radius); }
.sw-strength { background: #f0fdf4; border: 1px solid #bbf7d0; }
.sw-weakness { background: #fff7ed; border: 1px solid #fed7aa; }
.sw-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sw-strength .sw-title { color: var(--success); }
.sw-weakness .sw-title { color: var(--warning); }
.sw-item { font-size: 13px; padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,.04); display: flex; gap: 6px; align-items: flex-start; }
.sw-item:last-child { border-bottom: none; }

/* Recommendations */
.recs-list { display: flex; flex-direction: column; gap: 8px; }
.rec-item { display: flex; gap: 10px; align-items: flex-start; }
.rec-no {
  width: 22px; height: 22px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.dim-recs-list { margin-top: 12px; }
.dim-recs-title { font-size: 12px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
.dim-rec-item { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; padding: 4px 0; }
.dim-rec-item i { color: var(--primary); font-size: 12px; margin-top: 2px; flex-shrink: 0; }

/* Photos grid */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-item { text-align: center; }
.report-photo { width: 100%; height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--gray-200); cursor: pointer; transition: transform var(--transition); }
.report-photo:hover { transform: scale(1.03); }
.photo-caption { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

/* Answers table */
.answers-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.answers-table th { background: var(--gray-50); padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); }
.answers-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-100); }
.answers-table tr:last-child td { border-bottom: none; }

/* Flags */
.flags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.flag-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
}

/* Public URL */
.report-public-url { background: #f8faff; border: 1.5px solid var(--primary-light) !important; }
.url-copy-row { display: flex; gap: 8px; margin-top: 10px; }
.url-input { font-size: 12px !important; }
.wa-hint { font-size: 12px; color: var(--gray-500); margin-top: 8px; display: flex; align-items: center; gap: 5px; }

.report-disclaimer {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 11.5px; color: var(--gray-500);
  margin-top: 12px;
  line-height: 1.6;
}

/* ===================== PUBLIC REPORT ===================== */
.public-page-wrap { min-height: 100vh; background: var(--gray-50); }
.public-verify-header {
  background: var(--primary);
  padding: 16px 20px;
}
.public-verify-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 15px; font-weight: 700; }
.public-verify-brand i { font-size: 20px; }
.public-verify-card {
  max-width: 420px; margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  margin-top: 32px; margin-bottom: 32px;
}
@media (max-width: 480px) { .public-verify-card { margin: 16px; padding: 24px 18px; } }
.public-verify-logo { font-size: 40px; color: var(--primary); text-align: center; margin-bottom: 12px; }
.public-verify-card h2 { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.public-verify-card p { font-size: 14px; color: var(--gray-500); text-align: center; margin-bottom: 20px; }
.verify-input { text-align: center; font-size: 20px !important; font-weight: 700 !important; letter-spacing: 4px; }
.verify-attempts-hint { text-align: center; font-size: 12px; color: var(--gray-500); margin-top: 10px; }
.public-page-footer { text-align: center; padding: 20px; font-size: 13px; }
.public-error { text-align: center; padding: 40px 24px; }
.public-error-icon { font-size: 48px; color: var(--warning); margin-bottom: 12px; }
.public-error h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

/* Public Report Content */
.public-report-wrap { max-width: 480px; margin: 0 auto; background: #fff; }
.public-report-header {
  padding: 28px 20px 24px;
  text-align: center; color: #fff;
}
.public-header-logo { font-size: 36px; margin-bottom: 6px; }
.public-header-title { font-size: 16px; font-weight: 700; }
.public-header-org   { font-size: 12px; opacity: .85; }
.public-header-date  { font-size: 11px; opacity: .7; margin-top: 4px; }
.public-score-hero { display: flex; flex-direction: column; align-items: center; padding: 24px 20px; }
.public-score-donut {
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.public-score-inner {
  width: 108px; height: 108px;
  background: #fff;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.public-score-val { font-size: 30px; font-weight: 900; line-height: 1; }
.public-score-lbl { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.public-score-info { text-align: center; }
.public-score-name   { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.public-score-lokasi { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.public-kat-badge {
  display: inline-flex; padding: 6px 20px;
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 800;
  margin-bottom: 10px;
}
.public-kat-desc { font-size: 13px; color: var(--gray-600); line-height: 1.5; max-width: 320px; }
.public-section { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.public-section-title { font-size: 14px; font-weight: 700; color: var(--gray-700); display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.public-section-title i { color: var(--primary); }
.public-kat-explain { padding: 14px; border-radius: var(--radius); font-size: 13.5px; line-height: 1.6; color: var(--gray-700); }
.public-dim-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--gray-50); }
.public-dim-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.public-dim-info { flex: 1; min-width: 0; }
.public-dim-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.public-dim-bar-bg { height: 5px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 3px; }
.public-dim-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.public-dim-sub { font-size: 11px; color: var(--gray-400); }
.public-dim-pct { font-size: 16px; font-weight: 800; flex-shrink: 0; }
.public-sw-list { display: flex; flex-direction: column; gap: 8px; }
.public-sw-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-radius: var(--radius); }
.public-strength { background: #f0fdf4; color: #166534; }
.public-weakness { background: #fff7ed; color: #c2410c; }
.public-recs { display: flex; flex-direction: column; gap: 10px; }
.public-rec-item { display: flex; gap: 10px; align-items: flex-start; }
.public-rec-no { width: 24px; height: 24px; background: var(--primary); color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.public-rec-text { font-size: 13.5px; color: var(--gray-700); line-height: 1.5; }
.public-disclaimer { padding: 16px 20px; font-size: 11.5px; color: var(--gray-400); line-height: 1.6; }
.public-footer { padding: 20px; text-align: center; font-size: 12px; color: var(--gray-500); background: var(--gray-50); }
.public-footer-logo { font-size: 24px; color: var(--primary); margin-bottom: 4px; }
.public-footer-date { font-size: 11px; margin-top: 4px; }

/* ===================== TABLES ===================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: var(--gray-50); padding: 10px 14px;
  text-align: left; font-size: 12px; font-weight: 700;
  color: var(--gray-600); border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.mono-sm { font-family: 'Courier New', monospace; font-size: 11px; }
.rank-no { font-size: 13px; font-weight: 700; color: var(--gray-500); text-align: center; }
.text-muted { color: var(--gray-400); }
.text-green { color: var(--success); }
.text-red   { color: var(--danger); }

/* Role & Status pills */
.role-pill {
  display: inline-flex; padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 700;
}
.status-pill { display: inline-flex; padding: 3px 10px; border-radius: var(--radius-full); font-size: 11.5px; font-weight: 600; }
.status-active   { background: #dcfce7; color: #166534; }
.status-inactive { background: #fee2e2; color: #991b1b; }

/* ===================== DASHBOARD ===================== */
.dashboard-greeting {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.greeting-hello { font-size: 17px; font-weight: 800; color: var(--gray-800); }
.greeting-sub   { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.draft-alert { cursor: pointer; align-items: center; transition: opacity var(--transition); }
.draft-alert:hover { opacity: .85; }
.draft-alert-sub { font-size: 11px; margin-top: 2px; }

/* Category Bars */
.cat-bars { display: flex; flex-direction: column; gap: 10px; }
.cat-bar-row { display: flex; align-items: center; gap: 10px; }
.cat-bar-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray-700); min-width: 130px; white-space: nowrap; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-bar-track { flex: 1; height: 8px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.cat-bar-fill  { height: 100%; border-radius: var(--radius-full); width: 0; transition: width .8s ease; }
.cat-bar-count { font-size: 12px; font-weight: 700; color: var(--gray-600); min-width: 60px; text-align: right; }

/* Recent list */
.recent-list { display: flex; flex-direction: column; gap: 2px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.recent-item:hover { background: var(--gray-50); }
.recent-kat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.recent-body { flex: 1; min-width: 0; }
.recent-name { font-size: 13.5px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: 11.5px; color: var(--gray-500); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.recent-score { text-align: right; flex-shrink: 0; }
.recent-pct { font-size: 15px; font-weight: 800; }
.recent-kat { font-size: 11px; font-weight: 600; }

/* Quick Actions */
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .quick-actions-grid { grid-template-columns: repeat(4, 1fr); } }
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 12px; font-weight: 600; color: var(--gray-700);
  transition: all var(--transition);
}
.quick-action i { font-size: 22px; color: var(--primary); }
.quick-action:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ===================== MANAGEMENT ===================== */
.mgmt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mgmt-header-right { display: flex; gap: 8px; }
.mgmt-two-col { display: grid; gap: 12px; }
@media (min-width: 768px) { .mgmt-two-col { grid-template-columns: 1fr 1fr; } }

/* Weak dims */
.weak-dims { display: flex; flex-direction: column; gap: 10px; }
.weak-dim-row { display: flex; align-items: center; gap: 10px; }
.weak-dim-icon { width: 28px; text-align: center; flex-shrink: 0; font-size: 15px; }
.weak-dim-info { flex: 1; min-width: 0; }
.weak-dim-label { font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 3px; }
.weak-dim-bar-bg { height: 5px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.weak-dim-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.weak-dim-pct { font-size: 14px; font-weight: 800; min-width: 40px; text-align: right; }

/* Zone distribution */
.zone-dist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 480px) { .zone-dist-grid { grid-template-columns: repeat(3, 1fr); } }
.zone-dist-item { display: flex; flex-direction: column; gap: 4px; }
.zone-dist-name { font-size: 11.5px; font-weight: 600; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-dist-bar-bg { height: 4px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.zone-dist-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.zone-dist-count { font-size: 12px; font-weight: 700; color: var(--gray-600); }

/* Ranking */
.ranking-tabs { display: flex; gap: 4px; margin-bottom: 12px; background: var(--gray-100); padding: 4px; border-radius: var(--radius); }
.tab-btn { flex: 1; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; color: var(--gray-600); transition: all var(--transition); }
.tab-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.ranking-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.ranking-top { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff); }
.ranking-pos { min-width: 36px; text-align: center; }
.medal { font-size: 22px; }
.rank-no { font-size: 14px; font-weight: 700; color: var(--gray-500); }
.ranking-body { flex: 1; min-width: 0; }
.ranking-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.ranking-meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ranking-score-wrap { text-align: right; flex-shrink: 0; }
.ranking-pct { font-size: 18px; font-weight: 900; }
.ranking-kat-badge { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-full); font-size: 10.5px; font-weight: 700; margin-top: 2px; }
.ranking-view-btn { flex-shrink: 0; }
.zone-ranking-list { display: flex; flex-direction: column; gap: 8px; }
.zone-rank-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 12px 16px; box-shadow: var(--shadow-sm); }
.zone-rank-pos { min-width: 30px; font-size: 18px; text-align: center; }
.zone-rank-info { flex: 1; min-width: 0; }
.zone-rank-name { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 3px; }
.zone-rank-cats { display: flex; gap: 8px; font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.zone-rank-bar-bg { height: 5px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.zone-rank-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.zone-rank-avg { font-size: 18px; font-weight: 900; min-width: 50px; text-align: right; }

/* Map */
.map-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray-600); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.map-info-bar { font-size: 12px; color: var(--gray-500); display: flex; gap: 16px; margin-bottom: 12px; }
.map-placeholder-note { background: #dbeafe; border: 1px solid #bfdbfe; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; color: #1e40af; display: flex; gap: 8px; margin-bottom: 12px; }
.map-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.map-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 14px; box-shadow: var(--shadow-sm); }
.map-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.map-card-kat { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; }
.map-card-score { font-size: 18px; font-weight: 800; }
.map-card-name { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.map-card-lokasi { font-size: 12px; color: var(--gray-600); margin-bottom: 2px; }
.map-card-zon    { font-size: 11.5px; color: var(--gray-500); margin-bottom: 2px; }
.map-card-coords { font-size: 11px; color: var(--gray-400); font-family: monospace; margin-bottom: 10px; }
.map-card-actions { display: flex; gap: 6px; }

/* Settings */
.settings-grid { display: grid; gap: 12px; }
@media (min-width: 768px) { .settings-grid { grid-template-columns: 1fr 1fr; } }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13.5px; font-weight: 500; color: var(--gray-700); }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Admin */
.zones-list { display: flex; flex-direction: column; gap: 6px; }
.zone-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.zone-name { font-size: 13.5px; font-weight: 500; color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.audit-log-list { display: flex; flex-direction: column; gap: 6px; }
.audit-item { display: flex; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); }
.audit-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.audit-body { flex: 1; min-width: 0; }
.audit-action { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; }
.audit-meta { display: flex; gap: 10px; font-size: 11.5px; color: var(--gray-500); flex-wrap: wrap; }
.audit-detail { font-size: 11.5px; color: var(--gray-500); margin-top: 3px; }

/* Profile */
.profile-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 20px; margin-bottom: 16px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow-sm); }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-info { flex: 1; min-width: 0; }
.profile-name  { font-size: 17px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.profile-role  { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.profile-meta  { display: flex; flex-direction: column; gap: 4px; }
.profile-meta span { font-size: 12.5px; color: var(--gray-500); display: flex; align-items: center; gap: 6px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Roles info */
.role-info-cards { display: grid; gap: 12px; }
@media (min-width: 768px) { .role-info-cards { grid-template-columns: repeat(3, 1fr); } }
.role-info-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); padding: 20px; box-shadow: var(--shadow-sm); }
.role-info-icon { font-size: 28px; margin-bottom: 8px; }
.role-info-name { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }
.role-info-perms { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.role-info-perms li { font-size: 12.5px; color: var(--gray-600); display: flex; align-items: center; gap: 6px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 40px; color: var(--gray-300); margin-bottom: 10px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }
.empty-sub   { font-size: 13px; color: var(--gray-400); }

/* Misc */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.link-sm { font-size: 12px; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.link-sm:hover { text-decoration: underline; }

/* stat-draft (red draft value) */
.stat-draft { color: var(--warning) !important; }

/* Collapsible report section */
.report-section-collapsible .report-section-title { cursor: pointer; user-select: none; }
.report-section-collapsible .report-section-title:hover { color: var(--primary); }
#answerTableContent table { margin-top: 8px; }

/* Officer Performance table */
.officer-perf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.officer-perf-table th { background: var(--gray-50); padding: 8px 12px; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.officer-perf-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-100); }
.officer-perf-table tr:last-child td { border-bottom: none; }
.officer-perf-table tr:hover td { background: var(--gray-50); }
.officer-score-bar-wrap { display: flex; align-items: center; gap: 8px; }
.officer-score-bar-bg { flex: 1; height: 6px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.officer-score-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }

/* Public report print footer */
.print-footer { display: none; }
@media print { .print-footer { display: flex !important; } }

/* Stat card neutral */
.stat-card-neutral .stat-icon,
.stat-card-neutral .stat-val { color: var(--gray-500); }

/* Scroll to top */
.scroll-top-btn {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 16px); right: 16px; z-index: 100;
  width: 40px; height: 40px;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}
.scroll-top-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
@media (min-width: 1024px) { .scroll-top-btn { bottom: 24px; } }

/* ============================================================
   WIZARD v6.0 — NEW CLASSES
   ============================================================ */

/* --- IC Upload (small variant) --- */
.ic-upload-sm {
  padding: 12px 16px;
  min-height: 60px;
  font-size: 13px;
}
.ic-upload-sm .ic-upload-placeholder i { font-size: 22px; margin-bottom: 4px; }
.ic-upload-sm .ic-upload-placeholder p  { font-size: 12px; }
.ic-upload-zone.has-file {
  border-color: var(--success);
  background: #f0fdf4;
}

/* --- Wizard GPS Mini-Map --- */
.wizard-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.wizard-map-wrap .leaflet-container {
  border-radius: var(--radius-lg);
}

/* --- Badge: Pilihan (optional) --- */
.badge-optional {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  background: #ede9fe;
  color: #5b21b6;
  letter-spacing: 0.02em;
}
.q-optional-badge {
  margin-left: 6px;
  vertical-align: middle;
}

/* --- Section score skipped state --- */
.sec-score-skipped {
  opacity: 0.45;
}
.sec-score-skipped .sec-score-label {
  font-style: italic;
}

/* --- Form invalid feedback --- */
.invalid-feedback {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  display: block;
}

/* --- Pemilik / Pengendali role badges --- */
.badge-role {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.badge-pemilik {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge-pengendali {
  background: #fef9c3;
  color: #92400e;
}

/* --- Pengendali toggle card --- */
.pengendali-toggle-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

/* --- Toggle label row (same-person toggle) --- */
.toggle-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0;
}

/* --- Custom toggle (wizard) ---
   Structure: .toggle-wrap > input.toggle-input + span.toggle-slider
   ------------------------------------------------------------------ */
.toggle-wrap {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
/* the span.toggle-slider acts as the track + knob */
.toggle-wrap .toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: background .3s;
  pointer-events: none;
}
.toggle-wrap .toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
  box-shadow: var(--shadow-sm);
}
.toggle-input:checked + .toggle-slider            { background: var(--primary); }
.toggle-input:checked + .toggle-slider::before    { transform: translateX(20px); }

/* --- Utility --- */
.ml-2 { margin-left: 8px; }
.hint-text { font-size: 12px; color: var(--gray-500); font-style: italic; }

/* ===================== MANAGEMENT COMMAND CENTRE (v5.2) ===================== */

/* Page wrapper */
.mgmt-page { display: flex; flex-direction: column; gap: 16px; }
.mgmt-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.mgmt-page-title { font-size: 18px; font-weight: 800; color: var(--gray-800); display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.mgmt-page-sub  { font-size: 12.5px; color: var(--gray-500); margin: 0; }
.mgmt-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* CC Buttons */
.btn-cc { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .18s; border: 1px solid transparent; white-space: nowrap; }
.btn-cc-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-cc-primary:hover { background: var(--primary-dark); }
.btn-cc-ghost { background: #fff; color: var(--gray-700); border-color: var(--gray-200); }
.btn-cc-ghost:hover { background: var(--gray-100); border-color: var(--gray-300); }
.btn-cc-xs { padding: 4px 10px; font-size: 11.5px; }

/* KPI Strip */
.kpi-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .kpi-strip { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .kpi-strip { grid-template-columns: repeat(8, 1fr); } }
.kpi-card { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.kpi-val { font-size: 20px; font-weight: 900; line-height: 1; }
.kpi-lbl { font-size: 10.5px; font-weight: 600; color: var(--gray-500); margin-top: 2px; }
.kpi-blue   .kpi-icon { background: #dbeafe; color: #2563eb; }
.kpi-indigo .kpi-icon { background: #e0e7ff; color: #4f46e5; }
.kpi-teal   .kpi-icon { background: #cffafe; color: #0891b2; }
.kpi-score  .kpi-icon { background: #f1f5f9; color: #475569; }
.kpi-green  .kpi-icon { background: #dcfce7; color: #16a34a; }
.kpi-blue2  .kpi-icon { background: #dbeafe; color: #2563eb; }
.kpi-amber  .kpi-icon { background: #fef3c7; color: #d97706; }
.kpi-red    .kpi-icon { background: #fee2e2; color: #dc2626; }

/* CC Cards */
.cc-row { display: grid; gap: 14px; }
.cc-row-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .cc-row-2 { grid-template-columns: 1fr 1fr; } }
.cc-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.cc-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cc-card-title { font-size: 13px; font-weight: 700; color: var(--gray-700); display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }

/* CC Filter Bar */
.cc-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 10px 14px; box-shadow: var(--shadow-sm); }
.cc-search-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 180px; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 6px 10px; background: var(--gray-50); }
.cc-search-wrap i { color: var(--gray-400); font-size: 13px; flex-shrink: 0; }
.cc-search { border: none; background: transparent; outline: none; font-size: 13px; color: var(--gray-800); width: 100%; }
.cc-select { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 6px 10px; font-size: 12.5px; color: var(--gray-700); background: var(--gray-50); outline: none; cursor: pointer; }
.cc-select:focus { border-color: var(--primary); }
.cc-list-count { font-size: 12px; color: var(--gray-500); font-weight: 500; }

/* CC Table */
.cc-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.cc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cc-table th { background: var(--gray-50); padding: 9px 12px; text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.cc-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.cc-table tr:last-child td { border-bottom: none; }
.cc-table tr:hover td { background: var(--gray-50); }
.cc-table-sm th, .cc-table-sm td { padding: 7px 10px; font-size: 12px; }
.text-muted { color: var(--gray-500) !important; font-size: 11.5px; }
.mono-xs { font-family: monospace; font-size: 11.5px; color: var(--gray-600); }

/* CC Tabs */
.cc-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--gray-100); border-radius: var(--radius); padding: 4px; }
.cc-tab { flex: 1; min-width: max-content; padding: 7px 12px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; color: var(--gray-600); border: none; background: transparent; cursor: pointer; display: flex; align-items: center; gap: 6px; justify-content: center; white-space: nowrap; transition: all .15s; }
.cc-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.cc-tab:hover:not(.active) { background: var(--gray-200); }

/* Score mini bar */
.score-mini-bar-bg { height: 5px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; min-width: 50px; }
.score-mini-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width .5s ease; }

/* Dimension row */
.dim-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.dim-row-label { font-size: 11.5px; font-weight: 600; color: var(--gray-600); min-width: 120px; display: flex; align-items: center; gap: 5px; }
.dim-row-bar { flex: 1; }
.dim-row-val { font-size: 12px; font-weight: 700; min-width: 36px; text-align: right; }

/* Dimension summary */
.dim-summary-row { display: flex; gap: 10px; margin-top: 10px; }
.dim-summary-item { flex: 1; padding: 10px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.dim-weak   { background: #fef3c7; }
.dim-strong { background: #dcfce7; }
.dim-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.dim-badge.dim-weak   { background: #fef3c7; color: #d97706; }
.dim-badge.dim-strong { background: #dcfce7; color: #16a34a; }

/* Category badge */
.cat-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; white-space: nowrap; }
.cat-A { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.cat-B { background: #dbeafe; color: #2563eb; border: 1px solid #bfdbfe; }
.cat-C { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.cat-D { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* Category mini pills */
.cat-mini-pill { display: inline-flex; padding: 2px 6px; border-radius: var(--radius-full); font-size: 10.5px; font-weight: 700; margin-right: 3px; }

/* Cat distribution */
.cat-dist-grid { display: flex; flex-direction: column; gap: 8px; }
.cat-dist-item { display: flex; align-items: center; gap: 8px; }
.cat-dist-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cat-dist-dot.cat-A { background: #16a34a; }
.cat-dist-dot.cat-B { background: #2563eb; }
.cat-dist-dot.cat-C { background: #d97706; }
.cat-dist-dot.cat-D { background: #dc2626; }
.cat-dist-info { flex: 1; min-width: 0; }
.cat-dist-label { font-size: 11.5px; font-weight: 600; color: var(--gray-600); margin-bottom: 3px; }
.cat-dist-bar-bg { height: 5px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.cat-dist-bar { height: 100%; border-radius: var(--radius-full); }
.cat-dist-count { font-size: 14px; font-weight: 800; min-width: 48px; text-align: right; }
.cat-dist-pct { font-size: 10.5px; font-weight: 500; color: var(--gray-500); }

/* Trend arrows */
.trend-up   { color: #16a34a; font-weight: 700; font-size: 12px; }
.trend-down { color: #dc2626; font-weight: 700; font-size: 12px; }
.trend-flat { color: #6b7280; font-weight: 600; font-size: 12px; }

/* Zone scoreboard */
.zone-scoreboard { display: flex; flex-direction: column; gap: 8px; }
.zone-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; transition: background .15s; }
.zone-row:hover { background: var(--gray-50); }
.zone-row-name { font-size: 12.5px; font-weight: 600; color: var(--gray-700); min-width: 110px; }
.zone-row-bar { flex: 1; }
.zone-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11.5px; min-width: 70px; }

/* TKK list */
.tkk-list { display: flex; flex-direction: column; gap: 6px; }
.tkk-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; transition: background .15s; }
.tkk-row:hover { background: var(--gray-50); }
.tkk-rank { width: 22px; height: 22px; border-radius: 50%; background: var(--gray-100); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--gray-600); flex-shrink: 0; }
.tkk-info { flex: 1; min-width: 0; }
.tkk-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.tkk-meta { font-size: 11px; color: var(--gray-500); }
.tkk-bar { width: 60px; }

/* Biz chips */
.biz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.biz-chip { padding: 4px 10px; border-radius: var(--radius-full); font-size: 11.5px; font-weight: 600; background: var(--gray-100); color: var(--gray-600); cursor: pointer; border: 1px solid var(--gray-200); transition: all .15s; }
.biz-chip:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.biz-chip strong { color: var(--gray-800); }
.biz-tag { padding: 2px 8px; background: var(--gray-100); color: var(--gray-600); border-radius: var(--radius-full); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.zon-tag  { padding: 2px 8px; background: #e0e7ff; color: #4f46e5; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; white-space: nowrap; }

/* Latest list */
.latest-list { display: flex; flex-direction: column; gap: 6px; }
.latest-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius); cursor: pointer; border: 1px solid var(--gray-100); transition: all .15s; }
.latest-item:hover { background: var(--gray-50); border-color: var(--gray-200); }
.latest-cat-bar { width: 4px; height: 44px; border-radius: var(--radius-full); flex-shrink: 0; }
.latest-body { flex: 1; min-width: 0; }
.latest-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.latest-meta { display: flex; gap: 8px; font-size: 11px; color: var(--gray-500); flex-wrap: wrap; margin-top: 2px; }
.latest-score-wrap { text-align: right; flex-shrink: 0; }
.latest-pct { font-size: 17px; font-weight: 900; }

/* Quick links strip */
.quick-links-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-link-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); font-size: 11.5px; font-weight: 600; color: var(--gray-600); cursor: pointer; flex: 1; min-width: 80px; transition: all .15s; box-shadow: var(--shadow-sm); }
.quick-link-btn i { font-size: 18px; color: var(--primary); }
.quick-link-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* Officer table */
.officer-table-wrap { overflow-x: auto; }

/* Rank items (new cc-style) */
.rank-no { font-size: 14px; font-weight: 700; color: var(--gray-400); }
.ranking-list { display: flex; flex-direction: column; gap: 6px; }
.rk-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 12px 14px; box-shadow: var(--shadow-sm); transition: all .15s; }
.rk-item:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.rk-top { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff); }
.rk-pos { min-width: 36px; text-align: center; flex-shrink: 0; }
.rk-body { flex: 1; min-width: 0; }
.rk-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.rk-meta { font-size: 11.5px; color: var(--gray-500); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.rk-cat-pills { margin-top: 4px; }
.rk-score-wrap { text-align: right; flex-shrink: 0; }
.rk-pct { font-size: 18px; font-weight: 900; }
.rk-range { font-size: 11px; margin-top: 2px; display: flex; gap: 6px; justify-content: flex-end; }
.rk-view { margin-left: 4px; flex-shrink: 0; }
.loks-badge { display: inline-flex; padding: 2px 7px; background: var(--gray-100); color: var(--gray-600); border-radius: var(--radius-full); font-size: 11px; font-weight: 600; margin-right: 4px; }
.multi-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; background: #e0e7ff; color: #4f46e5; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }

/* Lokasi cards */
.lokasi-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: all .15s; }
.lokasi-card:hover { box-shadow: var(--shadow); }
.lokasi-card-top { display: flex; gap: 12px; align-items: flex-start; }
.lokasi-card-score-wrap { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.lokasi-score-circle { width: 52px; height: 52px; border-radius: 50%; border: 3px solid; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.lokasi-card-body { flex: 1; min-width: 0; }
.lokasi-card-name { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 3px; }
.lokasi-card-penjaja { font-size: 12px; color: var(--gray-600); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.lokasi-card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--gray-500); }
.lokasi-card-meta span { display: flex; align-items: center; gap: 4px; }
.lokasi-card-gps { flex-shrink: 0; }
.lokasi-history-strip { display: flex; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-100); align-items: flex-end; }
.lokasi-hist-item { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: default; }
.lokasi-hist-bar { border-radius: 3px 3px 0 0; width: 14px; min-height: 3px; transition: height .3s; }
.lokasi-hist-score { font-size: 9.5px; font-weight: 700; color: var(--gray-500); }

/* Penjaja profile */
.profile-hero { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 18px; display: flex; gap: 16px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.profile-hero-left { display: flex; gap: 14px; align-items: center; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-nama   { font-size: 16px; font-weight: 800; color: var(--gray-800); }
.profile-ic     { font-size: 12.5px; color: var(--gray-500); font-family: monospace; }
.profile-phone  { font-size: 12.5px; color: var(--gray-500); }
.profile-hero-stats { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-left: auto; }
.profile-stat { text-align: center; min-width: 60px; }
.profile-stat-val { font-size: 17px; font-weight: 800; color: var(--gray-800); }
.profile-stat-lbl { font-size: 10px; color: var(--gray-500); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* Insight alerts */
.insight-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.5; }
.insight-alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.insight-alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.insight-alert-red  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Area zone cards */
.area-zone-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .area-zone-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .area-zone-grid { grid-template-columns: repeat(3, 1fr); } }
.area-zone-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: all .15s; }
.area-zone-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.area-zone-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); }
.area-zone-name  { font-size: 14px; font-weight: 800; color: var(--gray-800); }
.area-zone-score { font-size: 20px; font-weight: 900; }
.area-zone-body  { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.area-zone-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--gray-600); }
.area-zone-stats span { display: flex; align-items: center; gap: 4px; }
.area-zone-cats  { display: flex; gap: 4px; }
.area-zone-dims  { display: flex; flex-direction: column; gap: 4px; }
.area-zone-footer{ display: flex; gap: 6px; flex-wrap: wrap; }

/* Movement badges (trends) */
.movement-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mvt-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; }
.mvt-improved { background: #dcfce7; color: #16a34a; }
.mvt-dropped  { background: #fee2e2; color: #dc2626; }
.mvt-same     { background: var(--gray-100); color: var(--gray-600); }
.mvt-new      { background: #dbeafe; color: #2563eb; }
.mvt-repeat   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* Insight cards */
.insight-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .insight-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .insight-grid { grid-template-columns: repeat(4, 1fr); } }
.insight-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 14px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-sm); }
.insight-card-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.insight-card-body { flex: 1; min-width: 0; }
.insight-card-label { font-size: 10.5px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.insight-card-val { font-size: 15px; font-weight: 800; color: var(--gray-800); margin-bottom: 2px; line-height: 1.2; }
.insight-card-sub { font-size: 11px; color: var(--gray-500); }
.insight-card-green  .insight-card-icon { background: #dcfce7; color: #16a34a; }
.insight-card-red    .insight-card-icon { background: #fee2e2; color: #dc2626; }
.insight-card-amber  .insight-card-icon { background: #fef3c7; color: #d97706; }
.insight-card-blue   .insight-card-icon { background: #dbeafe; color: #2563eb; }
.insight-card-indigo .insight-card-icon { background: #e0e7ff; color: #4f46e5; }

/* Follow-up priority list */
.priority-list { display: flex; flex-direction: column; gap: 8px; }
.priority-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.priority-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--gray-200); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; color: var(--gray-700); flex-shrink: 0; }
.priority-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.priority-body { flex: 1; min-width: 0; }
.priority-label { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.priority-desc  { font-size: 12px; color: var(--gray-500); }
.priority-action { flex-shrink: 0; }
.priority-high   .priority-icon { background: #fee2e2; color: #dc2626; }
.priority-high   .priority-rank { background: #fee2e2; color: #dc2626; }
.priority-medium .priority-icon { background: #fef3c7; color: #d97706; }
.priority-medium .priority-rank { background: #fef3c7; color: #d97706; }
.priority-low    .priority-icon { background: #dbeafe; color: #2563eb; }

/* Review flags */
.flag-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--radius-full); font-size: 10.5px; font-weight: 600; border: 1px solid; margin-right: 3px; }
.flag-detail { font-size: 11.5px; color: var(--gray-600); }
.flags-summary-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.flag-summary-chip { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-lg); font-size: 12.5px; font-weight: 600; border: 1px solid; }

/* Map legend & toolbar */
.map-legend-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray-600); }
.map-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.map-legend-heat { width: 32px; height: 10px; border-radius: var(--radius-full); background: linear-gradient(to right, #3b82f6, #22c55e, #f59e0b, #ef4444); }
.map-toggle-group { display: flex; gap: 4px; }
.map-info-bar { font-size: 12.5px; color: var(--gray-600); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ── Enhanced Map (Peta Haba) UI ───────────────────────────── */
/* Filter toolbar */
.map-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  align-items: flex-end;
}
.map-filter-group { display: flex; flex-direction: column; gap: 4px; }
.map-filter-label {
  font-size: 11px; font-weight: 600;
  color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 4px;
}

/* Score range dual slider */
.map-score-slider-wrap {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}
.map-dual-slider {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.map-slider {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  pointer-events: none;
  z-index: 3;
}
.map-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(37,99,235,.4);
  cursor: pointer;
  pointer-events: all;
}
.map-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  cursor: pointer;
  pointer-events: all;
}
.map-slider-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  z-index: 1;
}
.map-slider-fill {
  position: absolute;
  height: 100%;
  background: #2563eb;
  border-radius: 2px;
}
.map-slider-min { z-index: 4; }
.map-slider-max { z-index: 4; }

/* Layer toggle buttons */
.map-controls-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-bottom: 10px;
}
.map-layer-toggles { display: flex; gap: 4px; }
.map-layer-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: #fff;
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  cursor: pointer;
  transition: all .15s;
}
.map-layer-btn:hover { border-color: var(--primary); color: var(--primary); }
.map-layer-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

/* Legend row inside controls bar */
.map-legend-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 12px; color: var(--gray-600);
}
.map-legend-dot-item { display: flex; align-items: center; gap: 4px; font-size: 11.5px; }
.map-legend-dot-circle {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.6);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.map-legend-heat-pill {
  display: inline-block;
  width: 28px; height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #3b82f6, #22c55e, #f59e0b, #ef4444);
}

/* Count badge */
.map-count-badge {
  margin-left: auto;
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Map canvas + mini stats */
.map-canvas-wrap {
  position: relative;
  margin-bottom: 12px;
}
.map-mini-stats {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  min-width: 150px;
  box-shadow: var(--shadow);
  z-index: 500;   /* above Leaflet tiles (z-index 400) */
  pointer-events: none;
}
.map-mini-title {
  font-size: 11px; font-weight: 700;
  color: var(--gray-700); text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.map-mini-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--gray-600);
  padding: 2px 0;
}
.map-mini-row strong { font-weight: 700; color: var(--gray-800); }

/* Responsive: hide mini-stats on very small screens */
@media (max-width: 480px) {
  .map-mini-stats { display: none; }
  .map-toolbar { flex-direction: column; }
}

/* Empty state helper */
.cc-empty { text-align: center; padding: 40px 20px; }
.cc-empty i { font-size: 36px; color: var(--gray-300); display: block; margin-bottom: 10px; }
.cc-empty-title { font-size: 14px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }
.cc-empty-sub   { font-size: 12px; color: var(--gray-400); }

/* ===================== PRINT STYLES ===================== */
@media print {
  .topbar, .sidebar, .bottom-nav, .sidebar-overlay,
  .scroll-top-btn, .wizard-nav, .report-header-top,
  .report-header-actions, .report-public-url,
  .toast-container, .modal-overlay { display: none !important; }
  body { background: #fff; }
  .app-layout { margin-left: 0 !important; }
  .main-content { padding: 0 !important; max-width: 100% !important; }
  .report-wrap { max-width: 100% !important; }
  .report-section { page-break-inside: avoid; border: 1px solid #ddd !important; box-shadow: none !important; }
  .print-footer { display: flex; justify-content: space-between; font-size: 11px; color: #888; margin-top: 20px; padding-top: 10px; border-top: 1px solid #ddd; }
}
.print-footer { display: none; }

/* ===================== RESPONSIVE TWEAKS ===================== */
@media (max-width: 360px) {
  .stats-grid-4 { grid-template-columns: 1fr 1fr; }
  .main-content { padding-left: 12px; padding-right: 12px; }
  .wizard-step-row { gap: 2px; }
  .wizard-step-dot { width: 22px; height: 22px; font-size: 10px; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .section-title { font-size: 15px; }
  .report-score-hero { flex-direction: column; align-items: center; text-align: center; }
  .score-hero-info { text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   MANAGEMENT DASHBOARD v2 — Redesigned Components
═══════════════════════════════════════════════════════════════════ */

/* ── Page layout ── */
.mgmt-page-map { padding-bottom: 0; }

/* ── KPI Strip v2 (4 large cards) ── */
.kpi-strip-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}
@media (min-width: 768px) { .kpi-strip-v2 { grid-template-columns: repeat(4, 1fr); } }

.kpi2-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .15s;
  border-top: 3px solid transparent;
}
.kpi2-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi2-blue   { border-top-color: #2563eb; }
.kpi2-teal   { border-top-color: #0891b2; }
.kpi2-score  { border-top-color: #16a34a; }
.kpi2-purple { border-top-color: #7c3aed; }

.kpi2-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.kpi2-blue   .kpi2-icon-wrap { background: #dbeafe; color: #2563eb; }
.kpi2-teal   .kpi2-icon-wrap { background: #cffafe; color: #0891b2; }
.kpi2-score  .kpi2-icon-wrap { background: #dcfce7; color: #16a34a; }
.kpi2-purple .kpi2-icon-wrap { background: #ede9fe; color: #7c3aed; }

.kpi2-content { flex: 1; min-width: 0; }
.kpi2-value { font-size: 26px; font-weight: 900; color: var(--gray-900); line-height: 1; }
.kpi2-label { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-top: 3px; }
.kpi2-sub   { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ── Category sub-strip ── */
.cat-kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
@media (min-width: 480px)  { .cat-kpi-strip { grid-template-columns: repeat(4, 1fr); } }

.cat-kpi-item {
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.cat-kpi-item i { font-size: 14px; flex-shrink: 0; }
.cat-kpi-val  { font-size: 20px; font-weight: 900; line-height: 1; }
.cat-kpi-lbl  { font-size: 10.5px; font-weight: 600; flex: 1; }
.cat-kpi-pct  { font-size: 11px; font-weight: 700; }

/* ── Taburan Kategori v2 (donut + bars side by side) ── */
.cat-dist-v2 {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cat-dist-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.cat-dist-row  { display: flex; align-items: center; gap: 8px; }
.cat-dist-kat  { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; min-width: 62px; }
.cat-dot       { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-dist-bar-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.cat-dist-bar-fill  { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.cat-dist-nums { display: flex; gap: 6px; align-items: center; min-width: 64px; justify-content: flex-end; }
.cat-dist-nums strong { font-size: 14px; font-weight: 800; }
.cat-dist-nums .text-muted { font-size: 11px; }
.cat-dist-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding-top: 6px; border-top: 1px solid var(--gray-100); margin-top: 3px; }

/* ── cc-card-badge ── */
.cc-card-badge {
  font-size: 11px; font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ── Dimension bars footer ── */
.dim-footer-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.dim-footer-item {
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.dim-footer-item i { font-size: 14px; color: var(--gray-400); }
.dim-footer-label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; }
.dim-footer-name  { font-size: 12px; font-weight: 700; color: var(--gray-700); }
.dim-footer-sep   { width: 1px; height: 32px; background: var(--gray-200); }
.dim-footer-weak  i  { color: #dc2626; }
.dim-footer-strong i { color: #16a34a; }

/* ── Zone scoreboard v2 ── */
.zone-scoreboard-v2 { display: flex; flex-direction: column; gap: 7px; }
.zone-row-v2 {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  cursor: pointer; transition: background .15s;
}
.zone-row-v2:hover { background: var(--gray-50); }
.zone-row-left { min-width: 90px; }
.zone-name-label { font-size: 12.5px; font-weight: 700; color: var(--gray-700); }
.zone-count-label { font-size: 10.5px; color: var(--gray-400); }
.zone-bar-wrap { flex: 1; }
.zone-bar-track { height: 8px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.zone-bar-fill  { height: 100%; border-radius: var(--radius-full); transition: width .5s ease; }
.zone-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 70px; }
.zone-avg-val   { font-size: 14px; font-weight: 800; line-height: 1; }
.zone-kat-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); }

/* ── Biz score table (new) ── */
.biz-score-table { display: flex; flex-direction: column; gap: 7px; }
.biz-score-row   { display: flex; align-items: center; gap: 8px; }
.biz-score-rank  {
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.biz-score-info  { flex: 1; min-width: 0; }
.biz-score-name  { font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-score-bar-track { height: 6px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.biz-score-bar-fill  { height: 100%; border-radius: var(--radius-full); transition: width .5s ease; }
.biz-score-meta  { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 44px; }
.biz-score-avg   { font-size: 13px; font-weight: 800; line-height: 1; }
.biz-score-cnt   { font-size: 10px; color: var(--gray-400); }
.biz-score-kat   { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); flex-shrink: 0; }
.biz-score-empty { font-size: 13px; color: var(--gray-400); text-align: center; padding: 20px 0; }

/* ── TKK list v2 ── */
.tkk-list-v2 { display: flex; flex-direction: column; gap: 7px; }
.tkk-row-v2  { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; transition: background .15s; }
.tkk-row-v2:hover { background: var(--gray-50); }
.tkk-rank-v2 { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tkk-body    { flex: 1; min-width: 0; }
.tkk-name-v2 { font-size: 12.5px; font-weight: 700; color: var(--gray-800); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkk-bar-track { height: 5px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.tkk-bar-fill  { height: 100%; border-radius: var(--radius-full); transition: width .5s ease; }
.tkk-meta-v2 { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 44px; font-size: 11.5px; }
.tkk-kat-badge { font-size: 10px; font-weight: 700; }

/* ── Latest list v2 ── */
.latest-list-v2 { display: flex; flex-direction: column; gap: 0; }
.latest-row-v2  { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background .15s; border-radius: var(--radius); }
.latest-row-v2:last-child { border-bottom: none; }
.latest-row-v2:hover { background: var(--gray-50); }
.latest-kat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.latest-body-v2 { flex: 1; min-width: 0; }
.latest-name-v2 { font-size: 13.5px; font-weight: 700; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-sub-v2  { display: flex; gap: 8px; font-size: 11px; color: var(--gray-500); flex-wrap: wrap; margin-top: 2px; }
.latest-score-v2 { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* ── Quick links v2 ── */
.quick-links-strip-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
@media (min-width: 480px)  { .quick-links-strip-v2 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px)  { .quick-links-strip-v2 { grid-template-columns: repeat(9, 1fr); } }

.quick-link-v2 {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 11px; font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.quick-link-v2:hover { box-shadow: var(--shadow); transform: translateY(-1px); background: var(--gray-50); }
.ql-icon { width: 34px; height: 34px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ql-label { text-align: center; line-height: 1.3; }

/* ── .mt-0 helper ── */
.mt-0 { margin-top: 0 !important; }

/* ═══════════════════════════════════════════════════════════════════
   HEATMAP PAGE v2 — Enhanced Layout
═══════════════════════════════════════════════════════════════════ */

/* ── Map page wrapper ── */
.mgmt-page-map .mgmt-page { padding-bottom: 16px; }

/* ── Toolbar ── */
.map-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 12px 14px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.map-filter-group { display: flex; flex-direction: column; gap: 4px; }
.map-filter-label { font-size: 10.5px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }

/* ── Score slider ── */
.map-score-slider-wrap {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 12px 16px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.map-dual-slider { position: relative; height: 28px; margin-top: 6px; }
.map-slider {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; -webkit-appearance: none; appearance: none;
  background: transparent; pointer-events: none; z-index: 2;
}
.map-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  cursor: pointer; pointer-events: all;
}
.map-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  cursor: pointer; pointer-events: all; border: none;
}
.map-slider-track {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; height: 6px;
  background: var(--gray-200); border-radius: var(--radius-full);
  z-index: 1;
}
.map-slider-fill {
  position: absolute; height: 100%;
  background: #2563eb; border-radius: var(--radius-full);
}

/* ── Controls bar (layer toggles + legend + count) ── */
.map-controls-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 10px 14px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.map-layer-toggles { display: flex; gap: 4px; }
.map-layer-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: #fff; color: var(--gray-600);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.map-layer-btn:hover { background: var(--gray-100); }
.map-layer-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.map-legend-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.map-legend-dot-item { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--gray-600); }
.map-legend-dot-circle { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.map-legend-heat-pill { width: 30px; height: 8px; border-radius: var(--radius-full); background: linear-gradient(to right, #3b82f6, #22c55e, #f59e0b, #ef4444); flex-shrink: 0; }

.map-count-badge { font-size: 12.5px; font-weight: 600; color: var(--gray-600); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-count-badge i { color: var(--primary); }

/* ── Map canvas + mini stats ── */
.map-canvas-wrap { position: relative; margin-bottom: 12px; }

.map-mini-stats {
  position: absolute; top: 12px; right: 12px; z-index: 500;
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  min-width: 160px;
  max-width: 190px;
  backdrop-filter: blur(8px);
}
.map-mini-title {
  font-size: 11px; font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.map-mini-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--gray-600);
  padding: 3px 0;
  border-bottom: 1px solid var(--gray-100);
}
.map-mini-row:last-child { border-bottom: none; }
.map-mini-row strong { font-weight: 700; color: var(--gray-800); }

/* ── Map card list ── */
.map-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px)  { .map-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .map-cards-grid { grid-template-columns: repeat(4, 1fr); } }

.map-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 12px;
  box-shadow: var(--shadow-sm); transition: all .15s;
}
.map-card:hover { box-shadow: var(--shadow); }
.map-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.map-card-kat    { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.map-card-score  { font-size: 16px; font-weight: 900; }
.map-card-name   { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card-lokasi { font-size: 11.5px; color: var(--gray-500); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card-zon    { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.map-card-actions{ display: flex; gap: 5px; margin-top: 8px; }
.map-card-more   {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray-500);
  border: 2px dashed var(--gray-200); border-radius: var(--radius-lg);
  padding: 20px; cursor: default; min-height: 100px;
}
.map-card-more i { font-size: 20px; color: var(--gray-300); }

/* ── Leaflet cluster overrides ── */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform .3s ease-out, opacity .3s ease-in;
}

/* ═══════════════════════════════════════════════════════════════════
   FILTER BAR v2 — enhanced with TKK cascade & sort dropdown
═══════════════════════════════════════════════════════════════════ */
.cc-filter-bar-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.cc-filter-bar-v2 .cc-search-wrap { flex: 1 1 180px; min-width: 160px; }
.cc-filter-bar-v2 .cc-select      { flex: 0 0 auto; min-width: 130px; max-width: 180px; }
.pg-reset-btn { white-space: nowrap; margin-left: auto; }

/* ── Pegawai filter bar (ui.js views use .filter-bar) ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 8px;
}
.filter-bar .search-wrap { flex: 1 1 180px; min-width: 160px; }
.filter-bar .form-select  { flex: 0 0 auto; min-width: 130px; }

/* ═══════════════════════════════════════════════════════════════════
   SORTABLE TABLE HEADERS
═══════════════════════════════════════════════════════════════════ */
.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background .12s;
}
.th-sort:hover { background: var(--gray-100); }
.th-sort-active { color: var(--primary); background: var(--primary-light) !important; }

/* ═══════════════════════════════════════════════════════════════════
   PAGINATOR
═══════════════════════════════════════════════════════════════════ */
.paginator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  font-size: 12.5px;
  color: var(--gray-600);
}

/* rows-per-page */
.pg-limit-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pg-limit-label { font-weight: 600; color: var(--gray-500); font-size: 12px; }
.pg-limit-select {
  padding: 3px 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
}

/* info text */
.pg-info {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* button group */
.pg-btns {
  display: flex;
  align-items: center;
  gap: 3px;
}
.pg-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg-btn:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-btn-active { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.pg-ellipsis {
  padding: 0 4px;
  color: var(--gray-400);
  font-size: 13px;
  line-height: 30px;
}
/* numbered pages hidden on mobile — show prev/next only */
.pg-numbered { display: none; }
@media (min-width: 480px) { .pg-numbered { display: contents; } }

/* ── Pegawai list paginator wrapper ── */
.list-paginator { padding: 8px 0 16px; }

/* ═══════════════════════════════════════════════════════════════════
   SORT DROPDOWN OPTION GROUP LABEL
═══════════════════════════════════════════════════════════════════ */
.cc-select optgroup { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════
   FILTER ACTIVE COUNT BADGE  (shown when filters are applied)
═══════════════════════════════════════════════════════════════════ */
.filter-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

/* ── cc-filter-bar (original) gets same wrap treatment ── */
.cc-filter-bar {
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS FOR FILTER ROWS
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .cc-filter-bar-v2 .cc-select { min-width: 110px; font-size: 12px; }
  .cc-filter-bar-v2 .cc-search { font-size: 12px; }
  .paginator { flex-direction: row; }
  .pg-info   { flex: none; width: 100%; text-align: left; order: 3; }
}

/* ═══════════════════════════════════════════════════════════════════
   LOKASI CARDS — add sort/filter wrap for card view
═══════════════════════════════════════════════════════════════════ */
.lokasi-cards-wrap { }
.lokasi-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 768px) { .lokasi-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .lokasi-cards-grid { grid-template-columns: repeat(3, 1fr); } }

/* ═══════════════════════════════════════════════════════════════════
   PEGAWAI LIST CARD SORT INDICATOR
═══════════════════════════════════════════════════════════════════ */
.sort-indicator {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  margin-left: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   SEMAKAN DATA — interactive flag chips
═══════════════════════════════════════════════════════════════════ */
.flag-summary-chip {
  cursor: pointer;
  transition: box-shadow .12s, transform .1s;
}
.flag-summary-chip:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
/* "Semua" chip — neutral colour */
.flag-chip-all {
  border-color: var(--gray-300) !important;
  background: var(--gray-50) !important;
  color: var(--gray-700);
}
/* Active / selected chip */
.flag-chip-sel {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  box-shadow: var(--shadow-sm);
}
/* Flag-type inline chip inside table rows */
.flag-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   PEGAWAI LIST — cc-filter-bar-v2 within .section-header context
═══════════════════════════════════════════════════════════════════ */
/* Ensure paginator inside Pegawai list renders correctly */
#bancianListPaginator,
#penjajListPaginator { padding-top: 6px; }

/* count label above list uses cc-list-count */
.cc-list-count {
  font-size: 12px;
  color: var(--gray-500);
  padding: 4px 0 8px;
  font-weight: 600;
}

/* ── Zon tag used inside table cells ── */
.zon-tag {
  display: inline-block;
  padding: 1px 7px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
}

/* ── list-count already defined above for older selectors ── */
.list-count {
  font-size: 12px;
  color: var(--gray-500);
  padding: 4px 0 8px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — hide less-critical table columns on small screens
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .cc-table th:nth-child(n+7),
  .cc-table td:nth-child(n+7) { display: none; }
  .flags-summary-strip { gap: 6px; }
  .flag-summary-chip   { font-size: 11.5px; padding: 5px 9px; }
}

