/* ==========================
   CSS RESET & BASE
========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f1a;
  --bg2: #111320;
  --surface: #161928;
  --surface2: #1c2035;
  --border: rgba(255,255,255,0.08);
  --border-active: rgba(99,102,241,0.6);
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent-glow: rgba(99,102,241,0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: rgba(239,68,68,0.15);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 32px rgba(0,0,0,0.5);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0d0f1a;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================
   BACKGROUND
========================== */
.page-wrapper {
  min-height: 100vh;
  position: relative;
  /* Property background photo with layered dark overlay for premium contrast */
  background:
    linear-gradient(to bottom,
      rgba(10,10,28,0.82) 0%,
      rgba(12,14,26,0.72) 40%,
      rgba(10,10,28,0.88) 100%
    ),
    url('bg.png') center center / cover no-repeat fixed;
}

/* ==========================
   HEADER
========================== */
.form-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 3px solid #2d2d6e;
  padding: 0.65rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo image in header */
.header-logo-img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.logo-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #2d2d6e;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo-tagline {
  display: block;
  font-size: 0.68rem;
  color: #cc1111;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-badge {
  background: rgba(45,45,110,0.1);
  border: 1.5px solid rgba(45,45,110,0.3);
  color: #2d2d6e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================
   HERO
========================== */
.form-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-logo {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 14px;
  padding: 8px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 60%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  padding: 0 1rem;
}

/* Step indicators */
.hero-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.hero-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  transition: all var(--transition);
}

.hero-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all var(--transition);
}

.hero-step.active {
  color: var(--accent2);
}

.hero-step.active span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 12px var(--accent-glow);
}

.hero-step.done span {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.hero-step-divider {
  width: 30px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* ==========================
   MAIN / FORM STEPS
========================== */
.form-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.form-step { display: none; animation: fadeSlideIn 0.4s ease; }
.form-step.active { display: block; }

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

/* ==========================
   STEP CARD
========================== */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--accent), var(--accent2), transparent) 1;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  /* overflow: visible — required so dropdowns inside are not clipped */
}

.step-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.step-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 2px rgba(99,102,241,0.4);
  line-height: 1;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================
   FIELDS
========================== */
.field-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .step-card { padding: 1.5rem; }
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.required-star { color: var(--accent2); }

.field-input, .field-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field-input:focus, .field-textarea:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-input::placeholder, .field-textarea::placeholder { color: var(--text-subtle); }

.field-textarea { resize: vertical; min-height: 120px; }

.field-input.error, .field-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

.field-error {
  display: block;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
  min-height: 1em;
}

/* ==========================
   ADDRESS LOOKUP
========================== */
/* Phone prefix field */
.phone-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.phone-input-wrap:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.phone-input-wrap.error {
  border-color: var(--error, #ef4444);
}
.phone-prefix {
  padding: 0 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  border-right: 1.5px solid var(--border);
  background: rgba(255,255,255,0.04);
  height: 100%;
  display: flex;
  align-items: center;
  user-select: none;
  letter-spacing: 0.01em;
}
.phone-digits-input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding-left: 0.75rem !important;
}
.phone-digits-input:focus { outline: none; box-shadow: none !important; }

.address-lookup-wrapper { position: relative; }


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

.address-icon {
  position: absolute;
  left: 0.9rem;
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.address-input { padding-left: 2.5rem !important; }

.address-spinner {
  position: absolute;
  right: 0.9rem;
  font-size: 0.9rem;
  animation: spin 1s linear infinite;
}

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

.address-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border-active);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
}

.address-option {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.address-option:last-child { border-bottom: none; }
.address-option:hover { background: rgba(99,102,241,0.12); color: var(--accent2); }
.address-option.no-results { color: var(--text-muted); cursor: default; }

.address-selected {
  margin-top: 0.6rem;
}

.address-selected-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.address-selected-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.address-selected-value {
  font-size: 0.88rem;
  color: var(--text);
}

.address-change-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  flex-shrink: 0;
}

.address-change-btn:hover { border-color: var(--accent); color: var(--accent2); }

/* ==========================
   ISSUE SELECT
========================== */
.issue-select-wrap {
  position: relative;
  cursor: pointer;
}

.issue-select-wrap .field-input { cursor: pointer; padding-right: 2rem; }

.select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.8rem;
}

.issue-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border-active);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7);
  z-index: 500;
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.issue-dropdown-search-wrap {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.issue-dropdown-search {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition);
}

.issue-dropdown-search:focus { border-color: var(--accent); }
.issue-dropdown-list { overflow-y: auto; flex: 1; }

.issue-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  padding: 0.75rem 1rem 0.4rem;
  background: rgba(99,102,241,0.06);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.issue-option {
  padding: 0.65rem 1rem 0.65rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition), color var(--transition);
}

.issue-option:hover { background: rgba(99,102,241,0.1); color: var(--text); }
.issue-option.selected { color: var(--accent2); background: rgba(99,102,241,0.08); }

/* ==========================
   URGENT / EMERGENCY BANNERS
========================== */
.urgent-banner, .emergency-banner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  animation: fadeSlideIn 0.3s ease;
}

.urgent-banner {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fcd34d;
}

.emergency-banner {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
}

.urgent-banner-icon, .emergency-banner-icon { font-size: 1.25rem; flex-shrink: 0; }

/* ==========================
   CONDITIONAL FIELDS
========================== */
.conditional-field {
  overflow: hidden;
  animation: expandDown 0.3s ease;
}

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

/* ==========================
   FILE UPLOAD
========================== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface2);
}

.upload-area:hover {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
}

.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-text { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.upload-sub { font-size: 0.8rem; color: var(--text-muted); }

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.preview-item {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item img, .preview-item video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 3px; right: 3px;
  background: rgba(239,68,68,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0.25rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 82px;
}

/* ==========================
   TROUBLESHOOTING
========================== */
.ts-question {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.ts-help-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--accent2);
  text-decoration: none;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 6px;
  transition: all var(--transition);
}

.ts-help-link:hover { background: rgba(99,102,241,0.1); }

.ts-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ts-option-btn {
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-family: inherit;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ts-option-btn::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all var(--transition);
}

.ts-option-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(99,102,241,0.08);
}

.ts-option-btn:hover::before { border-color: var(--accent); }

.ts-option-btn.selected {
  border-color: var(--accent);
  color: var(--accent2);
  background: rgba(99,102,241,0.1);
}

.ts-option-btn.selected::before {
  border-color: var(--accent);
  background: var(--accent);
}

.ts-notice {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #6ee7b7;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #fcd34d;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-engineer {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--accent2);
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-resolved {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #34d399;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-high-priority {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #fca5a5;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-outcome-neutral {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: var(--accent2);
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
}

.ts-outcome-resolved {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: #34d399;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
  font-weight: 500;
}

.ts-outcome-engineer {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: #fcd34d;
  margin-top: 0.75rem;
  animation: fadeSlideIn 0.3s ease;
  font-weight: 500;
}

.ts-text-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  outline: none;
  margin-top: 0.75rem;
  transition: border-color var(--transition);
}

.ts-text-input:focus { border-color: var(--accent); }

.no-troubleshoot {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.no-troubleshoot-icon { font-size: 2rem; margin-bottom: 0.75rem; }

/* ==========================
   OUTCOME NOTICE
========================== */
.outcome-notice {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
}

/* ==========================
   REVIEW GRID
========================== */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) { .review-grid { grid-template-columns: 1fr; } }

.review-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.review-item.full { grid-column: 1 / -1; }

.review-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
}

.review-item-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ==========================
   CHECKBOX
========================== */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  margin-top: 2px;
  cursor: pointer;
}

/* ==========================
   BUTTONS
========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.75rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99,102,241,0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }

.btn-submit {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
  padding: 0.9rem 2.5rem;
  font-size: 1rem;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(16,185,129,0.45);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-arrow { transition: transform var(--transition); }
.btn:hover .btn-arrow { transform: translateX(4px); }

.step-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ==========================
   MODAL
========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modalPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.modal-message { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }
.modal-btn { min-width: 140px; }

/* ==========================
   CONFIRMATION
========================== */
.confirmation-card { text-align: center; padding: 3.5rem 2.5rem; }
.confirm-icon { font-size: 4rem; margin-bottom: 1.25rem; }
.confirm-title { font-size: 1.75rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; }
.confirm-message { font-size: 1rem; color: var(--text-muted); line-height: 1.7; max-width: 480px; margin: 0 auto 1.5rem; }
.confirm-ref {
  font-size: 0.82rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  display: inline-block;
  color: var(--text-muted);
  font-family: monospace;
}

.confirm-note {
  max-width: 500px;
  margin: 1.25rem auto 0.5rem;
  padding: 0.9rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: left;
}
.confirm-note:empty { display: none; }
.confirm-note--warn {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fcd34d;
}
.confirm-note--info {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent2);
}

/* ==========================
   FOOTER
========================== */
.form-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ==========================
   UTILITIES
========================== */
.hidden { display: none !important; }

/* ==========================
   VIDEO MODAL
========================== */
.video-modal-card {
  background: #000;
  border-radius: 16px;
  max-width: 860px;
  width: 94vw;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.9);
  overflow: hidden;
}

.video-embed-wrap {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  width: 100%;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.video-modal-close:hover { background: rgba(255,255,255,0.3); }

/* Select field styling */
select.field-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select.field-input option { background: var(--surface2); color: var(--text); }

/* Troubleshooting Q&A on review */
.ts-review-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.ts-review-q { font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.ts-review-a { color: var(--accent2); }
.ts-review-separator { border: none; border-top: 1px solid var(--border); margin: 0.6rem 0; }

/* ============================================================
   MOBILE RESPONSIVE  ≤ 640px
============================================================ */
@media (max-width: 640px) {

  /* --- Header --- */
  .header-inner { padding: 0 1rem; gap: 0.5rem; }
  .header-logo  { gap: 0.5rem; }
  .header-logo-img { height: 38px; width: 38px; }
  .logo-name    { font-size: 0.78rem; }
  .logo-tagline { font-size: 0.6rem; }
  .header-badge { font-size: 0.62rem; padding: 0.25rem 0.6rem; white-space: nowrap; }

  /* --- Hero --- */
  .form-hero  { padding: 2rem 1rem 1.25rem; }
  .hero-logo  { width: 72px; height: 72px; border-radius: 12px; margin-bottom: 1rem; }
  .hero-title { font-size: 1.7rem; }
  .hero-subtitle {
    font-size: 0.82rem;
    white-space: normal;
    padding: 0 0.25rem;
    margin-bottom: 1.5rem;
  }

  /* --- Step indicators --- */
  .hero-steps {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    justify-content: center;
  }
  .hero-step { font-size: 0.72rem; gap: 0.3rem; }
  .hero-step span { width: 22px; height: 22px; font-size: 0.7rem; }
  .hero-step-divider { display: none; }

  /* --- Form card --- */
  .step-card  { padding: 1.25rem 1rem; border-radius: 14px; }
  .step-num   { font-size: 2rem; }
  .step-title { font-size: 1.25rem; }

  /* --- Fields --- */
  .field-row  { grid-template-columns: 1fr; gap: 0; }
  .field-input, .field-textarea { font-size: 0.9rem; padding: 0.75rem 0.9rem; }

  /* --- Phone prefix --- */
  .phone-prefix { font-size: 0.8rem; padding: 0 0.7rem; }

  /* --- Upload area --- */
  .upload-area { padding: 1.5rem 1rem; }
  .upload-text { font-size: 0.85rem; }
  .upload-sub  { font-size: 0.75rem; }

  /* --- Step nav buttons --- */
  .step-nav { flex-direction: column-reverse; gap: 0.6rem; }
  .step-nav .btn { width: 100%; justify-content: center; }

  /* --- Troubleshooting --- */
  .ts-question-text { font-size: 0.92rem; }
  .ts-options { flex-direction: column; gap: 0.5rem; }
  .ts-option-btn { width: 100%; text-align: center; }
  .ts-outcome-resolved,
  .ts-outcome-engineer,
  .ts-outcome-neutral,
  .ts-high-priority { font-size: 0.82rem; padding: 0.75rem 1rem; }

  /* --- Review grid --- */
  .review-grid { grid-template-columns: 1fr; }

  /* --- Confirmation --- */
  .confirmation-card { padding: 2rem 1.25rem; }
  .confirm-icon  { font-size: 2.8rem; }
  .confirm-title { font-size: 1.3rem; }
  .confirm-message { font-size: 0.88rem; }
  .confirm-note  { font-size: 0.8rem; }

  /* --- Modal --- */
  .modal-card { margin: 1rem; padding: 1.5rem 1.25rem; }
  .modal-title { font-size: 1.1rem; }
  .modal-message { font-size: 0.88rem; }

  /* --- Priority / Issue dropdowns --- */
  .issue-dropdown { max-height: 220px; }
  .issue-option   { font-size: 0.85rem; padding: 0.6rem 0.9rem; }
}

/* Very small phones ≤ 380px */
@media (max-width: 380px) {
  .logo-name  { font-size: 0.7rem; }
  .hero-title { font-size: 1.45rem; }
  .step-card  { padding: 1rem 0.85rem; }
}
