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

:root {
  --bg:        #111318;
  --surface:   #1C1E23;
  --surface2:  #25282F;
  --border:    rgba(255,255,255,0.10);
  --primary:   #4CAF50;
  --primary-d: #2E7D32;
  --primary-c: #C8E6C9;
  --on-pri:    #fff;
  --text:      #E8EAED;
  --text2:     #9AA0A6;
  --error:     #F28B82;
  --warn:      #FDD663;
  --info:      #82B1FF;
  --radius:    12px;
  --radius-s:  8px;
  --trans:     0.22s ease;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

/* ── App shell ───────────────────────────────────────────────────────────── */
#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── Screens ─────────────────────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transform: translateX(30px);
  transition: opacity var(--trans), transform var(--trans);
  pointer-events: none;
  overflow: hidden;
}
.screen.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.screen.leaving {
  opacity: 0;
  transform: translateX(-30px);
}

/* ── App bar ─────────────────────────────────────────────────────────────── */
.app-bar {
  display: flex;
  align-items: center;
  padding: 0 8px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top);
}
.app-bar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  margin-left: 4px;
}
.app-bar-sub {
  font-size: 11px;
  color: var(--text2);
  margin-left: 4px;
}
.icon-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none; background: none; color: var(--text);
  cursor: pointer; flex-shrink: 0;
  transition: background var(--trans);
}
.icon-btn:active { background: rgba(255,255,255,0.1); }

/* ── Scroll content ──────────────────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--trans);
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary);
}
.form-input::placeholder { color: var(--text2); }
.form-select option { background: var(--surface2); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px;
  border-radius: var(--radius-s); border: none;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--trans);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-primary { background: var(--primary-d); color: var(--on-pri); }
.btn-primary:active { background: #1B5E20; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:active { background: rgba(76,175,80,0.08); }
.btn-danger { background: #c62828; color: #fff; }
.btn-sm {
  width: auto; padding: 8px 16px;
  font-size: 13px;
}
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.btn-file { cursor: pointer; margin: 0; }

/* ── Chips ───────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.chip-green  { background: rgba(76,175,80,0.15); color: #81C784; }
.chip-amber  { background: rgba(255,193,7,0.15);  color: #FFD54F; }
.chip-blue   { background: rgba(130,177,255,0.15); color: var(--info); }
.chip-orange { background: rgba(255,152,0,0.15);   color: #FFB74D; }
.chip-red    { background: rgba(239,83,80,0.15);   color: #EF9A9A; }

/* ── Login screen ────────────────────────────────────────────────────────── */
#screen-login {
  justify-content: center;
  padding: 32px 24px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 8px;
}
.login-logo h1 {
  font-size: 24px; font-weight: 700; color: var(--primary);
}
.login-logo p {
  font-size: 13px; color: var(--text2); margin-top: 4px;
}

/* ── Home screen ─────────────────────────────────────────────────────────── */
.home-menu {
  display: grid;
  gap: 12px;
  padding: 20px 16px;
}
.home-menu-btn {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all var(--trans);
  text-align: left;
}
.home-menu-btn:active { background: var(--surface2); transform: scale(0.98); }
.home-menu-icon {
  font-size: 32px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(76,175,80,0.12);
  border-radius: var(--radius-s);
}
.home-menu-text h3 { font-size: 16px; font-weight: 600; }
.home-menu-text p  { font-size: 12px; color: var(--text2); margin-top: 3px; }

/* ── Riwayat list ────────────────────────────────────────────────────────── */
.tx-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.tx-item-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 6px;
}
.tx-item-supplier { font-weight: 600; font-size: 15px; }
.tx-item-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tx-item-date { font-size: 12px; color: var(--text2); }

/* ── Camera screen ───────────────────────────────────────────────────────── */
#screen-camera {
  background: #000;
  position: fixed;
  z-index: 100;
}
.camera-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.camera-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.camera-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.cam-badge {
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cam-badge.mono { font-family: monospace; }
.cam-badge.grade-super { background: rgba(255,193,7,0.75); color: #000; font-weight: 700; }
.cam-badge.grade-ab    { background: rgba(100,221,23,0.75); color: #000; font-weight: 700; }
.cam-badge.grade-bc    { background: rgba(255,152,0,0.75);  color: #000; font-weight: 700; }

.capture-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--trans);
  flex-shrink: 0;
}
.capture-btn:active { background: rgba(255,255,255,0.4); transform: scale(0.93); }
.capture-btn.loading { background: rgba(255,255,255,0.35); pointer-events: none; }

/* ── Review screen ───────────────────────────────────────────────────────── */
#screen-review {
  background: #000;
  flex-direction: row;
  position: fixed;
  z-index: 100;
}
.review-side {
  width: 80px;
  flex-shrink: 0;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  overflow-y: auto;
  padding-top: calc(8px + env(safe-area-inset-top));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.review-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#review-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.side-chip {
  width: 64px;
  padding: 6px 4px;
  border-radius: var(--radius-s);
  border: 1px solid;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--trans);
  font-size: 10px; font-weight: 600;
  text-align: center;
  line-height: 1.2;
}
.side-chip svg, .side-chip .chip-icon { font-size: 15px; }
.side-chip.green  { background: rgba(76,175,80,0.15); border-color: rgba(76,175,80,0.4);  color: #81C784; }
.side-chip.amber  { background: rgba(255,193,7,0.15);  border-color: rgba(255,193,7,0.4);  color: #FFD54F; }
.side-chip.blue   { background: rgba(82,130,255,0.15); border-color: rgba(82,130,255,0.4); color: #82B1FF; }
.side-chip.orange { background: rgba(255,152,0,0.15);  border-color: rgba(255,152,0,0.4);  color: #FFB74D; }
.side-chip.cyan   { background: rgba(0,229,255,0.12);  border-color: rgba(0,229,255,0.3);  color: #80DEEA; }
.side-chip.red-del {
  width: 44px; height: 44px; padding: 0;
  background: rgba(198,40,40,0.15); border-color: rgba(198,40,40,0.4); color: #EF9A9A;
  justify-content: center; border-radius: 8px;
}
.side-divider { width: 48px; height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0 8px; }
.side-spacer { flex: 1; }

.save-btn {
  width: 80px;
  padding: 20px 0;
  background: var(--primary-d);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--trans);
  font-weight: 700; font-size: 13px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
  border: none;
}
.save-btn:active  { background: #1B5E20; }
.save-btn.loading { background: #1B5E20; pointer-events: none; }
.retake-btn {
  width: 64px;
  padding: 8px 0;
  border-radius: var(--radius-s);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  font-size: 9px; font-weight: 600;
  margin-bottom: 8px;
  transition: all var(--trans);
}
.retake-btn:active { background: rgba(255,255,255,0.15); }

/* ── Konfirmasi screen ───────────────────────────────────────────────────── */
.sess-card {
  background: var(--surface2);
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.sess-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(76,175,80,0.2);
  color: #81C784;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.sess-info { flex: 1; }
.sess-title { font-weight: 600; font-size: 14px; }
.sess-sub   { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.n-log      { font-size: 18px; font-weight: 700; color: var(--info); line-height: 1; }
.n-log-u    { font-size: 11px; color: var(--text2); }
.n-vol      { font-size: 18px; font-weight: 700; color: #81C784; line-height: 1; }
.n-vol-u    { font-size: 11px; color: var(--text2); }
.n-sep      { font-size: 11px; color: var(--border); margin: 0 4px; }
.total-card {
  background: rgba(46,125,50,0.15);
  border: 1.5px solid rgba(76,175,80,0.35);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  display: flex; align-items: center; gap: 12px;
}
.total-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: #81C784; text-transform: uppercase;
}
.total-value { font-size: 20px; font-weight: 700; color: #A5D6A7; }

/* ── Toast / Snackbar ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px; right: 16px;
  background: #323232;
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  font-size: 14px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #2E7D32; }
.toast.error   { background: #B71C1C; }
.toast.warn    { background: #E65100; }

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.65);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  font-size: 14px; color: #fff;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.loading-overlay.hidden { display: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Dialog ──────────────────────────────────────────────────────────────── */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.dialog-backdrop.hidden { display: none; }
.dialog-backdrop.center { align-items: center; padding: 24px; }
.dialog {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px;
  width: 100%; max-width: 480px;
  animation: slideUp 0.25s ease;
}
.dialog-backdrop.center .dialog {
  border-radius: var(--radius);
  animation: fadeIn 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes fadeIn  { from { opacity: 0; transform: scale(0.96); } }
.dialog-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.dialog h3 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.dialog p, .dialog .msg { font-size: 13px; color: var(--text2); margin-bottom: 16px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.dialog-actions .btn { flex: 1; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.hint-badge {
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.8);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.info-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2);
  margin-top: 6px;
}
.section-label {
  font-size: 12px; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 600; margin-bottom: 8px;
}
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Landscape hint for camera ───────────────────────────────────────────── */
.landscape-hint {
  position: absolute; inset: 0; z-index: 10;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; color: #fff; font-size: 15px; text-align: center; padding: 24px;
}
.landscape-hint-icon { font-size: 48px; }

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── New UX Components ──────────────────────────────────────────────────── */

/* Password toggle */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .form-input {
  padding-right: 44px;
}
.input-suffix-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  transition: color var(--trans);
}
.input-suffix-btn:hover { color: var(--text); }

/* Field validation */
.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  min-height: 16px;
}
.field-hint {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}
.required-star { color: var(--error); }

/* Supplier loading */
.input-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
  padding: 10px 0;
}
.mini-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Progress steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}
.step {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  background: var(--surface2);
  border: 2px solid var(--border);
  color: var(--text2);
  flex-shrink: 0;
}
.step.active {
  background: var(--primary-d);
  border-color: var(--primary);
  color: #fff;
}
.step.done {
  background: rgba(76,175,80,0.15);
  border-color: var(--primary);
  color: var(--primary);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 40px;
}

/* Session summary */
.sessi-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
}
.sessi-summary-label { font-size: 12px; color: var(--text2); }
.sessi-summary-count { font-size: 15px; font-weight: 700; color: var(--primary); }

/* Camera GPS badge */
.cam-gps { display: flex; align-items: center; gap: 4px; transition: all var(--trans); }
.cam-gps.ok    { background: rgba(76,175,80,0.7); color: #fff; }
.cam-gps.fail  { background: rgba(220,38,38,0.7); color: #fff; }
.cam-gps.loading { background: rgba(0,0,0,0.55); }

/* Capture flash */
.capture-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 50;
  pointer-events: none;
}
.capture-flash.flash {
  animation: flash-anim 0.25s ease-out forwards;
}
@keyframes flash-anim {
  0%   { opacity: 0; }
  20%  { opacity: 0.85; }
  100% { opacity: 0; }
}

/* Camera permission overlay */
.cam-overlay-full {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cam-overlay-full.hidden {
  display: none;
}
.cam-perm-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
}
.cam-perm-icon { font-size: 56px; margin-bottom: 12px; display: block; }
.cam-perm-box h3 { font-size: 18px; margin-bottom: 8px; }
.cam-perm-box p { font-size: 13px; color: var(--text2); margin-bottom: 16px; line-height: 1.5; }
.cam-perm-steps { text-align: left; margin-bottom: 8px; }
.perm-step {
  font-size: 12.5px; color: var(--text2);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 8px;
}
.perm-step:last-child { border-bottom: none; }

/* AI chip */
.ai-chip { margin-bottom: 8px; }

/* Review loading overlay */
.review-loading-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; z-index: 10;
}
.review-loading-text { font-size: 13px; color: #fff; }

/* Dialog buttons */
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 20px;
  border-radius: var(--radius-s); border: none;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--trans);
  text-decoration: none;
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:active { transform: scale(0.97); }
.btn-whatsapp:hover { background: #1fb855; }

.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px 20px;
  border-radius: var(--radius-s); border: none;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all var(--trans);
  text-decoration: none;
  background: transparent;
  color: var(--text2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.dialog-icon-success { font-size: 48px; display: block; margin-bottom: 8px; }
.dialog-icon-warn    { font-size: 48px; display: block; margin-bottom: 8px; }
.dialog-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.dialog-sub  { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.mono-small { font-family: monospace; font-size: 11px; }

/* Riwayat item as button */
.tx-item-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: all var(--trans);
  display: block;
  text-decoration: none;
}
.tx-item-btn:hover { background: var(--surface2); }
.tx-item-btn:active { transform: scale(0.98); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}
.empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  opacity: .3;
}
.empty-icon svg { width: 40px; height: 40px; }
.empty-title { font-size: 15px; font-weight: 500; }
.empty-sub { font-size: 13px; margin-top: 4px; }

/* Error state in riwayat */
.error-state {
  text-align: center;
  padding: 24px;
  color: var(--error);
}
.error-state .err-msg { font-size: 13px; margin: 8px 0 16px; }

/* GPS ok badge */
.gps-ok { color: var(--primary); font-size: 12px; }

/* Detail screen */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.detail-id {
  font-family: monospace;
  font-size: 12px;
  color: var(--text2);
}
.sesi-card { margin-bottom: 10px; }
.sess-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.sess-card-title { font-size: 14px; font-weight: 600; }
.sess-card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text2);
  flex-wrap: wrap;
}
.sess-card-stats {
  display: flex;
  gap: 16px;
}
.stat-item { text-align: center; }
.stat-val {
  font-size: 18px; font-weight: 700;
  color: var(--info);
}
.stat-lbl {
  font-size: 10px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Camera back/close button */
.cam-back-btn {
  background: rgba(0,0,0,0.55) !important;
  border-radius: 8px !important;
}

/* Retry button */
.btn-retry {
  margin-top: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--trans);
}
.btn-retry:hover { background: rgba(255,255,255,0.12); }

/* Chip unit */
.chip-unit {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.8;
}

/* Session card delete */
.sess-delete-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(220,38,38,0.12);
  color: var(--error);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--trans);
}
.sess-delete-btn:hover { background: rgba(220,38,38,0.25); }

/* Submit disabled */
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
