:root {
  --brand-navy: #0A0534;
  --brand-navy-2: #0b002b;
  --brand-red: #D43A36;
  --brand-purple: #A174F1;
  --bg-page: #ffffff;
  --bg-soft: #f6f5fb;
  --bg-input: #fafaff;
  --primary-color: #0A0534;
  --text-main: #1f2937;
  --text-mute: #6b7280;
  --border-soft: #e5e7eb;
  --border-strong: #d1d5db;
  --success: #16a34a;
  --error: #dc2626;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --t: all 0.2s ease;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
  padding: 32px 16px 56px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.light-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 260px;
  background: linear-gradient(to top, rgba(10, 5, 52, 0) 0%, rgba(10, 5, 52, 0.08) 60%, rgba(212, 58, 54, 0.08) 100%);
  z-index: 0;
  pointer-events: none;
}

.app-container { width: 100%; max-width: 580px; position: relative; z-index: 2; margin: 0 auto; }
.app-header { text-align: center; margin-bottom: 20px; }
.app-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--brand-navy); margin-bottom: 12px; }

.advisor-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #ffffff;
  border: 1.5px solid rgba(161, 116, 241, 0.25);
  border-radius: 16px; padding: 14px 18px; margin: 0 auto; width: 100%;
  box-shadow: 0 10px 25px -4px rgba(10, 5, 52, 0.08), 0 3px 10px -2px rgba(161, 116, 241, 0.12);
  position: relative; overflow: hidden; transition: var(--t);
}
.advisor-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #0A0534 0%, #A174F1 50%, #25D366 100%);
}
.advisor-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-align: left; }
.advisor-avatar-wrapper { position: relative; display: inline-flex; flex-shrink: 0; }
.advisor-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 50%; background: linear-gradient(135deg, #0A0534 0%, #241470 100%); color: #fff;
  box-shadow: 0 4px 10px rgba(10, 5, 52, 0.2);
}
.online-indicator {
  position: absolute; bottom: 0; right: 0; width: 11px; height: 11px;
  background: #22c55e; border: 2px solid #ffffff; border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}
.advisor-content { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.advisor-avatar.official {
  background: linear-gradient(135deg, #0A0534 0%, #065f46 100%);
}
.advisor-badge.official {
  color: #059669; background: rgba(5, 150, 105, 0.1);
}
.advisor-toggle-btn {
  background: transparent; border: 1px dashed rgba(10,5,52,0.18); border-radius: 4px;
  font-size: 10px; color: var(--text-mute); padding: 1px 6px; cursor: pointer; margin-left: 6px;
  transition: all 0.2s;
}
.advisor-toggle-btn:hover { color: var(--brand-navy); border-color: var(--brand-navy); background: #f8fafc; }
.advisor-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: #7c3aed; background: rgba(124, 58, 237, 0.08);
  padding: 1px 6px; border-radius: 4px;
}
.advisor-name-row { font-size: 15px; line-height: 1.3; white-space: nowrap; margin-top: 2px; }
.advisor-name { font-weight: 800; color: var(--brand-navy); letter-spacing: -0.2px; }
.advisor-phone-row { font-size: 12px; color: #64748b; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.advisor-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.advisor-action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9999px;
  font-size: 12px; font-weight: 700; text-decoration: none; transition: var(--t);
}
.advisor-action-btn.call-action {
  background: #ffffff; color: var(--brand-navy); border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.advisor-action-btn.call-action:hover {
  background: #f8fafc; border-color: var(--brand-navy); transform: translateY(-1px);
}
.advisor-action-btn.whatsapp-action {
  background: linear-gradient(135deg, #25D366 0%, #16a34a 100%); color: #ffffff;
  border: none; box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.advisor-action-btn.whatsapp-action:hover {
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5); transform: translateY(-1px);
}

.card {
  background: #ffffff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 32px 28px 24px;
  box-shadow: 0 4px 20px rgba(10, 5, 52, 0.03); display: none; position: relative;
  margin-top: 14px;
}
.card.active { display: block; animation: calcFadeIn 0.2s ease forwards; }
@keyframes calcFadeIn { from { opacity: 0; } to { opacity: 1; } }

.step-header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid #f1f3f7; }
.step-meta { display: flex; align-items: center; gap: 10px; }
.step-pill { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: rgba(10, 5, 52, 0.06); color: var(--brand-navy); }
.step-title-text { font-size: 14px; font-weight: 700; color: var(--brand-navy); }
.step-progress-track { width: 60px; height: 5px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.step-progress-fill { height: 100%; background: var(--brand-navy); border-radius: 3px; transition: width 0.35s ease; }

.form-group { display: flex; flex-direction: column; margin-bottom: 20px; width: 100%; position: relative; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; min-width: 0; margin-bottom: 20px; }
label { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.amount-hint { font-size: 12px; font-weight: 500; color: #64748b; }

.amount-input-wrapper, .phone-input-wrapper {
  display: flex; align-items: stretch; border: 1px solid #d1d5db; border-radius: 8px;
  background: #ffffff; height: 46px; box-shadow: none !important; outline: none !important;
  transition: border-color 0.15s ease; overflow: hidden; box-sizing: border-box;
  contain: paint;
}
.amount-input-wrapper:hover, .phone-input-wrapper:hover { border-color: #9ca3af; }
.amount-input-wrapper:focus-within, .phone-input-wrapper:focus-within {
  border-color: var(--brand-navy) !important; box-shadow: none !important; outline: none !important;
}
.amount-input-wrapper:focus-within .amount-prefix,
.phone-input-wrapper:focus-within .phone-prefix {
  border-right-color: var(--brand-navy);
}
.amount-prefix, .phone-prefix {
  padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--brand-navy);
  background: #f8fafc; border-right: 1px solid #d1d5db; height: 100%; display: flex; align-items: center;
  border-top-left-radius: 7px; border-bottom-left-radius: 7px; user-select: none; flex-shrink: 0;
  box-sizing: border-box;
}
.amount-inner-input, .phone-inner-input {
  border: none !important; box-shadow: none !important; outline: none !important;
  padding: 0 14px !important; flex: 1; min-width: 0; height: 100%; font-size: 15px; color: #0f172a;
  background: transparent !important; -webkit-appearance: none; box-sizing: border-box;
}

.custom-select-box {
  background: #ffffff; border: 1px solid #d1d5db; border-radius: 8px; height: 46px; padding: 0 14px;
  font-size: 15px; color: #94a3b8; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; box-shadow: none !important; outline: none !important; transition: border-color 0.15s ease;
  overflow: hidden; box-sizing: border-box;
}
.custom-select-box:hover:not(.disabled) { border-color: #9ca3af; }
.custom-select-box.has-value { color: #0f172a; font-weight: 500; }
.custom-select-box.disabled { background: #f8fafc; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; }
.dropdown-arrow { font-size: 9px; color: #9ca3af; transition: transform 0.2s; }
.dropdown-arrow.open { transform: rotate(180deg); color: var(--brand-navy); }
.custom-dropdown-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; max-height: 200px; overflow-y: auto; z-index: 50; box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.dropdown-item { padding: 10px 14px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f8fafc; }
.dropdown-item:hover, .dropdown-item.active { background: #f6f5fb; color: var(--brand-navy); font-weight: 600; }

.agreement-wrapper { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 14px; }
.agreement-wrapper input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand-navy); flex-shrink: 0; }
.consent-clickable-label { font-size: 12px; color: #64748b; line-height: 1.5; cursor: pointer; text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.terms-link { font-size: 12px; color: var(--brand-navy); margin-bottom: 22px; cursor: pointer; text-align: center; text-decoration: underline; font-weight: 600; }

.btn-primary {
  width: 100%; height: 48px; background: var(--brand-navy); color: #fff; border: none; border-radius: 8px;
  font-size: 15px; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 6px; transition: var(--t);
}
.btn-primary:hover { opacity: 0.95; transform: translateY(-1px); }

.bottom-support-row { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.support-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: opacity 0.2s; min-height: 42px;
}
.support-btn:hover { opacity: 0.85; }
.support-call { background: #f1f5f9; color: #334155; }
.support-whatsapp { background: #22c55e; color: #fff; }

/* Estimate banner */
.estimate-banner {
  background: linear-gradient(135deg, rgba(10, 5, 52, 0.03) 0%, rgba(161, 116, 241, 0.05) 100%);
  border: 1px solid rgba(10, 5, 52, 0.08); border-radius: 14px; padding: 22px 20px; text-align: center; margin-bottom: 22px;
}
.estimate-vehicle-value {
  font-size: 13px; color: var(--brand-navy); margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px dashed rgba(10, 5, 52, 0.12);
}
.estimate-vehicle-value strong { font-weight: 700; }
.estimate-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); margin-bottom: 6px; }
.estimate-amount { font-size: 28px; font-weight: 800; color: var(--brand-navy); letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 6px; }
.estimate-car { font-size: 13px; color: var(--text-mute); margin-bottom: 6px; }
.estimate-car strong { color: var(--brand-navy); }
.estimate-hint { font-size: 12px; color: var(--text-mute); line-height: 1.5; }
.estimate-hint strong { color: var(--brand-navy); }
.estimate-next-action {
  background: rgba(10, 5, 52, 0.04); border-left: 3px solid var(--brand-navy); border-radius: 4px 8px 8px 4px;
  padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--brand-navy); text-align: left; margin-top: 14px; line-height: 1.4;
}

/* Upload Progress & Groups */
.upload-progress-section { margin-bottom: 18px; }
.upload-progress-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--brand-navy); margin-bottom: 6px; }
.upload-progress-count { font-size: 13px; font-weight: 700; color: var(--text-mute); }
.upload-progress-bar { height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; }
.upload-progress-fill { height: 100%; background: var(--brand-navy); border-radius: 2px; transition: width 0.3s; }

.doc-group { margin-bottom: 18px; }
.doc-group-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--brand-navy);
  margin-bottom: 10px; padding: 8px 10px; background: var(--bg-soft); border-radius: 6px; cursor: pointer;
  list-style: none; user-select: none; display: flex; justify-content: space-between; align-items: center;
}
.doc-group-title::-webkit-details-marker { display: none; }
.accordion-arrow { display: inline-block; font-size: 9px; color: var(--brand-navy); }

.doc-list-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.doc-row {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 12px 14px;
  background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; transition: var(--t); position: relative;
}
.doc-row:hover { border-color: var(--brand-navy); box-shadow: 0 4px 12px rgba(10, 5, 52, 0.05); }
.doc-row.uploaded { border-color: var(--brand-navy); background: rgba(10, 5, 52, 0.02); }
.file-input { display: none; }
.doc-thumb {
  width: 44px; height: 44px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; color: var(--brand-navy); flex-shrink: 0; font-size: 18px;
}
.doc-row.uploaded .doc-thumb { background: rgba(10, 5, 52, 0.08); }
.doc-info { width: 100%; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.doc-name { font-size: 13px; font-weight: 700; color: var(--brand-navy); }
.doc-status { font-size: 11px; color: var(--text-mute); }
.doc-action {
  width: 100% !important; height: 32px; min-height: 32px !important; border-radius: 6px !important;
  font-size: 12px; font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 4px;
}
.doc-action.upload { background: var(--brand-navy) !important; color: #fff; }
.doc-action.upload:hover { opacity: 0.9; }
.doc-action.remove { background: #fee2e2 !important; color: #dc2626; }
.pwd-card {
  display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1px solid var(--border-soft); border-radius: 12px; padding: 18px 14px;
}
.pwd-input {
  background: #f8fafc !important; border: 1px solid #e2e8f0 !important;
  border-radius: 8px; padding: 12px 14px !important; font-size: 13px !important; width: 100%;
  color: #1e293b;
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 5, 52, 0.45); display: flex; justify-content: center;
  align-items: center; z-index: 200; opacity: 0; pointer-events: none; transition: var(--t); padding: 16px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 480px; box-shadow: 0 25px 50px -12px rgba(10,5,52,0.25); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--brand-navy); }
.modal-close-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-mute); }
.modal-body { font-size: 13px; line-height: 1.6; color: var(--text-mute); }

/* Success Page View */
.success-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; padding: 40px 24px; text-align: center; box-shadow: 0 4px 24px rgba(10,5,52,0.08); }
.success-icon-wrap { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-purple) 100%); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #fff; box-shadow: 0 8px 24px rgba(10,5,52,0.2); }
.success-title { font-size: 22px; font-weight: 800; color: var(--brand-navy); margin-bottom: 10px; }
.success-desc { font-size: 14px; color: var(--text-mute); line-height: 1.6; margin-bottom: 26px; }
.success-actions { display: flex; flex-direction: column; gap: 10px; }
.contact-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.contact-btn.call-btn { background: #f3f4f6; color: #1f2937; }
.contact-btn.whatsapp-btn { background: #25D366; color: #fff; }

/* Cyber Toast */
.cyber-toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(239, 68, 68, 0.95);
  color: white; padding: 14px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 9999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2); text-align: center; max-width: 90%;
}
.cyber-toast.info { background: rgba(59, 130, 246, 0.95); }
