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

:root {
  --red: #DC2626;
  --red-light: #FEE2E2;
  --red-mid: #EF4444;
  --blue: #1D4ED8;
  --blue-light: #DBEAFE;
  --blue-mid: #3B82F6;
  --navy: #0F172A;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --white: #FFFFFF;
  --green: #16A34A;
  --green-light: #DCFCE7;
  --amber: #D97706;
  --amber-light: #FEF3C7;
  --sidebar-w: 256px;
  --topbar-h: 60px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter',sans-serif; background:var(--gray-50); color:var(--navy); overflow:hidden; height:100vh; }

/* ─── LOGIN ──────────────────────────────────────────── */
#loginScreen {
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #7C1C1C 100%);
  overflow:hidden;
}
.login-bg-circles { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.login-bg-circles::before {
  content:''; position:absolute; width:600px; height:600px;
  border-radius:50%; border:1px solid rgba(255,255,255,0.05);
  top:-100px; left:-100px;
}
.login-bg-circles::after {
  content:''; position:absolute; width:400px; height:400px;
  border-radius:50%; border:1px solid rgba(255,255,255,0.05);
  bottom:-80px; right:-80px;
}
.login-split {
  display:flex; width:900px; min-height:540px;
  background:var(--white); border-radius:24px; overflow:hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
  animation: loginReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loginReveal {
  from { opacity:0; transform:translateY(40px) scale(0.96); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.login-left {
  flex:0 0 380px;
  padding:48px 40px; display:flex; flex-direction:column; justify-content:space-between;
  position:relative; overflow:hidden;
}
.login-left::before {
  content:''; position:absolute; width:300px; height:300px;
  background:rgba(255,255,255,0.07); border-radius:50%;
  bottom:-80px; right:-80px;
}
.login-left::after {
  content:''; position:absolute; width:200px; height:200px;
  background:rgba(255,255,255,0.05); border-radius:50%;
  top:-60px; left:-60px;
}
.ll-logo { display:flex; flex-direction:column; align-items:center; gap:16px; position:relative; z-index:1; }
.ll-logo img { width:100px; height:100px; object-fit:contain; filter:drop-shadow(0 8px 24px rgba(0,0,0,0.3)); }
.ll-logo h1 { font-family:'Sora',sans-serif; font-size:26px; color:var(--white); text-align:center; line-height:1.2; font-weight:800; }
.ll-logo p { font-size:12px; color:rgba(255,255,255,0.7); text-align:center; letter-spacing:1px; text-transform:uppercase; }
.ll-stats { display:flex; flex-direction:column; gap:10px; position:relative; z-index:1; }
.ll-stat { background:rgba(255,255,255,0.12); border-radius:10px; padding:12px 16px; display:flex; justify-content:space-between; align-items:center; }
.ll-stat-num { font-size:20px; font-weight:700; color:var(--white); font-family:'Sora',sans-serif; }
.ll-stat-label { font-size:11px; color:rgba(255,255,255,0.7); }
.login-right { flex:1; padding:48px 40px; display:flex; flex-direction:column; justify-content:center; }
.login-right h2 { font-family:'Sora',sans-serif; font-size:26px; font-weight:800; color:var(--navy); margin-bottom:6px; }
.login-right p { font-size:13px; color:var(--gray-500); margin-bottom:32px; }
.lf-group { margin-bottom:18px; }
.lf-group label { display:block; font-size:12px; font-weight:600; color:var(--gray-600); margin-bottom:6px; letter-spacing:0.3px; }
.lf-group input {
  width:100%; padding:11px 14px; border:1.5px solid var(--gray-200);
  border-radius:10px; font-size:14px; font-family:'Inter',sans-serif;
  color:var(--navy); outline:none; transition:border-color 0.2s, box-shadow 0.2s;
  background:var(--gray-50);
}
.lf-group input:focus { border-color:var(--red); box-shadow:0 0 0 3px rgba(220,38,38,0.08); background:var(--white); }
.login-btn {
  width:100%; padding:13px; background:linear-gradient(135deg, var(--red) 0%, #B91C1C 100%);
  color:var(--white); border:none; border-radius:10px; font-size:14px; font-weight:700;
  cursor:pointer; transition:all 0.2s; font-family:'Inter',sans-serif;
  box-shadow: 0 4px 14px rgba(220,38,38,0.35); letter-spacing:0.3px;
}
.login-btn:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(220,38,38,0.45); }
.login-hint { font-size:12px; color:var(--gray-400); text-align:center; margin-top:16px; }
.login-hint b { color:var(--red); }

/* ─── APP SHELL ──────────────────────────────────────── */
#app { display:none; height:100vh; flex-direction:column; }
#app.active { display:flex; }

/* TOPBAR */
.topbar {
  height:var(--topbar-h); background:var(--white); border-bottom:1px solid var(--gray-200);
  display:flex; align-items:center; padding:0 20px 0 0;
  box-shadow:var(--shadow-sm); z-index:200; flex-shrink:0; position:relative;
}
.topbar-brand {
  width:var(--sidebar-w); display:flex; align-items:center; gap:10px;
  padding:0 20px; border-right:1px solid var(--gray-200); height:100%; flex-shrink:0;
}
.topbar-brand img { width:34px; height:34px; object-fit:contain; }
.topbar-brand span { font-family:'Sora',sans-serif; font-size:17px; font-weight:700; color:var(--red); }
.topbar-search-wrap { flex:1; padding:0 20px; }
.topbar-search {
  width:100%; max-width:380px; padding:8px 14px 8px 36px; background:var(--gray-100);
  border:1px solid transparent; border-radius:8px; font-size:13px;
  font-family:'Inter',sans-serif; color:var(--navy); outline:none;
  transition:all 0.2s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:12px center;
}
.topbar-search:focus { background-color:var(--white); border-color:var(--blue-mid); }
.topbar-right { display:flex; align-items:center; gap:12px; margin-left:auto; }
.tb-icon-btn {
  width:36px; height:36px; border-radius:8px; background:var(--gray-100);
  border:none; cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:16px; position:relative; transition:background 0.15s;
}
.tb-icon-btn:hover { background:var(--gray-200); }
.tb-notif-dot { position:absolute; top:5px; right:5px; width:8px; height:8px; background:var(--red); border-radius:50%; border:2px solid var(--white); }
.tb-divider { width:1px; height:24px; background:var(--gray-200); }
.tb-user { display:flex; align-items:center; gap:10px; cursor:pointer; padding:6px 10px; border-radius:10px; transition:background 0.15s; }
.tb-user:hover { background:var(--gray-100); }
.tb-avatar {
  width:34px; height:34px; border-radius:50%;
  background:linear-gradient(135deg, var(--red) 0%, #B91C1C 100%);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:var(--white);
}
.tb-name { font-size:13px; font-weight:600; color:var(--navy); }
.tb-role { font-size:11px; color:var(--gray-400); }
.tb-logout {
  padding:7px 14px; background:transparent; border:1.5px solid var(--gray-200);
  border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; color:var(--gray-500);
  font-family:'Inter',sans-serif; transition:all 0.15s;
}
.tb-logout:hover { border-color:var(--red); color:var(--red); background:var(--red-light); }

/* LAYOUT */
.app-body { display:flex; flex:1; overflow:hidden; }

/* SIDEBAR */
.sidebar {
  width:var(--sidebar-w); background:var(--white); border-right:1px solid var(--gray-200);
  overflow:hidden; flex-shrink:0; padding:0;
  display:flex; flex-direction:column;
}
.sidebar-scroll {
  flex:1; overflow-y:auto; padding:12px 0 6px;
}
.sidebar-scroll::-webkit-scrollbar { width:3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background:var(--gray-200); border-radius:4px; }
.nav-section { padding:16px 12px 6px; }
.nav-label { font-size:10px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--gray-400); padding:0 10px 6px; }
.nav-item {
  display:flex; align-items:center; gap:10px; padding:9px 10px;
  border-radius:10px; cursor:pointer; font-size:13px; font-weight:500;
  color:var(--gray-600); margin-bottom:2px; transition:all 0.15s; position:relative;
}
.nav-item:hover { background:var(--gray-100); color:var(--navy); }
.nav-item.active { background:var(--red-light); color:var(--red); font-weight:700; }
.nav-item.active .nav-ico { color:var(--red); }
.nav-ico { width:18px; height:18px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.nav-badge { margin-left:auto; background:var(--red); color:var(--white); font-size:10px; font-weight:700; padding:2px 7px; border-radius:20px; }
.nav-badge.blue { background:var(--blue); }
.nav-divider { height:1px; background:var(--gray-100); margin:8px 16px; }

/* MAIN CONTENT */
.main-content { flex:1; overflow-y:auto; background:var(--gray-50); display:flex; flex-direction:column; }
.main-content::-webkit-scrollbar { width:6px; }
.main-content::-webkit-scrollbar-thumb { background:var(--gray-200); border-radius:4px; }

/* PAGE */
.page { display:none; padding:28px; }
.page.active { display:block; animation:pageIn 0.25s ease; flex:1; }
.page-peta-layout { flex-direction:column; }
@keyframes pageIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.page-header { margin-bottom:24px; }
.breadcrumb { font-size:12px; color:var(--gray-400); margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.breadcrumb span { color:var(--red); font-weight:600; }
.page-title { font-family:'Sora',sans-serif; font-size:24px; font-weight:800; color:var(--navy); }
.page-sub { font-size:13px; color:var(--gray-500); margin-top:4px; }

/* CARDS */
.card {
  background:var(--white); border:1px solid var(--gray-200); border-radius:16px;
  padding:20px; box-shadow:var(--shadow-sm); margin-bottom:16px;
}
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.card-title { font-size:14px; font-weight:700; color:var(--navy); }
.card-sub { font-size:12px; color:var(--gray-400); margin-top:2px; }
.card-action { font-size:12px; font-weight:600; color:var(--blue); cursor:pointer; }
.card-action:hover { color:var(--red); }

/* STAT CARDS */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
.stat-card {
  background:var(--white); border:1px solid var(--gray-200); border-radius:16px; padding:20px;
  box-shadow:var(--shadow-sm); position:relative; overflow:hidden; transition:all 0.2s;
}
.stat-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--red) 0%, var(--red-mid) 100%);
}
.stat-card.blue::before { background:linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 100%); }
.stat-card.green::before { background:linear-gradient(90deg, #15803D 0%, var(--green) 100%); }
.stat-card.amber::before { background:linear-gradient(90deg, #92400E 0%, var(--amber) 100%); }
.stat-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.stat-icon { width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; margin-bottom:12px; }
.stat-icon.red { background:var(--red-light); }
.stat-icon.blue { background:var(--blue-light); }
.stat-icon.green { background:var(--green-light); }
.stat-icon.amber { background:var(--amber-light); }
.stat-num { font-family:'Sora',sans-serif; font-size:28px; font-weight:800; color:var(--navy); line-height:1; }
.stat-label { font-size:12px; color:var(--gray-500); margin-top:6px; font-weight:500; }
.stat-change { font-size:11px; margin-top:8px; font-weight:600; display:flex; align-items:center; gap:4px; }
.stat-change.up { color:var(--green); }
.stat-change.down { color:var(--red); }

/* GRID */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.grid-auto { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }

/* TABLE */
.table-wrap { overflow-x:auto; border-radius:8px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th { background:var(--gray-50); color:var(--gray-500); font-size:11px; font-weight:700; letter-spacing:0.5px; text-transform:uppercase; padding:10px 14px; text-align:left; border-bottom:1px solid var(--gray-200); white-space:nowrap; }
td { padding:12px 14px; border-bottom:1px solid var(--gray-100); color:var(--gray-700); vertical-align:middle; }
tr:last-child td { border-bottom:none; }
tr:hover td { background:var(--gray-50); }

/* BADGE */
.badge { display:inline-flex; align-items:center; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.badge.green { background:var(--green-light); color:#15803D; }
.badge.red { background:var(--red-light); color:var(--red); }
.badge.blue { background:var(--blue-light); color:var(--blue); }
.badge.amber { background:var(--amber-light); color:#92400E; }
.badge.gray { background:var(--gray-100); color:var(--gray-500); }

/* BUTTONS */
.btn { padding:9px 18px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; border:none; font-family:'Inter',sans-serif; transition:all 0.15s; }
.btn-primary { background:linear-gradient(135deg, var(--red) 0%, #B91C1C 100%); color:var(--white); box-shadow:0 2px 8px rgba(220,38,38,0.25); }
.btn-primary:hover { box-shadow:0 4px 14px rgba(220,38,38,0.35); transform:translateY(-1px); }
.btn-blue { background:linear-gradient(135deg, var(--blue) 0%, #1E40AF 100%); color:var(--white); box-shadow:0 2px 8px rgba(29,78,216,0.25); }
.btn-blue:hover { box-shadow:0 4px 14px rgba(29,78,216,0.35); transform:translateY(-1px); }
.btn-outline { background:var(--white); border:1.5px solid var(--gray-200); color:var(--gray-600); }
.btn-outline:hover { border-color:var(--red); color:var(--red); background:var(--red-light); }
.btn-sm { padding:6px 12px; font-size:12px; border-radius:6px; }
.btn-group { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

/* FORM */
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.form-row.cols3 { grid-template-columns:1fr 1fr 1fr; }
.form-row.col1 { grid-template-columns:1fr; }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size:12px; font-weight:600; color:var(--gray-600); }
.field input, .field select, .field textarea {
  padding:10px 12px; border:1.5px solid var(--gray-200); border-radius:8px;
  font-size:13px; font-family:'Inter',sans-serif; color:var(--navy);
  outline:none; transition:border 0.2s, box-shadow 0.2s; background:var(--gray-50);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color:var(--blue-mid); box-shadow:0 0 0 3px rgba(59,130,246,0.1); background:var(--white);
}
.field textarea { resize:vertical; min-height:80px; }

/* UPLOAD */
.upload-zone {
  border:2px dashed var(--gray-300); border-radius:12px; padding:32px; text-align:center;
  cursor:pointer; transition:all 0.2s; background:var(--gray-50);
}
.upload-zone:hover { border-color:var(--blue-mid); background:var(--blue-light); }
.upload-icon { font-size:32px; margin-bottom:8px; }
.upload-text { font-size:13px; color:var(--gray-500); font-weight:500; }
.upload-text small { display:block; font-size:11px; color:var(--gray-400); margin-top:4px; }

/* PROGRESS */
.progress-track { height:6px; background:var(--gray-100); border-radius:3px; }
.progress-fill { height:100%; border-radius:3px; background:linear-gradient(90deg, var(--red) 0%, var(--red-mid) 100%); }
.progress-fill.blue { background:linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 100%); }
.progress-fill.green { background:linear-gradient(90deg, #15803D 0%, var(--green) 100%); }

/* BAR CHART */
.bar-chart { display:flex; flex-direction:column; gap:12px; }
.bar-row { display:flex; align-items:center; gap:12px; }
.bar-label { width:100px; font-size:12px; color:var(--gray-500); text-align:right; flex-shrink:0; font-weight:500; }
.bar-track { flex:1; height:16px; background:var(--gray-100); border-radius:8px; overflow:hidden; }
.bar-fill { height:100%; border-radius:8px; background:linear-gradient(90deg, var(--red) 0%, var(--red-mid) 100%); }
.bar-fill.blue { background:linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 100%); }
.bar-fill.green { background:linear-gradient(90deg, #15803D 0%, var(--green) 100%); }
.bar-fill.amber { background:linear-gradient(90deg, #92400E 0%, var(--amber) 100%); }
.bar-fill.purple { background:linear-gradient(90deg, #7C3AED 0%, #A78BFA 100%); }
.bar-val { width:70px; font-size:12px; font-weight:700; color:var(--navy); }

/* DONUT */
.donut-wrap { display:flex; align-items:center; gap:24px; }
.donut {
  width:90px; height:90px; border-radius:50%; flex-shrink:0;
  background:conic-gradient(var(--green) 0% 45%, var(--blue) 45% 72%, var(--amber) 72% 88%, var(--red) 88% 100%);
  position:relative;
}
.donut::after { content:''; position:absolute; inset:20%; background:var(--white); border-radius:50%; }
.donut-legend { display:flex; flex-direction:column; gap:7px; }
.legend-item { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--gray-600); }
.legend-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }

/* NOTIF */
.notif-item { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--gray-100); }
.notif-item:last-child { border-bottom:none; }
.notif-dot-wrap { padding-top:4px; }
.notif-dot { width:8px; height:8px; border-radius:50%; background:var(--red); flex-shrink:0; }
.notif-dot.read { background:var(--gray-300); }
.notif-text { font-size:13px; color:var(--navy); font-weight:500; }
.notif-time { font-size:11px; color:var(--gray-400); margin-top:4px; }

/* MINI STATS */
.mini-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.mini-stat { background:var(--white); border:1px solid var(--gray-200); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow-sm); }
.mini-num { font-family:'Sora',sans-serif; font-size:22px; font-weight:800; color:var(--navy); }
.mini-label { font-size:11px; color:var(--gray-400); margin-top:4px; font-weight:500; }

/* KADER CARD */
.kader-card { display:flex; align-items:center; gap:12px; padding:14px; background:var(--gray-50); border:1px solid var(--gray-200); border-radius:12px; margin-bottom:10px; cursor:pointer; transition:all 0.15s; }
.kader-card:hover { border-color:var(--red); background:var(--red-light); }
.kader-av { width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg, var(--red) 0%, #B91C1C 100%); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; color:var(--white); flex-shrink:0; }
.kader-av.blue { background:linear-gradient(135deg, var(--blue) 0%, #1E40AF 100%); }
.kader-av.green { background:linear-gradient(135deg, #15803D 0%, var(--green) 100%); }
.kader-av.amber { background:linear-gradient(135deg, #92400E 0%, var(--amber) 100%); }
.kader-av.purple { background:linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%); }
.kader-info h4 { font-size:13px; font-weight:700; color:var(--navy); }
.kader-info p { font-size:11px; color:var(--gray-400); margin-top:2px; }

/* LAPORAN ITEM */
.laporan-item { padding:16px; background:var(--white); border:1px solid var(--gray-200); border-radius:12px; margin-bottom:10px; transition:all 0.15s; }
.laporan-item:hover { border-color:var(--blue-mid); box-shadow:var(--shadow-md); }
.laporan-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:8px; }
.laporan-title { font-size:14px; font-weight:700; color:var(--navy); }
.laporan-meta { font-size:12px; color:var(--gray-400); margin-top:2px; }

/* ASSET ITEM */
.asset-item { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--gray-50); border:1px solid var(--gray-200); border-radius:12px; margin-bottom:8px; }
.asset-icon { width:38px; height:38px; border-radius:10px; background:var(--blue-light); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }

/* ─── MAP PAGE ──────────────────────────────────────── */
#mapPage { display:none; padding:0; height:calc(100vh - var(--topbar-h)); overflow:hidden; }
#mapPage.active { display:flex; flex-direction:column; }

/* ═══════════════════════════════════════════════════════
   PREMIUM MAP — Clean Light Edition
   ═══════════════════════════════════════════════════════ */

#page-peta {
  flex: none !important;
  background: #f0f4f8 !important;
  position: relative;
}

.map-topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: relative;
}

.map-topbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #dc2626, #7c3aed, #2563eb);
  opacity: 0.7;
}

.map-topbar h2 {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

/* ── Dropdowns ────────────── */
.map-wilayah-selectors {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.map-wilayah-selectors select {
  padding: 7px 28px 7px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  cursor: pointer;
  min-width: 145px;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 9px) center;
}
.map-wilayah-selectors select:hover:not(:disabled) {
  border-color: #dc2626;
  background-color: #fef2f2;
}
.map-wilayah-selectors select:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.map-wilayah-selectors select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.map-sel-arrow {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Breadcrumb ───────────── */
.map-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  flex-shrink: 0;
}
.map-breadcrumb-item {
  color: #94a3b8;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}
.map-breadcrumb-item:hover {
  color: #dc2626;
  background: #fef2f2;
}
.map-breadcrumb-item.active {
  color: #dc2626;
  font-weight: 700;
  background: #fef2f2;
}
.map-breadcrumb-sep { color: #e2e8f0; }

/* ── Badges ───────────────── */
.map-badges { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.map-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1.5px solid transparent;
}
.map-level-badge.dpd  { background: #fef2f2;  border-color: #fecaca;  color: #dc2626; }
.map-level-badge.dpc-kota  { background: #f5f3ff;  border-color: #ddd6fe;  color: #7c3aed; }
.map-level-badge.dpc  { background: #eff6ff;  border-color: #bfdbfe;  color: #2563eb; }
.map-level-badge.pac  { background: #f0fdf4;  border-color: #bbf7d0;  color: #16a34a; }

/* ── Layout ───────────────── */
.map-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
#mapContainer { flex: 1; z-index: 1; }

/* No dark filter — show map naturally */
.leaflet-tile-pane { filter: none; }

/* ── Right Panel ─ */
.map-panel {
  width: 300px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: -4px 0 20px rgba(0,0,0,0.05);
}

.map-panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  position: relative;
}
.map-panel-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #7c3aed, #2563eb);
}

.map-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.2px;
}
.map-panel-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.map-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.map-panel-body::-webkit-scrollbar { width: 3px; }
.map-panel-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
.map-panel-body::-webkit-scrollbar-track { background: transparent; }

/* ── Stat Chips ───────────── */
.map-stat-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 6px;
  transition: background 0.15s;
}
.map-stat-chip:hover { background: #f1f5f9; }
.map-stat-chip .label { font-size: 11px; color: #64748b; }
.map-stat-chip .value { font-size: 12px; font-weight: 700; color: #0f172a; }

/* ── Region List ──────────── */
.map-region-item {
  padding: 9px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  position: relative;
  overflow: hidden;
}
.map-region-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #dc2626, #7c3aed);
  opacity: 0;
  transition: opacity 0.15s;
}
.map-region-item:hover {
  background: #fef2f2;
  border-color: #fecaca;
  transform: translateX(2px);
}
.map-region-item:hover::before { opacity: 1; }
.map-region-item .rname { font-size: 12px; font-weight: 700; color: #0f172a; }
.map-region-item .rcount { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.map-region-item .rarrow { color: #cbd5e1; font-size: 16px; transition: transform 0.15s, color 0.15s; }
.map-region-item:hover .rarrow { color: #dc2626; transform: translateX(3px); }

/* ── Back Button ──────────── */
.map-back-btn {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  text-align: left;
}
.map-back-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ── Popup ──────────── */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05) !important;
  border: none !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.leaflet-popup-content { margin: 0 !important; }
.leaflet-popup-tip { background: #ffffff !important; }

.map-popup {
  padding: 16px;
  min-width: 200px;
  position: relative;
}
.map-popup::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #7c3aed);
}
.map-popup h3 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.2px;
}
.map-popup .pop-stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
}
.map-popup .pop-stat:last-of-type { border-bottom: none; }
.map-popup .pop-key { color: #94a3b8; }
.map-popup .pop-val { font-weight: 700; color: #0f172a; }
.map-popup .pop-btn {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: linear-gradient(135deg, #dc2626, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.2px;
  transition: opacity 0.15s, transform 0.1s;
}
.map-popup .pop-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.leaflet-popup-close-button {
  color: #94a3b8 !important;
  font-size: 18px !important;
  top: 8px !important;
  right: 8px !important;
}

/* Zoom buttons */
.leaflet-bar a {
  background: #ffffff !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}
.leaflet-bar a:hover { background: #fef2f2 !important; color: #dc2626 !important; }

/* INFO CHIPS */
.info-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.info-chip { background: rgba(255,255,255,0.15); border-radius: 6px; padding: 4px 10px; font-size: 11px; color: rgba(255,255,255,0.8); }


/* ═══════════════════════════════════════════════════════
   DASHBOARD REDESIGN
═══════════════════════════════════════════════════════ */

/* Hero Banner */
.db-hero {
  position: relative;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 40%, #7C1C1C 100%);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 20px;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: stretch;
}
.db-hero-bg {
  position: absolute; inset: 0; z-index: 1;
  background-image: radial-gradient(circle at 80% 50%, rgba(220,38,38,0.15) 0%, transparent 60%),
                    radial-gradient(circle at 20% 80%, rgba(29,78,216,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.db-hero-bg::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  top: -100px; right: -80px;
}
.db-hero-bg::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  bottom: -60px; left: 30%;
}
.db-hero-content {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.db-hero-left  { flex: 0 0 auto; max-width: 280px; min-width: 0; position: relative; z-index: 4; }
.db-hero-right { flex: 0 0 auto; position: relative; z-index: 4; }
.db-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 10px;
}
.db-hero-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800; line-height: 1.2;
  color: #fff; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.db-hero-sub-label {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.db-hero-main-title {
  font-size: 22px; font-weight: 700;
  color: #FCA5A5;
  white-space: nowrap;
}
.db-hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); }
.db-hero-photo {
  position: absolute;
  top: 0; bottom: 0;
  left: 55%;
  transform: translateX(-50%);
  width: 420px;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.db-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.95) contrast(1.02);
  mask-image:
    linear-gradient(to right,  rgba(0,0,0,0) 0%,   rgba(0,0,0,0.7) 20%, rgba(0,0,0,1) 35%,
                               rgba(0,0,0,1) 65%,  rgba(0,0,0,0.7) 80%, rgba(0,0,0,0) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,1)   5%,
                               rgba(0,0,0,1) 95%,  rgba(0,0,0,0.2) 100%);
  -webkit-mask-image:
    linear-gradient(to right,  rgba(0,0,0,0) 0%,   rgba(0,0,0,0.7) 20%, rgba(0,0,0,1) 35%,
                               rgba(0,0,0,1) 65%,  rgba(0,0,0,0.7) 80%, rgba(0,0,0,0) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,1)   5%,
                               rgba(0,0,0,1) 95%,  rgba(0,0,0,0.2) 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}
.db-hero-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 20px 28px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.db-badge-num {
  font-family: 'Sora', sans-serif;
  font-size: 32px; font-weight: 800; color: #fff;
  line-height: 1;
}
.db-badge-label { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.db-badge-trend {
  display: inline-block;
  margin-top: 8px;
  background: rgba(22,163,74,0.25);
  color: #4ADE80;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px; font-weight: 700;
}

/* KPI Strip */
.db-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.db-kpi {
  background: #fff;
  border: 1.5px solid #F1F5F9;
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: dbFadeUp 0.5s both;
}
.db-kpi:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.db-kpi::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  border-radius: 14px 14px 0 0;
}
.db-kpi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.db-kpi-num {
  font-family: 'Sora', sans-serif;
  font-size: 20px; font-weight: 800; color: #0F172A; line-height: 1;
}
.db-kpi-label { font-size: 11px; color: #64748B; margin-top: 3px; }
.db-kpi-bar {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: var(--pct);
  background: var(--bar); opacity: 0.3;
  border-radius: 0 2px 0 0;
}

/* Cards */
.db-card {
  background: #fff;
  border: 1.5px solid #F1F5F9;
  border-radius: 16px;
  padding: 22px;
  animation: dbFadeUp 0.5s 0.1s both;
}
.db-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.db-card-title { font-size: 15px; font-weight: 700; color: #0F172A; }
.db-card-sub { font-size: 12px; color: #94A3B8; margin-top: 2px; }
.db-btn-link {
  font-size: 12px; font-weight: 600; color: #DC2626;
  background: none; border: none; cursor: pointer;
  padding: 0; white-space: nowrap;
  transition: opacity 0.15s;
}
.db-btn-link:hover { opacity: 0.7; }

/* Main Grid */
.db-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Bar Chart */
.db-bars { display: flex; flex-direction: column; gap: 14px; }
.db-bar-row { display: flex; align-items: center; gap: 10px; }
.db-bar-meta { display: flex; justify-content: space-between; width: 130px; flex-shrink: 0; }
.db-bar-name { font-size: 12px; font-weight: 600; color: #334155; }
.db-bar-val { font-size: 11px; color: #94A3B8; }
.db-bar-track {
  flex: 1; height: 7px; background: #F1F5F9; border-radius: 99px; overflow: hidden;
}
.db-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.db-bar-pct { font-size: 11px; font-weight: 700; color: #64748B; width: 28px; text-align: right; flex-shrink: 0; }

/* Donut */
.db-donut-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.db-donut-svg { width: 110px; height: 110px; flex-shrink: 0; transform: rotate(-90deg); }
.db-donut-svg text { transform: rotate(90deg) translate(0, -120px); }
.db-donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.db-legend-item { display: flex; align-items: center; gap: 8px; }
.db-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.db-legend-name { font-size: 12px; color: #475569; flex: 1; }
.db-legend-pct { font-size: 12px; font-weight: 700; color: #0F172A; }
.db-prog-track { height: 6px; background: #F1F5F9; border-radius: 99px; overflow: hidden; }
.db-prog-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1D4ED8, #60A5FA); }

/* Top Provinsi List */
.db-toplist { display: flex; flex-direction: column; gap: 10px; }
.db-toplist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 10px;
  transition: background 0.15s;
}
.db-toplist-item:hover { background: #F1F5F9; }
.db-rank {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--rank-color); color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-toplist-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: #fff;
  flex-shrink: 0; letter-spacing: 0.5px;
}
.db-toplist-info { flex: 1; min-width: 0; }
.db-toplist-name { font-size: 13px; font-weight: 700; color: #0F172A; }
.db-toplist-detail { font-size: 11px; color: #94A3B8; margin-top: 1px; }
.db-toplist-num { font-size: 13px; font-weight: 800; color: #0F172A; white-space: nowrap; }

/* Activity Feed */
.db-card-activity { margin-bottom: 0; }
.db-activity-list { display: flex; flex-direction: column; }
.db-act-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F8FAFC;
  transition: background 0.15s;
}
.db-act-item:last-child { border-bottom: none; }
.db-act-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.db-act-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.db-act-body { flex: 1; min-width: 0; }
.db-act-name { font-size: 13px; font-weight: 600; color: #0F172A; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.db-act-tag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.db-act-desc { font-size: 12px; color: #64748B; margin-top: 2px; }
.db-act-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.db-act-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.db-act-time { font-size: 11px; color: #94A3B8; }

/* Animations */
@keyframes dbFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-kpi:nth-child(1) { animation-delay: 0.05s; }
.db-kpi:nth-child(2) { animation-delay: 0.10s; }
.db-kpi:nth-child(3) { animation-delay: 0.15s; }
.db-kpi:nth-child(4) { animation-delay: 0.20s; }
.db-kpi:nth-child(5) { animation-delay: 0.25s; }
.db-kpi:nth-child(6) { animation-delay: 0.30s; }


/* ═══════════════════════════════════════════════════════
   RESPONSIVE / MOBILE — Full Breakpoint System
═══════════════════════════════════════════════════════ */

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px; height: 40px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
  margin-right: 8px;
}
.mobile-menu-btn:hover { background: var(--gray-200); }

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 299;
}

/* ── Tablet (≤1200px) ─────────────────────────── */
@media (max-width: 1200px) {
  .db-kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .db-main-grid { grid-template-columns: 1fr 1fr; }
  .db-card-chart { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .map-wilayah-selectors select { min-width: 120px; font-size: 11px; }
  .map-panel { width: 260px; }
  /* .db-hero-main-title { font-size: 24px; } */
  .db-badge-num { font-size: 26px; }
}

/* ── Small Tablet (≤1024px) ───────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .nav-item { font-size: 12px; padding: 8px 8px; }
  .nav-label { font-size: 9px; }
  .topbar-brand span { font-size: 15px; }
  .topbar-brand { width: var(--sidebar-w); padding: 0 12px; }
  .map-topbar { padding: 8px 12px; gap: 8px; }
  .map-topbar h2 { font-size: 14px; }
  .form-row.cols3 { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile Landscape / Large Phone (≤768px) ──── */
@media (max-width: 768px) {
  body { overflow: auto; height: auto; }

  /* Login */
  .login-split {
    flex-direction: column;
    width: 95vw; max-width: 440px;
    min-height: auto;
    max-height: 95vh;
    overflow-y: auto;
  }
  .login-left {
    flex: 0 0 auto;
    padding: 28px 24px 20px;
  }
  .login-left .ll-stats { display: none; }
  .ll-logo img { width: 60px; height: 60px; }
  .ll-logo h1 { font-size: 18px; }
  .login-right { padding: 24px; }
  .login-right h2 { font-size: 20px; }

  /* Show hamburger */
  .mobile-menu-btn { display: flex; }

  /* Topbar */
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-brand {
    width: auto;
    border-right: none;
    padding: 0;
    gap: 6px;
  }
  .topbar-brand span { display: none; }
  .topbar-search-wrap { display: none; }
  .tb-user > div { display: none; }
  .tb-logout { display: none; }
  .tb-divider { display: none; }

  /* Sidebar: Off-canvas */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px; height: 100vh;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    padding-top: 16px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  }
  .sidebar-overlay.active { display: block; }

  /* App body */
  .app-body { flex-direction: column; }
  #app { height: auto; min-height: 100vh; }

  /* Main content */
  .main-content { overflow-y: visible; height: auto; }
  .page { padding: 16px; }
  .page-title { font-size: 18px; }

  /* Dashboard */
  .db-hero {
    padding: 20px;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    min-height: unset;
  }
  .db-hero-content { flex-direction: row; gap: 0; align-items: center; }
  .db-hero-photo { top: 0; bottom: 0; left: 55%; transform: translateX(-50%); width: 60%; }
  .db-hero-main-title { font-size: 16px; }
  .db-hero-sub-label { font-size: 11px; }
  .db-hero-sub { font-size: 11px; }
  .db-hero-badge { padding: 10px 14px; }
  .db-badge-num { font-size: 20px; }
  .db-hero-left { max-width: 220px; }
  .db-kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .db-kpi { padding: 12px; }
  .db-kpi-num { font-size: 16px; }
  .db-main-grid { grid-template-columns: 1fr; }

  /* Stats Grid */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-num { font-size: 22px; }

  /* Mini Stats */
  .mini-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mini-num { font-size: 18px; }

  /* Grid */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  /* Form */
  .form-row, .form-row.cols3 { grid-template-columns: 1fr; gap: 12px; }

  /* Tables */
  .table-wrap { margin: 0 -12px; border-radius: 0; }
  table { font-size: 12px; }
  th, td { padding: 8px 10px; }

  /* Activity Feed */
  .db-act-item { flex-wrap: wrap; gap: 8px; }
  .db-act-right { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
  .db-act-tag { display: none; }

  /* Map */
  #page-peta { height: auto !important; min-height: calc(100vh - 60px); }
  .map-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .map-wilayah-selectors {
    flex-wrap: wrap;
    gap: 4px;
  }
  .map-wilayah-selectors select {
    min-width: 0;
    flex: 1 1 120px;
    font-size: 11px;
    padding: 6px 24px 6px 8px;
  }
  .map-sel-arrow { display: none; }
  .map-badges { display: none; }
  .map-layout {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  #mapContainer {
    height: 50vh;
    min-height: 280px;
  }
  .map-panel {
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-left: none;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  }

  /* Toplist */
  .db-toplist-item { padding: 8px 10px; }
  .db-toplist-detail { display: none; }

  /* Bar Meta */
  .db-bar-meta { width: 100px; }
  .db-bar-val { display: none; }

  /* Donut */
  .db-donut-wrap { flex-direction: column; align-items: center; }

  /* Upload Zones */
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .upload-zone { padding: 20px; }
  .upload-icon { font-size: 24px; }

  /* Laporan */
  .laporan-header { flex-direction: column; gap: 8px; }

  /* Jabatan page */
  #jabWilayahTabs { gap: 4px; }
  #jabWilayahTabs .btn { font-size: 11px; padding: 5px 8px; }
  #jabOrgChart { min-width: 600px !important; }

  /* TPS page */
  #tpsGlobalStats { grid-template-columns: 1fr 1fr; }
}

/* ── Small Phone (≤480px) ─────────────────────── */
@media (max-width: 480px) {
  .login-split { width: 100vw; border-radius: 0; max-height: 100vh; }
  #loginScreen { align-items: stretch; }
  .login-left { padding: 20px 16px 16px; }
  .login-right { padding: 20px 16px; }
  .ll-logo h1 { font-size: 16px; }
  .login-right h2 { font-size: 18px; }

  .page { padding: 12px; }
  .page-title { font-size: 16px; }

  .db-hero { padding: 14px; border-radius: 10px; aspect-ratio: 16 / 9; min-height: unset; }
  .db-hero-main-title { font-size: 13px; }
  .db-hero-left { max-width: 160px; }
  .db-eyebrow { font-size: 9px; }
  .db-hero-sub { font-size: 11px; }
  .db-badge-num { font-size: 20px; }

  .db-kpi-strip { grid-template-columns: 1fr 1fr; }
  .db-kpi { padding: 10px; }
  .db-kpi-num { font-size: 14px; }
  .db-kpi-label { font-size: 10px; }
  .db-kpi-icon { width: 28px; height: 28px; font-size: 13px; margin-bottom: 6px; }

  .card { padding: 14px; border-radius: 12px; }
  .card-title { font-size: 13px; }

  .stats-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .mini-stat { padding: 10px 12px; }
  .mini-num { font-size: 16px; }

  table { font-size: 11px; }
  th, td { padding: 6px 8px; }

  .btn { padding: 7px 14px; font-size: 12px; }
  .btn-sm { padding: 5px 10px; font-size: 11px; }

  .grid-3 { grid-template-columns: 1fr; }

  #mapContainer { height: 40vh; min-height: 220px; }

  .db-act-avatar { display: none; }
  .db-act-dot { display: none; }
  .db-toplist-avatar { width: 28px; height: 28px; font-size: 8px; }
  .db-rank { width: 18px; height: 18px; font-size: 9px; }

  .breadcrumb { font-size: 11px; }
}

/* ── Large Desktop (≥1400px) ──────────────────── */
@media (min-width: 1400px) {
  /* .db-hero-main-title { font-size: 32px; } */
  .db-badge-num { font-size: 36px; }
  .db-kpi-strip { gap: 16px; }
  .page { padding: 32px; }
}

/* ── Print ────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .mobile-menu-btn, .sidebar-overlay,
  .tb-logout, .btn, .map-topbar { display: none !important; }
  .main-content { overflow: visible; }
  .page { display: block !important; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
}

/* ── Accessibility ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--blue-mid);
  outline-offset: 2px;
}

/* ── Active Page Display Fix ─────────────────── */
.page.active { display: block; flex:1; }

/* ══════════════════════════════════════════════════════════════
   MODAL STYLES
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position:fixed; inset:0; z-index:9999;
  background:rgba(15,23,42,0.55); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center;
  padding:20px; animation:modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn { from{opacity:0} to{opacity:1} }
@keyframes modalSlideUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }

.modal-box {
  background:var(--white); border-radius:16px; width:100%; max-width:720px;
  max-height:90vh; display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.2); animation:modalSlideUp 0.25s ease;
}
.modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 24px; border-bottom:1px solid var(--gray-200);
}
.modal-header h3 {
  font-family:'Sora',sans-serif; font-size:17px; font-weight:700; color:var(--navy); margin:0;
}
.modal-close {
  width:34px; height:34px; border-radius:8px; border:none; background:var(--gray-100);
  font-size:20px; color:var(--gray-500); cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:all 0.15s;
}
.modal-close:hover { background:var(--red-light); color:var(--red); }
.modal-body { padding:20px 24px; overflow-y:auto; flex:1; }
.modal-footer {
  display:flex; gap:10px; justify-content:flex-end;
  padding:16px 24px; border-top:1px solid var(--gray-200);
}

/* Detail kader info grid */
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.detail-item label { display:block; font-size:11px; font-weight:600; color:var(--gray-400); margin-bottom:2px; text-transform:uppercase; letter-spacing:0.3px; }
.detail-item span { font-size:13px; font-weight:500; color:var(--navy); }

/* Toast notification */
.toast-notif {
  position:fixed; bottom:28px; right:28px; z-index:10000;
  padding:14px 22px; border-radius:10px; font-size:13px; font-weight:600;
  color:var(--white); box-shadow:0 8px 30px rgba(0,0,0,0.18);
  animation:toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
}
.toast-notif.success { background:linear-gradient(135deg,#16A34A,#15803D); }
.toast-notif.error { background:linear-gradient(135deg,#DC2626,#991B1B); }
@keyframes toastIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastOut { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(20px)} }

@media(max-width:768px){
  .modal-box { max-width:100%; max-height:95vh; border-radius:12px; }
  .modal-body .form-row, .modal-body .form-row.cols3 { grid-template-columns:1fr; }
  .modal-header { padding:14px 16px; }
  .modal-body { padding:16px; }
  .modal-footer { padding:12px 16px; }
  .detail-grid { grid-template-columns:1fr; }
}


/* ═══════════════════════════════════════════════════
   APP FOOTER
═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   APP FOOTER — Geometric / Exclusive Edition
═══════════════════════════════════════════════════ */
.app-footer {
  background: #fafafa;
  border-top: none;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 88px;
  margin-top: auto;
}

/* SVG decorative layer */
.footer-svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Angled top stripe — the signature cut */
.footer-top-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #DC2626 15%,
    #ff6b6b 40%,
    #DC2626 65%,
    transparent 100%
  );
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 32px 16px;
  position: relative;
  z-index: 2;
}

/* LEFT: brand stamp */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-stamp {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.footer-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(220,38,38,0.3);
  position: relative;
  z-index: 1;
}
.footer-stamp-ring {
  position: absolute;
  inset: -5px;
  border-radius: 14px;
  border: 1.5px dashed rgba(220,38,38,0.3);
  animation: footerSpin 12s linear infinite;
}
.footer-brand-text {}
.footer-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.3px;
}
.footer-brand-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* CENTER: slashes + tagline */
.footer-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.footer-slash-left,
.footer-slash-right {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, transparent, #DC2626, transparent);
  transform: skewX(-15deg);
  opacity: 0.5;
}
.footer-center-text {
  text-align: center;
}
.footer-tagline {
  font-family: 'Sora', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.5px;
}
.footer-tagline-sub {
  font-size: 10px;
  color: #DC2626;
  margin-top: 2px;
  letter-spacing: 1px;
  font-style: italic;
  opacity: 0.8;
}

/* RIGHT: credit badge */
.footer-credit {}
.footer-credit-badge {
  border: 1.5px solid rgba(220,38,38,0.2);
  border-radius: 10px;
  padding: 8px 14px;
  background: rgba(220,38,38,0.03);
  text-align: right;
  position: relative;
  overflow: hidden;
}
/* diagonal accent on badge */
.footer-credit-badge::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent rgba(220,38,38,0.15) transparent transparent;
}
.footer-credit-label {
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.footer-credit-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.footer-credit-icon {
  font-size: 13px;
  filter: drop-shadow(0 0 4px rgba(220,38,38,0.6));
  animation: footerPulse 2.5s ease-in-out infinite;
}
.footer-credit-name {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #DC2626, #ff6b6b, #DC2626);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footerShine 3s linear infinite;
  letter-spacing: 0.3px;
}
.footer-credit-copy {
  font-size: 9px;
  color: #cbd5e1;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* Animations */
@keyframes footerShine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes footerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.15); }
}
@keyframes footerSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 12px;
    text-align: center;
  }
  .footer-brand { display: none; }
  .footer-credit-badge { text-align: center; }
  .footer-credit-brand { justify-content: center; }
  .footer-slash-left, .footer-slash-right { display: none; }
}

/* ═══════════════════════════════════════════════════
   SIDEBAR FOOTER
═══════════════════════════════════════════════════ */
.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 12px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  flex-shrink: 0;
}
.sidebar-footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.sidebar-footer-icon {
  font-size: 12px;
  filter: drop-shadow(0 0 3px rgba(220,38,38,0.6));
  animation: footerPulse 2.5s ease-in-out infinite;
}
.sidebar-footer-name {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(90deg, #DC2626, #ff6b6b, #DC2626);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footerShine 3s linear infinite;
  letter-spacing: 0.2px;
}
.sidebar-footer-sub {
  font-size: 9px;
  color: var(--gray-400);
  letter-spacing: 0.3px;
}
.sidebar-footer-bar {
  height: 2px;
  background: var(--gray-100);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.sidebar-footer-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #DC2626, transparent);
  animation: footerScan 4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════
   JABATAN & STRUKTUR — RESPONSIVE
═══════════════════════════════════════════════════ */

/* Outer chart wrapper */
.jab-chart-wrap {
  max-width: 860px;
  margin: 0 auto;
}

/* Province dropdown row */
.jab-prov-dropdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Province banner */
.jab-prov-banner {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.jab-prov-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  flex-shrink: 0;
}

/* Org chart boxes */
.jab-box {
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  width: 175px;
  max-width: 100%;
  transition: transform .18s, box-shadow .18s;
}
.jab-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Child cards (kecamatan/kelurahan) */
.jab-child-card {
  background: rgba(30,100,60,0.08);
  border: 1.5px solid var(--green);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 110px;
  cursor: pointer;
  transition: all .18s;
}
.jab-child-card:hover {
  background: rgba(30,100,60,0.15);
}

/* Ranting banner */
.jab-ranting-banner {
  background: linear-gradient(135deg,rgba(180,20,40,0.06),rgba(180,20,40,0.02));
  border: 1.5px solid rgba(180,20,40,0.15);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Table wrappers */
.jab-table-wrap {
  max-width: 860px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table footer summary row */
.jab-tfoot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.jab-tfoot-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

/* ── Mobile overrides ── */
@media (max-width: 768px) {

  /* Province dropdown: stack label above select */
  .jab-prov-dropdown-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .jab-prov-dropdown-row > div {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Province banner: stack emoji+text / stats vertically */
  .jab-prov-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
  .jab-prov-stats {
    width: 100%;
    text-align: left;
  }
  .jab-prov-stats > div:last-child {
    justify-content: flex-start !important;
  }

  /* Org boxes: shrink and stack */
  .jab-box {
    width: auto;
    min-width: 140px;
    padding: 12px 14px;
    font-size: 12px;
  }

  /* Child cards: smaller */
  .jab-child-card {
    min-width: 90px;
    padding: 8px 10px;
    font-size: 11px;
  }

  /* Ranting banner: stack */
  .jab-ranting-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }
  .jab-ranting-banner > div:last-child {
    align-self: flex-end;
  }

  /* Table footer: stack */
  .jab-tfoot-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .jab-tfoot-stats {
    gap: 6px;
    font-size: 10px;
  }
  /* Hide dividers in tfoot on mobile */
  .jab-tfoot-stats > span[style*="gray-200"] {
    display: none;
  }

  /* Breadcrumb: wrap */
  #jabBreadcrumb {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* Legend: wrap */
  #jabLegend {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* Stats bar: 2 columns on mobile */
  #jabStats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .jab-chart-wrap {
    padding: 0 2px;
  }
  .jab-box {
    min-width: 120px;
    padding: 10px 10px;
  }
  .jab-child-card {
    min-width: 80px;
    font-size: 10px;
  }
  /* Tables: fixed layout with smaller text */
  .jab-table-wrap table {
    font-size: 11px !important;
  }
  .jab-table-wrap th,
  .jab-table-wrap td {
    padding: 7px 8px !important;
  }
  /* Hide Wilayah column on very small screens */
  .jab-table-wrap th:last-child,
  .jab-table-wrap td:last-child {
    display: none;
  }
}

/* ── Org chart horizontal scroll container ── */
.jab-org-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* On mobile: let chart be as wide as it needs, user can scroll */
@media (max-width: 768px) {
  .jab-org-scroll {
    margin: 0 -12px;          /* bleed to edges so scroll feels natural */
    padding: 0 12px;
  }
  .jab-org-scroll .jab-chart-wrap {
    min-width: 480px;         /* minimum so boxes don't squish too hard */
  }

  /* Slightly smaller boxes so 2 fit side by side */
  .jab-box {
    width: 145px !important;
    min-width: 130px !important;
    padding: 10px 12px !important;
    font-size: 11px !important;
  }
  .jab-box > div:first-child {   /* icon */
    font-size: 18px !important;
  }

  /* Child cards (kelurahan/kecamatan) */
  .jab-child-card {
    min-width: 86px !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .jab-org-scroll .jab-chart-wrap {
    min-width: 400px;
  }
  .jab-box {
    width: 130px !important;
    min-width: 115px !important;
  }
}

/* ═══════════════════════════════════════════════════
   CRUD MODAL FORMS — Beautiful UI
═══════════════════════════════════════════════════ */
.crud-form-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:14px; margin-bottom:14px; }
.crud-field { display:flex; flex-direction:column; gap:5px; }
.crud-field.full { grid-column:1 / -1; }
.crud-field label { font-size:12px; font-weight:600; color:var(--gray-500); text-transform:uppercase; letter-spacing:0.4px; }
.crud-input {
  width:100%; padding:10px 14px; border:1.5px solid var(--gray-200); border-radius:10px;
  font-size:14px; font-family:'Inter',sans-serif; color:var(--navy);
  background:var(--white); transition:all 0.2s ease;
  outline:none;
}
.crud-input:focus { border-color:var(--red); box-shadow:0 0 0 3px rgba(220,38,38,0.1); }
.crud-input:hover { border-color:var(--gray-300); }
.crud-textarea { resize:vertical; min-height:60px; }
select.crud-input { cursor:pointer; appearance:auto; }

.crud-section-title {
  font-size:13px; font-weight:700; color:var(--navy); padding-bottom:8px;
  margin-bottom:14px; border-bottom:2px solid var(--red-light);
  font-family:'Sora',sans-serif;
}

/* Detail Grid */
.crud-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.crud-detail-item { display:flex; flex-direction:column; gap:3px; }
.crud-detail-item label { font-size:11px; font-weight:600; color:var(--gray-400); text-transform:uppercase; letter-spacing:0.4px; }
.crud-detail-item span { font-size:14px; font-weight:500; color:var(--navy); }
.crud-detail-full { grid-column:1 / -1; display:flex; flex-direction:column; gap:3px; }
.crud-detail-full label { font-size:11px; font-weight:600; color:var(--gray-400); text-transform:uppercase; letter-spacing:0.4px; }
.crud-detail-full span { font-size:14px; font-weight:500; color:var(--navy); line-height:1.6; }
.crud-detail-divider {
  grid-column:1 / -1; font-size:12px; font-weight:700; color:var(--gray-500);
  padding:10px 0 6px; margin-top:4px;
  border-bottom:1.5px solid var(--gray-200); text-transform:uppercase; letter-spacing:0.5px;
}

/* Delete confirmation */
.crud-delete-icon {
  width:72px; height:72px; border-radius:50%; margin:0 auto 16px;
  display:flex; align-items:center; justify-content:center; font-size:32px;
  background:linear-gradient(135deg, #FEE2E2, #FECACA);
  animation:crud-shake 0.4s ease;
}
@keyframes crud-shake {
  0%,100%{transform:rotate(0)} 25%{transform:rotate(-8deg)} 75%{transform:rotate(8deg)}
}
.btn-danger {
  padding:10px 20px; border-radius:10px; border:none; font-size:14px; font-weight:600;
  background:linear-gradient(135deg,#DC2626,#991B1B); color:var(--white);
  cursor:pointer; transition:all 0.2s;
}
.btn-danger:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(220,38,38,0.35); }

/* Action buttons in tables */
.crud-actions { display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.crud-btn-del { color:var(--red) !important; }
.crud-btn-del:hover { background:var(--red-light) !important; }

/* Empty state */
.crud-empty { text-align:center; padding:40px 20px; color:var(--gray-400); font-size:14px; font-style:italic; }

/* Notifikasi Items */
.crud-notif-item {
  display:flex; gap:14px; padding:16px 20px; border-bottom:1px solid var(--gray-100);
  align-items:flex-start; transition:all 0.2s;
}
.crud-notif-item:hover { background:var(--gray-50); }
.crud-notif-item.read { opacity:0.6; }
.crud-notif-icon { font-size:24px; flex-shrink:0; width:40px; height:40px; display:flex; align-items:center; justify-content:center; background:var(--gray-50); border-radius:12px; }
.crud-notif-body { flex:1; min-width:0; }
.crud-notif-title { font-weight:600; font-size:14px; color:var(--navy); margin-bottom:2px; }
.crud-notif-dot { display:inline-block; width:8px; height:8px; background:var(--red); border-radius:50%; margin-left:6px; vertical-align:middle; animation:crud-pulse 2s infinite; }
@keyframes crud-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.crud-notif-text { font-size:13px; color:var(--gray-500); line-height:1.4; }
.crud-notif-time { font-size:11px; color:var(--gray-400); margin-top:4px; }
.crud-notif-actions { display:flex; gap:4px; flex-shrink:0; }

@media(max-width:768px){
  .crud-form-row { grid-template-columns:1fr; }
  .crud-detail-grid { grid-template-columns:1fr; }
}

/* ═══ Upload Zones in Modal ═══ */
.crud-upload-zone {
  border:2px dashed var(--gray-200); border-radius:12px; padding:12px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:all 0.2s;
  background:var(--gray-50); min-height:80px;
}
.crud-upload-zone:hover { border-color:var(--red); background:var(--red-light); }
.crud-upload-placeholder { text-align:center; color:var(--gray-400); font-size:14px; line-height:1.6; }
