/* =========================================================
   SIMANTAP — Sistem Informasi Manajemen Pasar Kabupaten
   Design tokens: two administrative scopes, one shared system.
   Kabupaten  = deep navy + antique gold  (authority, oversight)
   Pasar      = deep emerald + terracotta (the marketplace itself)
   ========================================================= */

:root{
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, .16);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .28);

  --font-display: 'Outfit', 'Plus Jakarta Sans', 'Segoe UI', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, sans-serif;

  --ok: #0f8a5f;
  --warn: #b8791a;
  --bad: #c23b3b;
  --ok-bg: #e8f6ef;
  --warn-bg: #fbf1de;
  --bad-bg: #fbeaea;
}

/* ---- Scope: KABUPATEN (navy / gold) ---- */
[data-scope="kabupaten"]{
  --primary-950: #0d1638;
  --primary-900: #131f4d;
  --primary-800: #1c2c66;
  --primary-700: #26397f;
  --primary-100: #e7eaf6;
  --primary-50:  #f4f5fb;
  --accent: #c9a227;
  --accent-dark: #a5811a;
  --accent-100: #faf3dd;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #171d3a;
  --text-muted: #5a6187;
  --border: #e4e6f2;
}

/* ---- Scope: PASAR / KECAMATAN (emerald / terracotta) ---- */
[data-scope="pasar"],
[data-scope="kecamatan"]{
  --primary-950: #072823;
  --primary-900: #0b3f37;
  --primary-800: #0f5548;
  --primary-700: #146b5a;
  --primary-100: #e2f2ec;
  --primary-50:  #f2faf7;
  --accent: #c76b3f;
  --accent-dark: #a3532e;
  --accent-100: #fbe9de;
  --bg: #f5faf8;
  --surface: #ffffff;
  --text: #14241f;
  --text-muted: #586b64;
  --border: #dfeee8;
}

*{box-sizing:border-box;}
html{min-height:100%;}
body{
  min-height:100%;
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-display); font-weight:700; margin:0 0 .35em; letter-spacing:-.01em;}
h1{font-size:26px;}
h2{font-size:21px;}
h3{font-size:17px;}
h4{font-size:15px;}
a{color:inherit; text-decoration:none;}
img{max-width:100%; display:block;}
::selection{background:var(--accent-100); color:var(--text);}

/* ---------- App shell ---------- */
.app-shell{
  display:flex;
  min-height:100vh;
  width:100%;
}

.sidebar{
  width:264px;
  height:100vh;
  height:100dvh;
  flex-shrink:0;
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  z-index:30;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  overscroll-behavior:contain;
  background:linear-gradient(180deg, #8b5cf6 0%, #7c3aed 45%, #6d28d9 100%);
  color:#fff;
  border-right:1px solid rgba(255,255,255,.18);
  box-shadow:4px 0 28px -4px rgba(124,58,237,.35);
}

.sidebar-brand{
  position:relative; z-index:2;
  padding:20px 18px 16px;
  display:flex; align-items:center; gap:12px;
  background:rgba(255,255,255,.10);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,.16);
}
.sidebar-brand .brand-logo{
  width:40px; height:50px; object-fit:contain; flex-shrink:0;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.35));
  transition:transform .2s ease;
}
.sidebar-brand:hover .brand-logo{ transform:scale(1.05); }
.sidebar-brand .name{font-family:var(--font-display); font-size:16.5px; font-weight:800; line-height:1.15; color:#ffffff;}
.sidebar-brand .scope-tag{
  display:inline-flex; align-items:center; gap:5px;
  margin-top:3px; padding:3px 9px; border-radius:99px;
  font-size:10px; letter-spacing:.08em; text-transform:uppercase; font-weight:700;
  background:linear-gradient(135deg, rgba(254,240,138,.30) 0%, rgba(245,158,11,.22) 100%);
  color:#fffbeb; border:1px solid rgba(253,224,71,.60);
}
.sidebar-brand .scope-tag::before{
  content:""; width:5px; height:5px; border-radius:50%; background:#fde047;
  box-shadow:0 0 8px #fef08a; flex-shrink:0;
}

.sidebar-nav{
  position:relative; z-index:2;
  padding:16px 14px 28px;
  overflow-y:auto; flex:1;
  overscroll-behavior:contain;
  background:transparent;
  display:flex; flex-direction:column;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.28) transparent;
}
.sidebar-nav::-webkit-scrollbar{width:5px;}
.sidebar-nav::-webkit-scrollbar-track{background:transparent;}
.sidebar-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.28); border-radius:99px;}
.sidebar-nav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.45);}

.nav-group{margin-bottom:14px;}
.nav-group-label{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.10em;
  color:rgba(255,255,255,.90); padding:0 10px 6px; font-weight:800;
  text-shadow:0 1px 4px rgba(0,0,0,.5);
}

.nav-item{
  display:flex; align-items:center; gap:11px;
  padding:8.5px 12px; border-radius:10px;
  color:rgba(255,255,255,.94); font-size:13px; font-weight:600;
  margin-bottom:2px; position:relative;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
  transition:all .18s ease;
  text-shadow:0 1px 2px rgba(0,0,0,.20);
}
.nav-item svg{width:18px; height:18px; flex-shrink:0; opacity:.92;}
.nav-item:hover{
  background:rgba(255,255,255,.22); color:#ffffff;
  border-color:rgba(255,255,255,.32);
  transform:translateX(3px); box-shadow:0 3px 10px rgba(0,0,0,.15);
}
.nav-item.active{
  background:#ffffff; color:#6d28d9; font-weight:800;
  border-color:#ffffff;
  box-shadow:0 4px 16px rgba(0,0,0,.18);
  text-shadow:none;
}
.nav-item.active::before{
  content:""; position:absolute; left:-14px; top:6px; bottom:6px; width:4px;
  background:#fde047; border-radius:0 4px 4px 0;
}
.nav-item.active svg{opacity:1; color:#6d28d9;}
.nav-item .badge-bad{
  margin-left:auto; background:linear-gradient(135deg, #ef4444, #dc2626); color:#ffffff;
  border:1px solid rgba(255,255,255,.4); box-shadow:0 2px 8px rgba(239,68,68,.45);
  font-size:11px; font-weight:800; border-radius:99px; padding:2px 8px;
}

/* Group Action Pills (Kecamatan, Pasar, Keluar) Inside Sidebar */
.sidebar-actions-group{
  margin-top:14px;
  margin-bottom:6px;
  padding:12px;
  border-radius:12px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
}
.sidebar-actions-label{
  font-size:10px; text-transform:uppercase; letter-spacing:.11em;
  color:rgba(255,255,255,.75); font-weight:700;
  margin-bottom:8px; padding-left:2px;
}
.switch-pills-wrap{
  display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%;
}
.switch-pill{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:7.5px 8px; border-radius:8px; font-size:12px; font-weight:600;
  color:rgba(255,255,255,.92); background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.20); text-decoration:none;
  transition:all .18s ease; white-space:nowrap;
  box-sizing:border-box;
}
.switch-pill:hover{
  background:rgba(255,255,255,.24); color:#ffffff;
  border-color:rgba(255,255,255,.38); transform:translateY(-1px);
}
.switch-pill-logout{
  background:rgba(239,68,68,.25); border-color:rgba(254,202,202,.35);
  color:#fee2e2; cursor:pointer; width:100%;
  display:flex; align-items:center; justify-content:center; gap:6px;
  padding:8px 12px; font-size:12px; font-weight:700;
  border:1px solid rgba(254,202,202,.35);
  border-radius:8px;
  transition:all .18s ease;
  box-sizing:border-box;
}
.switch-pill-logout:hover{
  background:#ef4444; color:#ffffff; border-color:#ef4444;
  box-shadow:0 3px 12px rgba(239,68,68,.35); transform:translateY(-1px);
}

/* Bagian Bawah Sidebar Memanjang */
.sidebar-bottom-spacer{
  margin-top:auto;
  min-height:160px;
  pointer-events:none;
}

/* Topbar Date Time Card */
.topbar-datetime-card{
  background:#ffffff; border:1px solid #e2e8f0; border-radius:12px;
  padding:6px 14px; display:flex; align-items:center; gap:8px;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.topbar-datetime-card .dt-icon{
  width:15px; height:15px; color:#2563eb; flex-shrink:0;
}
.topbar-datetime-card .dt-content{
  display:flex; align-items:center; gap:6px;
}
.topbar-datetime-card .dt-date{
  font-size:12.5px; font-weight:600; color:#1e293b;
}
.topbar-datetime-card .dt-divider{
  color:#cbd5e1; font-size:12px;
}
.topbar-datetime-card .dt-time{
  font-size:12px; font-weight:700; color:#1d4ed8; background:#eff6ff;
  padding:2px 7px; border-radius:6px;
}

/* Topbar Notif & User Pill */
.topbar-notif-btn{
  position:relative; width:38px; height:38px; border-radius:10px;
  background:#ffffff; border:1px solid #e2e8f0; display:flex;
  align-items:center; justify-content:center; color:#64748b;
  cursor:pointer; transition:all .2s ease;
}
.topbar-notif-btn:hover{
  background:#f8fafc; color:#1e293b; border-color:#cbd5e1;
}
.topbar-notif-btn svg{width:18px; height:18px;}
.notif-badge-pill{
  position:absolute; top:-4px; right:-4px; background:#ef4444; color:#fff;
  font-size:10px; font-weight:800; width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:2px solid #ffffff; box-shadow:0 1px 4px rgba(239,68,68,.3);
}
.topbar-user-link{
  display:flex; align-items:center; gap:10px; padding:4px 12px 4px 4px;
  border-radius:99px; border:1px solid #e2e8f0; background:#ffffff;
  text-decoration:none; color:inherit; transition:all .2s ease;
}
.topbar-user-link:hover{
  background:#f8fafc; border-color:#cbd5e1; box-shadow:0 2px 8px rgba(15,23,42,.06);
}
.topbar-avatar-wrap{position:relative;}
.avatar-photo-topbar{
  width:36px; height:36px; border-radius:50%; object-fit:cover;
  border:1.5px solid #2563eb;
}
.avatar-status-dot{
  position:absolute; bottom:0; right:0; width:9px; height:9px;
  border-radius:50%; background:#10b981; border:1.5px solid #ffffff;
}

.btn-topbar-logout{
  color:#ef4444; border-color:#fca5a5; padding:5px 12px; font-size:12.5px;
  font-weight:600; gap:6px; border-radius:8px; display:inline-flex;
  align-items:center; transition:all .18s ease; background:rgba(254,242,242,.6);
}
.btn-topbar-logout:hover{
  background:#ef4444; color:#ffffff; border-color:#ef4444;
  box-shadow:0 2px 8px rgba(239,68,68,.25);
}

.main{
  margin-left:264px;
  width:calc(100% - 264px);
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

.topbar{
  background:var(--surface);
  border-bottom:1px solid var(--border);
  padding:16px 32px;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:20;
}
.topbar-title{font-family:var(--font-display); font-size:18px; font-weight:700;}
.topbar-eyebrow{
  font-size:11px; text-transform:uppercase; letter-spacing:.09em;
  color:var(--text-muted); font-weight:700; margin-bottom:3px;
}
.topbar-user{display:flex; align-items:center; gap:12px;}
.avatar{
  width:38px; height:38px; border-radius:50%;
  background:var(--primary-900); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:600; font-family:var(--font-display); font-size:15px;
}
.user-meta{line-height:1.25;}
.user-meta .u-name{font-weight:600; font-size:13.5px;}
.user-meta .u-role{font-size:11.5px; color:var(--text-muted);}

.content{padding:28px 32px 60px; max-width:1320px; width:100%; margin:0 auto;}

/* ---------- Cards & surfaces ---------- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
}
.card-pad{padding:24px 26px;}
.card-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 26px; border-bottom:1px solid var(--border);
}
.card-header h3{margin:0; font-size:15px;}
.card-header p{margin:2px 0 0; font-size:13px; color:var(--text-muted);}

/* Stat cards */
.stat-grid{display:grid; grid-template-columns:repeat(5,1fr); gap:16px; margin-bottom:24px;}
@media (max-width:1200px){.stat-grid{grid-template-columns:repeat(3,1fr);}}
@media (max-width:850px){.stat-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:540px){.stat-grid{grid-template-columns:1fr;}}

.stat-card{
  background:var(--surface); border:1px solid var(--border); border-radius:18px;
  padding:20px 22px; position:relative; overflow:hidden; box-shadow:var(--shadow-sm);
  transition:transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover{
  transform:translateY(-3px); box-shadow:var(--shadow-md);
}
.stat-card::after{
  content:""; position:absolute; right:-25px; top:-25px; width:100px; height:100px;
  border-radius:50%; background:rgba(255,255,255,.35); pointer-events:none;
}
.stat-card .icon-badge{
  width:44px; height:44px; border-radius:12px; background:var(--primary-900);
  color:#fff; display:flex; align-items:center; justify-content:center; margin-bottom:14px; position:relative; z-index:1;
  transition:transform .2s ease;
}
.stat-card:hover .icon-badge{
  transform:scale(1.06);
}
.stat-card .icon-badge svg{width:22px; height:22px;}
.stat-card .stat-value{font-family:var(--font-display); font-size:30px; font-weight:800; line-height:1.1; letter-spacing:-0.02em; position:relative; z-index:1;}
.stat-card .stat-label{font-size:12.5px; font-weight:600; color:var(--text-muted); margin-top:5px; position:relative; z-index:1;}
.stat-card .stat-tag{
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  padding:2px 8px; border-radius:6px; margin-top:8px; display:inline-block; position:relative; z-index:1;
}

/* --- Pastel Variants for Top Stat Cards --- */
.stat-card.pastel-emerald{
  background: linear-gradient(145deg, #f0fdf4 0%, #e2fbe9 100%);
  border: 1px solid #bbf7d0;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.12);
}
.stat-card.pastel-emerald .icon-badge{
  background: #10b981; color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.stat-card.pastel-emerald .stat-value{ color: #065f46; }
.stat-card.pastel-emerald .stat-label{ color: #047857; }
.stat-card.pastel-emerald .stat-tag{ background: rgba(16, 185, 129, 0.15); color: #065f46; }

.stat-card.pastel-amber{
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.12);
}
.stat-card.pastel-amber .icon-badge{
  background: #f59e0b; color: #fff; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.stat-card.pastel-amber .stat-value{ color: #92400e; }
.stat-card.pastel-amber .stat-label{ color: #b45309; }
.stat-card.pastel-amber .stat-tag{ background: rgba(245, 158, 11, 0.15); color: #92400e; }

.stat-card.pastel-indigo{
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1px solid #ddd6fe;
  box-shadow: 0 4px 20px -2px rgba(139, 92, 246, 0.12);
}
.stat-card.pastel-indigo .icon-badge{
  background: #8b5cf6; color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.stat-card.pastel-indigo .stat-value{ color: #5b21b6; }
.stat-card.pastel-indigo .stat-label{ color: #6d28d9; }
.stat-card.pastel-indigo .stat-tag{ background: rgba(139, 92, 246, 0.15); color: #5b21b6; }

.stat-card.pastel-sky{
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.12);
}
.stat-card.pastel-sky .icon-badge{
  background: #0284c7; color: #fff; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.stat-card.pastel-sky .stat-value{ color: #075985; }
.stat-card.pastel-sky .stat-label{ color: #0369a1; }
.stat-card.pastel-sky .stat-tag{ background: rgba(2, 132, 199, 0.15); color: #075985; }

.stat-card.pastel-rose{
  background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid #fecdd3;
  box-shadow: 0 4px 20px -2px rgba(244, 63, 94, 0.12);
}
.stat-card.pastel-rose .icon-badge{
  background: #f43f5e; color: #fff; box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}
.stat-card.pastel-rose .stat-value{ color: #9f1239; }
.stat-card.pastel-rose .stat-label{ color: #be123c; }
.stat-card.pastel-rose .stat-tag{ background: rgba(244, 63, 94, 0.15); color: #9f1239; }

/* --- Dashboard Welcome Hero Banner --- */
.dash-banner{
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
  color: #fff; border-radius: 20px; padding: 24px 28px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  box-shadow: 0 10px 30px -8px rgba(13, 22, 56, 0.25); position: relative; overflow: hidden;
}
.dash-banner::before{
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.25) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.dash-banner h2{ font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 4px; color: #fff; }
.dash-banner p{ font-size: 13.5px; color: rgba(255,255,255,0.8); margin: 0; max-width: 600px; line-height: 1.45; }
.dash-banner-badge{
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; backdrop-filter: blur(8px);
}
.dash-banner-badge .dot{ width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 18px; border-radius:10px; font-weight:600; font-size:14px;
  border:1px solid transparent; cursor:pointer; transition:all .15s ease; line-height:1.2;
}
.btn svg{width:16px; height:16px;}
.btn-primary{background:var(--primary-900); color:#fff;}
.btn-primary:hover{background:var(--primary-800);}
.btn-accent{background:var(--accent); color:#241a02;}
.btn-accent:hover{background:var(--accent-dark); color:#fff;}
.btn-outline{background:transparent; border-color:var(--border); color:var(--text);}
.btn-outline:hover{border-color:var(--primary-800); background:var(--primary-50);}
.btn-ghost{background:transparent; color:var(--text-muted);}
.btn-ghost:hover{background:var(--primary-50); color:var(--text);}
.btn-danger{background:#fff; color:var(--bad); border-color:#f1cccc;}
.btn-danger:hover{background:var(--bad-bg);}
.btn-sm{padding:7px 13px; font-size:13px; border-radius:8px;}
.btn-block{width:100%;}

/* ---------- Forms ---------- */
.field{margin-bottom:18px;}
.field label{display:block; font-size:13px; font-weight:600; margin-bottom:7px; color:var(--text);}
.field .hint{font-size:12px; color:var(--text-muted); margin-top:5px;}
.field .error{font-size:12.5px; color:var(--bad); margin-top:5px; font-weight:600;}
.input, select.input, textarea.input{
  width:100%; padding:11px 13px; border-radius:10px; border:1.5px solid var(--border);
  background:var(--surface); font-family:var(--font-body); font-size:14.5px; color:var(--text);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus, textarea.input:focus{
  outline:none; border-color:var(--primary-800); box-shadow:0 0 0 3px var(--primary-100);
}
textarea.input{resize:vertical; min-height:90px;}
.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 20px;}
@media (max-width:720px){.form-grid{grid-template-columns:1fr;}}
.checkbox-row{display:flex; align-items:center; gap:10px;}
.checkbox-row input[type="checkbox"]{width:18px; height:18px; accent-color:var(--primary-800);}

/* ---------- Table ---------- */
.table-wrap{overflow-x:auto;}
table.simple{width:100%; border-collapse:collapse; font-size:14px;}
table.simple th{
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--text-muted); font-weight:700; padding:12px 16px; border-bottom:1.5px solid var(--border);
  background:var(--primary-50);
}
table.simple td{padding:14px 16px; border-bottom:1px solid var(--border); vertical-align:middle;}
table.simple tr:last-child td{border-bottom:none;}
table.simple tbody tr:hover{background:var(--primary-50);}

/* Zebra striping — scoped to Data Kecamatan only */
.table-zebra tbody tr:nth-child(odd){background:var(--surface);}
.table-zebra tbody tr:nth-child(even){background:var(--primary-50);}
.table-zebra tbody tr:hover{background:var(--primary-100);}

/* ---------- Badges ---------- */
.badge{
  display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius:99px;
  font-size:12px; font-weight:700;
}
.badge-ok{background:var(--ok-bg); color:var(--ok);}
.badge-warn{background:var(--warn-bg); color:var(--warn);}
.badge-bad{background:var(--bad-bg); color:var(--bad);}
.badge-neutral{background:var(--primary-100); color:var(--primary-800);}
.badge-accent{background:var(--accent-100); color:var(--accent-dark);}
.badge::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor;}

/* ---------- Alerts ---------- */
.alert{padding:14px 18px; border-radius:12px; font-size:14px; margin-bottom:20px; display:flex; gap:10px; align-items:flex-start;}
.alert-success{background:var(--ok-bg); color:var(--ok); border:1px solid #cbeadb;}
.alert-error{background:var(--bad-bg); color:var(--bad); border:1px solid #f2caca;}

/* ---------- Facility grid ---------- */
.facility-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px;}
.facility-card{
  border:1.5px solid var(--border); border-radius:var(--radius-md); padding:18px;
  transition: border-color .15s ease;
}
.facility-card.tersedia{border-color:var(--primary-100); background:var(--primary-50);}
.facility-card .fc-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px;}
.facility-card .fc-icon{
  width:38px; height:38px; border-radius:10px; background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
}
.facility-card .fc-icon svg{width:19px; height:19px; color:var(--primary-800);}
.facility-card .fc-name{font-weight:700; font-size:14.5px; margin-bottom:2px;}
.facility-card .fc-photo{
  width:100%; height:96px; object-fit:cover; border-radius:8px; margin-top:10px;
  border:1px solid var(--border);
}
.facility-card .fc-photo-empty{
  width:100%; height:96px; border-radius:8px; margin-top:10px; border:1.5px dashed var(--border);
  display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:11.5px; gap:6px;
}
.facility-card .fc-photo-empty svg{width:16px; height:16px; opacity:.6;}
.facility-upload-preview{
  width:100%; height:110px; object-fit:cover; border-radius:10px; border:1px solid var(--border); margin-bottom:8px;
}

/* ---------- Auth pages (v2 — transparent hero text + standalone white login box) ---------- */
.login2-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background: var(--bg); padding:24px 20px; position:relative; overflow-y:auto;
}

[data-scope="kabupaten"] .login2-wrap{
  background: 
    linear-gradient(to right, rgba(13, 22, 56, 0.70) 0%, rgba(13, 22, 56, 0.42) 50%, rgba(10, 16, 38, 0.25) 100%),
    url('../images/bg-login-kabupaten.jpg?v=2') center center / cover no-repeat fixed;
}

[data-scope="pasar"] .login2-wrap{
  background: 
    linear-gradient(to right, rgba(7, 40, 35, 0.55) 0%, rgba(7, 40, 35, 0.3) 50%, rgba(0, 0, 0, 0.2) 100%),
    url('../images/bg-login-pasar.jpg') center center / cover no-repeat fixed;
}

[data-scope="kecamatan"] .login2-wrap{
  background: 
    linear-gradient(to right, rgba(4, 40, 34, 0.68) 0%, rgba(6, 78, 59, 0.48) 50%, rgba(0, 0, 0, 0.25) 100%),
    url('../images/bg-login-kecamatan.jpg') center center / cover no-repeat fixed;
}

[data-scope="kecamatan"] .login2-heading h1 .accent,
[data-scope="pasar"] .login2-heading h1 .accent{
  color: #34d399;
}
[data-scope="kecamatan"] .login2-heading .eyebrow,
[data-scope="pasar"] .login2-heading .eyebrow{
  color: #34d399;
}
[data-scope="kecamatan"] .login2-heading .rule,
[data-scope="pasar"] .login2-heading .rule{
  background: #10b981;
}
[data-scope="kecamatan"] .login2-stat-card .sc-icon,
[data-scope="pasar"] .login2-stat-card .sc-icon{
  color: #34d399;
}
[data-scope="kecamatan"] .login2-card-brand .lcb-label,
[data-scope="pasar"] .login2-card-brand .lcb-label{
  color: #065f46;
  font-weight: 800;
  letter-spacing: 0.03em;
}
[data-scope="kecamatan"] .login2-card-brand .lcb-label::after,
[data-scope="pasar"] .login2-card-brand .lcb-label::after{
  background: #10b981;
  height: 3px;
  border-radius: 99px;
}
[data-scope="kecamatan"] .login2-icon-circle,
[data-scope="pasar"] .login2-icon-circle{
  background: #ecfdf5;
}
[data-scope="kecamatan"] .login2-icon-circle svg,
[data-scope="pasar"] .login2-icon-circle svg{
  color: #047857;
}
[data-scope="kecamatan"] .login2-panel .btn-primary,
[data-scope="pasar"] .login2-panel .btn-primary{
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #047857;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.35);
}
[data-scope="kecamatan"] .login2-panel .btn-primary:hover{
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.45);
  transform: translateY(-1px);
}

.login2-shell{
  width:100%; max-width:1160px; display:flex; align-items:center; justify-content:space-between;
  gap:48px; background:transparent; box-shadow:none; border:none; position:relative; z-index:2;
}

.login2-hero{
  flex:1.1; background:transparent; padding:0 20px 0 0; border:none; box-shadow:none; backdrop-filter:none; color:#fff;
  display:flex; flex-direction:column; justify-content:center;
}

.hero-illustration{
  display:none !important;
}

.login2-brand{ display:flex; align-items:center; gap:14px; margin-bottom:24px; }
.login2-brand img{ width:48px; height:62px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.login2-brand .lb-title{ font-weight:800; font-size:14.5px; letter-spacing:.02em; line-height:1.25; text-shadow:0 2px 10px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.9); }
.login2-brand .lb-sub{ font-size:11.5px; color:rgba(255,255,255,.9); font-style:italic; margin-top:2px; text-shadow:0 2px 8px rgba(0,0,0,.8); }

.login2-heading{ margin:0; }
.login2-heading .eyebrow{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--accent); margin-bottom:6px; text-shadow:0 2px 8px rgba(0,0,0,.8); }
.login2-heading h1{ color:#fff; font-size:34px; line-height:1.2; margin-bottom:12px; font-weight:800; text-shadow:0 3px 16px rgba(0,0,0,.85), 0 1px 4px rgba(0,0,0,.9); }
.login2-heading h1 .accent{ color:var(--accent); display:block; }
.login2-heading .rule{ width:54px; height:3.5px; background:var(--accent); border-radius:2px; margin-bottom:14px; box-shadow:0 2px 8px rgba(0,0,0,.5); }
.login2-heading p{ color:rgba(255,255,255,.95); font-size:14.5px; max-width:460px; line-height:1.6; text-shadow:0 2px 10px rgba(0,0,0,.85); }

.login2-stat-card{
  background:rgba(0,0,0,.35); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.18); border-radius:14px; padding:14px 16px;
  display:flex; gap:12px; align-items:flex-start; max-width:420px; margin-top:22px;
  box-shadow:0 10px 25px rgba(0,0,0,.3);
}
.login2-stat-card .sc-icon{
  width:34px; height:34px; border-radius:9px; background:rgba(255,255,255,.18);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--accent);
}
.login2-stat-card .sc-icon svg{ width:18px; height:18px; }
.login2-stat-card .sc-title{ font-weight:700; font-size:13px; margin-bottom:3px; color:#fff; text-shadow:0 1px 6px rgba(0,0,0,.8); }
.login2-stat-card .sc-desc{ font-size:11.5px; color:rgba(255,255,255,.9); line-height:1.45; }

.login2-footer{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;
  font-size:11px; color:rgba(255,255,255,.75); padding-top:16px; margin-top:28px;
  border-top:1px solid rgba(255,255,255,.2); text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.login2-footer span{ display:inline-flex; align-items:center; gap:5px; }

.login2-panel{
  flex:0 0 400px; width:400px; max-width:100%;
  background:#ffffff; border-radius:24px; padding:34px 34px;
  box-shadow:0 25px 60px -12px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.15);
}
.login2-form-box{ width:100%; }
.login2-card-brand{ display:flex; flex-direction:column; align-items:center; gap:5px; margin-bottom:12px; }
.login2-card-brand img{ width:42px; height:54px; object-fit:contain; filter:drop-shadow(0 2px 6px rgba(0,0,0,.12)); margin-bottom:3px; }
.login2-card-brand .lcb-label{
  font-family:var(--font-display); font-weight:700; font-size:14px; color:var(--accent-dark);
  position:relative; padding-bottom:6px;
}
.login2-card-brand .lcb-label::after{
  content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:26px; height:2.5px; background:var(--accent); border-radius:2px;
}

.login2-icon-circle{
  width:46px; height:46px; border-radius:50%; background:var(--primary-100);
  display:flex; align-items:center; justify-content:center; margin:0 auto 10px;
}
.login2-icon-circle svg{ width:22px; height:22px; color:var(--primary-800); }
.login2-form-box h2{ text-align:center; font-size:20px; margin-bottom:4px; font-weight:700; color:var(--text); }
.login2-form-box .sub{ text-align:center; color:var(--text-muted); font-size:12.5px; line-height:1.45; margin-bottom:18px; }

.login2-form-box .field{ margin-bottom:14px; }
.login2-form-box .field label{ font-size:12.5px; margin-bottom:6px; font-weight:600; color:var(--text); }
.login2-form-box .input{ padding:9px 14px; font-size:13.5px; border-radius:10px; }

.input-icon-field{ position:relative; }
.input-icon-field .ifi{
  position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--text-muted); pointer-events:none;
}
.input-icon-field .ifi svg{ width:16px; height:16px; }
.input-icon-field .input{ padding-left:38px; }
.input-icon-field .toggle-pass{
  position:absolute; right:11px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer;
  color:var(--text-muted); padding:3px; display:flex;
}
.input-icon-field .toggle-pass svg{ width:16px; height:16px; }

.login2-row-between{ display:flex; align-items:center; justify-content:space-between; margin:0 0 14px; font-size:12px; }
.login2-row-between label{ display:flex; align-items:center; gap:6px; color:var(--text); font-weight:500; cursor:pointer; }
.login2-row-between a, .login2-row-between button.linklike{
  color:var(--primary-800); font-weight:700; background:none; border:none; cursor:pointer; font-size:12px; padding:0;
}

.login2-form-box .btn-block{ padding:10px 18px; font-size:14px; font-weight:700; border-radius:10px; }

.login2-divider{ display:flex; align-items:center; gap:10px; margin:14px 0; color:var(--text-muted); font-size:11.5px; }
.login2-divider::before, .login2-divider::after{ content:""; flex:1; height:1px; background:var(--border); }

.btn-alt{
  width:100%; display:flex; align-items:center; justify-content:center; gap:9px;
  padding:10px 16px; border-radius:11px; border:1.5px solid var(--border); background:var(--surface);
  font-weight:600; font-size:13px; color:var(--text); cursor:pointer; transition:border-color .15s ease, background .15s ease;
}
.btn-alt:hover{ border-color:var(--primary-800); background:var(--primary-50); }
.btn-alt svg{ width:15px; height:15px; color:var(--primary-800); }

.login2-skyline{ display:none; }

@media (max-width: 900px){
  .login2-wrap{ padding:32px 16px; }
  .login2-shell{ flex-direction:column; gap:28px; }
  .login2-hero{ text-align:center; align-items:center; }
  .login2-brand{ justify-content:center; text-align:left; }
  .login2-heading .rule{ margin:0 auto 14px; }
  .login2-footer{ justify-content:center; width:100%; }
  .login2-panel{ width:100%; max-width:420px; padding:28px 22px; }
}
/* ---------- Misc ---------- */
.section-title{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;}
.pill-nav{display:flex; gap:8px; flex-wrap:wrap;}
.pill{padding:7px 14px; border-radius:99px; font-size:13px; font-weight:600; border:1.5px solid var(--border); color:var(--text-muted);}
.pill.active{background:var(--primary-900); border-color:var(--primary-900); color:#fff;}
.empty-state{text-align:center; padding:60px 20px; color:var(--text-muted);}
.empty-state svg{width:52px; height:52px; margin:0 auto 14px; opacity:.35;}
.divider{height:1px; background:var(--border); margin:22px 0;}
.pagination-wrap{display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 26px; border-top:1px solid var(--border);}
.pg-info{font-size:12.5px; color:var(--text-muted);}
.pg-info strong{color:var(--text); font-weight:700;}
.pg-links{display:flex; align-items:center; gap:4px; flex-wrap:wrap;}
.pg-btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:32px; height:32px; padding:0 8px; border-radius:8px;
  font-size:13px; font-weight:600; color:var(--text-muted);
  border:1px solid transparent; text-decoration:none; line-height:1;
  transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.pg-btn svg{width:16px; height:16px; display:block;}
a.pg-btn:hover{background:var(--primary-50); color:var(--text); border-color:var(--border);}
.pg-btn.pg-active{background:var(--primary-900); color:#fff;}
.pg-btn.pg-disabled{color:var(--border); cursor:not-allowed;}
.pg-ellipsis{padding:0 4px; color:var(--text-muted); font-size:13px;}

/* Facility status mini-pills used on the Fasilitas Pasar overview page */
.fac-summary{display:flex; gap:6px; flex-wrap:wrap;}
.fac-pill{
  display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:99px;
  font-size:11.5px; font-weight:700;
}
.fac-pill::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor;}
.fac-pill.fp-baik{background:var(--ok-bg); color:var(--ok);}
.fac-pill.fp-sedang{background:var(--warn-bg); color:var(--warn);}
.fac-pill.fp-rusak{background:var(--bad-bg); color:var(--bad);}
.fac-pill.fp-tidak_ada{background:var(--primary-100); color:var(--text-muted);}
.avatar-lg{width:76px; height:76px; border-radius:18px; background:var(--primary-900); color:#fff; display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-size:28px; font-weight:700;}
.avatar-photo{
  width:40px; height:40px; border-radius:50%; object-fit:cover; border:1.5px solid var(--border); flex-shrink:0;
}
.avatar-photo-lg{ width:52px; height:52px; border-radius:14px; }
.avatar-photo-placeholder{
  width:40px; height:40px; border-radius:50%; border:1.5px dashed var(--border); background:var(--primary-50);
  display:flex; align-items:center; justify-content:center; color:var(--text-muted); flex-shrink:0;
}
.avatar-photo-placeholder svg{width:17px; height:17px; opacity:.55;}
.kv-list{display:grid; grid-template-columns:1fr; gap:0;}
.kv-row{display:flex; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--border); font-size:14px;}
.kv-row:last-child{border-bottom:none;}
.kv-row .k{color:var(--text-muted);}
.kv-row .v{font-weight:600; text-align:right;}
.photo-frame{border-radius:var(--radius-lg); overflow:hidden; border:1px solid var(--border); aspect-ratio:16/10; background:var(--primary-50); display:flex; align-items:center; justify-content:center;}
.photo-frame img{width:100%; height:100%; object-fit:cover;}
.photo-frame .placeholder{color:var(--text-muted); font-size:13px; display:flex; flex-direction:column; align-items:center; gap:8px;}
.photo-frame .placeholder svg{width:34px; height:34px; opacity:.4;}

/* Drone monitoring video gallery */
.video-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:18px;}
.video-card{border:1.5px solid var(--border); border-radius:var(--radius-md); overflow:hidden; background:var(--surface);}
.video-card .vc-body{padding:14px 16px;}
.video-card .vc-title{font-weight:700; font-size:14.5px; margin-bottom:3px;}
.video-card .vc-meta{font-size:12px; color:var(--text-muted); margin-bottom:8px;}
.video-card .vc-desc{font-size:13px; color:var(--text-muted); margin-bottom:10px; line-height:1.5;}

/* Click-to-play video wrapper */
.video-player-wrap{
  position:relative; width:100%; aspect-ratio:16/9; background:#0f172a;
  cursor:pointer; overflow:hidden;
}
.video-player-wrap video{
  width:100%; height:100%; object-fit:contain; display:block; background:#000;
}
.video-player-wrap .vp-play-overlay{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg, rgba(15,23,42,0.15) 0%, rgba(15,23,42,0.55) 100%);
  transition: opacity .25s ease, visibility .25s ease;
  z-index:2;
}
.video-player-wrap.is-playing .vp-play-overlay{
  opacity:0; visibility:hidden; pointer-events:none;
}
.video-player-wrap .vp-play-btn{
  width:64px; height:64px; border-radius:50%;
  background:rgba(255,255,255,0.92); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 24px rgba(0,0,0,0.3);
  transition:transform .2s ease, box-shadow .2s ease;
}
.video-player-wrap:hover .vp-play-btn{
  transform:scale(1.1);
  box-shadow:0 8px 32px rgba(0,0,0,0.4);
}
.video-player-wrap .vp-play-btn svg{
  width:28px; height:28px; fill:var(--primary, #3b82f6); margin-left:3px;
}
.video-player-wrap .vp-loading{
  position:absolute; inset:0; display:none; align-items:center; justify-content:center;
  background:rgba(15,23,42,0.7); z-index:3;
}
.video-player-wrap.is-loading .vp-loading{display:flex;}
.video-player-wrap.is-loading .vp-play-overlay{opacity:0; visibility:hidden; pointer-events:none;}
.vp-spinner{
  width:40px; height:40px; border:3px solid rgba(255,255,255,0.2);
  border-top-color:#fff; border-radius:50%;
  animation:vpSpin .7s linear infinite;
}
@keyframes vpSpin{to{transform:rotate(360deg)}}
.video-player-wrap .vp-poster-img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1;
  transition: opacity .3s ease;
}
.video-player-wrap.is-playing .vp-poster-img,
.video-player-wrap.is-loading .vp-poster-img{opacity:0;}

/* Video conversion status badges */
.vp-status-badge{
  position:absolute; top:8px; right:8px; z-index:4;
  display:inline-flex; align-items:center; gap:5px;
  padding:4px 10px; border-radius:20px;
  font-size:11px; font-weight:600; line-height:1;
  backdrop-filter:blur(8px); pointer-events:auto;
}
.vp-status-converting{
  background:rgba(245,158,11,0.85); color:#fff;
}
.vp-status-ready{
  background:rgba(16,185,129,0.85); color:#fff;
}
.vp-status-failed{
  background:rgba(239,68,68,0.85); color:#fff; cursor:help;
}
.vp-spinner-sm{
  width:12px; height:12px; border:2px solid rgba(255,255,255,0.3);
  border-top-color:#fff; border-radius:50%;
  animation:vpSpin .7s linear infinite;
}
.video-player-wrap.is-playing .vp-status-badge{
  opacity:0; transition:opacity .3s ease;
}
.video-upload-drop{
  border:1.5px dashed var(--border); border-radius:var(--radius-md); padding:22px;
  text-align:center; color:var(--text-muted); background:var(--primary-50);
}

/* Drone Upload Component */
.drone-upload-dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  padding: 24px 20px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}
.drone-upload-dropzone:hover, .drone-upload-dropzone.drag-active {
  border-color: #2563eb;
  background: #eff6ff;
}
.drone-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.drone-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.drone-upload-prompt svg {
  color: #2563eb;
  filter: drop-shadow(0 2px 4px rgba(37,99,235,0.2));
}
.drone-file-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.drone-file-selected .file-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #1e3a8a;
  word-break: break-all;
}
.drone-file-selected .file-size {
  font-size: 12px;
  color: #64748b;
  margin-left: 8px;
}
.drone-video-card-premium {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 4px 14px -4px rgba(15,23,42,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.drone-video-card-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15,23,42,0.12);
}

.sidebar-toggle-btn{
  display:none; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:10px; border:1.5px solid var(--border);
  background:var(--surface); color:var(--text); cursor:pointer; flex-shrink:0;
}
.sidebar-toggle-btn svg{width:19px; height:19px;}
.sidebar-toggle-btn:hover{background:var(--primary-50);}

.sidebar-overlay{
  display:none; position:fixed; inset:0; background:rgba(10,16,38,.45);
  z-index:45; opacity:0; transition:opacity .2s ease;
}
.sidebar-overlay.open{display:block; opacity:1;}

@media (max-width: 900px){
  .sidebar{position:fixed; left:-264px; z-index:50; transition:left .2s ease;}
  .sidebar.open{left:0;}
  .main{margin-left:0; width:100%;}
  .sidebar-toggle-btn{display:flex;}
  .content{padding:20px 16px 50px;}
  .topbar{padding:14px 16px;}
}

@media (max-width: 480px){
  .topbar-user button.btn span{display:none;}
  .topbar-user .user-meta{display:none;}
}

/* =========================================================
   CARD PREMIUM — USER MANAGEMENT & PHOTO AVATARS
   ========================================================= */

/* Topbar user link & avatar photo */
.topbar-user-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background .18s ease, transform .15s ease;
  text-decoration: none;
  color: inherit;
}
.topbar-user-link:hover {
  background: var(--primary-50);
}
.topbar-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.avatar-photo-topbar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  display: block;
}
.avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

/* User Quick Stats */
.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.user-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}
.user-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.08);
}
.user-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-stat-icon svg { width: 20px; height: 20px; }
.user-stat-icon.icon-all { background: #eef2ff; color: #4338ca; }
.user-stat-icon.icon-super { background: #fef3c7; color: #b45309; }
.user-stat-icon.icon-kab { background: #e0f2fe; color: #0369a1; }
.user-stat-icon.icon-kec { background: #d1fae5; color: #047857; }
.user-stat-icon.icon-active { background: #ecfdf5; color: #059669; }
.user-stat-icon.icon-pasar { background: #ecfdf5; color: #047857; }
.user-stat-icon.icon-warning-pasar { background: #fff7ed; color: #c2410c; }
.user-stat-icon.icon-inactive { background: #f1f5f9; color: #64748b; }
.user-stat-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}
.user-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* User Toolbar */
.user-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.user-filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}
.user-search-wrap {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 320px;
}
.user-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}
.user-search-input {
  width: 100%;
  padding-left: 38px !important;
  padding-right: 32px !important;
  height: 40px;
  border-radius: 10px;
}
.user-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
}
.filter-pills {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.filter-pill {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s ease;
  white-space: nowrap;
}
.filter-pill:hover {
  color: var(--text);
  background: var(--primary-50);
}
.filter-pill.active {
  background: var(--primary-900);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}
.user-select-filter {
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
  width: auto;
  max-width: 200px;
}
.btn-filter-submit {
  height: 40px;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
}
.btn-add-user {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* Premium Cards Grid */
.user-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.user-card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.user-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -8px rgba(15, 23, 42, 0.14);
  border-color: #ccd2e8;
}
.user-card-premium.is-self {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 1.5px #60a5fa, 0 6px 20px -4px rgba(37, 99, 235, 0.12);
}

/* Card Cover Header */
.user-card-cover {
  height: 64px;
  padding: 12px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}
.user-card-cover.cover-super {
  background: linear-gradient(135deg, #b45309 0%, #d97706 40%, #f59e0b 100%);
}
.user-card-cover.cover-kabupaten {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #334155 100%);
}
.user-card-cover.cover-kecamatan {
  background: linear-gradient(135deg, #065f46 0%, #047857 45%, #10b981 100%);
}
.user-card-cover.cover-pasar {
  background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
}
.user-card-cover.cover-default {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}
.user-card-role-badge {
  z-index: 2;
}
.user-card-self-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  letter-spacing: .02em;
}

/* Role Chips */
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.role-chip.chip-super, .role-chip.role-badge-super { color: #92400e; background:#fef3c7; border: 1px solid #fde68a; }
.role-chip.chip-kabupaten, .role-chip.role-badge-kabupaten { color: #0f172a; background:#e2e8f0; border: 1px solid #cbd5e1; }
.role-chip.chip-kecamatan, .role-chip.role-badge-kecamatan { color: #065f46; background:#d1fae5; border: 1px solid #a7f3d0; }
.role-chip.chip-pasar, .role-chip.role-badge-pasar { color: #c2410c; background:#ffedd5; border: 1px solid #fed7aa; }
.role-chip.chip-default { color: #374151; background:#f3f4f6; }

/* Card Body */
.user-card-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.user-card-avatar-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  position: relative;
  margin-top: -34px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  border: 3.5px solid #ffffff;
  background: #ffffff;
  flex-shrink: 0;
}
.user-card-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.user-card-avatar-initial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: #ffffff;
}
.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
}
.user-status-indicator.active {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}
.user-status-indicator.inactive {
  background: #94a3b8;
}

/* User Info */
.user-card-name {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-jabatan {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card-details {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.detail-item svg { flex-shrink: 0; color: #64748b; }
.detail-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-item.kecamatan-item {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 8px;
  color: #166534;
  font-weight: 600;
}
.detail-item.kecamatan-item svg { color: #16a34a; }
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.status-active { background: #dcfce7; color: #15803d; }
.status-inactive { background: #f1f5f9; color: #64748b; }

/* Card Actions */
.user-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.btn-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  flex: 1;
}
.btn-card-action.btn-edit {
  background: var(--primary-50);
  color: var(--primary-800);
  border-color: var(--border);
}
.btn-card-action.btn-edit:hover {
  background: var(--primary-100);
  color: var(--primary-950);
}
.btn-card-action.btn-delete {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  width: 100%;
}
.btn-card-action.btn-delete:hover {
  background: #fee2e2;
  color: #991b1b;
}
.btn-card-action.btn-profile {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.btn-card-action.btn-profile:hover {
  background: #dbeafe;
}
.btn-card-action.btn-reset {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.btn-card-action.btn-reset:hover {
  background: #fef3c7;
  color: #92400e;
}
.card-reset-panel {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  animation: fadeIn .2s ease;
}
.card-reset-panel .reset-form-inner {
  display: flex;
  gap: 6px;
  align-items: center;
}
.card-reset-panel .reset-input-wrap {
  position: relative;
  flex: 1;
}
.card-reset-panel .reset-input-wrap input {
  padding-right: 32px;
  font-size: 12.5px;
  height: 34px;
}
.btn-toggle-pwd-mini {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}
.btn-toggle-pwd-mini:hover {
  color: #475569;
}

/* Empty State */
.user-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
}
.user-empty-state .empty-icon {
  color: var(--text-muted);
  opacity: .5;
  margin-bottom: 12px;
}

/* User Form Container (Card Premium Form) */
.user-form-container {
  max-width: 960px;
  margin: 0 auto;
}
.user-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 30px -6px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.user-form-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-50) 100%);
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-form-header .header-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-900);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.user-form-body {
  padding: 30px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  .user-form-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
}

/* Photo Upload Dropzone */
.user-form-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.photo-upload-label {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 12px;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.photo-upload-dropzone {
  width: 100%;
  padding: 22px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: all .2s ease;
}
.photo-upload-dropzone:hover, .photo-upload-dropzone.drag-active {
  border-color: #3b82f6;
  background: #eff6ff;
}
.photo-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 5;
}
.photo-preview-box {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid #e2e8f0;
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
}
.photo-placeholder-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  padding: 10px;
}
.photo-placeholder-wrap .upload-hint {
  font-size: 10.5px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.25;
}
.avatar-initial-large {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary-900);
}
.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .18s ease;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}
.photo-preview-box:hover .photo-hover-overlay {
  opacity: 1;
}
.photo-meta-info {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.format-tag, .size-tag {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
}
.btn-remove-photo {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 6;
  margin-top: 4px;
  transition: background .15s ease;
}
.btn-remove-photo:hover { background: #fee2e2; }
.photo-info-tip {
  margin-top: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #166534;
  font-size: 11.5px;
  line-height: 1.45;
  display: flex;
  gap: 8px;
  text-align: left;
}
.photo-info-tip svg { flex-shrink: 0; color: #16a34a; margin-top: 2px; }

/* Form Fields Column */
.user-form-fields-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: #94a3b8;
  pointer-events: none;
}
.input-with-icon .input {
  padding-left: 38px !important;
  width: 100%;
}
.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  padding: 4px;
}
.btn-toggle-pwd:hover { color: var(--text); }
.required-star { color: #dc2626; }
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Role Selector Grid */
.role-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.role-radio-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .18s ease;
  position: relative;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.role-radio-card:hover {
  border-color: #94a3b8;
  background: var(--primary-50);
}
.role-radio-card.selected {
  border-color: var(--primary-900);
  background: #f8fafc;
  box-shadow: 0 0 0 1px var(--primary-900), 0 4px 12px rgba(15, 23, 42, 0.08);
}
.role-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.role-radio-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
}
.role-radio-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-radio-icon svg { width: 14px; height: 14px; }
.role-icon-super { background: #fef3c7; color: #b45309; }
.role-icon-kab { background: #e0f2fe; color: #0369a1; }
.role-icon-kec { background: #d1fae5; color: #047857; }
.role-radio-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* User Form Actions */
.user-form-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.btn-submit-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 10px;
}
.input-static {
  padding: 9px 12px;
  background: var(--primary-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
}

/* =========================================================
   UNIVERSAL IMAGE LIGHTBOX / VIEWER MODAL
   ========================================================= */

/* Cursor cue on content images */
.content img:not(.brand-logo):not(.system-icon),
.photo-frame img,
.user-card-avatar-img,
.photo-preview-img,
.avatar-photo,
.avatar-photo-lg,
.avatar-photo-topbar,
.video-card img,
table.simple img {
  cursor: zoom-in;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

.content img:not(.brand-logo):hover,
.photo-frame:hover img,
table.simple img:hover {
  filter: brightness(1.05);
}

.image-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
}

.image-viewer-modal.open {
  opacity: 1;
  visibility: visible;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 26, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.image-viewer-dialog {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: auto;
}

.image-viewer-modal.open .image-viewer-dialog {
  transform: scale(1) translateY(0);
}

.image-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px 14px 0 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
}

.image-viewer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.image-viewer-title-wrap svg {
  color: var(--accent, #facc15);
  flex-shrink: 0;
}

.image-viewer-caption {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 460px;
}

.image-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.iv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  line-height: 1;
}

.iv-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.iv-close-btn {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.iv-close-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
}

.image-viewer-body {
  position: relative;
  background: rgba(0, 0, 0, 0.45);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
  max-height: 78vh;
}

.image-viewer-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.image-viewer-img {
  max-width: 88vw;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: zoom-in;
  user-select: none;
}

.image-viewer-img.is-zoomed {
  transform: scale(1.65);
  cursor: zoom-out;
}

.image-viewer-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-radius: 0 0 14px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.iv-tip {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* =========================================================
   IDLE INACTIVITY TIMEOUT MODAL (1 MINUTE)
   ========================================================= */
.idle-timeout-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.idle-timeout-modal.open {
  opacity: 1;
  visibility: visible;
}

.idle-timeout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.idle-timeout-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: var(--surface, #ffffff);
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2);
  text-align: center;
  transform: scale(0.92) translateY(14px);
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.idle-timeout-modal.open .idle-timeout-dialog {
  transform: scale(1) translateY(0);
}

.idle-timeout-icon-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idle-timeout-icon-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  animation: idlePulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes idlePulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.3; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.idle-timeout-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -4px rgba(245, 158, 11, 0.35);
}

.idle-timeout-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text, #171d3a);
}

.idle-timeout-content p {
  font-size: 13.5px;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  margin: 0 0 16px;
}

.idle-countdown-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 24px;
  margin-bottom: 14px;
}

.idle-countdown-number {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  color: #dc2626;
  line-height: 1;
}

.idle-countdown-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
  margin-top: 4px;
}

.idle-timeout-progress {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 22px;
}

.idle-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 99px;
  transition: width 1s linear;
}

.idle-timeout-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.btn-stay-logged {
  width: 100%;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
}

.btn-logout-now {
  width: 100%;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted, #64748b);
  border-radius: 10px;
}

.btn-logout-now:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ==========================================================================
   PREMIUM EDIT PASAR INTERFACE
   ========================================================================== */
.pasar-edit-container {
  max-width: 1220px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.pasar-edit-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #044e3f 100%);
  border-radius: 22px;
  padding: 26px 32px;
  margin-bottom: 24px;
  box-shadow: 0 12px 36px -8px rgba(15, 23, 42, 0.25);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.pasar-edit-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-eyebrow a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color .15s;
}
.hero-eyebrow a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.hero-title {
  font-size: 25px;
  font-weight: 800;
  font-family: var(--font-display);
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-badge.badge-kondisi-baik {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}
.hero-badge.badge-kondisi-sedang {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}
.hero-badge.badge-kondisi-rusak {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}
.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  z-index: 2;
}

/* 2-Column Layout */
.pasar-edit-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px) {
  .pasar-edit-layout {
    grid-template-columns: 1fr;
  }
}

.pasar-edit-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 85px;
}
@media (max-width: 980px) {
  .pasar-edit-sidebar {
    position: static;
  }
}

.pasar-edit-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section Cards */
.pasar-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.pasar-section-card:hover {
  box-shadow: 0 8px 28px -4px rgba(15, 23, 42, 0.09);
}
.pasar-section-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-50) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.pasar-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.icon-identity { background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%); }
.icon-location { background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%); }
.icon-sarana { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.icon-drone { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }

/* Choice Cards Grid */
.choice-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .choice-cards-grid {
    grid-template-columns: 1fr;
  }
}
.choice-card {
  border: 1.5px solid var(--border);
  border-radius: 13px;
  padding: 13px 15px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--surface);
  position: relative;
  user-select: none;
}
.choice-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-1px);
}
.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card.active-blue {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.choice-card.active-green {
  border-color: #10b981;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}
.choice-card.active-amber {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}
.choice-card.active-rose {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}
.choice-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #475569;
}
.choice-card.active-blue .choice-icon-wrap { background: #dbeafe; color: #1d4ed8; }
.choice-card.active-green .choice-icon-wrap { background: #d1fae5; color: #047857; }
.choice-card.active-amber .choice-icon-wrap { background: #fef3c7; color: #b45309; }
.choice-card.active-rose .choice-icon-wrap { background: #fee2e2; color: #b91c1c; }

/* Sarana Input Cards */
.sarana-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 680px) {
  .sarana-cards-grid {
    grid-template-columns: 1fr;
  }
}
.sarana-card {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: all .2s ease;
}
.sarana-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.sarana-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.sarana-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
}

/* Sidebar Occupancy KPI Widget */
.occupancy-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
}
.occupancy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.occupancy-meter-wrap {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
}
.occupancy-meter-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width .3s ease;
}
.occupancy-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.occupancy-stat-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
}
.occupancy-stat-box .val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}
.occupancy-stat-box .lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sidebar Quick Nav Anchor Pills */
.pasar-nav-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pasar-nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.pasar-nav-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}
.pasar-nav-pill svg {
  color: #64748b;
  flex-shrink: 0;
}
.pasar-nav-pill:hover svg {
  color: #0f172a;
}

/* ==========================================================================
   PETA SEBARAN PASAR STUDIO (PREMIUM MAP EXPLORER)
   ========================================================================== */
.peta-studio-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 1080px) {
  .peta-studio-grid {
    grid-template-columns: 1fr;
  }
}

.peta-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
  height: 720px;
  overflow: hidden;
}

.peta-sidebar-head {
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.peta-sidebar-search {
  position: relative;
  width: 100%;
}
.peta-sidebar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.peta-sidebar-search input {
  width: 100%;
  padding-left: 36px !important;
  height: 38px;
  border-radius: 10px;
  font-size: 13px;
}

.peta-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.peta-market-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #ffffff;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.peta-market-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(3px);
}
.peta-market-item.active {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}
.peta-market-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #10b981;
}

.peta-market-thumb {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  flex-shrink: 0;
  position: relative;
}
.peta-market-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peta-market-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.peta-market-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.peta-market-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.peta-market-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Map Canvas Card */
.peta-canvas-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.06);
  position: relative;
  height: 720px;
  display: flex;
  flex-direction: column;
}
#peta-kabupaten {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Custom Pulsing Leaflet Markers */
.custom-pin-wrap {
  position: relative;
  width: 38px;
  height: 38px;
}
.custom-pin-pulse {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  opacity: 0.8;
  animation: markerPulseRing 2.2s infinite ease-out;
}
.custom-pin-pulse.pulse-baik { background: rgba(16, 185, 129, 0.4); }
.custom-pin-pulse.pulse-sedang { background: rgba(245, 158, 11, 0.4); }
.custom-pin-pulse.pulse-rusak { background: rgba(239, 68, 68, 0.4); }

.custom-pin-marker {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: transform .2s ease;
}
.custom-pin-marker:hover {
  transform: rotate(-45deg) scale(1.15);
}
.custom-pin-marker.pin-baik { background: linear-gradient(135deg, #10b981, #047857); }
.custom-pin-marker.pin-sedang { background: linear-gradient(135deg, #f59e0b, #b45309); }
.custom-pin-marker.pin-rusak { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.custom-pin-marker svg {
  transform: rotate(45deg);
  color: #ffffff;
  width: 14px;
  height: 14px;
}

@keyframes markerPulseRing {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.7);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Premium Leaflet Popup */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}
.leaflet-container a.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  width: 26px !important;
  height: 26px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  backdrop-filter: blur(4px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  font-size: 14px !important;
  z-index: 10;
  transition: background .15s ease !important;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  background: rgba(15, 23, 42, 0.9) !important;
}

.simantap-popup {
  width: 290px;
  font-family: var(--font-body);
}
.simantap-popup-cover {
  height: 130px;
  width: 100%;
  position: relative;
  background: #0f172a;
}
.simantap-popup-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.simantap-popup-badges {
  position: absolute;
  bottom: 8px;
  left: 10px;
  display: flex;
  gap: 5px;
}
.simantap-popup-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  backdrop-filter: blur(6px);
  text-transform: capitalize;
}
.simantap-popup-badge.bg-baik { background: rgba(16, 185, 129, 0.88); }
.simantap-popup-badge.bg-sedang { background: rgba(245, 158, 11, 0.88); }
.simantap-popup-badge.bg-rusak { background: rgba(239, 68, 68, 0.88); }
.simantap-popup-badge.bg-jenis { background: rgba(15, 23, 42, 0.75); }

.simantap-popup-body {
  padding: 14px 16px;
  background: #ffffff;
}
.simantap-popup-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}
.simantap-popup-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}
.simantap-popup-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.simantap-popup-kpi-item {
  font-size: 11px;
}
.simantap-popup-kpi-val {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}
.simantap-popup-kpi-lbl {
  color: #64748b;
  font-size: 10.5px;
}

.simantap-popup-actions {
  display: flex;
  gap: 6px;
}
.simantap-popup-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s ease;
}
.simantap-popup-btn.btn-main {
  background: #0f172a;
  color: #ffffff;
}
.simantap-popup-btn.btn-main:hover {
  background: #1e293b;
}
.simantap-popup-btn.btn-sub {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.simantap-popup-btn.btn-sub:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Map Floating Quick Actions */
.peta-floating-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.peta-btn-tool {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
}
.peta-btn-tool:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}


/* ==========================================================================
   FASILITAS PASAR (PREMIUM HEALTH MATRIX)
   ========================================================================== */
.fac-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.fac-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.fac-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fac-kpi-icon.icon-toilet { background: #dbeafe; color: #1d4ed8; }
.fac-kpi-icon.icon-musholla { background: #dcfce7; color: #15803d; }
.fac-kpi-icon.icon-parkir { background: #fef3c7; color: #b45309; }
.fac-kpi-icon.icon-drainase { background: #e0e7ff; color: #4338ca; }
.fac-kpi-icon.icon-tps { background: #fee2e2; color: #b91c1c; }

.fac-kpi-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.fac-kpi-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Visual 5-Item Facility Matrix Row */
.fac-matrix-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (max-width: 900px) {
  .fac-matrix-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .fac-matrix-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fac-matrix-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .15s ease;
}
.fac-matrix-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.fac-matrix-item.cond-baik {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.fac-matrix-item.cond-sedang {
  background: #fffbeb;
  border-color: #fde68a;
}
.fac-matrix-item.cond-rusak {
  background: #fef2f2;
  border-color: #fecaca;
}
.fac-matrix-item.cond-none {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.65;
}

.fac-item-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.cond-baik .fac-item-icon-wrap { background: #dcfce7; color: #15803d; }
.cond-sedang .fac-item-icon-wrap { background: #fef3c7; color: #b45309; }
.cond-rusak .fac-item-icon-wrap { background: #fee2e2; color: #b91c1c; }
.cond-none .fac-item-icon-wrap { background: #e2e8f0; color: #64748b; }

.fac-item-text {
  flex: 1;
  min-width: 0;
}
.fac-item-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fac-item-status {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: capitalize;
}
.cond-baik .fac-item-status { color: #15803d; }
.cond-sedang .fac-item-status { color: #b45309; }
.cond-rusak .fac-item-status { color: #b91c1c; }
.cond-none .fac-item-status { color: #94a3b8; }

/* Facility Health Meter */
.fac-health-meter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fac-health-bar {
  width: 70px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.fac-health-fill {
  height: 100%;
  border-radius: 99px;
}

/* ==========================================================================
   DATA PASAR (PREMIUM HORIZONTAL CARD DESIGN)
   ========================================================================== */
.pasar-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 22px;
}

.pasar-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.pasar-item-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.09);
}

@media (max-width: 860px) {
  .pasar-item-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Left Photo Box */
.pasar-item-photo-wrap {
  width: 100%;
  height: 135px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
@media (max-width: 860px) {
  .pasar-item-photo-wrap {
    height: 180px;
  }
}
.pasar-item-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.pasar-item-card:hover .pasar-item-photo-wrap img {
  transform: scale(1.05);
}
.pasar-item-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  gap: 6px;
}

/* Right Content Area */
.pasar-item-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
}

/* Top: Badges, Title & Quick Actions */
.pasar-item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.pasar-item-identity {
  flex: 1;
  min-width: 0;
}
.pasar-item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pasar-kondisi-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}
.kondisi-baik { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.kondisi-sedang { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.kondisi-rusak { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

.pasar-jenis-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.pasar-drone-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Title */
.pasar-item-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.25;
  display: inline-block;
  margin: 2px 0 3px;
  transition: color .15s ease;
}
.pasar-item-title:hover {
  color: #059669;
}

/* Address */
.pasar-item-address {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pasar-item-address svg {
  flex-shrink: 0;
  color: #94a3b8;
}

/* Actions Group */
.pasar-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .pasar-item-top-row {
    flex-direction: column;
  }
  .pasar-item-actions {
    width: 100%;
    margin-top: 6px;
  }
}

/* Middle: Metrics & Status Bar */
.pasar-item-metrics-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.pasar-metric-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #475569;
}
.pasar-metric-pill .val {
  font-weight: 700;
  color: #0f172a;
}
.pasar-metric-pill.highlight-open .val {
  color: #15803d;
}
.pasar-metric-divider {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
}

/* Bottom Row: Additional Details (Operational, Notes) */
.pasar-item-subinfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}
.pasar-subinfo-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pasar-subinfo-item svg {
  color: #94a3b8;
  flex-shrink: 0;
}

/* =========================================================
   SIMANTAP MODERN DASHBOARD REDESIGN SYSTEM
   - Kabupaten: Executive Royal Navy & Sapphire Gold (Premium)
   - Kecamatan: Emerald Jade & Forest Teal (Semi Premium)
   - Pasar: Indigo-Violet & Velvet Amber-Rose (Elegan & Indah)
   ========================================================= */

/* Topbar Datetime & Notification Pill */
.topbar-datetime-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  font-size: 12.5px;
}
.topbar-datetime-card .dt-icon {
  width: 16px;
  height: 16px;
  color: #3b82f6;
  flex-shrink: 0;
}
.topbar-datetime-card .dt-content {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-datetime-card .dt-date {
  font-weight: 600;
  color: #334155;
}
.topbar-datetime-card .dt-time {
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
}

.topbar-notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.topbar-notif-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
}
.topbar-notif-btn .notif-badge-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.35);
}

/* =========================================================
   SIDEBAR BOTTOM MARKET ART (Sesuai Desain Gambar Referensi)
   Gedung Pasar Deli Serdang dengan efek gradien transparan
   ========================================================= */
.sidebar-bottom-art {
  position: relative;
  width: 100%;
  margin-top: auto;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

.sidebar-bottom-art-img {
  width: 100%;
  height: auto;
  max-height: 290px;
  display: block;
  object-fit: cover;
  object-position: bottom center;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 65%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 65%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.95;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 -4px 16px rgba(0, 0, 0, 0.35));
}

/* Fallback & backwards compatibility */
.sidebar-motto-wrap {
  position: relative;
  width: 100%;
  margin-top: auto;
  overflow: hidden;
  padding: 0;
}

/* Footer */
.app-dashboard-footer {
  margin-top: 36px;
  padding: 20px 6px 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: #64748b;
}
.app-dashboard-footer .footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: italic;
  font-weight: 500;
  color: #475569;
}
.app-dashboard-footer .leaf-emoji {
  font-style: normal;
  font-size: 15px;
}

/* Hero Welcome Banner */
.dash-hero-banner {
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  padding: 30px 34px;
  margin-bottom: 24px;
  box-shadow: 0 10px 32px -8px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background-size: cover;
  background-position: right center;
  min-height: 140px;
}
.dash-hero-banner .hero-left {
  position: relative;
  z-index: 2;
  max-width: 620px;
}
.dash-hero-banner .hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.dash-hero-banner .hero-sub {
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}
.dash-hero-banner .hero-right {
  position: relative;
  z-index: 2;
  text-align: right;
  flex-shrink: 0;
}
.dash-hero-banner .hero-quote {
  font-style: italic;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 8px 16px;
  border-radius: 99px;
  display: inline-block;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 4 KPI Cards Grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .dash-kpi-grid { grid-template-columns: 1fr; }
}

.kpi-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 138px;
}
.kpi-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.12);
}

.kpi-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.kpi-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.kpi-card-icon svg {
  width: 24px;
  height: 24px;
}
.kpi-card-info {
  flex: 1;
}
.kpi-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}
.kpi-card-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.kpi-card-footer {
  margin-top: 14px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kpi-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
}
.kpi-trend-badge.trend-up {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.kpi-trend-badge.trend-warn {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.kpi-trend-badge.trend-bad {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.kpi-trend-sub {
  font-size: 11.5px;
  color: #94a3b8;
}

.kpi-watermark-icon {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 86px;
  height: 86px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.kpi-stat-card:hover .kpi-watermark-icon {
  opacity: 0.13;
  transform: scale(1.05) rotate(-3deg);
}

/* Middle Row: 2-Column Grid (Chart + Map) */
.dash-mid-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .dash-mid-grid { grid-template-columns: 1fr; }
}

.dash-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dash-panel-header {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}
.dash-panel-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-panel-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dash-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-chart-container {
  padding: 16px 20px 20px;
  position: relative;
  flex: 1;
  min-height: 280px;
}
.dash-map-container {
  height: 310px;
  width: 100%;
  position: relative;
}

/* Bottom Row: 3-Column Grid */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.15fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) {
  .dash-bottom-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .dash-bottom-grid { grid-template-columns: 1fr; }
}

/* Ranking Table (Card 1) */
.dash-rank-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-rank-table th {
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 18px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.dash-rank-table td {
  padding: 11px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid #f1f5f9;
}
.dash-rank-table tr:hover td {
  background: #f8fafc;
}
.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rank-badge-1 { background: #fef3c7; color: #b45309; }
.rank-badge-2 { background: #e2e8f0; color: #334155; }
.rank-badge-3 { background: #ffedd5; color: #c2410c; }
.rank-market-name {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease;
}
.rank-market-name:hover {
  color: #2563eb;
}
.rank-count-pill {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

/* Donut Chart Card (Card 2) */
.donut-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 18px 20px 22px;
  position: relative;
  flex: 1;
}
.donut-watermark-icon {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 90px;
  height: 90px;
  opacity: 0.05;
  pointer-events: none;
  color: #1e3a8a;
  z-index: 1;
}
.donut-canvas-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
  z-index: 2;
}
.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-center-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
}
.donut-center-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 3px;
}
.donut-legend-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 10px;
  position: relative;
  z-index: 2;
}
.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.donut-legend-indicator {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}
.donut-legend-text {
  font-weight: 600;
  color: #334155;
  min-width: 96px;
}
.donut-legend-val {
  font-weight: 800;
  color: #0f172a;
  min-width: 24px;
  text-align: right;
}
.donut-legend-pct {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  min-width: 44px;
  text-align: right;
}

/* Activity Feed (Card 3) */
.activity-feed-list {
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.activity-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.activity-feed-item:hover {
  background: #f8fafc;
}
.activity-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.activity-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-icon-pill svg {
  width: 18px;
  height: 18px;
}
.activity-icon-pill.icon-emerald {
  background: #ecfdf5;
  color: #10b981;
}
.activity-icon-pill.icon-blue {
  background: #eff6ff;
  color: #3b82f6;
}
.activity-icon-pill.icon-rose {
  background: #fef2f2;
  color: #ef4444;
}
.activity-icon-pill.icon-amber {
  background: #fffbeb;
  color: #f59e0b;
}
.activity-meta {
  min-width: 0;
}
.activity-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-subject {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-time {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Quick Action Row */
.quick-actions-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.quick-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   THEME 1: PREMIUM (KABUPATEN)
   Executive Royal Navy, Sapphire Gold, Luminous Glass
   ========================================================= */
[data-scope="kabupaten"] .main {
  background: #f4f7fb;
}
[data-scope="kabupaten"] .topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.theme-premium .dash-hero-banner {
  background-image: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.94) 42%, rgba(255, 255, 255, 0.25) 75%, rgba(255, 255, 255, 0.08) 100%), url('/images/banner-pasar.jpg');
  border-color: #dbeafe;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
  min-height: 135px;
}
.theme-premium .hero-title {
  color: #0b1736;
  font-size: 27px;
  font-weight: 800;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.theme-premium .hero-highlight {
  color: #2563eb;
  font-weight: 800;
}
.theme-premium .hero-sub {
  color: #475569;
  font-size: 13.5px;
  line-height: 1.45;
}
.theme-premium .hero-sub span {
  color: #1e293b;
  font-weight: 700;
}
.theme-premium .hero-quote {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(219, 234, 254, 0.95);
  box-shadow: 0 4px 18px rgba(30, 58, 138, 0.08);
  border-radius: 99px;
  padding: 10px 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  font-weight: 700;
  color: #1e3a8a;
  text-shadow: none;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.theme-premium .kpi-icon-1 { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.theme-premium .kpi-icon-2 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.theme-premium .kpi-icon-3 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.theme-premium .kpi-icon-4 { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* =========================================================
   THEME 2: SEMI PREMIUM (KECAMATAN)
   Prestigious Emerald Jade, Deep Forest Teal & Mint Highlights
   ========================================================= */
.theme-semi-premium .dash-hero-banner {
  background-image: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.94) 48%, rgba(255, 255, 255, 0.25) 82%, rgba(255, 255, 255, 0.08) 100%), url('/images/bg-login-kecamatan.jpg');
  border-color: #a7f3d0;
}
.theme-semi-premium .hero-title {
  color: #064e3b;
}
.theme-semi-premium .hero-title span {
  color: #059669;
}
.theme-semi-premium .hero-sub {
  color: #2d4a3e;
}
.theme-semi-premium .hero-quote {
  background: rgba(236, 253, 245, 0.9);
  color: #065f46;
  border: 1px solid #a7f3d0;
  box-shadow: 0 4px 14px rgba(6, 95, 70, 0.08);
}
.theme-semi-premium .kpi-icon-1 { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.theme-semi-premium .kpi-icon-2 { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.theme-semi-premium .kpi-icon-3 { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.theme-semi-premium .kpi-icon-4 { background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); }

/* =========================================================
   THEME 3: ELEGAN & INDAH (PASAR)
   Indigo Violet, Twilight Blue & Warm Velvet Rose/Amber
   ========================================================= */
.theme-elegan .dash-hero-banner {
  background-image: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.94) 48%, rgba(255, 255, 255, 0.25) 82%, rgba(255, 255, 255, 0.08) 100%), url('/images/bg-login-pasar.jpg');
  border-color: #ddd6fe;
}
.theme-elegan .hero-title {
  color: #312e81;
}
.theme-elegan .hero-title span {
  color: #4f46e5;
}
.theme-elegan .hero-sub {
  color: #3730a3;
}
.theme-elegan .hero-quote {
  background: rgba(245, 243, 255, 0.92);
  color: #4338ca;
  border: 1px solid #c7d2fe;
  box-shadow: 0 4px 14px rgba(67, 56, 202, 0.08);
}
.theme-elegan .kpi-icon-1 { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.theme-elegan .kpi-icon-2 { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.theme-elegan .kpi-icon-3 { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.theme-elegan .kpi-icon-4 { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

/* 5-Column Responsive KPI Grid */
.dash-kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1280px) {
  .dash-kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 850px) {
  .dash-kpi-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dash-kpi-grid-5 { grid-template-columns: 1fr; }
}

.theme-premium .kpi-icon-5 { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }

/* Toolbar & Filter Enhancements */
.premium-toolbar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.premium-search-field {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 440px;
}
.premium-search-field svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}
.premium-search-input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 13.5px;
  font-family: inherit;
  color: #0f172a;
  transition: all 0.2s ease;
}
.premium-search-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

/* =========================================================
   PASAR DIRECTORY & ITEM CARDS (PREMIUM STYLING)
   ========================================================= */
.pasar-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease;
}
.pasar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 12px;
}
.pasar-section-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}
.pasar-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pasar-item-card {
  display: flex;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.pasar-item-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.08);
}
.pasar-item-photo-wrap {
  width: 170px;
  min-width: 170px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pasar-item-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.pasar-item-card:hover .pasar-item-photo-wrap img {
  transform: scale(1.05);
}
.pasar-item-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #94a3b8;
  padding: 16px;
  text-align: center;
}
.pasar-item-content {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.pasar-item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.pasar-item-identity {
  flex: 1;
  min-width: 240px;
}
.pasar-item-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.pasar-kondisi-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}
.pasar-kondisi-pill.kondisi-baik {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.pasar-kondisi-pill.kondisi-sedang {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.pasar-kondisi-pill.kondisi-rusak {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.pasar-jenis-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
}
.pasar-drone-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pasar-item-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  display: inline-block;
  line-height: 1.25;
  transition: color 0.18s ease;
}
.pasar-item-title:hover {
  color: #2563eb;
}
.pasar-item-address {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12.5px;
  margin-top: 4px;
}
.pasar-item-address svg {
  flex-shrink: 0;
  color: #94a3b8;
}
.pasar-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pasar-item-metrics-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.pasar-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}
.pasar-metric-pill strong.val {
  color: #0f172a;
  font-weight: 700;
}
.pasar-metric-pill.highlight-open {
  color: #15803d;
  font-weight: 600;
}
.pasar-metric-divider {
  width: 1px;
  height: 16px;
  background: #e2e8f0;
}
.pasar-item-subinfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.pasar-subinfo-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 768px) {
  .pasar-item-card {
    flex-direction: column;
  }
  .pasar-item-photo-wrap {
    width: 100%;
    min-width: 100%;
    height: 160px;
  }
}


