/* --- Mobile Design Tokens --- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --navy: #1a237e;
  --text-dark: #0f172a;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

/* --- Base Reset & Mobile Container (Dynamic Island & Full Screen Support) --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  font-family: 'Poppins', sans-serif;
  background-color: #1e40af; /* Exact match with top hero blue */
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow-x: hidden;
}

/* Mobile-first full screen container */
.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  margin: 0 auto;
}

/* --- Fluid Tablet Layout (≥ 768px) --- */
@media (min-width: 768px) {
  .app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  /* Bento Grid: 4 columns on tablet */
  .monitoring-bento-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  /* KPI Grid on tablet */
  .dash-kpi-container {
    padding: 0 24px;
    margin-top: 18px;
  }
  .dash-kpi-grid {
    gap: 14px;
  }
  .dash-kpi-card {
    padding: 14px 12px;
  }
  .dash-kpi-val {
    font-size: 1.5rem;
  }

  /* Header & sections padding on tablet */
  .dash-hero-header {
    padding: 28px 24px 34px;
  }
  .dash-quick-shortcuts {
    padding: 0 24px;
  }
  .admin-monitoring-card {
    margin: 0 24px 20px 24px;
  }

  /* Sliding panel centered on tablet */
  .upload-sliding-panel {
    max-width: 600px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 24px;
  }

  /* Banners centered on tablet */
  .status-banner, .sync-queue-bar {
    max-width: 560px;
  }

  /* Login Screen centered horizontally & vertically on tablet */
  .login-screen {
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .login-header {
    margin-top: 0;
    max-width: 480px;
    width: 100%;
    text-align: center;
  }
  .login-form-container {
    max-width: 480px;
    width: 100%;
    margin: 20px auto;
  }
  .login-footer {
    max-width: 480px;
    width: 100%;
    text-align: center;
    margin-top: 12px;
  }
}

/* --- Utilities --- */
.flex-1 { flex: 1; }
.hidden { display: none !important; }

.status-banner {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.status-banner.online {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-banner.offline {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  animation: pulse 2s infinite;
}

/* --- Floating Sync Queue Bar --- */
.sync-queue-bar {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.25);
  z-index: 998;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sync-btn-link {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.sync-btn-link:active {
  background-color: rgba(255, 255, 255, 0.35);
}
@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes pulse {
  0% { opacity: 0.9; }
  50% { opacity: 0.7; }
  100% { opacity: 0.9; }
}

/* --- Custom Alerts / Overlays --- */
.overlay-alert {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay-alert.show {
  opacity: 1;
  pointer-events: auto;
}
.alert-box {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--radius-lg);
  width: 85%;
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.overlay-alert.show .alert-box {
  transform: scale(1);
}
.alert-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.alert-title {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.alert-desc {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.4;
  margin-bottom: 16px;
}
.alert-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

/* --- UI: Login Page --- */
.login-screen {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(243, 244, 246, 0.6) 0%, rgba(224, 242, 254, 0.4) 90%);
}
.login-screen::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0) 70%);
  z-index: 1;
}
.login-screen::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0) 70%);
  z-index: 1;
}
.login-header {
  text-align: center;
  margin-top: 30px;
  z-index: 2;
}
.app-shield-logo {
  width: 84px;
  height: 84px;
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  padding: 8px;
  transition: transform 0.3s ease;
}
.app-shield-logo:hover {
  transform: scale(1.05);
}
.app-shield-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.app-shield-logo svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
}
.app-title {
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--navy) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.app-subtitle {
  color: var(--text-gray);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.login-form-container {
  margin: 24px auto;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
  z-index: 2;
}
.form-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-dark);
  letter-spacing: -0.3px;
  text-align: left;
}
.input-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-gray);
  margin-bottom: 6px;
  display: block;
  text-align: left;
}
.input-wrapper {
  position: relative;
  margin-bottom: 18px;
}
.input-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  transition: color 0.2s ease;
}
.input-icon-right {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  background: none;
}
.input-wrapper .mobile-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background-color: var(--bg-light);
  outline: none;
}
.mobile-input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.input-wrapper:focus-within .input-icon-left {
  color: var(--primary);
}
.forgot-pass-link {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  margin-top: -6px;
  margin-bottom: 22px;
}
.mobile-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  outline: none;
}
.mobile-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}
.mobile-btn:disabled {
  background: var(--text-light);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Footer style */
.login-footer {
  text-align: center;
  margin-top: auto;
}
.dinas-pupr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  border-radius: 20px;
  margin-bottom: 12px;
}
.flag-icon {
  width: 12px;
  height: 8px;
  background: linear-gradient(to bottom, #ef4444 50%, #ffffff 50%);
  border: 0.5px solid var(--text-light);
}
.badge-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
}
.footer-text {
  font-size: 0.65rem;
  color: var(--text-light);
  line-height: 1.4;
  padding: 0 20px;
}

/* --- UI: Dashboard Page --- */
.dashboard-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f8fafc;
}

/* --- Dashboard Header Badges --- */
.header-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
}
.header-badge.pupr {
  background-color: #eff6ff;
  color: var(--navy);
  border-color: #dbeafe;
}
.header-badge.gps {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.header-badge.gps::before {
  content: "";
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}
.header-badge.sync {
  background-color: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

/* --- Dashboard Hero Greeting & Header (Modern Executive iOS Bento Grid) --- */
.dash-hero-header {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(18px + env(safe-area-inset-left, 0px));
  padding-right: calc(18px + env(safe-area-inset-right, 0px));
  padding-bottom: 22px;
  background: 
    radial-gradient(circle at 88% 12%, rgba(147, 197, 253, 0.32), transparent 48%),
    radial-gradient(circle at 12% 88%, rgba(30, 58, 138, 0.45), transparent 52%),
    linear-gradient(155deg, #1e3a8a 0%, #1d4ed8 48%, #2563eb 100%);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 10px 28px -4px rgba(30, 64, 175, 0.28), 0 4px 10px -2px rgba(30, 64, 175, 0.15);
  color: #ffffff;
  position: relative;
  overflow: visible;
  z-index: 50;
}
.dash-hero-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.dash-status-pill {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
@keyframes dashStatusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0);
  }
}
.dash-status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: dashStatusPulse 2s infinite ease-in-out;
}
.dash-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.dash-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
  color: #1e40af;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.dash-user-info {
  flex: 1;
  min-width: 0;
}
.dash-greet-tag {
  font-size: 0.74rem;
  color: #bfdbfe;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: -0.01em;
}
.dash-user-name {
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.dash-date-tag {
  font-size: 0.68rem;
  color: #93c5fd;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.dash-skpd-box {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 10px 14px;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.dash-skpd-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --- Top 3 KPI Stats Bento Grid (Modern Executive iOS Bento) --- */
.dash-kpi-container {
  margin-top: 14px;
  padding: 0 16px;
  position: relative;
  z-index: 10;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}
.dash-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 12px 10px;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: transform, box-shadow, border-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.dash-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.07);
}
.dash-kpi-card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.dash-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 4px;
}
.dash-kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.dash-kpi-icon-wrap.active { 
  background: #eff6ff; 
  color: #2563eb; 
  border: 1px solid #dbeafe;
}
.dash-kpi-icon-wrap.today { 
  background: #fffbeb; 
  color: #d97706; 
  border: 1px solid #fef3c7;
}
.dash-kpi-icon-wrap.done { 
  background: #ecfdf5; 
  color: #059669; 
  border: 1px solid #d1fae5;
}
.dash-kpi-card:hover .dash-kpi-icon-wrap {
  transform: scale(1.06);
}
.dash-kpi-badge {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.dash-kpi-badge.active {
  background: #dbeafe;
  color: #1e40af;
}
.dash-kpi-badge.today {
  background: #fef3c7;
  color: #92400e;
}
.dash-kpi-badge.done {
  background: #d1fae5;
  color: #065f46;
}
.dash-kpi-val {
  font-size: 1.42rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.dash-kpi-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  color: #334155;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.dash-kpi-desc {
  font-size: 0.54rem;
  color: #94a3b8;
  line-height: 1.2;
  margin-top: 2px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

/* --- Quick Action Shortcuts Scroller --- */
.dash-quick-shortcuts {
  padding: 0 16px 14px 16px;
}
.dash-section-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.dash-section-subhead-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}
.dash-section-subhead-desc {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}
.dash-shortcuts-scroller {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dash-shortcuts-scroller::-webkit-scrollbar {
  display: none;
}
.dash-shortcut-chip {
  flex: 1;
  min-width: 130px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
  transition-property: transform, box-shadow, background-color, border-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.dash-shortcut-chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.dash-shortcut-chip:active {
  transform: scale(0.97);
  background: #f8fafc;
}
.dash-chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.dash-chip-icon.blue { 
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); 
  color: #2563eb; 
  border: 1px solid #bfdbfe;
}
.dash-chip-icon.purple { 
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); 
  color: #7c3aed; 
  border: 1px solid #ddd6fe;
}
.dash-chip-icon.amber { 
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); 
  color: #d97706; 
  border: 1px solid #fde68a;
}
.dash-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-chip-text strong {
  font-size: 0.72rem;
  color: #0f172a;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-chip-text span {
  font-size: 0.6rem;
  color: #94a3b8;
  line-height: 1.15;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Project Progress List Section --- */
.project-progress-section {
  padding: 10px 16px 100px 16px;
  flex: 1;
}
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.view-all-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.year-select-wrapper {
  position: relative;
}
.year-select-db {
  padding: 6px 30px 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  appearance: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
  transition-property: border-color, box-shadow;
  transition-duration: 150ms;
}
.year-select-db:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* --- Project Progress Card (iOS Bento Aesthetic) --- */
.project-progress-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 15px 16px;
  margin-bottom: 12px;
  background-color: #ffffff;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  transition-property: transform, box-shadow, border-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.interactive-project-card {
  cursor: pointer;
}
.interactive-project-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}
.interactive-project-card:active {
  transform: scale(0.985);
  background-color: #f8fafc;
}
.m-rup-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  background: #f1f5f9;
  color: #475569;
  padding: 2.5px 8px;
  border-radius: 8px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  letter-spacing: -0.01em;
}
.proj-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 9px;
  gap: 12px;
}
.proj-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  flex: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.proj-pct {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.proj-pct.selesai {
  color: var(--success);
}
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 6px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-bar-fill.selesai {
  background: linear-gradient(90deg, #10b981 0%, #047857 100%);
}
.proj-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f8fafc;
  font-size: 0.7rem;
  color: var(--text-gray);
}
.proj-pengawas-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.proj-pengawas-info strong {
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-detail-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.interactive-project-card:hover .proj-detail-link {
  transform: translateX(2px);
}

.m-deviasi-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.m-deviasi-badge.dev-positive {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.m-deviasi-badge.dev-neutral {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.m-deviasi-badge.dev-negative {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}


/* --- Sliding Upload Panel --- */
.upload-panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow: hidden;
}
.upload-panel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.upload-sliding-panel {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  z-index: 601;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  transition: bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.upload-panel-overlay.show .upload-sliding-panel {
  bottom: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.panel-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-gray);
  cursor: pointer;
}

/* --- Bottom Navigation Tab Bar (Safe Area Adaptable) --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) 10px;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 500;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.05);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: none;
  font-family: inherit;
  opacity: 0.55;
  position: relative;
  padding: 6px 0;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.bottom-nav-placeholder {
  display: none;
}

/* --- Assistive Touch Floating Camera Button --- */
.assistive-touch-btn {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  border: none;
  cursor: pointer;
  z-index: 9999;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.3s ease, opacity 0.3s ease, transform 0.15s ease;
  opacity: 0.85;
}
.assistive-touch-btn:hover,
.assistive-touch-btn.dragging {
  opacity: 1;
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.55);
}
.assistive-touch-btn:active {
  transform: scale(0.9);
}
.assistive-touch-btn.idle {
  opacity: 0.45;
}
.assistive-touch-btn.snapping {
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease, opacity 0.3s ease;
}
/* Subtle pulse ring when idle */
.assistive-touch-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.25);
  animation: atPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
.assistive-touch-btn.dragging::before,
.assistive-touch-btn.idle::before {
  animation: none;
  opacity: 0;
}
@keyframes atPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0; }
}
.bottom-nav-item.active {
  color: var(--primary);
  opacity: 1;
}
.bottom-nav-item i {
  font-size: 1.3rem;
  margin-bottom: 4px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-nav-item.active i {
  transform: scale(1.15) translateY(-2px);
}
.bottom-nav-item:active i {
  transform: scale(0.85);
}
/* Active dot indicator under icon */
.bottom-nav-item::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-nav-item.active::after {
  width: 20px;
}
/* Ripple on tap */
.bottom-nav-item .nav-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  transform: scale(0);
  animation: navRipple 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes navRipple {
  to { transform: scale(2.5); opacity: 0; }
}


/* --- Dynamic Screen Content with Slide Transitions --- */
.screen-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 68px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s 0.35s;
  will-change: transform, opacity;
}
.screen-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s 0s;
  position: relative;
  bottom: auto;
}
.screen-content.slide-left {
  transform: translateX(-40px);
}
.screen-content.slide-right {
  transform: translateX(40px);
}
#kegiatanScreen.active,
#verifikasiScreen.active,
#petaScreen.active,
#badanUsahaScreen.active {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 64px - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  padding-bottom: 0 !important;
}

/* Respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .screen-content {
    transition: none;
    transform: none;
  }
  .screen-content.active {
    transition: none;
  }
  .screen-content.slide-left,
  .screen-content.slide-right {
    transform: none;
  }
  .bottom-nav-item i {
    transition: none;
  }
  .bottom-nav-item::after {
    transition: none;
  }
  .assistive-touch-btn {
    transition: none;
  }
  .assistive-touch-btn::before {
    animation: none;
  }
  .bottom-nav-item .nav-ripple {
    animation: none;
  }
}
#kegiatanListTab::-webkit-scrollbar {
  width: 4px;
}
#kegiatanListTab::-webkit-scrollbar-track {
  background: transparent;
}
#kegiatanListTab::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 10px;
}
/* --- Project Progress Slider (Horizontal 3-Cards Paging / Carousel) --- */
.project-slider-wrapper {
  position: relative;
  width: 100%;
}

.project-progress-slider {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 16px;
  padding: 4px 2px 8px 2px;
}
.project-progress-slider::-webkit-scrollbar {
  display: none;
}

.project-slide-page {
  min-width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.project-slide-page .project-progress-card {
  margin-bottom: 0 !important;
}

/* Slider Pagination Control Bar */
.project-slider-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  margin-bottom: 24px;
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.slider-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}
.slider-nav-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.slider-nav-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}
.slider-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
}

.slider-page-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 5px;
}
.slider-page-info strong {
  color: #0f172a;
  font-weight: 700;
}
.slider-total-items {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 130px;
  overflow: hidden;
  padding: 2px 4px;
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
}
.slider-dot.active {
  width: 20px;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Profil Screen Styles */
.profile-screen-body {
  padding: 32px 20px 100px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-avatar-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3.5px solid var(--primary);
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  margin: 10px auto 16px auto;
}
.profile-username {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.profile-role {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 600;
  margin-bottom: 2px;
}
.profile-agency {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 24px;
}
/* --- Admin Monitoring Dashboard Bento Grid (Modern Executive iOS Widget) --- */
.admin-monitoring-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 16px 14px;
  margin: 16px 16px 0 16px;
  box-shadow: 0 6px 24px -2px rgba(15, 23, 42, 0.04), 0 2px 8px -1px rgba(15, 23, 42, 0.02);
}
.admin-monitoring-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
}
.admin-monitoring-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid #bfdbfe;
}
.admin-monitoring-title-box {
  flex: 1;
  min-width: 0;
}
.admin-monitoring-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.admin-monitoring-subtitle {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 500;
  line-height: 1.2;
}
.admin-monitoring-badge {
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3.5px 10px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Bento Grid 2x4 iOS Widget Aesthetic */
.monitoring-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.m-stat-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition-property: transform, box-shadow, border-color, background-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}
.m-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}
.m-stat-card:active {
  transform: scale(0.96);
  background-color: #f8fafc;
}

.m-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.m-stat-card:hover .m-stat-icon {
  transform: scale(1.08);
}
.m-stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.m-stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.m-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #475569;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* Stat card color variants */
.m-stat-card.bp { border-left: 3.5px solid #f59e0b; }
.m-stat-card.bp .m-stat-icon { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.m-stat-card.bp .m-stat-num { color: #d97706; }

.m-stat-card.knt { border-left: 3.5px solid #2563eb; }
.m-stat-card.knt .m-stat-icon { background: #dbeafe; color: #2563eb; border: 1px solid #bfdbfe; }
.m-stat-card.knt .m-stat-num { color: #2563eb; }

.m-stat-card.sel { border-left: 3.5px solid #10b981; }
.m-stat-card.sel .m-stat-icon { background: #d1fae5; color: #059669; border: 1px solid #a7f3d0; }
.m-stat-card.sel .m-stat-num { color: #059669; }

.m-stat-card.bel { border-left: 3.5px solid #f43f5e; }
.m-stat-card.bel .m-stat-icon { background: #ffe4e6; color: #e11d48; border: 1px solid #fecdd3; }
.m-stat-card.bel .m-stat-num { color: #e11d48; }

.m-stat-card.trg { border-left: 3.5px solid #8b5cf6; }
.m-stat-card.trg .m-stat-icon { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }
.m-stat-card.trg .m-stat-num { color: #7c3aed; }

.m-stat-card.real { border-left: 3.5px solid #06b6d4; }
.m-stat-card.real .m-stat-icon { background: #cffafe; color: #0891b2; border: 1px solid #a5f3fc; }
.m-stat-card.real .m-stat-num { color: #0891b2; }

.m-stat-card.dev { border-left: 3.5px solid #ea580c; }
.m-stat-card.dev .m-stat-icon { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.m-stat-card.dev .m-stat-num { color: #c2410c; }

.m-stat-card.null { border-left: 3.5px solid #64748b; }
.m-stat-card.null .m-stat-icon { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.m-stat-card.null .m-stat-num { color: #475569; }

.m-stat-card.active-card-filter {
  box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(37, 99, 235, 0.22) !important;
  background: #ffffff !important;
  transform: translateY(-2px);
}

/* Deviasi Badge on Project Progress Cards */
.m-deviasi-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}
.m-deviasi-badge.dev-negative {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}
.m-deviasi-badge.dev-positive {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.m-deviasi-badge.dev-neutral {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* --- PWA Install Floating Banner & Modal --- */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: 16px;
  z-index: 10050;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: slideUpPwa 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpPwa {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pwa-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  padding: 6px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}
.pwa-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pwa-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pwa-banner-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.pwa-banner-desc {
  font-size: 0.68rem;
  color: var(--text-gray);
  line-height: 1.35;
}
.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-btn-primary {
  flex: 1;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}
.pwa-btn-primary:active {
  transform: scale(0.96);
}
.pwa-btn-secondary {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- PWA Guidance Modal Backdrop & Card --- */
.pwa-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pwa-modal-overlay.show {
  display: flex !important;
}
.pwa-modal-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  animation: popUpPwa 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popUpPwa {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (min-width: 480px) {
  .pwa-install-banner {
    max-width: 420px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
}




/* ========================================================== */
/* UI/UX PRO MAX REDESIGN: PROFIL & DIGITAL E-KTP SCREEN      */
/* ========================================================== */

/* Hero Header Profile */
.profile-header-hero {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(18px + env(safe-area-inset-left, 0px));
  padding-right: calc(18px + env(safe-area-inset-right, 0px));
  padding-bottom: 20px;
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 40%, #2563eb 100%);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.2);
  color: #ffffff;
  position: relative;
  overflow: visible;
  z-index: 40;
}
.profile-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.profile-header-title-box {
  display: flex;
  flex-direction: column;
}
.profile-screen-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.profile-screen-subtitle {
  font-size: 0.65rem;
  color: #93c5fd;
  font-weight: 500;
  margin-top: 1px;
}
.profile-verified-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* User Card in Hero */
.profile-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 14px 16px;
}
.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-glow {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #38bdf8);
  opacity: 0.6;
  filter: blur(4px);
}
.profile-avatar-circle-hero {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  color: #1e40af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.profile-avatar-check {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  border: 2px solid #ffffff;
  z-index: 3;
}
.profile-user-details {
  flex: 1;
  min-width: 0;
}
.profile-fullname {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 4px;
}
.profile-agency-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  color: #cbd5e1;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Body */
.profile-content-body {
  padding: 16px 16px calc(140px + env(safe-area-inset-bottom, 0px)) 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Profile KPI 3-Cards Grid */
.profile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.profile-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}
.profile-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.profile-kpi-icon.blue { background: #eff6ff; color: #2563eb; }
.profile-kpi-icon.green { background: #ecfdf5; color: #059669; }
.profile-kpi-icon.amber { background: #fffbeb; color: #d97706; }
.profile-kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.profile-kpi-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  color: #334155;
  margin-top: 3px;
}
.profile-kpi-desc {
  font-size: 0.52rem;
  color: #94a3b8;
  margin-top: 1px;
}

/* Section Wrapper */
.profile-section-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.profile-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-section-chip {
  font-size: 0.58rem;
  font-weight: 800;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #dbeafe;
}

/* Digital E-KTP Card */
.digital-ktp-card {
  background: linear-gradient(135deg, #0284c7 0%, #1e40af 60%, #1e3a8a 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 16px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
}
.digital-ktp-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 8px;
}
.digital-ktp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.digital-ktp-gov {
  display: flex;
  flex-direction: column;
}
.gov-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
}
.gov-sub {
  font-size: 0.55rem;
  font-weight: 600;
  color: #bae6fd;
  margin-top: 1px;
}
.digital-ktp-chip-icon {
  font-size: 1.6rem;
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.digital-ktp-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}
.digital-ktp-row {
  display: grid;
  grid-template-columns: 85px 1fr;
  align-items: baseline;
  gap: 8px;
}
.ktp-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  color: #93c5fd;
}
.ktp-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  word-break: break-word;
}
.ktp-val.highlight {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fef08a;
}
.digital-ktp-footer {
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 10px;
}
.btn-view-ktp {
  width: 100%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-view-ktp:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.98);
}

/* Settings Group Card */
.settings-group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}
.settings-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.settings-tile:last-child {
  border-bottom: none;
}
.settings-tile:active {
  background-color: #f8fafc;
}
.settings-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.settings-tile-icon.blue { background: #eff6ff; color: #2563eb; }
.settings-tile-icon.emerald { background: #ecfdf5; color: #059669; }
.settings-tile-icon.purple { background: #faf5ff; color: #9333ea; }
.settings-tile-icon.amber { background: #fffbeb; color: #d97706; }
.settings-tile-icon.cyan { background: #ecfeff; color: #0891b2; }
.settings-tile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.settings-tile-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}
.settings-tile-sub {
  font-size: 0.64rem;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-tile-arrow {
  font-size: 0.75rem;
  color: #cbd5e1;
  flex-shrink: 0;
}

/* App Info Card */
.profile-app-info-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-info-logo img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
}
.app-info-meta {
  display: flex;
  flex-direction: column;
}
.app-info-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
}
.app-info-version {
  font-size: 0.6rem;
  color: #64748b;
  margin-top: 1px;
}
.app-info-copyright {
  font-size: 0.55rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Logout Button */
.profile-logout-wrap {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 20px;
}
.profile-logout-btn {
  width: 100%;
  background: #ffffff;
  color: #e11d48;
  border: 1.5px solid #fecdd3;
  border-radius: 16px;
  padding: 13px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.05);
  transition: all 0.2s ease;
}
.profile-logout-btn:active {
  background: #fff1f2;
  border-color: #fda4af;
  transform: scale(0.98);
}

/* KTP Lightbox / Modal Panel */
.ktp-modal-panel {
  max-height: 85vh;
  padding-bottom: 24px;
}
.ktp-modal-body {
  padding: 12px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ktp-preview-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.ktp-img-wrapper {
  position: relative;
  width: 100%;
  background: #0f172a;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ktp-full-img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
}
.ktp-verified-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}
.ktp-empty-state {
  padding: 30px 16px;
  text-align: center;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
}
.ktp-empty-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.ktp-empty-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}
.ktp-empty-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}
.ktp-meta-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ktp-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}
.ktp-meta-label {
  color: #64748b;
  font-weight: 600;
}
.ktp-meta-value {
  color: #0f172a;
  font-weight: 700;
}

/* --- Dynamic Form Groups (Dashboard Modal) --- */
.form-group-db {
  margin-bottom: 18px;
}
.mobile-select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--bg-light);
  color: var(--text-dark);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}
.mobile-select:disabled {
  opacity: 0.6;
  background-color: var(--border-color);
}
.mobile-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--bg-light);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mobile-input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- Webcam Container --- */
.camera-container {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #000000;
  position: relative;
  margin-bottom: 12px;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-element {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.camera-element video,
.camera-element canvas,
.camera-element img,
.camera-container video,
.camera-container canvas,
.camera-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  display: block !important;
  transform: none !important;
}
.camera-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* --- Location Stats Card --- */
.location-card {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-color);
}
.location-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-dark);
}
.location-item:last-child {
  margin-bottom: 0;
}
.location-item i {
  color: var(--primary);
  font-size: 1rem;
  margin-top: 2px;
}
.location-label {
  font-weight: 600;
  color: var(--text-gray);
  margin-right: 4px;
}

/* --- Spinner Animation --- */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #ffffff;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
  display: inline-block;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- UI/UX Pro Max Redesign for Kegiatan Screen --- */
.kegiatan-header-hero {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(18px + env(safe-area-inset-left, 0px));
  padding-right: calc(18px + env(safe-area-inset-right, 0px));
  padding-bottom: 16px;
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 40%, #2563eb 100%);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.18);
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  z-index: 40;
}
.kegiatan-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.kegiatan-header-left {
  flex: 1;
  min-width: 0;
}
.kegiatan-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.kegiatan-subtitle {
  font-size: 0.72rem;
  color: #bfdbfe;
  margin-top: 3px;
  font-weight: 500;
  line-height: 1.25;
}
.kegiatan-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.kegiatan-year-wrapper {
  position: relative;
  display: inline-flex;
}
.year-select-kegiatan {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  color: #1e40af !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  padding: 4px 22px 4px 10px !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 7px center !important;
  background-size: 10px !important;
  transition: all 0.2s ease;
}
.year-select-kegiatan:hover,
.year-select-kegiatan:focus {
  background-color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 3px 8px rgba(15, 23, 42, 0.12) !important;
}
.kegiatan-total-badge {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 16px;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 480px), (orientation: landscape) and (max-height: 600px) {
  .kegiatan-header-right {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
}

/* Kegiatan Search Container */
.search-container-keg {
  position: relative;
  margin-bottom: 12px;
}
.search-icon-keg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.85rem;
}
.search-input-keg {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.82rem;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.search-input-keg:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Filter Pills Row */
.filter-pills-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-pills-row::-webkit-scrollbar {
  display: none;
}
.filter-pill {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1.5px solid #e2e8f0;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  -webkit-tap-highlight-color: transparent;
}
.filter-pill:active {
  transform: scale(0.95);
}
.filter-pill.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.filter-pill .pill-count {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
}
.filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Kegiatan Card Item */
.kegiatan-card-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  content-visibility: auto;
  contain-intrinsic-size: 140px;
}
.kegiatan-card-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.kegiatan-card-item:active {
  transform: scale(0.98);
  background-color: #f8fafc;
}
.kegiatan-card-item:last-child {
  margin-bottom: 0;
}

/* Status Chips */
.keg-status-chip {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.keg-status-chip.aktif {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.keg-status-chip.selesai {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.keg-status-chip.tertunda {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.keg-status-chip.belum_ada_target, .keg-status-chip.draft {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.keg-rup-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 5px;
}
.keg-year-badge {
  font-size: 0.62rem;
  font-weight: 700;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 2px 6px;
  border-radius: 5px;
}

.app-header .panel-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

/* --- UI/UX Pro Max Dedicated Peta Screen --- */
.peta-header-hero {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  padding-bottom: 12px;
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.2);
  color: #ffffff;
  flex-shrink: 0;
  z-index: 40;
}
.peta-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.peta-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.peta-subtitle {
  font-size: 0.7rem;
  color: #bfdbfe;
  margin-top: 2px;
  font-weight: 500;
}
.peta-count-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.peta-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.peta-filter-row::-webkit-scrollbar {
  display: none;
}
.peta-filter-chip {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  color: #eff6ff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.peta-filter-chip.active {
  background: #ffffff;
  color: #1e40af;
  border-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.peta-map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #e2e8f0;
}
#fullPetaMap {
  width: 100%;
  height: 100%;
  z-index: 1;
}
.peta-gps-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  border: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
}
.peta-gps-btn:active {
  transform: scale(0.92);
  background: #eff6ff;
}
.peta-preview-card {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  z-index: 30;
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.peta-preview-card.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.peta-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
}
.peta-preview-rup {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.peta-preview-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.3;
  padding-right: 24px;
}
.peta-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #475569;
  margin-bottom: 8px;
}
.peta-preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: opacity 0.2s ease;
}
.peta-preview-btn:active {
  opacity: 0.85;
}
.peta-marker-pin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.peta-marker-pin.active {
  transform: scale(1.4);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3), 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* --- Detail Kegiatan Styles (Horizontal Slide Subpage) --- */
#detailKegiatanPanelOverlay.upload-panel-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: transparent;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  z-index: 700 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s 0.32s,
              background-color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#detailKegiatanPanelOverlay.upload-panel-overlay.show {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: rgba(15, 23, 42, 0.4) !important;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s 0s,
              background-color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#detailKegiatanPanelOverlay .upload-sliding-panel {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: var(--bg-main, #f8fafc) !important;
  transform: translate3d(100%, 0, 0);
  -webkit-transform: translate3d(100%, 0, 0);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
              -webkit-transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.26);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#detailKegiatanPanelOverlay .upload-sliding-panel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 3.5px;
  height: 38px;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
  pointer-events: none;
  z-index: 25;
}

#detailKegiatanPanelOverlay.upload-panel-overlay.show .upload-sliding-panel {
  transform: translate3d(0, 0, 0) !important;
  -webkit-transform: translate3d(0, 0, 0) !important;
}

#detailKegiatanPanelOverlay .panel-header {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: 12px;
  padding-left: calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(14px + env(safe-area-inset-right, 0px));
  margin-bottom: 0;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  z-index: 10;
}

#detailKegiatanPanelOverlay .detail-kegiatan-scroll-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px 16px calc(50px + env(safe-area-inset-bottom, 0px)) 16px;
}

.back-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.back-circle-btn:active {
  background-color: var(--border-color);
}
.det-timeline-container {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
  margin-left: 10px;
  margin-top: 10px;
}
.det-timeline-item {
  position: relative;
  margin-bottom: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 70px;
}
.det-timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid #fff;
}
.det-timeline-item.no-realisasi::before {
  background-color: #cbd5e1;
}
.det-timeline-week {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-gray);
  text-transform: uppercase;
  text-align: left;
}
.det-timeline-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 2px 0 4px 0;
  text-align: left;
}
.det-timeline-meta {
  font-size: 0.7rem;
  color: var(--text-gray);
  text-align: left;
}
.btn-history-trigger {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.btn-history-trigger:active {
  opacity: 0.7;
}

.interactive-history-card {
  -webkit-tap-highlight-color: transparent;
}
.interactive-history-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}
.interactive-history-card:active {
  transform: scale(0.98);
  background-color: #f8fafc !important;
}

/* --- Landscape Mode Responsiveness for Mobile Devices --- */
@media (orientation: landscape) and (max-height: 600px) {
  body {
    align-items: flex-start;
    padding: 0;
  }

  .app-container {
    max-width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .bottom-nav {
    max-width: 100% !important;
    height: 52px !important;
    border-radius: 0 !important;
    padding: 0 24px;
  }

  .bottom-nav-item {
    padding: 2px 0;
  }

  .bottom-nav-item i {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .screen-content {
    padding-bottom: 64px !important;
  }

  .upload-sliding-panel {
    max-height: 96vh !important;
    padding: 16px 24px;
    border-radius: 16px 16px 0 0;
  }

  .status-banner {
    width: auto;
    max-width: calc(100% - 40px);
    top: 8px;
    padding: 6px 14px;
    font-size: 0.7rem;
  }

  .sync-queue-bar {
    width: auto;
    max-width: calc(100% - 40px);
    top: 8px;
    padding: 6px 14px;
    font-size: 0.7rem;
  }

  /* --- Kegiatan Screen in Landscape Mode: Sticky Header & Search --- */
  #kegiatanScreen.active {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 52px) !important;
    height: calc(100vh - 52px) !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  .kegiatan-header-hero {
    padding: 6px 16px 8px !important;
    border-radius: 0 0 14px 14px !important;
    flex-shrink: 0 !important;
  }

  .kegiatan-title {
    font-size: 0.95rem !important;
  }

  .kegiatan-subtitle {
    display: none !important;
  }

  .kegiatan-total-badge {
    padding: 2px 8px !important;
    font-size: 0.6rem !important;
  }

  .dash-skpd-box {
    margin-top: 3px !important;
    padding: 3px 8px !important;
  }

  .skpd-search-display {
    padding: 5px 10px !important;
  }

  .skpd-search-label {
    font-size: 0.75rem !important;
  }

  .skpd-search-list {
    max-height: 140px !important;
  }

  .kegiatan-filter-container {
    padding: 6px 16px 0 16px !important;
    flex-shrink: 0 !important;
    background: #f8fafc !important;
  }

  .search-container-keg {
    margin-bottom: 5px !important;
  }

  .search-input-keg {
    padding: 5px 14px 5px 34px !important;
    font-size: 0.76rem !important;
    height: 32px !important;
  }

  .filter-pills-row {
    margin-bottom: 5px !important;
    gap: 6px !important;
    padding-bottom: 2px !important;
  }

  .filter-pill {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
  }

  #kegiatanListTab {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    padding: 6px 16px 30px 16px !important;
  }

  .assistive-touch-btn {
    bottom: 58px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 1.1rem !important;
  }
}

/* --- UI UX PRO MAX: Interactive Progress & Weekly Breakdown Styles --- */
.interactive-stat-card {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.interactive-stat-card:active {
  transform: scale(0.97);
}
.interactive-stat-card .click-chip {
  transition: all 0.2s ease;
}
.interactive-stat-card:hover .click-chip {
  transform: translateX(2px);
  background-color: var(--primary) !important;
  color: #fff !important;
}
.interactive-stat-card.target-card:hover .click-chip {
  background-color: #475569 !important;
  color: #fff !important;
}
.btn-open-weekly-breakdown:active {
  transform: scale(0.98);
  opacity: 0.9;
}
.weekly-detail-card {
  animation: weeklyCardFadeIn 0.25s ease-out;
}
@keyframes weeklyCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.filter-chip {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip:active {
  transform: scale(0.95);
}
.tab-mode-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tab-mode-btn:active {
  transform: scale(0.97);
}
.layman-guide-box {
  transition: all 0.2s ease;
}
#detDeviasiRow:active {
  transform: scale(0.98);
  opacity: 0.92;
}
.btn-input-realisasi-card:active {
  transform: scale(0.98);
  opacity: 0.9;
}
.quick-pct-btn {
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.quick-pct-btn:active {
  transform: scale(0.93);
}
#inpRealisasi:focus, #inpKeterangan:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* ================================================================ */
/* --- Desktop & Computer PWA Mode (≥ 1024px Fullscreen) ---        */
/* ================================================================ */
@media (min-width: 1024px) {
  html, body {
    background-color: #f8fafc !important;
    align-items: stretch !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  /* Fullscreen app container */
  .app-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    background-color: #f8fafc !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* 1. Hero Header: Balanced 2-Column Grid */
  .dash-hero-header {
    padding: 24px 48px 36px !important;
    border-radius: 0 0 28px 28px !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "user status"
      "user skpd" !important;
    align-items: center !important;
    gap: 12px 32px !important;
  }

  .dash-user-row {
    grid-area: user !important;
    margin-top: 0 !important;
  }

  .dash-user-avatar {
    width: 64px !important;
    height: 64px !important;
    font-size: 1.5rem !important;
    border-radius: 18px !important;
  }

  .dash-user-name {
    font-size: 1.6rem !important;
  }

  .dash-hero-status-row {
    grid-area: status !important;
    justify-content: flex-end !important;
    margin-bottom: 0 !important;
    gap: 10px !important;
  }

  .dash-status-pill {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
  }

  .dash-skpd-box {
    grid-area: skpd !important;
    margin-top: 0 !important;
    width: 440px !important;
    max-width: 100% !important;
    padding: 10px 14px !important;
  }

  /* 2. Top 3 KPI Stats Grid */
  .dash-kpi-container {
    padding: 0 48px !important;
    margin-top: 24px !important;
    margin-bottom: 20px !important;
  }

  .dash-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }

  .dash-kpi-card {
    padding: 18px 22px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
  }

  .dash-kpi-icon-wrap {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
  }

  .dash-kpi-val {
    font-size: 2.1rem !important;
    margin-top: 4px !important;
  }

  .dash-kpi-lbl {
    font-size: 0.84rem !important;
  }

  .dash-kpi-desc {
    font-size: 0.74rem !important;
  }

  /* 3. Quick Shortcuts: 2 equal-width cards */
  .dash-quick-shortcuts {
    padding: 0 48px !important;
    margin-bottom: 24px !important;
  }

  .dash-shortcuts-scroller {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }

  .dash-shortcut-chip {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
  }

  .dash-chip-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.15rem !important;
  }

  .dash-chip-text strong {
    font-size: 0.9rem !important;
  }

  .dash-chip-text span {
    font-size: 0.75rem !important;
  }

  /* 4. Monitoring Pelaksanaan Paket: 4-Column Bento Grid */
  .admin-monitoring-card {
    margin: 0 48px 28px 48px !important;
    padding: 24px 32px !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
  }

  .admin-monitoring-title {
    font-size: 1.15rem !important;
  }

  .admin-monitoring-subtitle {
    font-size: 0.78rem !important;
  }

  .monitoring-bento-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }

  .m-stat-card {
    padding: 14px 18px !important;
    border-radius: 14px !important;
  }

  .m-stat-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.05rem !important;
  }

  .m-stat-num {
    font-size: 1.4rem !important;
  }

  .m-stat-label {
    font-size: 0.76rem !important;
  }

  /* 5. Project Progress Section: 2 Columns Grid (3 on ≥ 1440px) */
  .project-progress-section {
    padding: 0 48px 30px !important;
  }

  .section-title {
    font-size: 1.15rem !important;
  }

  .project-slide-page {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
  }

  .project-progress-card {
    margin-bottom: 0 !important;
    padding: 18px 22px !important;
    border-radius: 16px !important;
  }

  /* Kegiatan Screen Fullscreen */
  .kegiatan-header-hero {
    padding: 28px 48px !important;
    border-radius: 0 0 28px 28px !important;
  }

  .kegiatan-filter-container {
    padding: 20px 48px 0 !important;
  }

  #kegiatanListTab {
    padding: 16px 48px 100px !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    align-content: flex-start !important;
  }

  .kegiatan-card-item {
    margin-bottom: 0 !important;
    padding: 18px 22px !important;
    border-radius: 16px !important;
  }

  /* Profil Screen Fullscreen */
  .profile-header-hero {
    padding: 32px 48px 40px !important;
    border-radius: 0 0 28px 28px !important;
  }

  .profile-details-card, .profile-settings-card {
    margin: 0 48px 24px !important;
    max-width: none !important;
  }

  /* Desktop Floating Island Dock */
  .bottom-nav {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 460px !important;
    max-width: 560px !important;
    height: 62px !important;
    border-radius: 32px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12) !important;
    padding: 6px 24px !important;
    z-index: 500 !important;
  }

  .bottom-nav-item {
    font-size: 0.72rem !important;
  }

  .bottom-nav-item i {
    font-size: 1.15rem !important;
  }

  /* Assistive touch button on Desktop */
  .assistive-touch-btn {
    bottom: 28px !important;
    right: 48px !important;
    width: 54px !important;
    height: 54px !important;
    font-size: 1.3rem !important;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4) !important;
  }

  /* Banners on Desktop */
  .status-banner, .sync-queue-bar {
    max-width: 680px !important;
  }

  /* Modals / sliding upload panel on Desktop */
  .upload-sliding-panel {
    max-width: 680px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    border-radius: 28px !important;
    bottom: -100% !important;
    transition: bottom 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }

  .upload-panel-overlay.show .upload-sliding-panel {
    bottom: 30px !important;
  }

  /* Login Screen on Desktop */
  .login-screen {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: radial-gradient(circle at 10% 20%, rgba(243, 244, 246, 0.8) 0%, rgba(224, 242, 254, 0.6) 90%) !important;
  }

  .login-header {
    max-width: 460px !important;
    margin: 0 auto 12px !important;
  }

  .login-form-container {
    max-width: 460px !important;
    margin: 0 auto !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08) !important;
  }

  .login-footer {
    max-width: 460px !important;
    margin: 16px auto 0 !important;
  }
}

/* Extra Wide Screen (≥ 1440px) 3 Columns for Cards */
@media (min-width: 1440px) {
  #kegiatanListTab {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 22px !important;
  }
}

/* ============================
   PULL-TO-REFRESH
   ============================ */
.pull-refresh-indicator {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
}

.pull-refresh-indicator.pulling {
  transition: none;
}

.pull-refresh-indicator.refreshing {
  transform: translateY(60px);
}

.pull-refresh-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 50%;
}

.pull-refresh-indicator.refreshing .pull-refresh-spinner {
  animation: ptr-spin 0.7s linear infinite;
}

.pull-refresh-indicator.pulling .pull-refresh-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.pull-refresh-indicator.pulling.ready .pull-refresh-arrow {
  transform: rotate(180deg);
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

/* ============================
   GPS WATERMARK (canvas hidden)
   ============================ */
#watermarkCanvas {
  display: none;
}

/* ============================
   MAP SECTION
   ============================ */
.map-section {
  padding: 0 16px;
  margin-bottom: 16px;
}

.map-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
}

.map-container {
  height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.map-container .leaflet-popup-content {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  line-height: 1.4;
}

.map-popup-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.map-popup-info {
  color: #64748b;
  font-size: 0.65rem;
}

.map-popup-progress {
  margin-top: 4px;
  font-weight: 700;
}

.map-popup-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.68rem;
  cursor: pointer;
}

/* --- SKELETON SHIMMER PLACEHOLDERS --- */
@keyframes ekendaShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.ekenda-skeleton-shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: ekendaShimmer 1.4s ease infinite;
  border-radius: 6px;
}

.ekenda-skeleton-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- VERIFIKASI PENGAWAS MOBILE STYLES (BLUE THEME + HORIZONTAL SLIDER) --- */
.verifikasi-header-hero {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(18px + env(safe-area-inset-left, 0px));
  padding-right: calc(18px + env(safe-area-inset-right, 0px));
  padding-bottom: 14px;
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 40%, #2563eb 100%);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.18);
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

.verif-filter-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.verif-filter-chips-row::-webkit-scrollbar {
  display: none;
}

.verif-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.verif-filter-chip.active {
  background: #ffffff;
  color: #1e40af;
  border-color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.verif-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.verif-filter-chip.active .verif-count-badge {
  background: #1e40af;
  color: #ffffff;
}

.verif-cards-list-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 85px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pengawas-verif-card {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.pengawas-verif-card.pending {
  border-color: #bfdbfe;
  background: #ffffff;
}

.pengawas-verif-card.verified {
  border-color: #bbf7d0;
  background: #ffffff;
}

.pengawas-verif-card.rejected {
  border-color: #fecaca;
  background: #ffffff;
}

.pengawas-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pengawas-status-pill.pending {
  background: #dbeafe;
  color: #1e40af;
}

.pengawas-status-pill.verified {
  background: #dcfce7;
  color: #15803d;
}

.pengawas-status-pill.rejected {
  background: #fee2e2;
  color: #b91c1c;
}

/* ============================================== */
/* ADMIN MASTER BADAN USAHA (PWA FULLSCREEN)      */
/* ============================================== */
.badan-usaha-header-hero {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-left: calc(18px + env(safe-area-inset-left, 0px));
  padding-right: calc(18px + env(safe-area-inset-right, 0px));
  padding-bottom: 14px;
  background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 40%, #2563eb 100%);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.18);
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

.btn-bu-hero-add {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-bu-hero-add:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.35);
}

.bu-hero-total-badge {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bu-year-wrapper {
  flex-shrink: 0;
}

.bu-year-select {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  appearance: auto;
}

.bu-year-select option {
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
}

.bu-filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bu-filter-pills-row::-webkit-scrollbar {
  display: none;
}

.bu-filter-pill {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.bu-filter-pill:active {
  transform: scale(0.96);
}

.bu-filter-pill.active {
  background: #ffffff;
  color: #1e40af;
  border-color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.bottom-nav-item span {
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bu-sliding-panel {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.bu-total-badge {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
}

.btn-bu-add {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-bu-add:active {
  transform: scale(0.96);
  background: #1d4ed8;
}

.bu-cards-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bu-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.bu-card:active {
  background: #f8fafc;
}

.bu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.bu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bu-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 2px;
}

.bu-npwp-row {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bu-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-bu-action {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-bu-action.edit {
  background: #f1f5f9;
  color: #0284c7;
}

.btn-bu-action.edit:active {
  background: #e0f2fe;
}

.btn-bu-action.delete {
  background: #fef2f2;
  color: #ef4444;
}

.btn-bu-action.delete:active {
  background: #fee2e2;
}

.bu-card-address {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  word-break: break-word;
}

.bu-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.bu-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bu-badge.pengawas {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.bu-badge.paket {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Badan Usaha Slide Pagination */
.bu-pagination-bar {
  display: flex;
  flex-shrink: 0;
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.bu-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  color: #334155;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bu-page-btn:active:not(:disabled) {
  background: #e2e8f0;
  transform: scale(0.96);
}

.bu-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.bu-page-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 20px;
  text-align: center;
  white-space: nowrap;
}

.bu-swipe-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 2px;
  display: block;
}

.bu-cards-list-container {
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  touch-action: pan-y;
}

@keyframes buSlideFromRight {
  0% {
    opacity: 0.2;
    transform: translate3d(40px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes buSlideFromLeft {
  0% {
    opacity: 0.2;
    transform: translate3d(-40px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.bu-cards-list-container.slide-anim-left {
  animation: buSlideFromRight 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bu-cards-list-container.slide-anim-right {
  animation: buSlideFromLeft 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


