/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; background: #F0F9FF; color: #2D3748; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,h5,h6 { font-family: 'Inter', sans-serif; margin-top: 0; }

/* ── Page header ── */
.page-header { background: #38B6FF; padding: 1rem 2rem; display: flex; align-items: center; gap: 0.75rem; box-shadow: 0 4px 20px rgba(56,182,255,0.35); }
.page-header a { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1rem; }
.page-header img { height: 36px; width: auto; }

/* ── Page shell ── */
.apply-wrapper { min-height: calc(100vh - 68px); display: flex; flex-direction: column; align-items: center; padding: 3rem 1.25rem 5rem; }
.apply-intro { text-align: center; margin-bottom: 2rem; max-width: 600px; }
.apply-intro h1 { font-size: 2rem; font-weight: 800; color: #0F172A; margin-bottom: 0.5rem; }
.apply-intro p { color: #718096; font-size: 0.95rem; line-height: 1.7; margin: 0; }
.apply-intro-actions { margin-top: 1rem; }
.btn-reset { padding: 0.7rem 1.2rem; background: #FFF7ED; color: #C2410C; border: 1.5px solid #FDBA74; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-reset:hover { background: #FFEDD5; border-color: #FB923C; transform: translateY(-1px); }
.apply-card { background: #fff; border-radius: 18px; box-shadow: 0 4px 32px rgba(0,0,0,0.07); padding: 2.5rem 3rem; width: 100%; max-width: 720px; }

/* ── Section title ── */
.fs-title { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #38B6FF; border-bottom: 2px solid #EBF8FF; padding-bottom: 0.5rem; margin: 0 0 1.25rem; }

/* ── Form layout ── */
.form-group { display: flex; flex-direction: column; margin-bottom: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.15rem; }

/* ── Labels ── */
label { font-size: 0.83rem; font-weight: 600; color: #4A5568; margin-bottom: 0.35rem; }
label .req { color: #E53E3E; margin-left: 2px; }
label .opt { color: #A0AEC0; font-weight: 400; }

/* ── Form controls ── */
input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="number"], select, textarea {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.9rem;
  padding: 0.68rem 0.9rem; border: 1.5px solid #E2E8F0;
  border-radius: 8px; color: #2D3748; background: #fff;
  outline: none; width: 100%; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: #38B6FF; box-shadow: 0 0 0 3px rgba(56,182,255,0.15); }
input.error, select.error, textarea.error { border-color: #FC8181; box-shadow: 0 0 0 3px rgba(252,129,129,0.15); }

/* ── Field error ── */
.field-error { font-size: 0.78rem; color: #E53E3E; margin-top: 0.3rem; display: none; }
.field-error.show { display: block; }

/* ── Select arrow (public site only) ── */
select {
  appearance: none;
  /* Removed global background-image to avoid conflict with Filament/Choices SVGs */
  padding-right: 2.5rem;
}
textarea { resize: vertical; min-height: 80px; }

/* ── Radio / Checkbox ── */
.radio-group { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.25rem; }
.radio-group label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; font-weight: 500; color: #4A5568; cursor: pointer; margin: 0; }
input[type="radio"], input[type="checkbox"] { accent-color: #38B6FF; width: 16px; height: 16px; cursor: pointer; }

/* ── Length of stay ── */
.los-row { display: flex; gap: 1rem; align-items: flex-end; }
.los-row .form-group { flex: 1; margin-bottom: 0; }

/* ── File upload ── */
.file-label { display: flex; align-items: center; gap: 0.75rem; padding: 0.68rem 0.9rem; border: 1.5px dashed #CBD5E0; border-radius: 8px; cursor: pointer; color: #718096; font-size: 0.88rem; transition: border-color 0.2s, color 0.2s; }
.file-label:hover { border-color: #38B6FF; color: #38B6FF; }
.file-label i { font-size: 1.1rem; flex-shrink: 0; }
input[type="file"] { display: none; }
.file-hint { font-size: 0.76rem; color: #A0AEC0; margin-top: 0.3rem; }

/* ── T&C row ── */
.tc-row { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.5rem; }
.tc-row input { margin-top: 3px; flex-shrink: 0; }
.tc-row label { font-size: 0.85rem; font-weight: 400; color: #4A5568; margin: 0; cursor: default; }
.tc-row label a { color: #38B6FF; text-decoration: underline; cursor: pointer; }

/* ── Review summary ── */
.review-summary { display: flex; flex-direction: column; gap: 1rem; }
.review-section { border: 1.5px solid #EDF2F7; border-radius: 12px; overflow: hidden; }
.review-section-title { background: #F7FAFC; padding: 0.6rem 1rem; font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #38B6FF; border-bottom: 1.5px solid #EDF2F7; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0.75rem 1rem; gap: 0.6rem 1.5rem; }
.review-item { display: flex; flex-direction: column; gap: 0.15rem; }
.review-item.full { grid-column: 1 / -1; }
.review-label { font-size: 0.72rem; font-weight: 600; color: #A0AEC0; text-transform: uppercase; letter-spacing: 0.05em; }
.review-value { font-size: 0.88rem; color: #1A202C; font-weight: 500; word-break: break-word; }
.review-value.empty { color: #CBD5E0; font-style: italic; }

/* ── Subscription type toggle ── */
.subs-toggle { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.subs-btn { flex: 1; min-width: 160px; padding: 0.85rem 1rem; background: #F7FAFC; border: 2px solid #E2E8F0; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 600; color: #718096; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.subs-btn:hover { border-color: #38B6FF; color: #38B6FF; background: #F0F9FF; }
.subs-btn.active { border-color: #38B6FF; color: #38B6FF; background: #EBF8FF; box-shadow: 0 0 0 3px rgba(56,182,255,0.12); }
.subs-btn i { font-size: 1rem; }

/* ── Tabs ── */
.app-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; border-bottom: 2px solid #EDF2F7; }
.app-tab { flex: 1; padding: 0.85rem 1rem; background: transparent; border: none; border-bottom: 3px solid transparent; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 600; color: #718096; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; position: relative; bottom: -2px; }
.app-tab:hover { color: #38B6FF; background: #F0F9FF; }
.app-tab.active { color: #38B6FF; border-bottom-color: #38B6FF; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Step indicator ── */
.step-indicator { display: flex; align-items: flex-start; margin-bottom: 2rem; }
.step-item { flex: 1; text-align: center; position: relative; }
.step-item:not(:last-child)::after { content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: #E2E8F0; z-index: 0; }
.step-item.completed::after { background: #22C55E; }
.step-circle { width: 34px; height: 34px; border-radius: 50%; background: #EDF2F7; color: #A0AEC0; display: inline-flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.82rem; margin-bottom: 0.35rem; position: relative; z-index: 1; transition: all 0.3s; }
.step-item.active .step-circle { background: #38B6FF; color: #fff; box-shadow: 0 0 0 4px rgba(56,182,255,0.2); }
.step-item.completed .step-circle { background: #22C55E; color: #fff; box-shadow: 0 0 0 4px rgba(34,197,94,0.2); }
.step-label { font-size: 0.7rem; font-weight: 600; color: #A0AEC0; text-transform: uppercase; letter-spacing: 0.05em; display: block; }
.step-item.active .step-label { color: #38B6FF; }
.step-item.completed .step-label { color: #22C55E; }

/* ── Step content ── */
.form-step { display: none; }
.form-step.active { display: block; }

/* ── Step nav buttons ── */
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #EDF2F7; }
.btn-prev { padding: 0.75rem 1.75rem; background: #F7FAFC; color: #4A5568; border: 1.5px solid #E2E8F0; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-prev:hover { background: #EDF2F7; }
.btn-next { padding: 0.75rem 1.75rem; background: #38B6FF; color: #fff; border: none; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(56,182,255,0.35); transition: all 0.2s; }
.btn-next:hover { background: #259fe8; transform: translateY(-1px); }
.step-count { font-size: 0.8rem; color: #A0AEC0; font-family: 'Inter', sans-serif; font-weight: 600; }

/* ── Success banner ── */
.success-banner { display: none; background: #C6F6D5; border: 1px solid #9AE6B4; color: #276749; border-radius: 8px; padding: 1rem 1.25rem; font-size: 0.9rem; font-weight: 500; margin-bottom: 1.5rem; flex-direction: column; gap: 0.6rem; }
.success-banner.show { display: flex; }
.success-banner-main { display: flex; align-items: center; gap: 0.6rem; }
.success-ref-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.55rem 0.85rem; background: #F0FFF4; border: 1.5px solid #68D391; border-radius: 8px; }
.success-ref-label { font-size: 0.82rem; font-weight: 600; color: #276749; }
.success-ref-number { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 800; color: #22543D; letter-spacing: 0.08em; }
.success-ref-note { font-size: 0.78rem; color: #2F855A; line-height: 1.5; }

/* ── T&C / Terms modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.55); backdrop-filter: blur(4px); z-index: 9000; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 16px; width: 100%; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-head { padding: 1.25rem 1.75rem; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-head h3 { margin: 0; font-size: 1.1rem; color: #0F172A; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #718096; padding: 0.25rem; transition: color 0.2s; }
.modal-close:hover { color: #0F172A; }
.modal-body { padding: 1.5rem 1.75rem; overflow-y: auto; }
.modal-body h4 { font-size: 0.9rem; color: #0F172A; margin: 1.25rem 0 0.4rem; }
.modal-body p, .modal-body li { font-size: 0.875rem; color: #4A5568; line-height: 1.75; }
.modal-body ul { padding-left: 1.25rem; }
.modal-contact { background: #F0F9FF; border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1.25rem; font-size: 0.85rem; color: #4A5568; }
.modal-foot { padding: 1rem 1.75rem; border-top: 1px solid #E2E8F0; display: flex; justify-content: flex-end; flex-shrink: 0; }
.btn-modal-accept { padding: 0.65rem 1.75rem; background: #38B6FF; color: #fff; border: none; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-modal-accept:hover { background: #259fe8; }

/* ── Reset confirmation modal ── */
.reset-modal-overlay { z-index: 10000; }
.reset-modal-box { max-width: 440px; text-align: center; padding: 1.75rem; animation: resetModalIn 0.28s ease-out; }
.reset-modal-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #D97706; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 10px 24px rgba(217,119,6,0.18); }
.reset-modal-box h3 { margin: 0 0 0.55rem; font-size: 1.15rem; color: #0F172A; }
.reset-modal-box p { margin: 0 0 1.25rem; color: #64748B; line-height: 1.65; font-size: 0.95rem; }
.reset-modal-actions { display: flex; justify-content: center; gap: 0.75rem; }
.btn-reset-cancel, .btn-reset-confirm { padding: 0.72rem 1.2rem; border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn-reset-cancel { background: #F8FAFC; color: #475569; border: 1.5px solid #E2E8F0; }
.btn-reset-cancel:hover { background: #F1F5F9; transform: translateY(-1px); }
.btn-reset-confirm { background: linear-gradient(135deg, #F59E0B, #D97706); color: #fff; border: none; box-shadow: 0 10px 24px rgba(217,119,6,0.2); }
.btn-reset-confirm:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(217,119,6,0.25); }
@keyframes resetModalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Privacy notice overlay ── */
.privacy-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.7); backdrop-filter: blur(6px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.privacy-overlay.hidden { display: none; }
.privacy-box { background: #fff; border-radius: 18px; width: 100%; max-width: 660px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.privacy-head { padding: 1.5rem 2rem 1rem; border-bottom: 1.5px solid #EDF2F7; flex-shrink: 0; }
.privacy-head-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.35rem; }
.privacy-head-icon { width: 40px; height: 40px; border-radius: 10px; background: #EBF8FF; display: flex; align-items: center; justify-content: center; color: #38B6FF; font-size: 1.1rem; flex-shrink: 0; }
.privacy-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; color: #0F172A; }
.privacy-head p { margin: 0; font-size: 0.82rem; color: #718096; }
.privacy-body { padding: 1.25rem 2rem; overflow-y: auto; flex: 1; }
.privacy-body h4 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #38B6FF; margin: 1.25rem 0 0.4rem; }
.privacy-body h4:first-child { margin-top: 0; }
.privacy-body p, .privacy-body li { font-size: 0.875rem; color: #4A5568; line-height: 1.75; margin: 0 0 0.4rem; }
.privacy-body ul { padding-left: 1.25rem; margin: 0 0 0.5rem; }
.privacy-body strong { color: #1A202C; }
/* Ensure consent box styling applies on all screen sizes */
.privacy-body .privacy-agree-row {
  background: #F0F9FF !important;
  border: 1.5px solid #38B6FF !important;
  border-radius: 10px !important;
  padding: 0.85rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0 !important;
}
.privacy-body .privacy-agree-row label {
  font-size: 0.85rem;
  color: #4A5568 !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.privacy-foot { padding: 1.25rem 2rem; border-top: 1.5px solid #EDF2F7; flex-shrink: 0; }
.privacy-agree-row { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 1.5rem; margin-bottom: 1rem; background: #F0F9FF !important; border: 1.5px solid #38B6FF !important; border-radius: 10px !important; padding: 0.85rem !important; }
.privacy-agree-row input { margin-top: 3px; flex-shrink: 0; accent-color: #38B6FF; width: 16px; height: 16px; cursor: pointer; }
.privacy-agree-row label { font-size: 0.85rem; color: #4A5568 !important; line-height: 1.55; cursor: pointer; margin: 0 !important; }
.privacy-agree-row label strong { color: #0F172A; }
.privacy-btn-row { display: flex; gap: 0.75rem; justify-content: flex-end; }
.btn-privacy-decline { padding: 0.7rem 1.5rem; background: #F7FAFC; color: #718096; border: 1.5px solid #E2E8F0; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-privacy-decline:hover { background: #EDF2F7; color: #4A5568; }
.btn-privacy-agree { padding: 0.7rem 1.75rem; background: #38B6FF; color: #fff; border: none; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(56,182,255,0.35); transition: all 0.2s; }
.btn-privacy-agree:hover { background: #259fe8; transform: translateY(-1px); }
.btn-privacy-agree:disabled { background: #CBD5E0; box-shadow: none; cursor: not-allowed; transform: none; }
.privacy-error { font-size: 0.78rem; color: #E53E3E; margin-top: -0.5rem; margin-bottom: 0.75rem; display: none; }
.privacy-error.show { display: block; }
.privacy-scroll-hint { font-size: 0.78rem; color: #38B6FF; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; animation: hintBob 1.4s ease-in-out infinite; }
.privacy-agree-row input[type="checkbox"]:disabled { opacity: 0.4; cursor: not-allowed; }
.privacy-agree-row:has(input:disabled) label { opacity: 0.4; cursor: not-allowed; }
@keyframes hintBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .apply-card { padding: 1.75rem 1.25rem; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .apply-intro h1 { font-size: 1.6rem; }
  .app-tab { font-size: 0.78rem; padding: 0.75rem 0.5rem; }
  .step-label { display: none; }
  .privacy-head { padding: 1.25rem 1.25rem 0.75rem; }
  .privacy-body { padding: 1rem 1.25rem; }
  .privacy-foot { padding: 1rem 1.25rem; }
}

/* ── Payment Summary ── */
.payment-summary { margin-top: 1.25rem; border: 2px solid #38B6FF; border-radius: 14px; overflow: hidden; }
.payment-summary-title { background: #38B6FF; color: #fff; padding: 0.75rem 1.25rem; font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; display: flex; align-items: center; gap: 0.5rem; }
.payment-summary-body { padding: 1rem 1.25rem; background: #F0F9FF; }
.payment-row { display: flex; justify-content: space-between; align-items: center; padding: 0.35rem 0; }
.payment-label { font-size: 0.88rem; color: #4A5568; font-weight: 500; }
.payment-amount { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 700; color: #0F172A; }
.payment-note { font-size: 0.78rem; color: #718096; line-height: 1.55; margin: 0.25rem 0 0.5rem; }
.payment-divider { height: 1px; background: #BEE3F8; margin: 0.5rem 0; }
.payment-total .payment-label { font-weight: 700; color: #0F172A; font-size: 0.9rem; }
.payment-total .payment-amount { font-size: 1.1rem; color: #38B6FF; }
.payment-wire-reminder { background: #FFFBEB; border: 1.5px solid #FCD34D; border-radius: 10px; padding: 0.85rem 1rem; margin-top: 0.75rem; }
.payment-wire-reminder-title { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 700; color: #92400E; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.payment-wire-reminder-title i { color: #D97706; }
.payment-wire-reminder p { font-size: 0.83rem; color: #78350F; line-height: 1.65; margin: 0 0 0.4rem; }
.payment-wire-reminder p:last-child { margin-bottom: 0; }
.payment-wire-example { background: #FEF3C7; border-radius: 6px; padding: 0.4rem 0.65rem; font-size: 0.8rem !important; color: #92400E !important; }

/* ── Rented docs notice ── */
.rented-docs-notice { display: flex; align-items: flex-start; gap: 0.6rem; background: #FFFBEB; border: 1.5px solid #FCD34D; border-radius: 10px; padding: 0.85rem 1rem; font-size: 0.85rem; color: #92400E; line-height: 1.55; margin-bottom: 0.25rem; }
.rented-docs-notice i { color: #D97706; font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.rented-docs-notice--plain { display: block; font-size: 0.85rem; line-height: 1.65; border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; border-width: 1.5px; border-style: solid; }

/* ── Application type picker (shown after privacy agreement) ── */
.privacy-box.hidden { display: none; }
.apptype-box { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.25); animation: appTypeIn 0.28s ease-out; }
.apptype-box.hidden { display: none; }
@keyframes appTypeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.apptype-body { padding: 1.5rem 2rem; display: flex; flex-direction: column; gap: 0.85rem; }
.apptype-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; background: #F7FAFC; border: 2px solid #E2E8F0; border-radius: 14px; cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s; width: 100%; }
.apptype-card:hover { border-color: #38B6FF; background: #F0F9FF; box-shadow: 0 4px 16px rgba(56,182,255,0.14); transform: translateY(-2px); }
.apptype-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.apptype-icon--res  { background: #EBF8FF; color: #38B6FF; }
.apptype-icon--biz  { background: #F0FFF4; color: #38A169; }
.apptype-icon--bundle   { background: #FFF5F7; color: #E53E3E; }
.apptype-icon--internet { background: #EBF8FF; color: #38B6FF; }
.apptype-icon--cable    { background: #FFFAF0; color: #DD6B20; }
.apptype-info { flex: 1; }
.apptype-title { display: block; font-family: 'Inter', sans-serif; font-size: 0.97rem; font-weight: 700; color: #0F172A; margin-bottom: 0.2rem; }
.apptype-desc { display: block; font-size: 0.81rem; color: #718096; line-height: 1.5; }
.apptype-arrow { color: #CBD5E0; font-size: 0.85rem; flex-shrink: 0; transition: color 0.2s, transform 0.2s; }
.apptype-card:hover .apptype-arrow { color: #38B6FF; transform: translateX(3px); }
.apptype-foot { padding: 1rem 2rem 1.5rem; display: flex; justify-content: flex-start; }

@media (max-width: 640px) {
  .apptype-body { padding: 1.25rem; }
  .apptype-foot { padding: 0.75rem 1.25rem 1.25rem; }
  .apptype-card { padding: 1rem; }
}

/* ── Field tooltip (? icon popover) ── */
.field-tooltip { position: relative; display: inline-flex; align-items: center; }
.field-tooltip-btn { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #CBD5E0; color: #fff; font-size: 0.65rem; font-weight: 700; font-family: 'Inter', sans-serif; border: none; cursor: pointer; padding: 0; line-height: 1; transition: background 0.2s; flex-shrink: 0; }
.field-tooltip-btn:hover { background: #38B6FF; }
.field-tooltip-btn.active { background: #38B6FF; }
.field-tooltip-pop { display: none; position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: #1A202C; color: #E2E8F0; font-size: 0.78rem; font-weight: 400; line-height: 1.55; padding: 0.55rem 0.75rem; border-radius: 8px; width: 240px; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.18); pointer-events: none; }
.field-tooltip-pop::before { content: ''; position: absolute; right: 100%; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-right-color: #1A202C; }
.field-tooltip-pop.show { display: block; }
@media (max-width: 640px) {
  .field-tooltip-pop { left: auto; right: 0; top: calc(100% + 8px); transform: none; width: 210px; }
  .field-tooltip-pop::before { display: none; }
}

/* ── Full-page Success Screen ── */
.success-page { display: none; min-height: calc(100vh - 68px); align-items: center; justify-content: center; padding: 3rem 1.25rem; background: #F0F9FF; }
.success-page.show { display: flex; }
.success-page-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 40px rgba(0,0,0,0.09); padding: 3rem 2.5rem; width: 100%; max-width: 520px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0; animation: successPageIn 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes successPageIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.success-page-icon { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, #C6F6D5, #9AE6B4); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #22543D; margin-bottom: 1.5rem; box-shadow: 0 8px 24px rgba(34,197,94,0.22); }
.success-page-title { font-family: 'Inter', sans-serif; font-size: 1.6rem; font-weight: 800; color: #0F172A; margin: 0 0 0.6rem; }
.success-page-msg { font-size: 0.95rem; color: #4A5568; line-height: 1.7; margin: 0 0 1.75rem; }
.success-page-ref-box { background: #F0FFF4; border: 2px solid #68D391; border-radius: 14px; padding: 1.1rem 2rem; width: 100%; margin-bottom: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.success-page-ref-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #276749; }
.success-page-ref-number { font-family: 'Inter', sans-serif; font-size: 1.45rem; font-weight: 800; color: #22543D; letter-spacing: 0.1em; word-break: break-all; }
.success-page-note { display: flex; align-items: flex-start; gap: 0.5rem; background: #EBF8FF; border: 1.5px solid #90CDF4; border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.83rem; color: #2B6CB0; line-height: 1.55; width: 100%; text-align: left; margin-bottom: 2rem; }
.success-page-note i { color: #3182CE; flex-shrink: 0; margin-top: 2px; }
.success-page-btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.85rem 2.25rem; background: #38B6FF; color: #fff; border: none; border-radius: 50px; font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 4px 16px rgba(56,182,255,0.35); transition: background 0.2s, transform 0.2s; }
.success-page-btn:hover { background: #259fe8; transform: translateY(-2px); }
@media (max-width: 640px) {
  .success-page-card { padding: 2rem 1.25rem; }
  .success-page-title { font-size: 1.35rem; }
  .success-page-ref-number { font-size: 1.15rem; }
}

/* ── Success page ref copy ── */
.success-page-ref-row { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.success-page-copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: #C6F6D5; color: #276749; border: 1.5px solid #9AE6B4; cursor: pointer; font-size: 0.95rem; transition: background 0.2s, color 0.2s, transform 0.15s; flex-shrink: 0; }
.success-page-copy-btn:hover { background: #9AE6B4; color: #22543D; transform: translateY(-1px); }
.success-page-copy-feedback { display: block; font-size: 0.75rem; font-weight: 600; color: #22543D; letter-spacing: 0.04em; height: 0; overflow: hidden; opacity: 0; transition: opacity 0.2s; margin-top: 0; }
.success-page-copy-feedback.show { height: auto; opacity: 1; margin-top: 0.35rem; }


/* ── Mobile Optimizations for 360px-400px screens ── */
@media (max-width: 400px) {
  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
  }
  
  * {
    box-sizing: border-box;
  }
  
  /* Page header */
  .page-header {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
  }
  
  .page-header a {
    font-size: 0.9rem;
  }
  
  .page-header img {
    height: 32px;
  }
  
  /* Privacy overlay and modal */
  .privacy-overlay {
    padding: 0.75rem;
  }
  
  .privacy-box {
    max-height: 95vh;
    border-radius: 14px;
  }
  
  .privacy-head {
    padding: 1.25rem 1.25rem 0.85rem;
  }
  
  .privacy-head-row {
    gap: 0.6rem;
    align-items: flex-start;
  }
  
  .privacy-head-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .privacy-head h2 {
    font-size: 1rem;
    line-height: 1.3;
  }
  
  .privacy-head p {
    font-size: 0.75rem;
    line-height: 1.4;
  }
  
  .privacy-body {
    padding: 0.85rem 1.25rem;
  }
  
  .privacy-body h4 {
    font-size: 0.72rem;
    margin: 0.85rem 0 0.3rem;
  }
  
  .privacy-body h4:first-child {
    margin-top: 0;
  }
  
  .privacy-body p,
  .privacy-body li {
    font-size: 0.78rem;
    line-height: 1.6;
    margin-bottom: 0.35rem;
  }
  
  .privacy-body ul {
    padding-left: 1.1rem;
    margin-bottom: 0.45rem;
  }
  
  /* Consent checkbox inside scrollable body */
  .privacy-body .privacy-agree-row {
    background: #F0F9FF;
    border: 1.5px solid #38B6FF;
    border-radius: 10px;
    padding: 0.85rem;
    margin-top: 1.25rem;
    gap: 0.5rem;
  }
  
  .privacy-body .privacy-agree-row input {
    margin-top: 2px;
    width: 14px;
    height: 14px;
  }
  
  .privacy-body .privacy-agree-row label {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  
  .privacy-foot {
    padding: 0.75rem 1.25rem;
  }
  
  /* Consent checkbox now inside scrollable body */
  .privacy-body .privacy-agree-row {
    background: #F0F9FF;
    border: 1.5px solid #38B6FF;
    border-radius: 10px;
    padding: 0.85rem !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .privacy-body .privacy-agree-row input {
    width: 14px !important;
    height: 14px !important;
  }
  
  .privacy-body .privacy-agree-row label {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
  }
  
  .privacy-scroll-hint {
    font-size: 0.72rem !important;
    margin-bottom: 0.6rem !important;
  }
  
  .privacy-error {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .privacy-agree-row {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .privacy-agree-row input {
    margin-top: 2px;
    width: 14px;
    height: 14px;
  }
  
  .privacy-agree-row label {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  
  .privacy-btn-row {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .btn-privacy-decline,
  .btn-privacy-agree {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .privacy-scroll-hint {
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.5rem;
    line-height: 1.3;
  }
  
  /* Application type picker */
  .apptype-box {
    max-width: 100%;
    border-radius: 14px;
  }
  
  .apptype-body {
    padding: 1rem !important;
  }
  
  .apptype-card {
    padding: 0.85rem !important;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    min-height: auto;
  }
  
  .apptype-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
    flex-shrink: 0;
  }
  
  .apptype-info {
    flex: 1;
    text-align: left;
  }
  
  .apptype-title {
    font-size: 0.9rem !important;
    display: block;
    margin-bottom: 0.25rem;
  }
  
  .apptype-desc {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    display: block;
  }
  
  .apptype-arrow {
    font-size: 0.85rem !important;
    flex-shrink: 0;
    margin-left: 0.25rem;
  }
  
  .apptype-foot {
    padding: 0.75rem 1rem 1rem !important;
  }
  
  /* Application form */
  .apply-wrapper {
    padding: 2rem 1rem 4rem;
  }
  
  .apply-intro {
    margin-bottom: 1.5rem;
  }
  
  .apply-intro h1 {
    font-size: 1.6rem;
  }
  
  .apply-intro p {
    font-size: 0.88rem;
  }
  
  .apply-card {
    padding: 1.5rem 1.1rem !important;
    border-radius: 14px;
  }
  
  /* Form elements */
  .fs-title {
    font-size: 0.68rem;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  label {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    font-size: 0.88rem;
    padding: 0.65rem 0.8rem;
  }
  
  .field-error {
    font-size: 0.75rem;
  }
  
  /* Radio and checkbox groups */
  .radio-group {
    gap: 1rem;
  }
  
  .radio-group label {
    font-size: 0.85rem;
  }
  
  /* File upload */
  .file-label {
    padding: 0.65rem 0.8rem;
    font-size: 0.85rem;
    gap: 0.6rem;
  }
  
  .file-hint {
    font-size: 0.74rem;
  }
  
  /* Subscription type toggle */
  .subs-toggle {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .subs-btn {
    min-width: 100%;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Step indicator */
  .step-indicator {
    margin-bottom: 1.5rem;
    gap: 0.25rem;
  }
  
  .step-circle {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
  
  .step-item:not(:last-child)::after {
    top: 15px;
  }
  
  .step-label {
    font-size: 0.65rem;
  }
  
  /* Step navigation */
  .step-nav {
    flex-direction: column-reverse;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
  
  .btn-prev,
  .btn-next {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .step-count {
    font-size: 0.75rem;
    text-align: center;
  }
  
  /* Review summary */
  .review-section-title {
    padding: 0.55rem 0.85rem;
    font-size: 0.68rem;
  }
  
  .review-grid {
    grid-template-columns: 1fr !important;
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }
  
  .review-label {
    font-size: 0.7rem;
  }
  
  .review-value {
    font-size: 0.85rem;
  }
  
  /* Success banner */
  .success-banner {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }
  
  .success-ref-row {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .success-ref-label {
    font-size: 0.78rem;
  }
  
  .success-ref-number {
    font-size: 0.95rem;
  }
  
  .success-ref-note {
    font-size: 0.76rem;
  }
  
  /* Modals */
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-box {
    max-height: 85vh;
    border-radius: 14px;
  }
  
  .modal-head {
    padding: 1rem 1.25rem;
  }
  
  .modal-head h3 {
    font-size: 1rem;
  }
  
  .modal-body {
    padding: 1.25rem;
  }
  
  .modal-body h4 {
    font-size: 0.85rem;
  }
  
  .modal-body p,
  .modal-body li {
    font-size: 0.82rem;
  }
  
  .modal-foot {
    padding: 0.85rem 1.25rem;
  }
  
  .btn-modal-accept {
    width: 100%;
    padding: 0.7rem 1.5rem;
  }
  
  /* Reset modal */
  .reset-modal-box {
    padding: 1.5rem 1.25rem !important;
  }
  
  .reset-modal-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }
  
  .reset-modal-box h3 {
    font-size: 1.05rem;
  }
  
  .reset-modal-box p {
    font-size: 0.88rem;
  }
  
  .reset-modal-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-reset-cancel,
  .btn-reset-confirm {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.88rem;
  }
  
  /* Success page */
  .success-page {
    padding: 2rem 1rem;
  }
  
  .success-page-card {
    padding: 1.75rem 1.1rem !important;
  }
  
  .success-page-title {
    font-size: 1.3rem !important;
  }
  
  .success-page-text {
    font-size: 0.88rem;
  }
  
  .success-page-btn {
    padding: 0.8rem 2rem;
    font-size: 0.88rem;
  }
  
  /* Tabs */
  .app-tabs {
    gap: 0.25rem;
    margin-bottom: 1.5rem;
  }
  
  .app-tab {
    padding: 0.75rem 0.65rem;
    font-size: 0.8rem;
  }
  
  /* T&C row */
  .tc-row label {
    font-size: 0.82rem;
  }
  
  /* Ensure text wraps properly */
  input, select, textarea, label, p, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
