/* ============================================================
   app.css — METEOR
   Mobile-first PWA: login, navigasi, laporan, user management
   ============================================================ */

/* ---------- PWA & MOBILE SHELL ---------- */
html {
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  height: 100%;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* Safe area for notch devices */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- APP SHELL ---------- */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ---------- TOP BAR ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--sp-4);
  background: var(--brand);
  color: var(--on-brand);
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo svg {
  width: 28px;
  height: 28px;
}

.topbar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-subtitle {
  font-size: 0.7rem;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.topbar-btn {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: var(--r-sm);
  padding: 8px;
  color: white;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-btn:active {
  background: rgba(255,255,255,.3);
}

/* ---------- PAGE CONTAINER ---------- */
.page-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  will-change: opacity, transform;
}

.page.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 1;
}

.page.exit-left {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
}

.page-content {
  padding: var(--sp-4);
  padding-bottom: 100px; /* space for bottom nav */
}

/* ---------- BOTTOM NAVIGATION ---------- */
.bottom-nav {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 6px;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 40px;
  height: 3px;
  background: var(--brand);
  border-radius: 0 0 3px 3px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.nav-item.active {
  color: var(--brand);
}

.nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}

.nav-item.active svg {
  transform: scale(1.1);
}

.nav-item:active svg {
  transform: scale(0.9);
}

/* ---------- STATS GRID (Dashboard) ---------- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.stat-card.wide {
  grid-column: span 2;
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-card .stat-nilai {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.stat-card .stat-nilai.positif {
  color: var(--ok);
}

.stat-card .stat-nilai.brand {
  color: var(--brand);
}

/* ---------- MAP ---------- */
.map-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.map-wrap.admin-map {
  height: 280px;
}

.map-wrap.lokasi-map {
  height: 240px;
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

.section-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.section-action:active {
  background: var(--brand-soft);
}

/* ---------- TITIK LIST ---------- */
.titik-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}

.titik-item:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

.titik-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.titik-info {
  flex: 1;
  min-width: 0;
}

.titik-kode {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.titik-area {
  font-size: 0.82rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titik-right {
  text-align: right;
  flex-shrink: 0;
}

.titik-harga {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

/* ---------- FORM STYLING ---------- */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: var(--sp-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input-row {
  display: flex;
  gap: var(--sp-2);
}

.input-row .input {
  flex: 1;
}

/* File upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}

.upload-area:active {
  background: var(--surface-alt);
  border-color: var(--brand);
}

.upload-area input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-area svg {
  color: var(--text-3);
  margin-bottom: var(--sp-2);
}

.upload-area span {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- ORDER PAGE (PUBLIK) ---------- */
.order-header {
  text-align: center;
  padding: var(--sp-3) 0 var(--sp-4);
}

.order-header h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.order-area {
  font-size: 0.88rem;
  color: var(--text-2);
}

.countdown-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.countdown-row .countdown {
  font-size: 1.1rem;
  padding: 8px var(--sp-4);
}

.rekening-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

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

.rekening-bank {
  font-size: 0.82rem;
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rekening-nomor {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 4px 0;
}

.rekening-nama {
  font-size: 0.85rem;
  color: var(--text-2);
}

.btn-salin {
  padding: 8px 14px;
  font-size: 0.82rem;
}

/* ---------- LOKASI PAGE ---------- */
.watermark-bar {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: var(--sp-2) 0;
}

.petunjuk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.petunjuk-card h3 {
  margin-bottom: var(--sp-3);
  font-size: 0.95rem;
}

.petunjuk-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.foto-lokasi {
  width: 100%;
  border-radius: var(--r-md);
  margin-top: var(--sp-3);
}

.action-btns {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.btn-sukses {
  background: var(--ok);
  color: white;
  border: none;
}

.btn-sukses:active {
  filter: brightness(0.9);
}

.btn-bahaya {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

.btn-bahaya:active {
  background: rgba(250,56,62,.08);
}

/* ---------- REVIEW PANEL ---------- */
.review-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
}

.review-nominal {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

.review-detail {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: var(--sp-3);
  line-height: 1.5;
}

.review-actions {
  display: flex;
  gap: var(--sp-2);
}

.review-actions .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 8px;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-3);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-3);
  opacity: .4;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ---------- TOAST NOTIFICATION ---------- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--abu-800);
  color: white;
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  z-index: 1000;
  opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- MODAL / SHEET ---------- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  z-index: 201;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  max-height: 85vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--abu-300);
  border-radius: 2px;
  margin: var(--sp-3) auto var(--sp-2);
}

.sheet-content {
  padding: var(--sp-3) var(--sp-5) var(--sp-5);
}

/* ---------- PULSE DOT ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.dot-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ---------- SKELETON LOADING ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--abu-100) 25%, var(--abu-50) 50%, var(--abu-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ---------- RIPPLE EFFECT ---------- */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(0,0,0,.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}

.ripple:active::after {
  opacity: 1;
}

/* ---------- SCROLL ENHANCEMENTS ---------- */
.page {
  scrollbar-width: thin;
  scrollbar-color: var(--abu-300) transparent;
}

.page::-webkit-scrollbar {
  width: 4px;
}

.page::-webkit-scrollbar-track {
  background: transparent;
}

.page::-webkit-scrollbar-thumb {
  background: var(--abu-300);
  border-radius: 2px;
}

/* ---------- PULL-TO-REFRESH INDICATOR ---------- */
.pull-indicator {
  text-align: center;
  padding: var(--sp-3);
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 600;
  display: none;
}

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: var(--brand);
  color: var(--on-brand);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(201,69,43,.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s;
}

.fab:active {
  transform: scale(0.9);
}

.fab svg {
  width: 24px;
  height: 24px;
}

/* Hide FAB on non-dashboard pages */
.fab.hidden {
  transform: scale(0);
  pointer-events: none;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 768px) {
  .page-content {
    max-width: 480px;
    margin: 0 auto;
  }

  .map-wrap.admin-map {
    height: 350px;
  }
}

/* ---------- MULTI-PHOTO UPLOAD GRID ---------- */
.foto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.foto-add {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  background: var(--surface-alt);
}

.foto-add:active {
  background: var(--border);
  border-color: var(--brand);
}

.foto-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.foto-add svg {
  color: var(--text-3);
}

.foto-add span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  padding: 0 4px;
}

.foto-add.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.foto-thumb {
  aspect-ratio: 1;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.foto-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.foto-thumb-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  padding: 0;
}

.foto-thumb-delete:active {
  background: var(--error);
}

.foto-thumb-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.55);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
}

.foto-counter {
  margin-top: var(--sp-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
}

.foto-counter.warning {
  color: var(--error);
}

.foto-counter.ok {
  color: var(--ok);
}

/* ---------- PHOTO GALLERY (LOKASI PAGE) ---------- */
.foto-gallery {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-top: var(--sp-3);
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}

.foto-gallery::-webkit-scrollbar {
  display: none;
}

.foto-gallery-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: var(--r-md);
  object-fit: cover;
  width: 100%;
  height: auto;
  max-height: 280px;
}

.foto-gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--sp-3) 0 var(--sp-1);
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--abu-300);
  transition: background .25s, transform .25s;
}

.gallery-dot.active {
  background: var(--brand);
  transform: scale(1.3);
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--abu-900);
  transition: opacity .5s, transform .5s;
}

.login-screen.hidden {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(201,69,43,.35) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: loginPulse 4s ease-in-out infinite;
}

@keyframes loginPulse {
  0%, 100% { opacity: .6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

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

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: var(--sp-5);
}

.login-brand {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.login-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-4);
}

.login-icon svg {
  width: 100%;
  height: 100%;
}

.login-title {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: white;
  margin: 0;
}

.login-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,.5);
  margin: 6px 0 0;
  letter-spacing: 0.02em;
}

.login-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.login-card-header {
  margin-bottom: var(--sp-5);
}

.login-card-header h2 {
  color: white;
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.login-card-header p {
  color: rgba(255,255,255,.45);
  font-size: 0.85rem;
  margin: 0;
}

.login-card .form-group {
  margin-bottom: var(--sp-4);
}

.login-card label {
  color: rgba(255,255,255,.6);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap svg {
  position: absolute;
  left: 12px;
  color: rgba(255,255,255,.35);
  pointer-events: none;
  z-index: 1;
}

.login-input-wrap .input {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: white;
  padding-left: 40px;
  font-size: 0.95rem;
}

.login-input-wrap .input::placeholder {
  color: rgba(255,255,255,.25);
}

.login-input-wrap .input:focus {
  border-color: var(--bata-500);
  background: rgba(255,255,255,.1);
}

.login-eye {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  cursor: pointer;
  padding: 6px;
  z-index: 1;
}

.login-eye:active {
  color: rgba(255,255,255,.7);
}

.login-error {
  font-size: 0.85rem;
  color: #FA383E;
  font-weight: 600;
  min-height: 20px;
  margin-bottom: var(--sp-3);
  text-align: center;
}

.login-btn {
  font-size: 1.05rem;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bata-500);
  color: white;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background .2s, transform .15s;
}

.login-btn:active {
  transform: scale(0.97);
}

.login-footer {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-4);
  font-size: 0.75rem;
  color: rgba(255,255,255,.25);
}

/* ============================================================
   REPORT / LAPORAN
   ============================================================ */
.report-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.report-tab {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s, color .2s;
}

.report-tab.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 2px 6px rgba(201,69,43,.25);
}

.report-panel {
  display: none;
}

.report-panel.active {
  display: block;
  animation: fadeSlideIn .3s ease;
}

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

.report-period-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
  font-weight: 700;
  font-size: 0.95rem;
}

.report-date {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text-2);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.report-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.report-summary-label {
  font-size: 0.78rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 6px;
}

.report-summary-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.report-compare {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
}

.report-compare.naik {
  background: #E6F9EE;
  color: #1F9D55;
}

.report-compare.turun {
  background: #FFEBEE;
  color: #C0271D;
}

.report-vs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.report-vs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--divider);
}

.report-vs-date {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-2);
}

.report-vs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.9rem;
}

.report-vs-row span:first-child {
  color: var(--text-2);
}

.report-vs-row span:last-child {
  font-weight: 700;
}

/* Chart bars */
.report-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.report-chart-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--sp-4);
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

.chart-bar-track {
  height: 28px;
  background: var(--surface-alt);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.chart-bar-fill {
  height: 100%;
  border-radius: var(--r-sm);
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

.chart-bar-fill.current {
  background: var(--brand);
}

.chart-bar-fill.prev {
  background: var(--abu-300);
}

.chart-bar-value {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Report table */
.report-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-4);
}

.report-table-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--sp-3);
}

.report-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.report-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.report-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}

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

.report-table .badge {
  font-size: .68rem;
  padding: 2px 8px;
}

/* ============================================================
   USER MANAGEMENT
   ============================================================ */
.user-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.user-meta {
  font-size: 0.8rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.user-role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-role.admin {
  background: var(--brand-soft);
  color: var(--brand);
}

.user-role.operator {
  background: #E7F3FF;
  color: #1877F2;
}

.user-delete {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}

.user-delete:active {
  color: var(--error);
  background: #FFEBEE;
}
