/* ============================================================
   GMTECH SMART SOLUSINDO — css/app.css
   Brand: Navy #0f2a4a · Orange #e85d04 · Red-Orange #c44d00
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0f2a4a;
  --navy-d:    #081c31;
  --navy-m:    #1a3a5c;
  --orange:    #e85d04;
  --orange-l:  #ff6b1a;
  --orange-d:  #c44d00;
  --red:       #dc2626;
  --green:     #16a34a;
  --amber:     #d97706;
  --bg:        #f0f2f5;
  --surface:   #ffffff;
  --border:    #dde2ea;
  --text:      #1a1f2e;
  --muted:     #5a6478;
  --radius:    10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow:    0 2px 10px rgba(0,0,0,0.10);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overscroll-behavior: none;
}

/* ══════════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════════ */
#login-screen {
  position: fixed; inset: 0; z-index: 999;
  background: linear-gradient(150deg, #081c31 0%, #0f2a4a 55%, #1a3a5c 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 20px;
  padding: 32px 28px; width: 100%; max-width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.login-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  height: 60px; margin-bottom: 16px;
}
.login-logo-img  { max-width: 160px; max-height: 56px; object-fit: contain; }
.login-logo-fallback {
  width: 56px; height: 56px; background: var(--navy); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff; letter-spacing: -1px;
}
.login-title { text-align: center; margin-bottom: 6px; }
.login-title h1 { font-size: 18px; font-weight: 700; color: var(--navy); }
.login-title p  { font-size: 12px; color: var(--muted); margin-top: 3px; }
.login-divider  { height: 1px; background: var(--border); margin: 20px 0; }
.login-field { margin-bottom: 14px; position: relative; }
.login-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.login-field input {
  width: 100%; padding: 11px 40px 11px 14px;
  border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 15px; color: var(--text); outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,93,4,0.12);
}
.login-field .field-icon {
  position: absolute; right: 12px; bottom: 11px;
  font-size: 18px; color: var(--muted); cursor: pointer;
}
.login-error {
  display: none; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
  font-size: 13px; color: #dc2626; text-align: center;
  align-items: center; gap: 6px;
}
.login-btn {
  width: 100%; padding: 13px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-d), var(--navy-m));
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.15s, transform 0.1s;
}
.login-btn:hover  { opacity: 0.9; }
.login-btn:active { transform: scale(0.98); }
.login-btn.loading { opacity: 0.7; pointer-events: none; }
.login-footer { text-align: center; font-size: 11px; color: #94a3b8; margin-top: 20px; }

/* ══════════════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════════════ */
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); }

/* ── Header ──────────────────────────────────────────────── */
.app-header {
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.header-logo-wrap {
  flex-shrink: 0; width: 90px; height: 40px;
  background: #fff; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px 7px; overflow: hidden;
}
.header-logo-img { max-width: 82px; max-height: 32px; object-fit: contain; display: block; }
.logo-fallback { font-weight: 800; font-size: 13px; color: var(--navy); letter-spacing: -0.5px; }
.header-info { flex: 1; min-width: 0; }
.header-info h1 { font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-info p  { font-size: 11px; opacity: 0.7; margin-top: 1px; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: background 0.15s;
}
.btn-icon:hover { background: rgba(255,255,255,0.22); }
.btn-icon-danger { background: rgba(220,38,38,0.18); border-color: rgba(220,38,38,0.35); }

/* ── Bottom Nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 8px;
  cursor: pointer; color: var(--muted);
  font-size: 10px; gap: 3px;
  border: none; background: none; transition: color 0.15s;
}
.nav-item i { font-size: 22px; }
.nav-item.active { color: var(--orange); }

/* ── Screen ──────────────────────────────────────────────── */
.screen { display: none; padding-bottom: 80px; }
.screen.active { display: block; }

/* ── Step Bar ────────────────────────────────────────────── */
.step-bar {
  background: var(--navy-d);
  padding: 10px 16px;
  display: flex; align-items: center;
}
.step-item {
  flex: 1; text-align: center;
  font-size: 10px; color: rgba(255,255,255,0.4);
  cursor: pointer; padding: 5px 2px; border-radius: 6px;
  transition: all 0.2s;
}
.step-item .s-icon { font-size: 18px; display: block; margin-bottom: 1px; }
.step-item.active { background: var(--orange); color: #fff; }
.step-item.done   { color: rgba(255,255,255,0.7); }
.step-connector   { width: 12px; height: 1px; background: rgba(255,255,255,0.15); flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 12px 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 10px 14px;
  background: #f5f7fa;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.4px;
  display: flex; align-items: center; gap: 8px;
}
.card-header i { font-size: 16px; color: var(--orange); }
.card-body { padding: 14px; }

/* ── Form Fields ─────────────────────────────────────────── */
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text);
  outline: none; transition: border 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,93,4,0.1);
}
.field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Status Selector ─────────────────────────────────────── */
.status-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.status-opt {
  border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 6px;
  text-align: center; cursor: pointer; transition: all 0.15s;
  font-size: 12px; font-weight: 500; color: var(--muted); background: #fafafa;
}
.status-opt i { display: block; font-size: 22px; margin-bottom: 4px; }
.status-opt.sel-selesai { background:#f0fdf4; border-color:#16a34a; color:#15803d; }
.status-opt.sel-proses  { background:#fffbeb; border-color:#d97706; color:#b45309; }
.status-opt.sel-tunda   { background:#fef2f2; border-color:#dc2626; color:#b91c1c; }

/* ── Material ────────────────────────────────────────────── */
.mat-header {
  display: grid; grid-template-columns: 1fr 60px 70px 32px; gap: 6px; margin-bottom: 8px;
}
.mat-header p {
  font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase;
}
.mat-row { display: flex; gap: 7px; margin-bottom: 8px; align-items: center; }
.mat-row input {
  flex: 1; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--text); background: #fff; outline: none;
  transition: border 0.15s;
}
.mat-row input:focus { border-color: var(--orange); }
.mat-row .qty { flex: 0 0 60px; }
.mat-row .sat { flex: 0 0 70px; }
.btn-del {
  width: 32px; height: 32px; flex-shrink: 0;
  background: none; border: 1px solid #fecaca; border-radius: 7px;
  cursor: pointer; color: var(--red);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.btn-add-mat {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--orange); border: 1px dashed #f9a87a;
  background: #fff7f0; border-radius: 8px; padding: 9px 14px;
  cursor: pointer; width: 100%; justify-content: center; font-weight: 500;
  transition: background 0.15s;
}
.btn-add-mat:hover { background: #ffe4cc; }

/* ── Photo Upload ────────────────────────────────────────── */
.photo-drop {
  border: 2px dashed var(--border); border-radius: 10px; padding: 20px;
  text-align: center; cursor: pointer; background: #f8fafc;
  transition: border 0.15s, background 0.15s;
}
.photo-drop:hover { border-color: var(--orange); background: #fff7f0; }
.photo-drop i     { font-size: 36px; color: var(--muted); margin-bottom: 6px; display: block; }
.photo-drop p     { font-size: 13px; color: var(--muted); }
.photo-drop small { font-size: 11px; color: #94a3b8; }
.photo-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px;
}
.photo-thumb-wrap { position: relative; }
.photo-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border); display: block;
}
.photo-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(220,38,38,0.85); color: #fff; border: none;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ── Customer Photo ──────────────────────────────────────── */
.cust-photo-drop i { color: var(--orange); }
.cust-photo-wrap { position: relative; border-radius: 10px; overflow: hidden; }
.cust-photo-img {
  width: 100%; max-height: 220px; object-fit: cover;
  border-radius: 10px; border: 2px solid var(--orange); display: block;
}
.cust-photo-del {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(220,38,38,0.85); color: #fff; border: none;
  font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cust-photo-badge {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(22,163,74,0.95), transparent);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 20px 12px 10px;
  display: flex; align-items: center; gap: 5px;
}
.btn-retake {
  width: 100%; margin-top: 10px; padding: 9px;
  border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--muted); font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s;
}
.btn-retake:hover { background: var(--bg); }

/* ── Signature ───────────────────────────────────────────── */
.sig-wrap {
  border: 1px solid var(--border); border-radius: 8px;
  background: #fafafa; overflow: hidden;
}
.sig-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.btn-clear-sig {
  font-size: 12px; color: var(--red); background: none;
  border: none; cursor: pointer; padding: 3px 8px; border-radius: 5px; font-weight: 500;
}
.btn-clear-sig:hover { background: #fee2e2; }
canvas.sig-canvas {
  display: block; width: 100%; height: 140px;
  touch-action: none; cursor: crosshair; background: #fff;
}
.sig-name-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── Form Nav ────────────────────────────────────────────── */
.form-nav {
  display: flex; gap: 10px; padding: 14px;
  background: var(--surface); border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 10;
}
.btn-back {
  padding: 12px 18px; border: 1px solid var(--border);
  border-radius: 9px; background: none; color: var(--text);
  font-size: 14px; cursor: pointer; font-weight: 500; transition: background 0.15s;
}
.btn-back:hover { background: var(--bg); }
.btn-primary {
  flex: 1; padding: 12px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-d), var(--navy-m));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover  { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-success {
  flex: 1; padding: 12px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--orange-d), var(--orange));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity 0.15s;
}
.btn-success:hover { opacity: 0.9; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff;
  padding: 11px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 500; z-index: 999;
  opacity: 0; transition: all 0.3s; pointer-events: none;
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }
.toast.info    { background: var(--navy-m); }

/* ── Sync Badge ──────────────────────────────────────────── */
.sync-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 500;
}
.sync-badge.online  { background: #f0fdf4; color: #16a34a; }
.sync-badge.offline { background: #fef2f2; color: #dc2626; }
.sync-badge.syncing { background: #fff7f0; color: var(--orange); }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sync-dot.pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── Dashboard ───────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 10px;
  padding: 14px; padding-bottom: 4px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-icon { font-size: 22px; margin-bottom: 2px; }
.stat-card .stat-val { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card .stat-lbl { font-size: 12px; color: var(--muted); }
.stat-card.accent-orange { border-left: 3px solid var(--orange); }
.stat-card.accent-orange .stat-icon { color: var(--orange); }
.stat-card.accent-green  { border-left: 3px solid var(--green); }
.stat-card.accent-green  .stat-icon { color: var(--green); }
.stat-card.accent-amber  { border-left: 3px solid var(--amber); }
.stat-card.accent-amber  .stat-icon { color: var(--amber); }
.stat-card.accent-red    { border-left: 3px solid var(--red); }
.stat-card.accent-red    .stat-icon { color: var(--red); }

.section-header {
  padding: 0 14px; margin-top: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-title { font-size: 13px; font-weight: 600; color: var(--navy); }
.btn-text { font-size: 12px; color: var(--orange); border: none; background: none; cursor: pointer; }

/* ── WO Cards ────────────────────────────────────────────── */
.wo-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px;
  margin: 10px 14px; cursor: pointer;
  transition: box-shadow 0.15s, border 0.15s;
  display: flex; gap: 12px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.wo-card:hover { border-color: #f9a87a; box-shadow: 0 4px 14px rgba(232,93,4,0.12); }
.wo-card-icon {
  width: 40px; height: 40px; border-radius: 9px;
  background: #fff7f0; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--orange); flex-shrink: 0;
}
.wo-card-body { flex: 1; min-width: 0; }
.wo-card-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-card-sub   { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.wo-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-selesai { background: #f0fdf4; color: #15803d; }
.badge-proses  { background: #fffbeb; color: #b45309; }
.badge-tunda   { background: #fef2f2; color: #b91c1c; }
.badge-offline { background: #f1f5f9; color: #64748b; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state i  { font-size: 48px; color: #cbd5e1; margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: #94a3b8; }

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; padding: 12px 14px 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 6px 13px; border-radius: 20px;
  border: 1px solid var(--border); background: #fff;
  font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.filter-chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Search Bar ──────────────────────────────────────────── */
.search-bar {
  margin: 12px 14px 0;
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 0 12px; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.search-bar i { font-size: 18px; color: var(--muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none; background: none;
  padding: 10px 0; font-size: 14px; color: var(--text);
}

/* ── Success Screen ──────────────────────────────────────── */
.success-wrap { text-align: center; padding: 40px 20px 20px; }
.success-icon {
  width: 72px; height: 72px; background: #f0fdf4; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 36px; color: var(--green);
}
.success-title { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.success-sub   { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.success-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-outline {
  width: 100%; padding: 13px;
  border: 1px solid var(--border); border-radius: 9px;
  background: none; color: var(--text); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-text-center {
  width: 100%; padding: 13px; border: none; background: none;
  color: var(--orange); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}

/* ── Settings ────────────────────────────────────────────── */
.status-info-box {
  padding: 14px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px;
}
.status-info-label {
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.btn-sync-manual {
  width: 100%; padding: 12px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 9px;
  background: none; color: var(--orange); font-size: 14px;
  cursor: pointer; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-danger-outline {
  width: 100%; padding: 12px;
  border: 1px solid #fecaca; border-radius: 9px;
  background: #fef2f2; color: #dc2626; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}

/* ── Loading Overlay ─────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(8,28,49,0.5);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.overlay.show { opacity: 1; pointer-events: all; }
.overlay-card {
  background: #fff; border-radius: 14px; padding: 28px 32px;
  text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.overlay-card p { font-size: 14px; font-weight: 500; color: var(--navy); }
.spinner {
  width: 36px; height: 36px; border: 3px solid #ffe4cc;
  border-top-color: var(--orange); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Detail Modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,28,49,0.55);
  z-index: 100; display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: #fff; border-radius: 18px 18px 0 0;
  width: 100%; max-width: 520px; margin: 0 auto;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.modal-overlay.show .modal-sheet { transform: translateY(0); }
.modal-header {
  padding: 14px 16px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.btn-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f1f5f9; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--muted);
}
.detail-section { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; }
.detail-section h3 {
  font-size: 11px; font-weight: 700; color: var(--orange);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.detail-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.detail-row .lbl { color: var(--muted); }
.detail-row .val { font-weight: 500; max-width: 55%; text-align: right; }
.modal-actions {
  display: flex; gap: 10px; padding: 14px;
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border);
}
.btn-edit {
  padding: 12px 16px; border: 1px solid #bfdbfe; border-radius: 9px;
  background: #eff6ff; color: #2563eb; font-size: 14px; cursor: pointer; font-weight: 500;
}
.btn-del-modal {
  padding: 12px 16px; border: 1px solid #fecaca; border-radius: 9px;
  background: #fef2f2; color: #dc2626; font-size: 14px; cursor: pointer;
}
