/* ===================================================================
   SIMODIS - Sistem Monitoring Digital Kegiatan Desa
   Kecamatan Batang Angkola, Kabupaten Tapanuli Selatan
   Tema Kantor Terang + Pita Ulos Angkola + Label Stempel
   =================================================================== */

:root {
  /* SIMODIS — tema "Kantor Terang" (A) + pita ulos (C) + label stempel (B) */
  --bg-base: #F6F5F0;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F2EC;
  --bg-input: #FFFFFF;
  --border-color: #E2E3DA;
  --border-light: rgba(28, 43, 36, 0.08);
  --primary: #1F5C3F;
  --primary-hover: #174A33;
  --primary-glow: rgba(31, 92, 63, 0.18);
  --primary-light: rgba(31, 92, 63, 0.08);
  --accent-cyan: #1D5C8C;
  --accent-cyan-light: rgba(29, 92, 140, 0.1);
  --accent-blue: #1D5C8C;
  --accent-purple: #5B3F8C;
  --accent-gold: #B8892A;
  --status-success: #2E6B4A;
  --status-warning: #8C5A0E;
  --status-danger: #B42318;
  --status-info: #1D5C8C;
  --font-main: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Domine', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --text-main: #1C2B24;
  --text-muted: #4E5D55;
  --text-dim: #6B7770;
  --text-inverse: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(28, 43, 36, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 43, 36, 0.08);
  --shadow-lg: 0 12px 28px rgba(28, 43, 36, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --backdrop-blur: blur(8px);
  --ulos: repeating-linear-gradient(90deg, #9E2A2B 0 22px, #1A1414 22px 25px, #D4A93A 25px 28px, #1A1414 28px 31px, #F7F3EC 31px 33px, #1A1414 33px 36px);
  --sidebar-width: 280px;
  --topbar-height: 76px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Utilities */
.hidden { display: none !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.25rem; }
.text-center { text-align: center; }

/* Offline Alert Banner */
.offline-banner {
  background: linear-gradient(90deg, #8C5A0E, #8C5A0E);
  color: #fff;
  padding: 10px 24px;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(184, 137, 42, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

.offline-banner .banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot.warning {
  background-color: #fef08a;
  box-shadow: 0 0 0 0 rgba(233, 212, 154, 0.7);
  animation: pulseWarning 1.6s infinite;
}

@keyframes pulseWarning {
  0% { box-shadow: 0 0 0 0 rgba(233, 212, 154, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(233, 212, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 212, 154, 0); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}

.sidebar-brand {
  padding: 24px 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-light);
}

.logo-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1F5C3F 0%, #1D5C8C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--primary-glow);
  flex-shrink: 0;
}

.logo-icon {
  width: 24px;
  height: 24px;
  color: white;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
  line-height: 1.1;
  font-family: var(--font-display); color: var(--primary);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

/* Real Login Screen Overlay with Kantor Bupati Tapsel Background */
.login-screen-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.88) 100%), 
              url('assets/kantor_bupati_tapsel_1.jpg') center/cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px 20px;
  overflow-y: auto;
}

.login-card-container {
  width: 100%;
  max-width: 480px;
  margin: auto;
  animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(28, 43, 36, 0.14);
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: 0 25px 60px rgba(28, 43, 36, 0.227);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1F5C3F 0%, #1D5C8C 50%, #8C5A0E 100%);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-img {
  width: 78px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(28, 43, 36, 0.175));
  margin-bottom: 12px;
}

.login-brand-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.login-brand-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: 4px;
}

.login-brand-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pka-tag {
  display: inline-block;
  background: rgba(31, 92, 63, 0.15);
  color: #2E6B4A;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 92, 63, 0.35);
  margin-top: 8px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.input-with-icon input {
  padding-left: 40px !important;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.login-error {
  background: rgba(180, 35, 24, 0.15);
  border: 1px solid rgba(180, 35, 24, 0.35);
  color: #8A1C13;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

.login-cred-note {
  background: rgba(31, 92, 63, 0.15);
  border: 1px solid rgba(31, 92, 63, 0.4);
  color: #2E6B4A;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  margin-bottom: 14px;
  animation: modalScaleUp 0.25s ease;
}

.demo-accounts-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.demo-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.demo-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-demo-acc {
  background: rgba(28, 43, 36, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-demo-acc:hover {
  background: rgba(31, 92, 63, 0.1);
  border-color: var(--primary);
  transform: translateX(3px);
}

.btn-demo-acc strong {
  font-size: 11.5px;
  color: var(--text-main);
  display: block;
}

.btn-demo-acc span {
  font-size: 11px;
  color: var(--text-muted);
}

.bg-switcher-container {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(28, 43, 36, 0.087);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(28, 43, 36, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bg-switcher-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #5B6A62;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bg-switcher-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-bg-opt {
  background: rgba(28, 43, 36, 0.06);
  border: 1px solid rgba(28, 43, 36, 0.15);
  color: #3E4A44;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-bg-opt:hover {
  background: rgba(31, 92, 63, 0.2);
  border-color: var(--primary);
  color: var(--text-main);
}

.btn-bg-opt.active {
  background: #1F5C3F;
  border-color: #1F5C3F;
  color: #F6F5F0;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(31, 92, 63, 0.4);
}

.demo-hint {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: center;
}

.demo-hint code {
  color: var(--accent-cyan);
}

/* Authenticated Sidebar Profile Card */
.auth-profile-card {
  margin: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.profile-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-header-row .badge-role-tag {
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.badge-role-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(29, 92, 140, 0.2);
  color: #1D5C8C;
  border: 1px solid rgba(29, 92, 140, 0.35);
  letter-spacing: 0.5px;
}

.btn-logout-link {
  background: transparent;
  border: none;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-logout-link svg {
  width: 14px;
  height: 14px;
}

.btn-logout-link:hover {
  color: #B42318;
}

.user-nip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Role Selector Card */
.role-selector-card {
  margin: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.role-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-dropdown-wrapper .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.role-dropdown-wrapper .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.current-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1D5C8C, #5B3F8C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.user-meta {
  overflow: hidden;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-title {
  font-size: 10.5px;
  color: var(--primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Navigation Menu */
.nav-menu {
  padding: 8px 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13.5px;
  transition: var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  background: rgba(28, 43, 36, 0.05);
  color: var(--text-main);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(31, 92, 63, 0.2) 0%, rgba(31, 92, 63, 0.04) 100%);
  color: var(--text-main);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(180, 35, 24, 0.2);
  color: #B42318;
  border: 1px solid rgba(180, 35, 24, 0.3);
}

.nav-badge.info {
  background: rgba(29, 92, 140, 0.15);
  color: #1D5C8C;
  border-color: rgba(29, 92, 140, 0.25);
}

/* Sidebar Footer & Offline Simulator */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  background: rgba(28, 43, 36, 0.07);
}

.network-sim-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.sim-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.status-indicator {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-indicator.online {
  background: rgba(31, 92, 63, 0.2);
  color: #2E6B4A;
  border: 1px solid rgba(31, 92, 63, 0.4);
}

.status-indicator.offline {
  background: rgba(184, 137, 42, 0.2);
  color: #8C5A0E;
  border: 1px solid rgba(184, 137, 42, 0.4);
}

.toggle-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #D5D8CE;
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #8C5A0E;
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.sim-caption {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.35;
}

.dev-credits {
  margin-top: 14px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-credits strong {
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-base);
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.breadcrumb-separator {
  color: var(--border-color);
}

.breadcrumb-active {
  color: var(--primary);
  font-weight: 700;
}

.page-headline {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  outline: none;
  transition: var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  width: 320px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-light);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--status-danger);
  color: white;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(180, 35, 24, 0.4);
}

/* Notification Dropdown */
.notification-wrapper {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

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

.notif-header {
  padding: 14px 16px;
  background: rgba(28, 43, 36, 0.07);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(28, 43, 36, 0.03);
}

.notif-item.unread {
  background: rgba(31, 92, 63, 0.05);
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(180, 35, 24, 0.15);
  color: var(--status-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-icon.warning {
  background: rgba(184, 137, 42, 0.15);
  color: var(--status-warning);
}

.notif-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-item-time {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Tab Panels */
.tab-pane {
  display: none;
  padding: 28px 32px;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* Early Warning Banner */
.early-warning-banner {
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.15) 0%, rgba(180, 35, 24, 0.05) 100%);
  border: 1px solid rgba(180, 35, 24, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.early-warning-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--status-danger);
}

.warning-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(180, 35, 24, 0.2);
  color: #B42318;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.warning-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.warning-details {
  flex-grow: 1;
}

.warning-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #8A1C13;
}

.warning-desc {
  font-size: 12.5px;
  color: #3E4A44;
  margin-top: 3px;
  line-height: 1.45;
}

.btn-warning-action {
  background: #B42318;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.35);
  transition: var(--transition-fast);
}

.btn-warning-action:hover {
  background: #B42318;
  transform: translateY(-1px);
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(28, 43, 36, 0.15);
  box-shadow: var(--shadow-md);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-box svg {
  width: 18px;
  height: 18px;
}

.kpi-icon-box.bg-blue { background: rgba(29, 92, 140, 0.15); color: #1D5C8C; }
.kpi-icon-box.bg-emerald { background: rgba(31, 92, 63, 0.15); color: #2E6B4A; }
.kpi-icon-box.bg-cyan { background: rgba(29, 92, 140, 0.15); color: #1D5C8C; }
.kpi-icon-box.bg-purple { background: rgba(91, 63, 140, 0.15); color: #5B3F8C; }

.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.progress-bar-sm {
  flex-grow: 1;
  height: 6px;
  background: rgba(28, 43, 36, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill.emerald {
  background: linear-gradient(90deg, #1F5C3F, #2E6B4A);
  height: 100%;
  border-radius: 999px;
}

.trend-text {
  font-weight: 700;
  font-size: 11px;
}

.trend-text.positive {
  color: #2E6B4A;
}

.kpi-subtext {
  color: var(--text-dim);
}

/* Toolbar Card */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-group-filter {
  display: flex;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn-filter {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-filter.active {
  background: var(--bg-card-hover);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(28, 43, 36, 0.105);
}

.form-select-sm {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Table Container & Custom Table */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(28, 43, 36, 0.015);
}

.header-title-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.header-title-box p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.status-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green { background-color: var(--status-success); box-shadow: 0 0 6px var(--status-success); }
.dot-yellow { background-color: var(--status-warning); box-shadow: 0 0 6px var(--status-warning); }
.dot-red { background-color: var(--status-danger); box-shadow: 0 0 6px var(--status-danger); }

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-custom th {
  background: rgba(28, 43, 36, 0.087);
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom tr:hover td {
  background: rgba(28, 43, 36, 0.02);
}

.village-name-cell {
  display: flex;
  flex-direction: column;
}

.village-name-cell strong {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13.5px;
}

.village-name-cell span {
  font-size: 11px;
  color: var(--text-dim);
}

.amount-mono {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.verified {
  background: rgba(31, 92, 63, 0.15);
  color: #2E6B4A;
  border: 1px solid rgba(31, 92, 63, 0.3);
}

.status-badge.pending {
  background: rgba(184, 137, 42, 0.15);
  color: #8C5A0E;
  border: 1px solid rgba(184, 137, 42, 0.3);
}

.status-badge.revision {
  background: rgba(180, 35, 24, 0.15);
  color: #B42318;
  border: 1px solid rgba(180, 35, 24, 0.3);
}

.status-badge.unsubmitted {
  background: rgba(91, 106, 98, 0.15);
  color: #3E4A44;
  border: 1px solid rgba(91, 106, 98, 0.3);
}

.risk-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.risk-tag.low { background: rgba(31, 92, 63, 0.15); color: #2E6B4A; }
.risk-tag.med { background: rgba(184, 137, 42, 0.15); color: #8C5A0E; }
.risk-tag.high { background: rgba(180, 35, 24, 0.2); color: #B42318; border: 1px solid rgba(180, 35, 24, 0.4); }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #174A33 100%);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #174A33 0%, #174A33 100%);
  transform: translateY(-1px);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-outline:hover {
  background: rgba(28, 43, 36, 0.05);
  border-color: var(--text-muted);
}

.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-outline-sm:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-outline-sm svg {
  width: 14px;
  height: 14px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-success {
  background: #1F5C3F;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(31, 92, 63, 0.35);
  transition: var(--transition-fast);
}

.btn-success:hover {
  background: #174A33;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--status-danger);
  color: #B42318;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(180, 35, 24, 0.1);
}

/* Secondary Grid (Pilot & Timeline) */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pilot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
}

.pilot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(28, 43, 36, 0.07);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  gap: 16px;
}

.pilot-info strong {
  color: var(--text-main);
  font-size: 13px;
  display: block;
}

.pilot-info p {
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 3px;
}

/* Timeline */
.timeline {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--primary);
}

.timeline-dot.blue { background: #1D5C8C; box-shadow: 0 0 8px #1D5C8C; }
.timeline-dot.yellow { background: #8C5A0E; box-shadow: 0 0 8px #8C5A0E; }

.timeline-content strong {
  font-size: 13px;
  color: var(--text-main);
  display: block;
}

.timeline-content p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-time {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* VERIFICATION WORKSPACE (TAB 2) */
.verification-workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 580px;
}

.workspace-sidebar {
  border-right: 1px solid var(--border-color);
  background: rgba(28, 43, 36, 0.07);
  display: flex;
  flex-direction: column;
}

.workspace-search {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.form-input-sm {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
}

.queue-list {
  flex-grow: 1;
  overflow-y: auto;
}

.queue-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.queue-item:hover {
  background: rgba(28, 43, 36, 0.03);
}

.queue-item.active {
  background: rgba(31, 92, 63, 0.1);
  border-left: 3px solid var(--primary);
}

.queue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.queue-item-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.queue-item-date {
  font-size: 10.5px;
  color: var(--text-dim);
}

.queue-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.workspace-main {
  padding: 24px;
  background: var(--bg-surface);
}

.empty-state-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dim);
  padding: 60px 40px;
}

.empty-state-card svg {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state-card h4 {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 700;
}

.empty-state-card p {
  font-size: 12.5px;
  max-width: 400px;
  margin-top: 6px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.review-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.review-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.review-checklist-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.chk-content {
  flex-grow: 1;
}

.chk-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.chk-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.verifier-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.decision-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.decision-buttons > button {
  flex: 1 1 220px;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  min-height: 44px;
}

.btn-success svg,
.btn-danger-outline svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-success:disabled {
  cursor: not-allowed;
  box-shadow: none;
}

/* PORTAL PELAPORAN FORM (TAB 3) */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.fields-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin: 22px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.total-calc-box {
  background: rgba(31, 92, 63, 0.1);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calc-label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 13px;
}

.calc-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #2E6B4A;
}

/* Dropzone Upload */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  background: rgba(28, 43, 36, 0.052);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(31, 92, 63, 0.05);
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.dropzone-text {
  font-size: 13px;
  color: #3E4A44;
}

.dropzone-text .highlight {
  color: var(--primary);
  font-weight: 700;
}

.dropzone-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.uploaded-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.file-item svg {
  width: 24px;
  height: 24px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.file-details {
  flex-grow: 1;
}

.file-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12.5px;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.file-check {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* TAB 4: CHARTS & RADAR */
.chart-bars-vertical {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 260px;
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--border-color);
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 60px;
  height: 100%;
  justify-content: flex-end;
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.bar-track {
  width: 32px;
  height: 180px;
  background: rgba(28, 43, 36, 0.05);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, #1D5C8C 100%);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s ease;
}

.bar-caption {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
}

.risk-card-item {
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid transparent;
}

.risk-card-item.low { background: rgba(31, 92, 63, 0.1); border-color: rgba(31, 92, 63, 0.3); }
.risk-card-item.med { background: rgba(184, 137, 42, 0.1); border-color: rgba(184, 137, 42, 0.3); }
.risk-card-item.high { background: rgba(180, 35, 24, 0.1); border-color: rgba(180, 35, 24, 0.3); }

.risk-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.risk-num {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0;
}

.risk-card-item.low .risk-num { color: #2E6B4A; }
.risk-card-item.med .risk-num { color: #8C5A0E; }
.risk-card-item.high .risk-num { color: #B42318; }

.risk-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.mitigation-recommendation {
  background: rgba(28, 43, 36, 0.07);
  border-left: 3px solid var(--accent-cyan);
  padding: 14px 18px;
  margin: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.mitigation-recommendation strong {
  color: var(--text-main);
  font-size: 12px;
  display: block;
}

.mitigation-recommendation p {
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 4px;
}

/* TAB 5: PRINT PAPER (SURAT RESMI KECAMATAN) */
.print-actions-bar {
  padding: 16px 24px;
  background: rgba(28, 43, 36, 0.07);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.official-paper {
  background: #ffffff;
  color: #1C2B24;
  padding: 48px 56px;
  margin: 24px auto;
  max-width: 900px;
  box-shadow: 0 10px 40px rgba(28, 43, 36, 0.175);
  font-family: 'Times New Roman', Times, serif;
}

.official-kop {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.kop-logo-box img,
.kop-logo-box svg {
  width: 68px;
  height: auto;
  max-height: 75px;
  object-fit: contain;
}

.kop-text {
  text-align: center;
  flex-grow: 1;
}

.kop-text h2 {
  font-size: 16pt;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.kop-text h3 {
  font-size: 14pt;
  font-weight: 800;
  margin-bottom: 4px;
}

.kop-text p {
  font-size: 9.5pt;
  font-family: Arial, sans-serif;
  color: #374151;
}

.kop-line {
  border-bottom: 3px double #000;
  margin-top: 10px;
}

.official-title-box {
  text-align: center;
  margin: 24px 0 18px;
}

.official-title-box h4 {
  font-size: 12pt;
  font-weight: 800;
  text-decoration: underline;
}

.official-title-box p {
  font-size: 11pt;
  font-weight: 700;
  margin-top: 2px;
}

.report-meta-num {
  font-size: 10pt;
  margin-top: 4px;
}

.official-body {
  font-size: 11pt;
  line-height: 1.5;
}

.table-print {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 9.5pt;
  font-family: Arial, sans-serif;
}

.table-print th, .table-print td {
  border: 1px solid #F1F2EC;
  padding: 6px 8px;
}

.table-print th {
  background: #f3f4f6;
  font-weight: 700;
  text-align: center;
}

.official-conclusion {
  margin: 20px 0;
  font-size: 10pt;
  font-family: Arial, sans-serif;
}

.official-conclusion ol {
  margin-left: 20px;
  margin-top: 6px;
}

.signatures-row {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  font-size: 10.5pt;
  font-family: Arial, sans-serif;
}

.sig-box {
  text-align: center;
  width: 320px;
}

.sig-space {
  height: 64px;
}

.sig-name {
  font-weight: 700;
  text-decoration: underline;
}

.sig-nip {
  font-size: 9.5pt;
  color: #4b5563;
}

/* TAB 6: PKA PROFIL & ASTA CITA */
.pka-profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 24px;
}

.profile-card {
  background: rgba(28, 43, 36, 0.07);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1F5C3F 0%, #1D5C8C 100%);
  color: white;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.profile-info h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.profile-nip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  margin: 4px 0 10px;
}

.profile-role {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-gov {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.milestone-overview h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.milestone-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(28, 43, 36, 0.07);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  align-items: center;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.step-item.done .step-badge {
  background: rgba(31, 92, 63, 0.2);
  color: #2E6B4A;
  border: 1px solid #1F5C3F;
}

.step-item.active {
  border-color: var(--primary);
  background: rgba(31, 92, 63, 0.05);
}

.step-item.active .step-badge {
  background: var(--primary);
  color: white;
}

.step-item strong {
  font-size: 13px;
  color: var(--text-main);
}

.step-item p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.asta-cita-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0 24px 24px;
}

.asta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.asta-num {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: inline-block;
  margin-bottom: 8px;
}

.asta-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.asta-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(28, 43, 36, 0.262);
  backdrop-filter: var(--backdrop-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-dialog.modal-lg {
  max-width: 880px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(28, 43, 36, 0.02);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(28, 43, 36, 0.07);
}

.doc-mock-sheet {
  background: #fff;
  color: #1C2B24;
  padding: 30px;
  border-radius: var(--radius-md);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.doc-mock-sheet h3 {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.doc-mock-sheet p.subtitle {
  text-align: center;
  color: #6B7770;
  margin-bottom: 16px;
}

.doc-mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.doc-photo-card {
  border: 1px solid #3E4A44;
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
}

.doc-photo-box {
  height: 120px;
  background: #33433B;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7770;
  font-weight: 600;
  font-size: 11px;
}

.doc-photo-caption {
  font-size: 10.5px;
  margin-top: 6px;
  color: #4E5D55;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease;
  min-width: 280px;
  max-width: 420px;
}

.toast.warning {
  border-left-color: var(--status-warning);
}

.toast.error {
  border-left-color: var(--status-danger);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Media Queries for Print */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .sidebar, .topbar, .print-actions-bar, .offline-banner, .toast-container {
    display: none !important;
  }
  .app-layout {
    display: block !important;
  }
  .main-content {
    overflow: visible !important;
    background: transparent !important;
  }
  .tab-pane {
    display: none !important;
  }
  #tab-rekapitulasi {
    display: block !important;
    padding: 0 !important;
  }
  .card.print-sheet {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .official-paper {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===================================================================
   SIMODIS v3.0 — New UX Components
   Operator Task Cards, Step Form, Mobile Village Cards, etc.
   =================================================================== */

/* ---- Sidebar Toggle (Mobile Hamburger) ---- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.sidebar-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle.active span:nth-child(2) { opacity: 0; }
.sidebar-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sidebar backdrop for mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 36, 0.175);
  z-index: 900;
  backdrop-filter: blur(2px);
}

/* ---- Operator Village Card ---- */
.operator-village-card {
  background: linear-gradient(135deg, rgba(31, 92, 63, .08) 0%, rgba(29, 92, 140, .08) 100%);
  border-color: rgba(31, 92, 63, .3) !important;
  margin-bottom: 24px;
}
.catatan-ekbang-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(184, 137, 42, .12);
  border: 1px solid rgba(184, 137, 42, .25);
}

/* ---- Operator Task Section ---- */
.operator-task-section {
  margin-bottom: 24px;
}
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header-row h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}
.section-badge {
  background: rgba(29, 92, 140, .15);
  color: #1D5C8C;
  border: 1px solid rgba(29, 92, 140, .3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* ---- Task Cards Grid ---- */
.task-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.task-icon-box {
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-icon-box svg { width: 22px; height: 22px; }
.task-status-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-card-body { flex: 1; }
.task-number { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 0.5px; }
.task-title { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.task-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

.task-card-footer { padding-top: 8px; border-top: 1px solid var(--border-light); }
.task-primary-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.task-primary-btn.btn-primary { background: linear-gradient(135deg, var(--primary), #2E6B4A); color: #fff; }
.task-primary-btn.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.task-primary-btn.btn-warning-action { background: linear-gradient(135deg, #8C5A0E, #8C5A0E); color: #fff; }
.task-primary-btn.btn-warning-action:hover { filter: brightness(1.1); }
.task-primary-btn.btn-outline { background: transparent; border: 1.5px solid var(--border-color); color: var(--text-main); }
.task-primary-btn.btn-outline:hover { background: var(--bg-surface); }

/* ---- Step Indicator ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 0;
  gap: 0;
  flex-wrap: wrap;
}
.step-item-ind {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 60px;
}
.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.step-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.step-line {
  flex: 1;
  min-width: 20px;
  max-width: 60px;
  height: 2px;
  background: var(--border-color);
  margin-bottom: 20px;
  transition: var(--transition-fast);
}

.step-item-ind.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(31, 92, 63, .2);
}
.step-item-ind.active .step-label { color: var(--primary); }

.step-item-ind.done .step-circle {
  background: rgba(31, 92, 63, .2);
  border-color: var(--primary);
  color: var(--primary);
}
.step-item-ind.done .step-label { color: var(--primary); }

/* ---- Step Pages ---- */
.step-pages-wrapper { position: relative; }
.step-page { display: none; }
.step-page.active { display: block; }

/* ---- Draft Saved Notice ---- */
.draft-saved-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 24px 0;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(46, 107, 74, .1);
  border: 1px solid rgba(46, 107, 74, .25);
  font-size: 12px;
  color: #2E6B4A;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

/* ---- Step Nav Footer ---- */
.step-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.step-counter-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---- Upload Grid ---- */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.upload-item-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.upload-item-card:hover { border-color: var(--primary); }
.upload-icon-area {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.upload-icon-area svg { width: 22px; height: 22px; }
.upload-title { font-size: 13px; font-weight: 700; color: var(--text-main); }
.upload-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.upload-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.upload-status { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ---- Confirmation ---- */
.confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.confirm-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.confirm-val { font-size: 14px; font-weight: 600; color: var(--text-main); }

.confirmation-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
}
.checkbox-label:has(input:checked) { color: var(--text-main); }

/* ---- Village Mobile Cards (visible on <768px) ---- */
.village-cards-mobile {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.village-mobile-card {
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 14px;
  transition: var(--transition-fast);
}
.village-mobile-card.risk-high { border-left: 3px solid #B42318; }
.village-mobile-card.risk-med { border-left: 3px solid #8C5A0E; }
.village-mobile-card.risk-low { border-left: 3px solid #1F5C3F; }
.vmc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.vmc-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.vmc-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.vmc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; padding: 10px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.vmc-stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; }
.vmc-stat-val { font-size: 13px; font-weight: 700; color: var(--text-main); margin-top: 2px; }
.vmc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ---- Search box inline in toolbar ---- */
.search-box-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}
.search-box-inline input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
  min-width: 160px;
}
.search-box-inline input::placeholder { color: var(--text-dim); }

/* ---- Row High Risk ---- */
tr.row-high-risk { background: rgba(180, 35, 24, 0.05) !important; }
tr.row-high-risk td { border-bottom-color: rgba(180, 35, 24, 0.15) !important; }

/* ---- Notification items ---- */
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.notif-dot.type-danger { background: var(--status-danger); }
.notif-dot.type-warning { background: var(--status-warning); }
.notif-dot.type-info { background: var(--status-info); }
.notif-dot.type-success { background: var(--status-success); }

/* ---- Toast improvements ---- */
.toast { gap: 10px; }
.toast-success { border-left-color: var(--status-success); }
.toast-warning { border-left-color: var(--status-warning); background: rgba(184, 137, 42, .12); }
.toast-error { border-left-color: var(--status-danger); background: rgba(180, 35, 24, .12); }
.toast-info { border-left-color: var(--status-info); }

/* ---- Operator task badge in topbar ---- */
.nav-badge { display: inline-flex; min-width: 20px; justify-content: center; }
.nav-badge:empty { display: none; }

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1024px) {
  .task-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-item-card { grid-template-columns: 40px 1fr; }
  .upload-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}

@media (max-width: 767px) {
  /* Show hamburger, hide sidebar by default */
  .sidebar-toggle { display: flex; }
  .sidebar-backdrop { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100dvh;
    width: 280px;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: none;
  }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }

  .main-content { margin-left: 0 !important; padding-top: 70px; }

  /* Hide table, show cards */
  .table-responsive { display: none; }
  .village-cards-mobile { display: flex; }

  /* Topbar adjust */
  .topbar { padding-left: 60px; }
  .topbar .search-box { display: none; }

  /* KPI 2 columns on mobile */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }

  /* Step form on mobile */
  .step-indicator { gap: 0; padding: 14px 10px 0; }
  .step-line { min-width: 10px; max-width: 30px; }
  .step-label { font-size: 9px; }
  .step-circle { width: 28px; height: 28px; font-size: 11px; }

  /* Task cards 1 column */
  .task-cards-grid { grid-template-columns: 1fr; }

  /* Toolbar wrap */
  .toolbar-card { flex-direction: column; gap: 12px; }
  .toolbar-left { flex-wrap: wrap; }
  .toolbar-right { width: 100%; justify-content: flex-end; }

  /* Verification workspace stack */
  .verification-workspace { flex-direction: column; }
  .workspace-sidebar { width: 100%; min-height: 150px; max-height: 200px; overflow-y: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
  .workspace-main { min-height: 300px; }

  /* Early warning banner wrap */
  .early-warning-banner { flex-direction: column; gap: 12px; }

  /* Modal full screen on mobile */
  .modal-dialog { width: 95vw; max-height: 95dvh; }

  /* Confirm grid 1 col */
  .confirm-grid { grid-template-columns: 1fr; }

  /* Signatures stack */
  .signatures-row { flex-direction: column; gap: 24px; }

  /* KPI grid mobile */
  .kpi-grid { gap: 10px; }
  .kpi-value { font-size: 18px; }

  /* Grid 2 cols to 1 col */
  .grid-2-cols { grid-template-columns: 1fr; }

  .pka-profile-grid { grid-template-columns: 1fr; }

  /* Step nav footer smaller */
  .step-nav-footer { padding: 12px 16px; }
  .step-counter-text { font-size: 11px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 16px; }
  .kpi-title { font-size: 11px; }

  .upload-item-card { grid-template-columns: 1fr; }
  .upload-icon-area { width: 36px; height: 36px; }

  .task-card { padding: 16px; }
  .task-title { font-size: 14px; }
}

/* ---- fadeIn animation ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Missing Variables & Fixes ---- */
:root {
  --card-bg: var(--bg-card);
}

.kop-logo-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.badge-pill.bg-blue-light {
  background: rgba(29, 92, 140, .15);
  color: #1D5C8C;
  border: 1px solid rgba(29, 92, 140, .25);
}
.badge-pill.bg-emerald-light {
  background: rgba(31, 92, 63, .15);
  color: #2E6B4A;
  border: 1px solid rgba(31, 92, 63, .25);
}

.login-cred-note {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(31, 92, 63, .12);
  border: 1px solid rgba(31, 92, 63, .25);
  font-size: 12px;
  color: #2E6B4A;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

/* Validasi formulir wajib */
.req-mark { color: #B42318; font-weight: 800; margin-left: 2px; }
.form-input.input-error, .form-textarea.input-error {
  border-color: #B42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.25);
}

/* ===================================================================
   TEMA CAMPURAN: Kantor Terang (A) + Pita Ulos Angkola (C) + Stempel (B)
   =================================================================== */
body { background: var(--bg-base); }

/* Judul memakai huruf Domine */
.page-headline, .login-brand-header h2, .section-title, .header-title-box h3,
.review-header h3, .modal-header h3, .notif-header h4, .profile-info h4,
.milestone-overview h4, .asta-card h4, .col-title {
  font-family: var(--font-display);
  letter-spacing: 0;
}
.kpi-value { font-variant-numeric: tabular-nums; }

/* Pita ulos: kepala halaman, menu samping, kartu login */
.topbar { box-shadow: none; }
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 7px;
  background: var(--ulos);
  pointer-events: none;
}
.sidebar { background: var(--bg-surface); }
.sidebar::before {
  content: "";
  display: block;
  flex-shrink: 0;
  height: 7px;
  background: var(--ulos);
}
.login-card::before { height: 8px; background: var(--ulos); }
.login-screen-overlay {
  background: linear-gradient(135deg, rgba(246, 245, 240, 0.86) 0%, rgba(246, 245, 240, 0.94) 100%),
              url('assets/kantor_bupati_tapsel_1.jpg') center/cover no-repeat fixed;
}
.login-card { background: #FFFFFF; box-shadow: var(--shadow-lg); }
.login-brand-header h3 { color: var(--primary); }

/* Menu samping */
.nav-item { color: var(--text-muted); }
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-main); }
.nav-item.active { background: rgba(31, 92, 63, 0.09); color: var(--primary); border-left-color: var(--primary); }

/* Tombol utama: hijau Pemkab polos */
.btn-primary, .btn-success { background: var(--primary); box-shadow: none; color: #FFFFFF; }
.btn-primary:hover, .btn-success:hover { background: var(--primary-hover); }
.task-primary-btn.btn-primary { background: var(--primary); }
.task-primary-btn.btn-warning-action { background: #8C5A0E; }

/* Label status bergaya stempel (B) */
.status-badge {
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  transform: rotate(-1.5deg);
  white-space: nowrap;
}
.status-badge .badge-dot { display: none; }
.status-badge.verified { color: #2E6B4A; background: rgba(46, 107, 74, 0.06); border-color: #2E6B4A; }
.status-badge.pending { color: #1D5C8C; background: rgba(29, 92, 140, 0.06); border-color: #1D5C8C; }
.status-badge.revision { color: #A8322A; background: rgba(168, 50, 42, 0.06); border-color: #A8322A; }
.status-badge.unsubmitted { color: #5E5A52; background: rgba(94, 90, 82, 0.06); border-color: #5E5A52; }

/* Label risiko: pil berisi teks */
.risk-tag.low { background: #E3F1E9; color: #14532D; border: none; }
.risk-tag.med { background: #F3E5C4; color: #6B4A0A; border: none; }
.risk-tag.high { background: #B42318; color: #FFFFFF; border: none; }

/* Kartu & panel: datar, bersih */
.kpi-card, .card, .card-panel { box-shadow: var(--shadow-sm); }
.kpi-card:hover { transform: none; }
.toast { background: #1C2B24; color: #F6F5F0; border-color: #1C2B24; }
.toast svg { color: #E9D49A; }

/* Input */
.form-input, .form-textarea, .form-select-sm, .form-input-sm, .search-box input {
  background: #FFFFFF;
  border-color: #C9CEC3;
  color: var(--text-main);
}
.form-input::placeholder, .form-textarea::placeholder, .search-box input::placeholder { color: #7A857F; }

@media print {
  .topbar::after, .sidebar::before, .login-card::before { display: none !important; }
  .status-badge { transform: none; }
}
.kpi-value, .amount-mono { font-family: var(--font-main); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.amount-mono { font-weight: 600; }

/* Kepala halaman di HP: tinggi mengikuti isi, judul tidak menabrak pita ulos */
@media (max-width: 767px) {
  .main-content { padding-top: 0; }
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 12px 14px 14px 72px;
    gap: 10px;
    align-items: center;
  }
  .topbar-left { min-width: 0; flex: 1; }
  .breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-headline { font-size: 16px; line-height: 1.3; }
  .btn-manual { padding: 8px !important; }
  .btn-manual .btn-label { display: none; }
  .sidebar-toggle { top: 12px; left: 14px; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
}
.nav-item .nav-badge, .nav-item [class*="badge"] { white-space: nowrap; }

/* Panel indikator keberhasilan aksi perubahan */
.indicator-panel { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.indicator-head { margin-bottom: 14px; }
.indicator-title { font-family: var(--font-display); font-size: 17px; color: var(--text-main); }
.indicator-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.indicator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.indicator-card { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--bg-base); }
.indicator-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.indicator-value { font-size: 24px; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; }
.indicator-meta { font-size: 12px; color: var(--text-muted); }
.indicator-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.indicator-target { font-size: 11.5px; color: var(--text-dim); }
.indicator-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.indicator-chip.ind-ok { background: #E3F1E9; color: #14532D; }
.indicator-chip.ind-warn { background: #F3E5C4; color: #6B4A0A; }
.indicator-chip.ind-none { background: #ECECE6; color: #3E4A44; }
.indicator-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
