/* ==========================================================================
   PILAH. — DESAIN MODERN MAKASSAR (PENGGUNA & VERIFIKATOR)
   "Langkah kecil, bumi lebih baik."
   ========================================================================== */

:root {
  --bg-page: #e9eee7;
  --bg-app: #f7f9f6;
  --dark-green: #163828;
  --dark-green-soft: #214e39;
  --lime: #c8f169;
  --lime-bright: #a3e635;
  --surface-white: #ffffff;
  --surface-sage: #e7efe3;
  --surface-cream: #f4ede2;
  --text-main: #14261c;
  --text-muted: #64746b;
  --border-soft: #dfe7dc;
  --organik-color: #16a34a;
  --organik-bg: #dcfce7;
  --anorganik-color: #0284c7;
  --anorganik-bg: #e0f2fe;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --content-max-width: 1080px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.45;
}

.app-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 42px rgba(22, 56, 40, 0.12);
  overflow-x: hidden;
}

/* ==================== VIEWS & SCREEN ANIMATION ==================== */
.view {
  display: none;
  flex: 1;
  padding: 20px 20px calc(80px + env(safe-area-inset-bottom, 20px) + 36px);
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view.active {
  display: flex;
  flex-direction: column;
}

.view.role-view.active {
  padding-bottom: 36px;
  justify-content: space-between;
}

.view-bottom-spacer {
  height: 40px;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}

/* Layar Kamera 100dvh agar shutter tidak pernah tertutup */
.view.scan-view.active {
  padding: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #11241a;
  color: #ffffff;
}

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

/* ==================== 0. PEMILIHAN PERAN ==================== */
.role-top-brand {
  margin-bottom: 12px;
}

.brand-logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark-green);
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-logo span {
  color: #65a30d;
}

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

.role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--surface-sage);
  color: var(--dark-green);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.role-hero h2 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--dark-green);
}

.role-hero p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.role-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.role-card {
  width: 100%;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  background: var(--surface-white);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.role-card:active {
  transform: scale(0.98);
}

.role-card.user-role {
  background: var(--lime);
  border-color: #a3e635;
}

.role-card.verifier-role {
  background: var(--surface-white);
  border-color: var(--border-soft);
}

.role-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(22, 56, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.role-icon-box.dark {
  background: var(--dark-green);
  color: #ffffff;
}

.role-card-body {
  flex: 1;
}

.role-card-body strong {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--dark-green);
}

.role-card-body span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 3px;
}

.role-arrow {
  font-size: 18px;
  color: var(--dark-green);
  font-weight: 800;
}

.btn-ghost-reset {
  background: none;
  border: 1px dashed var(--border-soft);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  transition: all 0.15s ease;
}

.btn-ghost-reset:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* ==================== 1. BERANDA ==================== */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chip-role-btn {
  background: var(--surface-sage);
  border: 1px solid var(--border-soft);
  color: var(--dark-green);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}

.chip-role-btn:hover {
  background: #d8e5d3;
}

.greeting-box {
  margin-bottom: 18px;
}

.greeting-box h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-green);
  line-height: 1.28;
}

.greeting-box p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.points-card {
  background: linear-gradient(145deg, #163828 0%, #214e39 100%);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(22, 56, 40, 0.22);
  margin-bottom: 16px;
}

.points-card.compact {
  padding: 16px 20px;
}

.points-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.points-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.points-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}

.points-number {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.points-unit {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime);
}

.btn-lime-pill {
  background: var(--lime);
  color: var(--dark-green);
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(200, 241, 105, 0.35);
  transition: transform 0.15s ease;
}

.btn-lime-pill:active {
  transform: scale(0.96);
}

.points-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.pending-pill {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: #fef08a;
}

.scan-banner {
  width: 100%;
  background: linear-gradient(135deg, #c8f169 0%, #a3e635 100%);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(200, 241, 105, 0.3);
  margin-bottom: 22px;
  text-align: left;
  transition: transform 0.15s ease;
}

.scan-banner:active {
  transform: scale(0.98);
}

.scan-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 56, 40, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.scan-banner-text {
  flex: 1;
}

.scan-banner-text strong {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--dark-green);
}

.scan-banner-text span {
  font-size: 11.5px;
  color: var(--dark-green-soft);
}

.scan-banner-arrow {
  font-size: 20px;
  color: var(--dark-green);
  font-weight: 800;
}

.section-block {
  margin-bottom: 20px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark-green);
  margin-bottom: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-card {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:active {
  transform: scale(0.98);
}

.category-card.organik {
  border-left: 4px solid var(--organik-color);
}

.category-card.anorganik {
  border-left: 4px solid var(--anorganik-color);
}

.category-card .cat-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.category-card strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.category-card p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.tips-card {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

.tips-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.tips-card strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

/* ==================== 2. KAMERA PEMINDAI ==================== */
.scan-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  z-index: 30;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.scan-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.scan-back-btn, .scan-help-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.scan-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}

.scan-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.camera-stage {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 32px 24px;
  background: #11241a;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 20;
}

.camera-fallback-content {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fallback-icon {
  font-size: 48px;
  margin-bottom: 2px;
}

.camera-fallback-content h3 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.camera-fallback-content p {
  font-size: 12px;
  color: #a7f3d0;
  line-height: 1.5;
}

.fallback-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.fallback-actions label {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
}

.btn-retry-cam {
  background: none;
  border: none;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  padding: 6px 12px;
}

.scanner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  gap: 16px;
}

.scanner-pill-top, .scanner-pill-bottom {
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
}

.scanner-frame {
  position: relative;
  width: 240px;
  height: 240px;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  border-radius: 20px;
}

.scanner-frame .corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--lime);
  border-style: solid;
}
.scanner-frame .corner.tl { top: -2px; left: -2px; border-width: 4px 0 0 4px; border-top-left-radius: 10px; }
.scanner-frame .corner.tr { top: -2px; right: -2px; border-width: 4px 4px 0 0; border-top-right-radius: 10px; }
.scanner-frame .corner.bl { bottom: -2px; left: -2px; border-width: 0 0 4px 4px; border-bottom-left-radius: 10px; }
.scanner-frame .corner.br { bottom: -2px; right: -2px; border-width: 0 4px 4px 0; border-bottom-right-radius: 10px; }

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #c8f169, transparent);
  box-shadow: 0 0 10px #c8f169;
  animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 5%; opacity: 0.2; }
  50% { opacity: 1; }
  100% { top: 95%; opacity: 0.2; }
}

.scan-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 36, 26, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  gap: 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 24px;
}

.scan-loading[hidden],
.scan-loading.hidden {
  display: none !important;
}

.btn-cancel-scan {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-cancel-scan:hover {
  background: rgba(255, 255, 255, 0.25);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(200, 241, 105, 0.2);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.scan-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom, 0px)) 24px;
  z-index: 30;
  text-align: center;
}

.scan-controls-title strong {
  display: block;
  font-size: 14.5px;
  color: #ffffff;
}

.scan-controls-title span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.shutter-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 14px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.shutter-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.shutter-inner {
  width: 100%;
  height: 100%;
  background: var(--lime);
  border-radius: 50%;
  transition: transform 0.1s ease;
}

.shutter-btn:active .shutter-inner {
  transform: scale(0.9);
}

.side-cam-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-size: 11px;
  cursor: pointer;
  background: none;
  border: none;
}

.side-cam-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
}

/* ==================== 3. HASIL IDENTIFIKASI ==================== */
.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  color: var(--dark-green);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sub-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark-green);
}

.result-image-box {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: 380px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #11241a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#result-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.recycle-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(22, 56, 40, 0.88);
  backdrop-filter: blur(8px);
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.result-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.category-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.cat-pill.anorganik {
  background: var(--anorganik-bg);
  color: var(--anorganik-color);
}

.cat-pill.organik {
  background: var(--organik-bg);
  color: var(--organik-color);
}

.edit-cat-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  color: #15803d;
  cursor: pointer;
}

.confidence-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.result-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark-green);
  line-height: 1.25;
}

.result-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}

.result-fun-fact-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
}

.fun-fact-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #15803d;
  margin-bottom: 4px;
}

.fun-fact-body {
  font-size: 12px;
  color: #166534;
  line-height: 1.4;
}

.prep-section {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
}

.prep-section h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark-green);
  margin-bottom: 8px;
}

.prep-list {
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.estimasi-box {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.estimasi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.estimasi-rate {
  font-size: 17px;
  font-weight: 800;
  color: #15803d;
  margin-top: 2px;
}

.estimasi-note {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--organik-bg);
  color: #15803d;
}

.helper-caption {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.btn-primary-full {
  width: 100%;
  background: var(--dark-green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 56, 40, 0.25);
  transition: transform 0.15s ease;
}

.btn-primary-full:active {
  transform: scale(0.98);
}

.btn-text-retry {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  margin-top: 4px;
}

/* ==================== 4. SETOR SAMPAH & LOKASI MAKASSAR ==================== */
.stepper-bar {
  display: flex;
  justify-content: space-between;
  background: var(--surface-white);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  border: 1px solid var(--border-soft);
  margin-bottom: 16px;
}

.step {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.step.active {
  color: var(--dark-green);
}

.deposit-intro h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-green);
}

.deposit-intro p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  margin-bottom: 14px;
}

.deposit-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
}

#deposit-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-sage);
}

.deposit-item-info {
  flex: 1;
}

.deposit-item-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.deposit-item-info span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-small-outline {
  background: none;
  border: 1px solid var(--border-soft);
  color: var(--dark-green);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

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

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

.weight-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  border: 1px solid var(--border-soft);
}

.weight-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface-sage);
  font-size: 18px;
  font-weight: 800;
  color: var(--dark-green);
  cursor: pointer;
}

.weight-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

#weight-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--dark-green);
}

.weight-display small {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.method-card {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1.5px solid var(--border-soft);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.method-card.active {
  border-color: var(--dark-green);
  background: #f0fdf4;
}

.method-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 20px;
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dark-green);
  color: #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.method-card.active .check-dot {
  opacity: 1;
}

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

.method-card small {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Lokasi Makassar */
.bank-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bank-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.loc-btn {
  background: var(--lime);
  color: var(--dark-green);
  border: none;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.maps-badge-link {
  font-size: 11px;
  font-weight: 700;
  color: #0369a1;
  text-decoration: none;
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.geo-status {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.bank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.bank-item {
  background: var(--surface-white);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.bank-item.selected {
  border-color: var(--dark-green);
  background: #f0fdf4;
}

.bank-item-info strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-main);
}

.bank-item-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.bank-distance-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #15803d;
  background: var(--organik-bg);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.deposit-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  margin-bottom: 16px;
  font-size: 13px;
}

.deposit-summary-row strong {
  color: #15803d;
  font-size: 16px;
}

/* ==================== 5. HADIAH & VOUCHER ==================== */
.rewards-header {
  margin-bottom: 14px;
}

.rewards-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-green);
}

.rewards-header p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.rewards-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 10px 0;
}

.rewards-filter-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark-green);
}

.link-btn {
  background: none;
  border: none;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.filter-pill {
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--dark-green);
  color: #ffffff;
  border-color: var(--dark-green);
}

.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.reward-card {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

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

.btn-redeem {
  background: var(--lime);
  color: var(--dark-green);
  border: none;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

.btn-redeem:disabled {
  background: var(--surface-sage);
  color: var(--text-muted);
  cursor: not-allowed;
}

.promo-footer-note {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-sage);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  line-height: 1.4;
}

/* ==================== 6. PANEL VERIFIKATOR ==================== */
.verifier-summary-card {
  background: linear-gradient(145deg, #163828 0%, #214e39 100%);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.verifier-big-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--lime);
  margin-top: 2px;
}

.verifier-queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verifier-card {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1.5px solid var(--border-soft);
}

.verifier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.verifier-ticket-tag {
  font-size: 11px;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 4px;
}

.verifier-card-body {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.verifier-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-sage);
}

.verifier-meta strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.verifier-meta span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.verifier-inputs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.verifier-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  outline: none;
}

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

.btn-approve {
  flex: 1;
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 800;
  padding: 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.btn-reject {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.btn-danger-outline {
  width: 100%;
  background: none;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 24px;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

/* ==================== 7. PROFIL ==================== */
.profile-card {
  background: var(--surface-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-soft);
  text-align: center;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 10px auto;
}

.profile-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark-green);
}

.profile-card p {
  font-size: 12px;
  color: var(--text-muted);
}

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

.stat-box {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  border: 1px solid var(--border-soft);
  text-align: center;
}

.stat-box span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--dark-green);
}

.stat-box small {
  font-size: 10.5px;
  color: var(--text-muted);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.history-pts {
  font-size: 13px;
  font-weight: 800;
  color: #15803d;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: calc(68px + env(safe-area-inset-bottom, 12px));
  padding-bottom: env(safe-area-inset-bottom, 12px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 24px rgba(22, 56, 40, 0.08);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bottom-nav.hidden {
  display: none !important;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-item.active {
  color: var(--dark-green);
  font-weight: 800;
}

.nav-icon {
  font-size: 19px;
}

/* ==================== MODAL VOUCHER & PILIHAN MATERIAL ==================== */
.material-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px 0;
}

.material-choice-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.material-choice-btn:hover,
.material-choice-btn:active {
  border-color: var(--dark-green);
  background: var(--surface-sage);
  transform: scale(0.99);
}

.material-choice-btn .m-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sage);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.material-choice-btn strong {
  display: block;
  font-size: 13px;
  color: var(--dark-green);
  font-weight: 700;
}

.material-choice-btn small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 36, 26, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px 36px 20px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

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

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

.close-modal-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.my-vouchers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voucher-item-box {
  background: var(--surface-sage);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px dashed #15803d;
}

.voucher-code-badge {
  display: inline-block;
  background: var(--dark-green);
  color: var(--lime);
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ==================== AUTHENTICATION & LOGIN MODAL ==================== */
.modal-sheet.auth-sheet {
  max-width: 440px;
}

.modal-header-icon-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--dark-green);
  color: var(--lime);
  border-radius: var(--radius-sm);
  font-size: 20px;
  flex-shrink: 0;
}

.modal-header-icon-title h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark-green);
  line-height: 1.2;
}

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

.form-select,
.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  background: #ffffff;
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--dark-green);
  box-shadow: 0 0 0 3px rgba(22, 56, 40, 0.12);
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper .form-input {
  padding-right: 44px;
}

.toggle-pwd-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.toggle-pwd-btn:hover {
  opacity: 1;
}

.auth-error-msg {
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  margin-top: 6px;
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-error {
  animation: shake 0.35s ease;
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

.passcode-hint-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
  color: #166534;
}

.hint-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hint-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hint-list li {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.hint-list code {
  background: #dcfce7;
  color: #14532d;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  font-size: 11px;
}

.hint-footer {
  display: block;
  font-size: 10px;
  color: #15803d;
  border-top: 1px dashed #bbf7d0;
  padding-top: 6px;
  margin-top: 4px;
}

.hint-footer code {
  background: #dcfce7;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-green);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 120;
  display: none;
  white-space: nowrap;
}

.toast.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ==================== DESKTOP & LAYAR KOMPUTER ==================== */
@media (min-width: 769px) {
  body {
    background-color: #dce5da;
    padding: 24px 20px 36px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .app-shell {
    max-width: var(--content-max-width, 1080px);
    width: 100%;
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(22, 56, 40, 0.16);
    overflow: hidden;
  }

  .view {
    padding: 28px 36px calc(90px + 36px);
  }

  .role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .rewards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }

  .verifier-queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }

  .history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }

  .method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 500px;
    max-width: 90vw;
    bottom: 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
    box-shadow: 0 16px 36px rgba(22, 56, 40, 0.18);
    height: 68px;
    padding-bottom: 0;
  }

  .modal-sheet {
    border-radius: var(--radius-lg);
    margin: auto;
    max-width: 520px;
  }
}
