* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #111827;
  background: #f4f6fb;
}

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

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.auth-hero {
  background: linear-gradient(135deg, #0f172a, #1f2937);
  color: #e2e8f0;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero h1 {
  font-size: 36px;
  margin: 0 0 12px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-brand h1 {
  margin: 0;
}

.auth-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.25);
}

.auth-hero p {
  line-height: 1.6;
  margin: 0;
  max-width: 440px;
}

.auth-panel {
  background: #ffffff;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.card h2 {
  margin: 0 0 8px;
}

.muted {
  color: #6b7280;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #374151;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  width: 100%;
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: #111827;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-ghost {
  background: transparent;
  color: #111827;
  border: 1px solid #d1d5db;
}

.btn-sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px;
}

.sidebar h3 {
  margin: 0 0 20px;
  font-size: 18px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.sidebar-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

.nav a,
.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: inherit;
  font: inherit;
  text-align: left;
}

.nav a:hover,
.nav-link:hover {
  background: rgba(148, 163, 184, 0.18);
}

.nav-dropdown {
  margin-bottom: 8px;
}

.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-dropdown-icon {
  font-size: 12px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-dropdown[open] .nav-dropdown-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-left: 10px;
}

.nav-dropdown-menu a {
  margin-bottom: 0;
  background: rgba(148, 163, 184, 0.12);
}

.content {
  padding: 32px;
}

.content-standalone {
  max-width: 960px;
  margin: 0 auto;
}

/* SUDESKA visual system */
:root {
  --ink: #172033;
  --muted: #69758a;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --line: #e3e9f2;
  --navy: #10233f;
  --navy-deep: #09172b;
  --teal: #0e9f8d;
  --teal-dark: #087e71;
  --aqua: #d9f5ef;
  --amber: #f4a844;
  --shadow: 0 18px 45px rgba(24, 48, 84, 0.09);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

.auth-wrap { grid-template-columns: minmax(420px, 1.2fr) minmax(380px, .8fr); background: var(--canvas); }
.auth-hero { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 88px); background: linear-gradient(140deg, #092039 0%, #10365b 52%, #087e71 150%); }
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; }
.auth-hero::before { width: 450px; height: 450px; right: -150px; top: -115px; border: 70px solid rgba(113, 224, 203, .12); }
.auth-hero::after { width: 300px; height: 300px; left: -110px; bottom: -180px; background: rgba(66, 211, 184, .1); }
.auth-hero > * { position: relative; z-index: 1; }
.hero-eyebrow, .eyebrow, .topbar-kicker, .stat-label, .nav-label { display: block; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.hero-eyebrow { color: #8be2d4; margin-bottom: 20px; }
.auth-brand { gap: 16px; }
.auth-brand h1 { font-size: clamp(40px, 5vw, 62px); letter-spacing: -.055em; }
.auth-logo { width: 64px; height: 64px; border-radius: 18px; }
.auth-hero p { color: #d8e5ef; font-size: 17px; max-width: 520px; }
.hero-footer { display: flex; align-items: center; gap: 12px; }
.hero-footer p { font-size: 14px; }
.hero-orb { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #6fe1ce; box-shadow: 0 0 0 7px rgba(111, 225, 206, .14); }
.auth-panel { position: relative; padding: clamp(28px, 5vw, 72px); background: #f9fbfd; }
.card { max-width: 440px; padding: 36px; border: 1px solid #e7edf5; border-radius: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 28px; letter-spacing: -.03em; }
.card .muted { font-size: 14px; line-height: 1.6; }

.shell { grid-template-columns: 270px minmax(0, 1fr); }
.sidebar { position: relative; min-height: 100vh; height: auto; padding: 28px 16px; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); box-shadow: 8px 0 35px rgba(6, 20, 40, .12); display: flex; flex-direction: column; }
.sidebar-brand { padding: 0 10px 27px; margin: 0 0 18px; color: #fff; text-decoration: none; }
.sidebar-brand > span:last-child { display: grid; gap: 4px; font-size: 20px; letter-spacing: -.025em; }
.sidebar-brand small { color: #8be2d4; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.sidebar-brand img, .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.brand-mark { display: grid; place-items: center; background: linear-gradient(135deg, #31c5ad, #0f8d9a); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 10px 22px rgba(14, 159, 141, .34); }
.nav-label { color: #7f94b1; padding: 0 12px 9px; }
.nav-label-spaced { margin-top: 18px; }
.nav { flex: 0 0 auto; min-height: 0; overflow: visible; padding-right: 0; }
.nav a, .nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 4px; color: #b7c6da; background: transparent; border-radius: 10px; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav a:hover, .nav-link:hover { color: #fff; background: rgba(127, 190, 207, .12); transform: translateX(2px); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(31, 184, 162, .28), rgba(31, 184, 162, .06)); box-shadow: inset 3px 0 0 #42d1ba; }
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(146, 205, 183, 0.35);
  background: rgba(83, 152, 125, 0.17);
  color: #dff3e9;
}
.nav-icon svg {
  width: 13px;
  height: 13px;
  display: block;
  fill: currentColor;
}
.nav a.active .nav-icon {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
}
.nav-dropdown-toggle > span:first-child { display: flex; align-items: center; gap: 10px; }
.nav-dropdown-menu { margin: 3px 0 7px 11px; padding-left: 13px; border-left: 1px solid rgba(143, 177, 209, .2); }
.nav-dropdown-menu a { padding: 8px 10px; font-size: 13px; }
.nav-logout {
  margin-top: 20px !important;
  color: #ffe0d9 !important;
  border: 1px solid rgba(255, 174, 156, 0.3) !important;
  background: rgba(255, 122, 96, 0.14) !important;
}
.nav-logout:hover {
  color: #fff7f5 !important;
  border-color: rgba(255, 196, 182, 0.5) !important;
  background: rgba(255, 138, 110, 0.22) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-forest,
  body.theme-forest .panel,
  body.theme-forest .card,
  body.theme-forest .table,
  body.theme-forest .overlay-card,
  body.theme-forest .stat,
  body.theme-forest .field-card {
    transition: none;
  }
}
.content { min-width: 0; padding: 0 clamp(22px, 4vw, 52px) 44px; }
.app-footer {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #dbe6e1;
  color: #5c7065;
  font-size: 12px;
  line-height: 1.5;
}
.app-footer p {
  margin: 0;
}
.app-footer-auth {
  padding: 12px 20px 16px;
  text-align: center;
  color: #6a7f74;
}
.app-footer-standalone {
  margin-bottom: 8px;
}
.topbar { height: 94px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.topbar > div:first-child { display: grid; gap: 4px; font-size: 14px; }
.topbar-kicker { color: var(--teal); }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip { display: flex; align-items: center; gap: 9px; color: #556277; font-size: 13px; font-weight: 700; }
.user-chip > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--teal), #57c6ba); }

.dashboard-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 29px 0 28px; }
.eyebrow { color: var(--teal); margin-bottom: 8px; }
.dashboard-intro h1 { margin: 0; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.045em; }
.dashboard-intro p { max-width: 590px; margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.btn { border-radius: 10px; padding: 11px 15px; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); box-shadow: 0 8px 18px rgba(14, 159, 141, .18); transition: transform .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 23px rgba(14, 159, 141, .25); }
.btn-secondary { background: #e8f4f1; color: #0c766b; box-shadow: none; }
.btn-ghost { background: #fff; color: #43516a; border-color: #dce5ef; box-shadow: none; }
.btn-ghost:hover { background: #f7fbfa; }
.stat-grid { gap: 16px; }
.stat { position: relative; overflow: hidden; padding: 21px; border: 1px solid #e6edf4; border-radius: 18px; box-shadow: 0 9px 24px rgba(29, 61, 98, .055); }
.stat::after { content: ""; position: absolute; right: -9px; bottom: -16px; width: 68px; height: 68px; border-radius: 50%; background: var(--aqua); opacity: .65; }
.stat:nth-child(2)::after { background: #dcecff; }.stat:nth-child(3)::after { background: #fff0d7; }.stat:nth-child(4)::after { background: #eee3ff; }
.stat-label { color: #738098; margin-bottom: 12px; }.stat strong { position: relative; z-index: 1; display: block; font-size: 30px; line-height: 1; letter-spacing: -.04em; }.stat div { margin-top: 9px; color: var(--muted); font-size: 13px; }
.panel, .overlay-card { border: 1px solid #e6edf4; border-radius: 18px; box-shadow: var(--shadow); }
.panel { padding: 22px; }.panel-header h3 { margin: 0; letter-spacing: -.02em; }.muted { color: var(--muted); }
.panel,
.overlay-card,
.section-hero,
.stat,
.field-card,
.ba-download-group {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.panel:hover,
.overlay-card:hover,
.section-hero:hover,
.ba-download-group:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(31, 73, 55, 0.11);
}
.filter-grid .field,
.ba-filter-panel .field,
.overlay-form .field {
  transition: transform 0.16s ease;
}
.filter-grid .field:focus-within,
.ba-filter-panel .field:focus-within,
.overlay-form .field:focus-within {
  transform: translateY(-1px);
}
.field label { color: #42516a; font-weight: 650; }.field input, .field select, .field textarea { border-color: #dbe4ef; border-radius: 10px; background: #fbfcfe; transition: border-color .18s ease, box-shadow .18s ease; }.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #36b9aa; box-shadow: 0 0 0 4px rgba(54, 185, 170, .13); background: #fff; }
.table { border: 1px solid #e6edf4; border-radius: 16px; box-shadow: var(--shadow); }.table th { padding: 14px 16px; color: #718096; background: #f8fafc; }.table td { padding: 14px 16px; color: #3f4b60; }.table tbody tr { transition: background .16s ease; }.table tbody tr:hover { background: #f6fbfa; }
.page-header h1 { margin: 0; letter-spacing: -.035em; }.page-header .muted { margin: 6px 0 0; }.flash, .alert { border: 1px solid transparent; }.flash-success { border-color: #bdebdc; }.flash-error, .alert { border-color: #f9c8c8; }
.geo-map { border-color: #dbe5ed; border-radius: 14px; }.overlay-card { box-shadow: none; background: #fbfcfe; }
.project-setup-panel { overflow: hidden; margin-bottom: 24px; border: 1px solid #dce9f0; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.project-setup-note { display: flex; align-items: flex-start; gap: 12px; padding: 15px 20px; color: #24536b; background: linear-gradient(90deg, #e9f8f5, #f6fbff); border-bottom: 1px solid #dcecef; }
.project-setup-note-icon { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 13px; font-weight: 800; }
.project-setup-note strong { font-size: 14px; }.project-setup-note p { margin: 3px 0 0; color: #607289; font-size: 13px; line-height: 1.45; }
.project-setup-frame,
.setup-project-frame {
  display: block;
  width: 100%;
  min-height: 0;
  height: 520px;
  border: 0;
  border-radius: 18px;
  background: #eef2f7;
  box-shadow: 0 16px 38px rgba(27, 58, 92, 0.08);
  transition: height .18s ease;
}
.saved-projects { overflow: hidden; border: 1px solid #e0e8f1; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(29, 61, 98, .05); }.saved-projects > summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; font-weight: 750; list-style: none; }.saved-projects > summary::-webkit-details-marker { display: none; }.saved-projects > summary::after { content: '⌄'; margin-left: 10px; color: var(--teal); transition: transform .2s ease; }.saved-projects[open] > summary::after { transform: rotate(180deg); }.saved-projects-count { display: inline-grid; place-items: center; min-width: 25px; height: 25px; margin-left: auto; margin-right: 8px; border-radius: 50%; color: #087e71; background: #dcf5f0; font-size: 12px; }.saved-projects .table { border: 0; border-radius: 0; box-shadow: none; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }.auth-hero { min-height: 38vh; }.auth-panel { padding: 28px 20px; }
  .shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; padding: 18px; }.sidebar-brand { padding-bottom: 15px; }.nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }.nav-label, .nav-dropdown { display: none; }.nav a { flex: 0 0 auto; margin: 0; }.nav-logout { margin-top: 0 !important; }.content { padding: 0 20px 32px; }.topbar { height: 74px; }.topbar > div:first-child { display: none; }.topbar { justify-content: flex-end; }.dashboard-intro { align-items: flex-start; flex-direction: column; margin-top: 24px; }.dashboard-intro .btn { width: 100%; }.dashboard-map { height: 380px; }.project-setup-frame, .setup-project-frame { min-height: 0; height: 640px; }
}

@media (max-width: 520px) { .card { padding: 26px; }.auth-hero { padding: 32px 28px; }.auth-brand h1 { font-size: 38px; }.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.stat { padding: 16px; }.stat strong { font-size: 26px; }.panel { padding: 16px; } }
@media (max-width: 520px) {
  .app-footer {
    margin-top: 18px;
    font-size: 11px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.panel {
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

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

.panel-map .panel-header {
  margin-bottom: 6px;
}

.inline-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #374151;
}

.inline-form {
  margin: 0;
}

.form-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.rating-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input[type="range"] {
  flex: 1;
  padding: 0;
  border: none;
}

.range-value {
  min-width: 48px;
  text-align: right;
  font-weight: 600;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
}

.ranking-actions {
  display: flex;
  gap: 6px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.matrix-row-label {
  text-align: left;
  font-weight: 600;
}

.note-block {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5f0;
  color: #374151;
  font-size: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.file-input-wrap {
  position: relative;
  width: 100%;
}

.file-input-wrap input[type="file"] {
  padding-right: 46px;
}

.file-input-action {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.file-input-action:hover {
  background: #f3f4f6;
}

.file-input-action:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.file-input-icon {
  width: 16px;
  height: 16px;
  fill: #111827;
}

.settings-media {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.settings-preview {
  width: 120px;
  height: 120px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  overflow: hidden;
}

.settings-preview-sm {
  width: 64px;
  height: 64px;
}

.settings-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.settings-note {
  font-size: 12px;
  color: #6b7280;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
  align-items: stretch;
  overflow: visible;
  padding-bottom: 2px;
}

.overlay-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 10px;
  align-content: start;
}

.overlay-card .field {
  margin-bottom: 0;
}


.overlay-form {
  display: grid;
  gap: 10px;
}

.overlay-saved {
  margin-top: 0;
}

.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.geo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
}

.geo-map {
  margin-top: 12px;
  height: clamp(250px, 42vh, 360px);
  border: 1px solid #cfdbe8;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #f8fbff, #eef2ff 60%, #edf6ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 24px rgba(15, 23, 42, 0.08);
}

.geo-coords {
  margin-top: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.geo-coords .muted {
  font-size: 11px;
}

.geo-map-inline {
  height: clamp(210px, 32vh, 290px);
}

.dashboard-map {
  height: clamp(320px, 56vh, 620px);
}

.panel-map .dashboard-map {
  margin-top: 6px;
}

.panel-map .inline-help {
  margin-top: 4px;
}

.panel-map .overlay-grid {
  margin-top: 10px;
}

.geo-marker-modern {
  filter: drop-shadow(0 2px 7px rgba(20, 83, 45, 0.35));
}

.geo-marker-modern:hover {
  filter: drop-shadow(0 5px 14px rgba(15, 118, 110, 0.42));
}

.geo-marker-active.geo-marker-modern {
  filter: drop-shadow(0 7px 16px rgba(21, 128, 61, 0.5));
  transform: scale(1.12);
}

.geo-map-fallback {
  padding: 12px;
  font-size: 13px;
  color: #6b7280;
}

body.popup-open {
  overflow: hidden;
}

.sudeska-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.sudeska-popup[hidden] {
  display: none !important;
}

.sudeska-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.sudeska-popup__card {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  border-radius: 22px;
  border: 1px solid #cfe3d7;
  background: linear-gradient(135deg, #ffffff, #f2f9f4);
  box-shadow: 0 26px 64px rgba(12, 39, 28, 0.28);
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  padding: 22px 24px;
}

.sudeska-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #115e59;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sudeska-popup__media {
  display: grid;
  place-items: center;
}

.sudeska-popup__media img {
  width: min(240px, 100%);
  height: auto;
  display: block;
}

.sudeska-popup__content h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: #134e3a;
}

.sudeska-popup__subtitle {
  margin: 0 0 12px;
  color: #2c6c56;
  font-weight: 600;
}

.sudeska-popup__content p {
  margin: 0 0 10px;
  color: #24483a;
  line-height: 1.58;
}

.sudeska-popup__points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.sudeska-popup__points li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #1f3f33;
}

.sudeska-popup__actions {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .sudeska-popup__card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 16px;
  }

  .sudeska-popup__media img {
    width: min(180px, 56vw);
  }
}

@media (max-width: 520px) {
  .sudeska-popup {
    padding: 10px;
  }

  .sudeska-popup__card {
    border-radius: 16px;
    padding: 16px 12px;
  }

  .sudeska-popup__content h2 {
    font-size: 20px;
  }
}

.geo-popup {
  min-width: min(280px, 86vw);
  width: min(520px, 86vw);
  max-width: min(520px, 86vw);
  font-size: 12px;
  color: #111827;
  max-height: 70vh;
  overflow: hidden;
  padding-right: 2px;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.leaflet-popup-content {
  width: min(520px, 86vw) !important;
  max-width: min(520px, 86vw);
  margin: 10px 12px;
}

.geo-popup-title {
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}

.geo-popup-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}

.geo-popup-status,
.geo-popup-empty {
  font-size: 12px;
  color: #6b7280;
}

.geo-popup-section {
  margin-top: 8px;
}

.geo-popup-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 4px;
}

.geo-popup-list {
  display: grid;
  gap: 8px;
  max-height: 44vh;
  overflow: auto;
  padding: 2px 6px 2px 0;
}

.geo-popup-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e5e7eb;
}

.geo-popup-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.geo-popup-label {
  font-weight: 600;
  color: #374151;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}

.geo-popup-value {
  color: #111827;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.geo-popup-images {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.geo-popup-image-card {
  display: grid;
  gap: 4px;
  overflow: visible;
}

.geo-popup-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: block;
}

.geo-popup-image-label {
  font-size: 11px;
  color: #6b7280;
}

.geo-popup-files {
  display: grid;
  gap: 6px;
  max-height: 18vh;
  overflow: auto;
  padding-right: 4px;
}

.geo-popup-file,
.geo-popup-link {
  font-size: 12px;
  color: #111827;
  text-decoration: underline;
}

.geo-popup-links {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.geo-popup-details {
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 6px;
}

.geo-popup-details > summary {
  cursor: pointer;
  font-size: 12px;
  color: #374151;
  font-weight: 600;
  list-style: none;
}

.geo-popup-details > summary::-webkit-details-marker {
  display: none;
}

.geo-popup-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.geo-popup-details[open] > summary::before {
  transform: rotate(90deg);
}

.geo-popup-list-technical {
  margin-top: 6px;
  max-height: 26vh;
}

.geo-popup-technical-section {
  margin-top: 8px;
}

.geo-popup-technical-section:first-of-type {
  margin-top: 6px;
}

.geo-popup-technical-title {
  font-size: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px 8px 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4b5563;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .geo-actions .btn {
    flex: 1 1 140px;
  }

  .geo-map {
    height: clamp(220px, 40vh, 300px);
  }

  .dashboard-map {
    height: clamp(280px, 48vh, 420px);
  }

  .geo-popup {
    width: min(94vw, 420px);
    max-width: min(94vw, 420px);
    max-height: 64vh;
    padding: 2px 0;
  }

  .leaflet-popup-content {
    width: min(94vw, 420px) !important;
    max-width: min(94vw, 420px);
    margin: 8px 10px;
  }

  .geo-popup-list {
    max-height: 36vh;
  }
}

.geo-popup-technical-title::-webkit-details-marker {
  display: none;
}

.geo-popup-technical-title::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transform-origin: center;
  transition: transform 0.15s ease;
}

.geo-popup-technical-section[open] > .geo-popup-technical-title::before {
  transform: rotate(90deg);
}

.pagination {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.page-link {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
}

.page-link.current {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.table-select {
  width: 100%;
}

.mono {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #374151;
  word-break: break-all;
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  background: #f8fafc;
}

.table tr:last-child td {
  border-bottom: none;
}

.ba-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(135deg, #0d4f88, #0f766e);
  color: #e6f7ff;
  border: 0;
}

.ba-hero h1 {
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.ba-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bfe9ff;
}

.ba-hero .muted {
  color: #d6ecff;
  margin: 8px 0 0;
}

.ba-layer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ba-layer-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #d9f3ff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ba-layer-summary strong {
  color: #ffffff;
}

.ba-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
  min-width: 310px;
}

.ba-stat {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.ba-stat span {
  font-size: 12px;
  color: #d9f3ff;
}

.ba-stat strong {
  font-size: 25px;
  line-height: 1;
  color: #ffffff;
}

.ba-panel .panel-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.ba-table-wrap {
  max-height: 70vh;
  overflow: auto;
  position: relative;
}
.ba-table-wrap::after {
  content: "";
  position: sticky;
  display: block;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 24px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(243, 248, 244, 0.95));
}

.ba-table th,
.ba-table td {
  white-space: nowrap;
}

.ba-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.ba-filter-actions {
  justify-content: flex-start;
}

.ba-download-panel .panel-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.ba-download-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ba-download-group {
  border: 1px solid #dbe6f2;
  border-radius: 12px;
  background: #f7fbff;
  padding: 12px;
}

.ba-download-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e3a5f;
  margin-bottom: 8px;
}

.ba-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .ba-hero {
    flex-direction: column;
  }

  .ba-hero-stats {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  margin: 0;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
}

.field-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.field-card.dragging {
  opacity: 0.6;
}

.field-card.drag-over {
  border-color: #94a3b8;
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.builder-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.6fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.config-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.config-field {
  margin-bottom: 0;
}

.logic-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.hidden {
  display: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  background: #ffffff;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

@media (max-width: 900px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    padding: 32px;
  }

  .auth-panel {
    padding: 32px;
  }

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

  .sidebar {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .page-header {
    align-items: flex-start;
  }

  .builder-row,
  .logic-row {
    grid-template-columns: 1fr;
  }

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

/* Forest Neo Theme Override */
:root {
  --forest-900: #173126;
  --forest-800: #214535;
  --forest-700: #2f6148;
  --forest-600: #3b7a5a;
  --moss-500: #6b8f52;
  --earth-500: #8b6b47;
  --sand-100: #f6f3ec;
  --mist-100: #eef6f2;
  --ink-900: #1d2b24;
  --ink-700: #41574c;
  --line-soft: #d7e3dc;
  --glow-soft: 0 22px 42px rgba(27, 59, 45, 0.11);
}

body.theme-forest {
  font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(1200px 680px at 88% -10%, rgba(107, 143, 82, 0.22), transparent 66%),
    radial-gradient(1000px 540px at -15% 12%, rgba(59, 122, 90, 0.18), transparent 68%),
    linear-gradient(180deg, #f8fbf8 0%, var(--sand-100) 100%);
  transition: background 0.35s ease, color 0.3s ease;
}

body.theme-forest::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.23;
  background-image: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.14) 75%, transparent 75%, transparent);
  background-size: 34px 34px;
}

body.theme-forest .shell,
body.theme-forest .content,
body.theme-forest .sidebar,
body.theme-forest .auth-wrap,
body.theme-forest .auth-panel,
body.theme-forest .auth-hero {
  position: relative;
  z-index: 1;
}

body.theme-forest .auth-hero {
  background: linear-gradient(145deg, #153629 0%, #235140 45%, #3b7a5a 100%);
}

body.theme-forest .auth-brand h1,
body.theme-forest .topbar strong,
body.theme-forest .dashboard-intro h1,
body.theme-forest .ba-hero h1,
body.theme-forest .page-header h1 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body.theme-forest .sidebar {
  background: linear-gradient(180deg, #132a21 0%, #1c3a2d 50%, #2a4d3b 100%);
  box-shadow: 10px 0 30px rgba(16, 34, 26, 0.28);
}

body.theme-forest .nav a,
body.theme-forest .nav-link {
  border: 1px solid transparent;
  color: #dbece3;
}

body.theme-forest .nav a:hover,
body.theme-forest .nav-link:hover {
  border-color: rgba(204, 235, 218, 0.2);
  background: rgba(208, 236, 216, 0.1);
}

body.theme-forest .nav a.active {
  border-color: rgba(193, 235, 206, 0.25);
  box-shadow: inset 4px 0 0 #9fca88;
  background: linear-gradient(90deg, rgba(159, 202, 136, 0.27), rgba(159, 202, 136, 0.06));
}

/* Menu "Pengguna" dan "Pengaturan": hijau modern, tidak bernuansa coklat. */
body.theme-forest .nav a[href*="/users"],
body.theme-forest .nav a[href*="/site-settings"] {
  border-color: rgba(52, 211, 153, 0.18);
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.12), rgba(15, 118, 110, 0.03));
  color: #e6fff4;
}

body.theme-forest .nav a[href*="/users"] .nav-icon,
body.theme-forest .nav a[href*="/site-settings"] .nav-icon {
  border-color: rgba(110, 231, 183, 0.5);
  background: rgba(16, 185, 129, 0.24);
  color: #d1fae5;
}

body.theme-forest .nav a[href*="/users"]:hover,
body.theme-forest .nav a[href*="/site-settings"]:hover,
body.theme-forest .nav a[href*="/users"].active,
body.theme-forest .nav a[href*="/site-settings"].active {
  border-color: rgba(110, 231, 183, 0.58);
  box-shadow: inset 4px 0 0 #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.34), rgba(5, 150, 105, 0.1));
  color: #ffffff;
}

body.theme-forest .nav .nav-logout {
  box-shadow: inset 4px 0 0 rgba(255, 178, 160, 0.65);
}

body.theme-forest .topbar {
  border-bottom: 1px solid var(--line-soft);
}

body.theme-forest .topbar-kicker,
body.theme-forest .eyebrow,
body.theme-forest .stat-label,
body.theme-forest .nav-label {
  color: #577a63;
}

body.theme-forest .app-footer {
  border-top-color: #cfded4;
  color: #5a7164;
}

body.theme-forest .panel,
body.theme-forest .card,
body.theme-forest .table,
body.theme-forest .overlay-card,
body.theme-forest .stat,
body.theme-forest .field-card {
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcf9 100%);
  box-shadow: var(--glow-soft);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.theme-forest .panel {
  border-radius: 20px;
}

body.theme-forest .dashboard-intro {
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(113, 153, 119, 0.25);
  background: linear-gradient(140deg, rgba(236, 247, 240, 0.96), rgba(243, 248, 234, 0.96));
  box-shadow: var(--glow-soft);
  animation: forestRise 0.55s ease both;
}

body.theme-forest .dashboard-intro p {
  color: var(--ink-700);
  margin: 10px 0 0;
}

body.theme-forest .stat-grid {
  margin-top: 18px;
}

body.theme-forest .stat {
  animation: forestRise 0.55s ease both;
}

body.theme-forest .stat strong {
  color: var(--forest-800);
}

body.theme-forest .btn {
  border: 1px solid rgba(21, 54, 41, 0.2);
  background: linear-gradient(135deg, var(--forest-700), var(--forest-600));
  color: #f4fff8;
  box-shadow: 0 12px 24px rgba(46, 97, 73, 0.25);
}

body.theme-forest .btn:hover {
  box-shadow: 0 16px 30px rgba(41, 90, 67, 0.32);
}

body.theme-forest .btn-secondary {
  color: #1f513d;
  border-color: #bfd9cc;
  background: linear-gradient(180deg, #eff9f4, #e3f2ea);
}

body.theme-forest .btn-ghost {
  color: #315948;
  border-color: #c8dcd1;
  background: #ffffff;
}

body.theme-forest .field label {
  color: #365343;
}

body.theme-forest .field input,
body.theme-forest .field select,
body.theme-forest .field textarea {
  border-color: #cddcd3;
  background: #fcfffd;
}

body.theme-forest .field input:focus,
body.theme-forest .field select:focus,
body.theme-forest .field textarea:focus {
  border-color: #4e8767;
  box-shadow: 0 0 0 4px rgba(78, 135, 103, 0.18);
}

body.theme-forest .table th {
  color: #4f695b;
  background: linear-gradient(180deg, #edf5ef, #e5f0e8);
}

body.theme-forest .table tbody tr:hover {
  background: #f1f8f3;
}

body.theme-forest .ba-hero {
  border: 1px solid rgba(183, 224, 188, 0.3);
  background: linear-gradient(130deg, #1a3a2d, #35674f 58%, #688f52 140%);
}

body.theme-forest .ba-download-group {
  border-color: #caddd0;
  background: linear-gradient(180deg, #f9fcf8, #f0f7f2);
}

body.theme-forest .inline-help,
body.theme-forest .muted,
body.theme-forest .settings-note,
body.theme-forest .geo-popup-meta,
body.theme-forest .geo-popup-empty,
body.theme-forest .geo-popup-status,
body.theme-forest .ba-download-label,
body.theme-forest .page-link {
  color: #5b6f63;
}

body.theme-forest .geo-map,
body.theme-forest .project-setup-panel {
  border-color: #ccddd2;
}

body.theme-forest .geo-map {
  background: radial-gradient(circle at 20% 16%, #f4fff7, #e9f7ee 55%, #e2f2e8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 10px 24px rgba(21, 72, 52, 0.12);
}

body.theme-forest .flash-success {
  color: #1e563f;
  background: #dff4e8;
  border-color: #b7e0c8;
}

body.theme-forest .flash-error,
body.theme-forest .alert {
  color: #7b3030;
  background: #feeae7;
  border-color: #f6cbc6;
}

@keyframes forestRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  body.theme-forest .dashboard-intro {
    padding: 18px;
  }
}

@media (max-width: 680px) {
  body.theme-forest .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-setup-frame,
  .setup-project-frame {
    height: 470px;
    border-radius: 14px;
  }

  .ba-panel {
    padding: 14px;
  }

  .ba-table-wrap {
    max-height: 56vh;
  }

  .ba-table th,
  .ba-table td {
    padding: 10px 11px;
    font-size: 12px;
  }

  body.theme-forest .dashboard-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  body.theme-forest .dashboard-intro .btn {
    width: 100%;
  }
}

.section-hero {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #d0ddd4;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(242, 250, 245, 0.95), rgba(251, 248, 238, 0.96));
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
}

.section-hero-head h2 {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 30px);
  letter-spacing: -0.03em;
  color: #234735;
}

.section-hero-head p {
  margin: 8px 0 0;
  color: #5a6e62;
  line-height: 1.55;
}

.section-hero-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-chip {
  border: 1px solid #c8d9ce;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  min-height: 74px;
}

.hero-chip small {
  font-size: 11px;
  color: #657c6f;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-chip strong {
  font-size: 20px;
  color: #244936;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill-active {
  background: #dff3e6;
  color: #256147;
  border: 1px solid #b7dfc6;
}

.status-pill-muted {
  background: #eef2ef;
  color: #5f6e64;
  border: 1px solid #d7ded9;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #315948;
  background: #eaf4ef;
  border: 1px solid #c9ddd2;
}

.setup-data-panel {
  margin-top: 20px;
}

.setup-table td,
.setup-table th {
  vertical-align: middle;
}

@media (max-width: 980px) {
  .section-hero {
    grid-template-columns: 1fr;
  }

  .section-hero-chips {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }
}

@media (max-width: 620px) {
  .section-hero {
    padding: 14px;
  }

  .section-hero-chips {
    grid-template-columns: 1fr;
  }

  .hero-chip {
    min-height: 62px;
  }
}

body.theme-forest.role-super-admin {
  --role-accent: #df9b31;
}

body.theme-forest.role-org-admin {
  --role-accent: #3ca07a;
}

body.theme-forest.role-viewer {
  --role-accent: #3b79bf;
}

body.theme-forest.role-enumerator {
  --role-accent: #7a61c2;
}

/* Aksen tetap memakai palet Forest untuk seluruh peran (menu preset tema dihapus). */
body.theme-forest.role-super-admin,
body.theme-forest.role-org-admin,
body.theme-forest.role-viewer,
body.theme-forest.role-enumerator {
  --role-accent: #3b7a5a;
}


body.table-compact-mode .table th,
body.table-compact-mode .table td {
  padding: 8px 10px;
  font-size: 12px;
}

body.table-compact-mode .ba-table-wrap {
  max-height: 52vh;
}

body.table-compact-mode .form-actions .btn-sm,
body.table-compact-mode .btn.btn-sm {
  padding: 5px 8px;
  font-size: 12px;
}

body.theme-forest .topbar-kicker {
  color: var(--role-accent, #577a63);
}

body.theme-forest .user-chip > span {
  background: linear-gradient(135deg, var(--role-accent, #3b7a5a), #5ea884);
}

body.theme-forest .nav a.active {
  box-shadow: inset 4px 0 0 var(--role-accent, #9fca88);
}

.builder-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #d6e3da;
  border-radius: 14px;
  background: linear-gradient(145deg, #f6fbf8, #faf8ef);
}

.builder-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.builder-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #c8d9ce;
  background: #ffffff;
  color: #3f5f4e;
  padding: 6px 10px;
  font-size: 12px;
}

.builder-pill strong {
  color: #1f4937;
}

.builder-tools input {
  width: 100%;
  border: 1px solid #cad9d0;
  border-radius: 11px;
  padding: 10px 12px;
  background: #ffffff;
}

.builder-empty {
  border: 1px dashed #bfd3c6;
  border-radius: 14px;
  padding: 18px;
  background: #fbfffd;
  text-align: center;
  margin-bottom: 12px;
}

.builder-empty h4 {
  margin: 0;
  color: #2d5441;
}

.builder-empty p {
  margin: 8px 0 12px;
  color: #617569;
}

.field-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.field-card:hover {
  transform: translateY(-1px);
  border-color: #bcd4c5;
  box-shadow: 0 10px 20px rgba(31, 73, 55, 0.08);
}

.ba-split-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: start;
}

.ba-split-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.ba-split-main {
  min-width: 0;
}

.ba-filter-panel .panel-header {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.ba-crs-note {
  margin-top: 10px;
}

@media (max-width: 1080px) {
  .builder-workbench {
    grid-template-columns: 1fr;
  }

  .ba-split-layout {
    grid-template-columns: 1fr;
  }

  .ba-split-side {
    position: static;
  }
}

@media (max-width: 900px) {
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .sidebar {
    align-items: stretch;
    gap: 10px;
  }

  .nav {
    display: block;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-label,
  .nav-dropdown {
    display: block;
  }

  .nav a,
  .nav-link {
    flex: none;
    margin-bottom: 4px;
  }

  .nav-logout {
    margin-top: 20px !important;
  }
}

/* Modern Auth Experience */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 540px at 90% -5%, rgba(26, 111, 85, 0.18), transparent 68%),
    radial-gradient(900px 420px at -5% 110%, rgba(11, 76, 104, 0.2), transparent 72%),
    linear-gradient(180deg, #f4f8f6 0%, #edf3f2 100%);
}

.auth-page .auth-wrap {
  min-height: 100vh;
  grid-template-columns: minmax(470px, 1.25fr) minmax(420px, .75fr);
  background: transparent;
}

.auth-page .auth-hero {
  position: relative;
  padding: clamp(34px, 5.6vw, 88px);
  background:
    linear-gradient(150deg, #0b2f26 0%, #174d3f 43%, #2f7059 100%);
  border-radius: 0 34px 34px 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08), 16px 0 34px rgba(11, 47, 38, 0.15);
  overflow: hidden;
}

.auth-page .auth-hero::before,
.auth-page .auth-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-page .auth-hero::before {
  right: -120px;
  top: -110px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 62px solid rgba(141, 228, 187, 0.13);
}

.auth-page .auth-hero::after {
  left: -180px;
  bottom: -180px;
  width: 430px;
  height: 430px;
  border-radius: 46px;
  background: linear-gradient(135deg, rgba(125, 202, 164, 0.16), rgba(26, 91, 69, 0.02));
  transform: rotate(22deg);
}

.auth-page .auth-hero-main,
.auth-page .hero-footer {
  position: relative;
  z-index: 1;
}

.auth-page .hero-eyebrow {
  margin-bottom: 16px;
  color: #8ce1bf;
  font-size: 11px;
  letter-spacing: .13em;
}

.auth-page .auth-brand {
  margin-bottom: 14px;
  gap: 14px;
}

.auth-page .auth-brand h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 62px);
  letter-spacing: -0.05em;
  color: #effaf4;
  line-height: .95;
}

.auth-page .auth-logo {
  width: 68px;
  height: 68px;
  padding: 7px;
  border-radius: 18px;
  background: rgba(245, 255, 250, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.auth-page .auth-hero p {
  margin: 0;
  max-width: 540px;
  color: #d7efe5;
  font-size: 16px;
  line-height: 1.7;
}

.auth-page .auth-hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-page .auth-meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(183, 236, 211, 0.3);
  background: rgba(183, 236, 211, 0.12);
  color: #dcf8eb;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.auth-page .auth-highlight-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  max-width: 510px;
}

.auth-page .auth-highlight-list li {
  position: relative;
  color: #d2ebdf;
  padding-left: 16px;
  font-size: 14px;
}

.auth-page .auth-highlight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ce1bf;
}

.auth-page .hero-footer {
  margin-top: 24px;
  align-items: flex-start;
}

.auth-page .hero-footer p {
  color: #c6e5d8;
  line-height: 1.5;
}

.auth-page .hero-orb {
  margin-top: 4px;
  width: 11px;
  height: 11px;
  background: #8ce1bf;
  box-shadow: 0 0 0 7px rgba(140, 225, 191, 0.16);
}

.auth-page .auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(26px, 4vw, 58px);
  background: transparent;
}

.auth-page .auth-login-card {
  width: 100%;
  max-width: 460px;
  padding: 34px;
  border-radius: 26px;
  border: 1px solid rgba(216, 228, 223, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 253, 252, 0.96));
  box-shadow: 0 22px 56px rgba(15, 45, 36, 0.13);
  backdrop-filter: blur(5px);
}

.auth-page .auth-login-head {
  margin-bottom: 16px;
}

.auth-page .auth-login-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cfe6da;
  color: #285f4b;
  background: #ecf7f1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.auth-page .auth-login-card h2 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: .96;
  letter-spacing: -0.04em;
  color: #163529;
}

.auth-page .auth-login-card .muted {
  margin: 0;
  color: #55756a;
  line-height: 1.6;
}

.auth-page .auth-alert {
  margin: 14px 0 8px;
  border: 1px solid #f1c0c0;
  background: #fff2f2;
}

.auth-page .auth-login-form {
  margin-top: 16px;
}

.auth-page .auth-login-form .field {
  margin-bottom: 13px;
}

.auth-page .auth-login-form .field label {
  color: #2f5448;
  font-weight: 700;
  margin-bottom: 7px;
}

.auth-page .auth-input-wrap {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #d2e2da;
  border-radius: 12px;
  background: #f8fcfa;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-page .auth-input-wrap-password {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.auth-page .auth-input-wrap:focus-within {
  border-color: #3b8f71;
  box-shadow: 0 0 0 4px rgba(59, 143, 113, 0.14);
  background: #ffffff;
}

.auth-page .auth-input-icon {
  display: inline-grid;
  place-items: center;
  height: 100%;
  color: #5a7a6f;
  font-weight: 800;
  border-right: 1px solid #dce9e2;
  background: linear-gradient(180deg, #eef7f2, #e4f2ec);
}

.auth-page .auth-input-wrap input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 11px 12px;
  font-size: 15px;
}

.auth-page .auth-input-wrap input:focus {
  outline: none;
}

.auth-page .auth-input-toggle {
  margin: 0 6px 0 2px;
  border: 1px solid #cfe0d8;
  border-radius: 9px;
  background: #eef7f2;
  color: #2d6651;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.auth-page .auth-input-toggle:hover {
  background: #e3f3eb;
  border-color: #b9d8cc;
}

.auth-page .auth-input-toggle[aria-pressed="true"] {
  background: #dff2e8;
  color: #1f5b45;
  border-color: #a9cebf;
}

.auth-page .auth-caps-hint {
  margin: 7px 2px 0;
  color: #8f5f18;
  font-size: 12px;
  font-weight: 600;
}

.auth-page .auth-remember-row {
  margin: 2px 0 12px;
}

.auth-page .auth-remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #486d61;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.auth-page .auth-remember-check input {
  width: 16px;
  height: 16px;
  accent-color: #287a5e;
}

.auth-page .auth-submit-btn {
  margin-top: 6px;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  background: linear-gradient(135deg, #1b7c63, #2e9a75);
  box-shadow: 0 14px 26px rgba(24, 118, 90, 0.28);
}

.auth-page .auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(24, 118, 90, 0.31);
}

.auth-page .auth-submit-btn:disabled,
.auth-page .auth-submit-btn.is-loading {
  cursor: wait;
  opacity: .96;
}

.auth-page .auth-login-footnote {
  margin: 14px 0 0;
  color: #628277;
  font-size: 12px;
  line-height: 1.5;
}

.auth-page .auth-hero-main {
  animation: authFadeUp .58s ease both;
}

.auth-page .hero-footer {
  animation: authFadeUp .58s ease .12s both;
}

.auth-page .auth-login-card {
  animation: authFadeUp .62s ease .18s both;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page .auth-hero-main,
  .auth-page .hero-footer,
  .auth-page .auth-login-card {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .auth-page .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-page .auth-hero {
    min-height: auto;
    border-radius: 0;
    padding-bottom: 28px;
  }

  .auth-page .auth-panel {
    padding-top: 20px;
  }
}

@media (max-width: 640px) {
  .auth-page .auth-login-card {
    padding: 24px;
    border-radius: 20px;
  }

  .auth-page .auth-brand h1 {
    font-size: 42px;
  }

  .auth-page .auth-login-card h2 {
    font-size: 30px;
  }
}

/* ── Setup Project: sub-judul bagian formulir & baris dasar hukum ────────── */
.panel-subtitle {
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line, #e5e9f0);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #42516a;
}

.panel-subtitle:first-of-type {
  margin-top: 0;
}

.dasar-hukum-row {
  margin-bottom: 8px;
}

/* ── Menu Survey: Proses Hasil Ukur Lapangan ─────────────────────────────── */
.survey-step-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #14633b;
  display: inline-flex;
  align-items: center;
}

.step-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  background: #e6f4ee;
  color: #14633b;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.status-line {
  margin: 12px 0 0;
  padding: 9px 13px;
  border: 1px solid #e3e7ea;
  border-radius: 8px;
  background: #f6f8f9;
  font-size: 13px;
  color: #4b5563;
}
.status-line.ok   { border-color: #cbe3d5; background: #eaf4ee; color: #14633b; }
.status-line.warn { border-color: #f3c9c6; background: #fdeceb; color: #b3261e; }

.ringkas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}
.ringkas > div {
  padding: 9px 13px;
  border: 1px solid #e3e7ea;
  border-radius: 8px;
  background: #fbfcfe;
}
.ringkas dt { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; }
.ringkas dd { margin: 3px 0 0; font-size: 14px; font-weight: 650; color: #1f2933; word-break: break-word; }

.progress-bar {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e9edf1;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a7f4b, #36b9aa);
  transition: width .3s ease;
}

.status-pill-warn { background: #fdeceb; color: #b3261e; }

.survey-pick { max-width: 560px; }

.survey-link-grid,
.import-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 4px;
}
.import-grid { grid-template-columns: 2fr auto; }
.survey-link-grid .field-action,
.import-grid .field-action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .survey-link-grid,
  .import-grid { grid-template-columns: 1fr; }
}

.tautan-box {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #dcecef;
  border-radius: 10px;
  background: linear-gradient(90deg, #e9f8f5, #f6fbff);
}
.tautan-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #607289;
}
.tautan-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tautan-row input {
  flex: 1 1 320px;
  padding: 8px 11px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  font-family: Consolas, monospace;
  font-size: 13px;
  color: #1f2933;
}

.monitor-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.monitor-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.monitor-auto input { width: auto; margin: 0; }

.import-form { margin-bottom: 16px; }

#tabel_titik tbody tr.terisi td { background: rgba(26, 127, 75, .04); }

/* --- Overlay SIGAP (dashboard) --- */
.overlay-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.sigap-controls {
  display: grid;
  gap: 8px;
}

.sigap-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.sigap-range input[type="range"] {
  flex: 1 1 auto;
  width: auto;
  margin: 0;
  padding: 0;
}

.sigap-range span:last-child {
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sigap-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.sigap-check input { width: auto; margin: 0; }

.overlay-sigap optgroup { font-size: 12px; }

/* ==========================================================================
   Kartu berwarna per menu — selaras dengan tampilan Berita Acara
   ========================================================================== */

/* Palet nuansa kehutanan per menu; variabelnya diwarisi seluruh kartu di halaman. */
body.theme-forest .content {
  --hero-from: #155e63;
  --hero-to: #0f766e;
  --page-accent: #116769;
  --page-tint: rgba(17, 103, 105, 0.10);
}

body.theme-forest .content[data-page="dashboard"] {
  --hero-from: #14532d;
  --hero-to: #15803d;
  --page-accent: #166b3a;
  --page-tint: rgba(22, 107, 58, 0.10);
}

body.theme-forest .content[data-page="setup-project"] {
  --hero-from: #134e4a;
  --hero-to: #0f766e;
  --page-accent: #116b60;
  --page-tint: rgba(17, 107, 96, 0.10);
}

body.theme-forest .content[data-page="survey"],
body.theme-forest .content[data-page="forms"] {
  --hero-from: #3f6212;
  --hero-to: #4d7c0f;
  --page-accent: #476f11;
  --page-tint: rgba(71, 111, 17, 0.10);
}

body.theme-forest .content[data-page="submissions"] {
  --hero-from: #0f5257;
  --hero-to: #0e7490;
  --page-accent: #116b7a;
  --page-tint: rgba(17, 107, 122, 0.10);
}

body.theme-forest .content[data-page="berita-acara"] {
  --hero-from: #155e63;
  --hero-to: #0f766e;
  --page-accent: #116769;
  --page-tint: rgba(17, 103, 105, 0.10);
}

body.theme-forest .content[data-page="users"] {
  --hero-from: #14532d;
  --hero-to: #166534;
  --page-accent: #15803d;
  --page-tint: rgba(21, 128, 61, 0.12);
}

body.theme-forest .content[data-page="audit-logs"] {
  --hero-from: #1e3a34;
  --hero-to: #2f5d52;
  --page-accent: #28504a;
  --page-tint: rgba(40, 80, 74, 0.10);
}

body.theme-forest .content[data-page="site-settings"] {
  --hero-from: #0f766e;
  --hero-to: #166534;
  --page-accent: #0f766e;
  --page-tint: rgba(15, 118, 110, 0.12);
}

/* --- kartu hero tiap menu --- */
body.theme-forest .section-hero,
body.theme-forest .dashboard-intro,
body.theme-forest .ba-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 22px 0;
  padding: clamp(18px, 2.3vw, 26px);
  border: 0;
  border-radius: 22px;
  color: #eef8ff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  box-shadow: 0 18px 38px rgba(12, 38, 30, 0.20);
}

body.theme-forest .section-hero::after,
body.theme-forest .dashboard-intro::after,
body.theme-forest .ba-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -70px;
  top: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

body.theme-forest .section-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: center;
}

body.theme-forest .section-hero-head h2,
body.theme-forest .dashboard-intro h1,
body.theme-forest .ba-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(21px, 2.5vw, 31px);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

body.theme-forest .section-hero-head p,
body.theme-forest .dashboard-intro p,
body.theme-forest .ba-hero .muted {
  margin: 9px 0 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

body.theme-forest .section-hero .eyebrow,
body.theme-forest .dashboard-intro .eyebrow,
body.theme-forest .ba-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* --- kotak angka di dalam hero --- */
body.theme-forest .section-hero-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

body.theme-forest .hero-chip,
body.theme-forest .ba-stat {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 78px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.15);
}

body.theme-forest .hero-chip small,
body.theme-forest .ba-stat span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.theme-forest .hero-chip strong,
body.theme-forest .ba-stat strong {
  color: #ffffff;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.1;
  word-break: break-word;
}

/* --- tombol yang berada di atas hero --- */
body.theme-forest .dashboard-intro .btn,
body.theme-forest .section-hero .btn {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: none;
}

body.theme-forest .dashboard-intro .btn:hover,
body.theme-forest .section-hero .btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

/* --- panel & kartu isi --- */
body.theme-forest .panel,
body.theme-forest .card,
body.theme-forest .field-card {
  border-radius: 20px;
  border: 1px solid #e8eef3;
  box-shadow: 0 12px 30px rgba(20, 45, 35, 0.06);
}

body.theme-forest .panel .panel-header {
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eef2f6;
}

body.theme-forest .panel .panel-header h3 {
  position: relative;
  padding-left: 12px;
  font-size: 15px;
}

body.theme-forest .panel .panel-header h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.05em;
  border-radius: 999px;
  background: var(--page-accent);
}

/* --- kartu statistik --- */
body.theme-forest .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

body.theme-forest .stat {
  border-radius: 20px;
  border: 1px solid #e8eef3;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
}

body.theme-forest .stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px 0 0 999px;
  background: var(--page-accent);
  opacity: 0.85;
}

body.theme-forest .stat::after {
  background: var(--page-tint);
  opacity: 1;
}

body.theme-forest .stat-label {
  color: var(--page-accent);
  opacity: 0.9;
}

/* --- header halaman & tabel --- */
body.theme-forest .page-header {
  margin-bottom: 18px;
}

body.theme-forest .table thead th {
  background: #f6f9fb;
  color: #46586b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #e3eaf1;
}

body.theme-forest .table tbody tr:nth-child(even) td {
  background: rgba(246, 249, 251, 0.6);
}

body.theme-forest .table tbody tr:hover td {
  background: var(--page-tint);
}

/* --- penyesuaian layar --- */
@media (max-width: 980px) {
  body.theme-forest .section-hero {
    grid-template-columns: 1fr;
  }

  body.theme-forest .section-hero-chips {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}

@media (max-width: 720px) {
  body.theme-forest .section-hero,
  body.theme-forest .dashboard-intro,
  body.theme-forest .ba-hero {
    margin: 16px 0 18px;
    border-radius: 18px;
  }

  body.theme-forest .dashboard-intro,
  body.theme-forest .ba-hero {
    flex-direction: column;
    align-items: stretch;
  }

  body.theme-forest .ba-hero-stats {
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  body.theme-forest .page-header {
    align-items: flex-start;
  }

  body.theme-forest .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 520px) {
  body.theme-forest .section-hero-chips,
  body.theme-forest .ba-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.theme-forest .hero-chip,
  body.theme-forest .ba-stat {
    min-height: 66px;
  }
}

/* Tabel lebar tetap terbaca di layar sempit: panel yang memuat tabel digulir mendatar. */
@media (max-width: 860px) {
  body.theme-forest .panel:has(.table) {
    overflow-x: auto;
  }

  body.theme-forest .panel .table {
    min-width: 560px;
  }
}

/* Baris tombol aksi di dalam kartu hero (mis. "Tambah User", "Menu Proses Survey"). */
body.theme-forest .section-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

body.theme-forest .section-hero-actions .btn {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: none;
}

body.theme-forest .section-hero-actions .btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* Halaman tanpa judul di luar kartu tidak perlu menyisakan ruang kosong. */
body.theme-forest .page-header:empty {
  display: none;
  margin: 0;
}

@media (max-width: 720px) {
  body.theme-forest .section-hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ---------------------------------------------------------------------------
   Panel GPS otomatis pada pengisian form petugas lapangan
   --------------------------------------------------------------------------- */
.gps-panel {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft, #d7e3dc);
  border-radius: 16px;
  background: linear-gradient(120deg, #f3faf6, #fbfdfc);
  box-shadow: 0 10px 24px rgba(27, 59, 45, 0.07);
}

.gps-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gps-panel-head strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.gps-panel-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: #9aa7b4;
  box-shadow: 0 0 0 4px rgba(154, 167, 180, 0.18);
}

.gps-panel-status {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-700, #41574c);
}

.gps-panel-detail {
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #4a6b5c;
  word-break: break-word;
}

.gps-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.gps-panel .inline-help {
  margin-top: 10px;
}

/* Warna indikator mengikuti status yang ditulis geo-utm.js pada panel. */
.gps-panel[data-gps-state="siap"] .gps-panel-dot {
  background: #2f9e6f;
  box-shadow: 0 0 0 4px rgba(47, 158, 111, 0.2);
}

.gps-panel[data-gps-state="peringatan"] .gps-panel-dot {
  background: var(--amber, #f4a844);
  box-shadow: 0 0 0 4px rgba(244, 168, 68, 0.22);
}

.gps-panel[data-gps-state="gagal"] .gps-panel-dot {
  background: #d1544f;
  box-shadow: 0 0 0 4px rgba(209, 84, 79, 0.2);
}

.gps-panel[data-gps-state="menunggu"] .gps-panel-dot,
.gps-panel[data-gps-state="mencari"] .gps-panel-dot {
  animation: gps-pulse 1.4s ease-in-out infinite;
}

@keyframes gps-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Kolom yang baru diisi GPS diberi tanda agar mudah dibedakan dari isian tangan. */
input[data-gps-autofill="1"] {
  border-color: #9ad3b8;
  background: #f4fbf7;
}

@media (max-width: 640px) {
  .gps-panel-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
