/* ── Step Navigator Sidebar (desktop only) ── */
.step-nav {
  display: none; /* shown via JS on form start; desktop media query makes it flex */
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}
.sn-header {
  background: var(--blue);
  padding: 16px 18px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  flex-shrink: 0;
}
.sn-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}
.sn-subtitle {
  font-size: 11px;
  opacity: 0.72;
  margin-top: 3px;
}
.sn-list {
  padding: 6px 0;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.sn-item.sn-current {
  background: var(--blue-light);
  border-left-color: var(--blue);
}
.sn-item.sn-visited { opacity: 0.65; }
.sn-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.sn-item.sn-current .sn-num { background: var(--blue); color: white; }
.sn-body { flex: 1; min-width: 0; }
.sn-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sn-item.sn-current .sn-label { color: var(--blue); }
.sn-optional { font-size: 10px; color: var(--text-muted); font-style: italic; }
.sn-status {
  font-size: 13px;
  font-weight: 700;
  color: transparent;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.2s;
}
.sn-status.sn-done { color: var(--green); }

/* ── Card body columns (used on desktop) ── */
.card-col-info { min-width: 0; }
.card-col-upload { min-width: 0; }

/* ── Tire Background (decorative, fixed, desktop only) ── */
.tire-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.tire {
  position: absolute;
  border-radius: 50%;
  border: 8px solid var(--blue);
  opacity: 0.025;
  animation: float 20s infinite ease-in-out;
}
.tire::before,
.tire::after {
  content: '';
  position: absolute;
  background: var(--blue);
}
.tire::before {
  width: 40%;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.tire::after {
  width: 8px;
  height: 40%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.tire:nth-child(1) { width: 200px; height: 200px; top: 10%;  left: 5%;   animation-delay: 0s;  animation-duration: 25s; }
.tire:nth-child(2) { width: 150px; height: 150px; top: 60%;  right: 10%; animation-delay: 5s;  animation-duration: 30s; }
.tire:nth-child(3) { width: 180px; height: 180px; bottom: 15%; left: 15%; animation-delay: 10s; animation-duration: 28s; }
.tire:nth-child(4) { width: 120px; height: 120px; top: 40%;  right: 25%; animation-delay: 15s; animation-duration: 22s; }

/* ── Intro instructions box (shown on step 0) ── */
.intro-instructions {
  background: linear-gradient(135deg, var(--surface) 0%, white 100%);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.intro-instructions h3 {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}
.intro-list {
  display: grid;
  gap: 10px;
}
.intro-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(0,61,165,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}
.intro-item:hover {
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(0,61,165,0.10);
}
.intro-num {
  background: linear-gradient(135deg, var(--red) 0%, #d4154a 100%);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(200,16,46,0.30);
}
.intro-num-guide {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  box-shadow: 0 3px 10px rgba(0,61,165,0.30);
}
.intro-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  align-self: center;
}
.intro-item-guide { background: linear-gradient(135deg, #eef2ff 0%, white 100%); border-color: rgba(0,61,165,0.15); }
.guide-link { color: var(--blue); text-decoration: underline; font-weight: 700; }
.guide-link:hover { color: var(--blue-dark); }

/* ── Floating Guide Button (FAB) ── */
/* bottom = 88px (nav-bar height) + env(safe-area-inset-bottom) for notched iOS devices */
.guide-fab {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  right: max(14px, env(safe-area-inset-right, 14px));
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: white;
  padding: 12px 18px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,61,165,0.35);
  transition: transform 0.25s, box-shadow 0.25s;
  letter-spacing: 0.2px;
  animation: fab-pulse 2.5s ease-in-out 3;
}
.guide-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,61,165,0.45);
  animation: none;
}
.guide-fab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Step card ── */
.step-card {
  display: none;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.step-card.active {
  display: block;
  animation: slideIn 0.25s ease forwards;
}
.card-header {
  background: var(--blue);
  padding: 16px 18px;
  color: white;
}
.card-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-icon   { font-size: 28px; flex-shrink: 0; }
.card-meta   { font-size: 11px; opacity: 0.75; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.card-title  { font-size: 20px; font-weight: 700; margin-top: 1px; }
.card-optional {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 600;
}
.card-body { padding: 18px; }
.card-instructions {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 6px;
  border-left: 3px solid var(--blue);
}

/* ── Instruction list ── */
.instr-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.75;
}
.instr-list li { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }

/* ── Shots section ── */
.shots-section { margin-bottom: 12px; }
.shots-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.shots-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.shot-chip {
  font-size: 11px;
  font-weight: 700;
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid #c7d7f7;
  border-radius: 99px;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Points badge ── */
.points-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.20);
  padding: 3px 11px;
  border-radius: 99px;
  white-space: nowrap;
  align-self: flex-start;
  flex-shrink: 0;
}

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: var(--surface);
  user-select: none;
}
.upload-zone:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.upload-zone.has-files {
  border-color: var(--green);
  background: var(--green-bg);
}
.upload-zone.required-error {
  border-color: var(--red);
  background: #fff5f5;
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.zone-icon  { font-size: 32px; margin-bottom: 6px; pointer-events: none; }
.zone-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 3px;
  pointer-events: none;
}
.zone-hint  { font-size: 12px; color: var(--text-muted); pointer-events: none; }

/* ── Video recording overlay ── */
.record-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.90);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.record-overlay.active { display: flex; }
.record-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  width: min(320px, 90vw);
}
.record-area-label {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 20px;
}
.record-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: rec-pulse 1s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}
.record-live {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ef4444;
}
.record-countdown {
  font-size: 80px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
  transition: color 0.3s;
}
.record-countdown.record-urgent { color: #ef4444; }
.record-seconds-label {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}
.record-min-hint {
  font-size: 12px;
  color: #475569;
  margin-bottom: 28px;
}
.record-stop-btn {
  width: 100%;
  padding: 13px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.record-stop-btn:active { background: #334155; }
.zone-count {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  pointer-events: none;
}

/* ── File chips ── */
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.file-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.2s;
}
.file-chip.uploading { background: #eff6ff; border-color: #bfdbfe; }
.file-chip.done      { background: var(--green-bg); border-color: #bbf7d0; }
.file-chip.error     { background: #fef2f2; border-color: #fecaca; }
.chip-icon   { font-size: 16px; flex-shrink: 0; }
.chip-name   { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.chip-size   { font-size: 11px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.chip-status { font-size: 16px; flex-shrink: 0; }
.spin        { display: inline-block; animation: spin 0.9s linear infinite; }

/* ── Special screens ── */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 120px;
  animation: slideIn 0.3s ease;
}
.screen.active { display: flex; }
.screen-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.screen-icon  { font-size: 60px; margin-bottom: 18px; }
.screen-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.screen-body  { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.screen-ref   { margin-top: 14px; font-size: 12px; color: var(--text-muted); }

/* ── Expired screen — proceed late button ── */
.proceed-late-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 28px;
  background: var(--blue);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, transform 0.1s;
  width: 100%;
}
.proceed-late-btn:hover { background: var(--blue-dark); }
.proceed-late-btn:active { transform: scale(0.97); }

/* ── Completed overlay (already submitted) ── */
.screen-completed-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, #15803d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(22,163,74,0.25);
}
.screen-completed-icon svg {
  width: 38px;
  height: 38px;
  fill: white;
}
.screen-completed-branch {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.late-tag {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Closed overlay (form unavailable) ── */
.screen-closed-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(0,61,165,0.25);
}
.screen-closed-icon svg {
  width: 38px;
  height: 38px;
  fill: white;
}

/* ── Contact note (shared) ── */
.contact-note {
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.warn { border-left: 4px solid var(--red); }

/* ── Loading overlay ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.overlay.active { display: flex; }
.overlay-box {
  background: white;
  border-radius: var(--radius);
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.loader {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.overlay-msg { margin-top: 14px; font-size: 15px; font-weight: 600; }

/* ── Consent block (LFPDPPP) ── */
.consent-block {
  display: none;
  background: var(--blue-light);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 14px 10px;
  font-size: 13px;
  color: var(--text);
}
.consent-title {
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
  font-size: 13px;
}
.consent-body {
  line-height: 1.5;
  margin-bottom: 12px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.consent-checkbox {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.consent-error {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}

/* ════════════════════════════════════════
   HD Resolution Badge — inside upload zone
════════════════════════════════════════ */
.zone-res-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  margin-top: 9px;
  letter-spacing: 0.15px;
  pointer-events: none; /* don't intercept clicks on zone overlay */
}
/* Image variant — green pill (auto resize, no action needed) */
.zone-res-image {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
/* Video variant — amber pill (rejection if over limit) */
.zone-res-video {
  background: #fff3e0;
  color: #bf360c;
  border: 1px solid #ffcc80;
}

/* ── Intro HD item ── */
.intro-item-hd { border-left: 3px solid #f59e0b; padding-left: 4px; }
.intro-num-hd  { background: #f59e0b !important; font-size: 11px !important; letter-spacing: 0.5px; }

/* ════════════════════════════════════════
   HD Resolution Rejection Modal
════════════════════════════════════════ */
.res-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000; /* H-09: above loading overlay (999) so rejection message is always visible */
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.res-modal-backdrop.active { display: flex; }

.res-modal-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  animation: slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header — red gradient matching brand */
.res-modal-header {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 22px 24px 18px;
  text-align: center;
}
.res-modal-header-icon  { font-size: 38px; display: block; margin-bottom: 8px; }
.res-modal-header-title {
  color: white;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

/* Body */
.res-modal-body { padding: 18px 22px 10px; }

.res-modal-detected {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: #fff0f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  margin-bottom: 14px;
}
.res-modal-filename {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: -8px 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-modal-desc {
  font-size: 13px;
  color: #444;
  line-height: 1.65;
  margin-bottom: 14px;
}

/* How-to steps */
.res-modal-steps-label {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 9px;
}
.res-modal-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8f9fb;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #333;
}
.res-modal-step-os {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1.2;
}

/* Footer buttons */
.res-modal-footer {
  padding: 8px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.res-modal-btn-retry {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  transition: background 0.18s, transform 0.1s;
}
.res-modal-btn-retry:hover  { background: var(--blue-dark); }
.res-modal-btn-retry:active { transform: scale(0.98); }
.res-modal-btn-dismiss {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  transition: background 0.18s;
}
.res-modal-btn-dismiss:hover { background: #f5f7fa; }
