/* ═══════════════════════════════════════════════════════════
   1. PROGRESS BAR — status badge override
   ═══════════════════════════════════════════════════════════ */
.progress-status-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   2. MEMBERSHIP TYPE SELECTION
   ═══════════════════════════════════════════════════════════ */
.membership-card-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 28px 0;
}

.membership-card {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

.membership-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.1);
}

.membership-card.selected {
    border-color: var(--primary-color);
    background: rgba(26, 58, 82, 0.04);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.membership-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.membership-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(26, 58, 82, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-color);
    margin-right: 18px;
    flex-shrink: 0;
}

.membership-card.selected .membership-icon {
    background: var(--primary-color);
    color: #fff;
}

.membership-info { flex: 1; }

.membership-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.membership-info p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.membership-radio-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.membership-card.selected .membership-radio-dot {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.membership-card.selected .membership-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

/* ═══════════════════════════════════════════════════════════
   3. CREATE ACCOUNT — field system
   ═══════════════════════════════════════════════════════════ */
.field-wrap {
    position: relative;
    margin-bottom: 22px;
}

.field-wrap label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}

.field-wrap label .req { color: #ef4444; }

.field-input {
    width: 100%;
    height: 52px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    color: #0f172a;
    padding: 0 16px 0 46px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.field-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1);
}

.field-input.no-icon  { padding-left: 16px; }
.field-input.has-suffix { padding-right: 52px; }

.input-box { position: relative; }

.field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.input-box:focus-within .field-icon { color: var(--primary-color); }

.field-suffix {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 0 12px 12px 0;
    transition: color 0.2s;
    background: transparent;
    border: none;
    outline: none;
}

.field-suffix:hover { color: var(--primary-color); }

.field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 5px;
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   4. PHONE INPUT
   ═══════════════════════════════════════════════════════════ */
.phone-wrap {
    display: flex;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    height: 52px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1);
}

.phone-code-wrap {
    display: flex;
    align-items: center;
    border-right: 1.5px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 4px 0 10px;
    min-width: 110px;
    flex-shrink: 0;
}

.select2-phone .select2-container { width: 100% !important; }

.select2-phone .select2-container--default .select2-selection--single {
    height: 50px !important;
    border: none !important;
    background: transparent !important;
    display: flex;
    align-items: center;
}

.select2-phone .select2-selection__rendered {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    padding-left: 2px !important;
    line-height: 50px !important;
}

.select2-phone .select2-selection__arrow { height: 50px !important; }

.phone-number-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 16px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    height: 100%;
}

/* ═══════════════════════════════════════════════════════════
   5. SELECT2 — shared dropdown styles
   ═══════════════════════════════════════════════════════════ */
.select2-dropdown {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1) !important;
    z-index: 10000 !important;
}

.select2-search--dropdown { padding: 10px !important; }

.select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.select2-results__option { padding: 10px 14px !important; font-size: 14px; }

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
}

/* Nationality select (verify_identity) */
.nationality-group { width: 100%; margin-bottom: 1.5rem; }

.nationality-group .select2-container { width: 100% !important; }

.nationality-group .select2-container--default .select2-selection--single {
    height: 54px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    background: #fff !important;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.nationality-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 52px !important;
    padding-left: 16px !important;
    color: #0f172a !important;
    font-weight: 500 !important;
    font-size: 0.95rem;
}

.nationality-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 52px !important;
    right: 12px !important;
}

.nationality-group .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.08) !important;
}

/* ═══════════════════════════════════════════════════════════
   6. PASSWORD STRENGTH METER
   ═══════════════════════════════════════════════════════════ */
.strength-row {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.strength-segment {
    height: 4px;
    border-radius: 99px;
    flex: 1;
    background: #e2e8f0;
    transition: background 0.3s ease;
}

.strength-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

#strengthText { font-weight: 700; font-size: 12px; }

.req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 16px;
    margin-top: 8px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #94a3b8;
    transition: color 0.2s;
}

.req-item .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: transparent;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.req-item.met             { color: #166534; }
.req-item.met .dot        { background: #16a34a; color: #fff; }

/* ═══════════════════════════════════════════════════════════
   7. SECTION DIVIDER
   ═══════════════════════════════════════════════════════════ */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 22px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════
   8. TERMS & CONDITIONS CHECKBOX
   ═══════════════════════════════════════════════════════════ */
.tc-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.tc-wrap:hover             { border-color: var(--primary-color); }

.tc-wrap.checked {
    border-color: var(--primary-color);
    background: rgba(26, 58, 82, 0.03);
}

.tc-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 1px;
}

.tc-wrap.checked .tc-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.tc-text { font-size: 13.5px; color: #475569; line-height: 1.5; }

.tc-text a { color: var(--primary-color); font-weight: 700; text-decoration: none; }

.tc-text a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   9. SUBMIT BUTTON
   ═══════════════════════════════════════════════════════════ */
.btn-submit {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(26, 58, 82, 0.25);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   10. PAGE HEADER (create_account)
   ═══════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.page-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(26, 58, 82, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.page-header-text h2 { font-size: 22px; font-weight: 800; color: #0f172a; margin: 0 0 4px; }

.page-header-text p  { font-size: 14px; color: #64748b; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   11. TWO-COLUMN GRID
   ═══════════════════════════════════════════════════════════ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

/* ═══════════════════════════════════════════════════════════
   12. OTP VERIFICATION (email & mobile)
   ═══════════════════════════════════════════════════════════ */
.verification-header {
    text-align: center;
    margin-bottom: 2rem;
}

.verification-icon {
    width: 64px;
    height: 64px;
    background: rgba(26, 58, 82, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 28px;
}

.premium-wizard #otp-inputs.otp-container {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 40px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
}

.premium-wizard #otp-inputs .otp-input {
    width: 48px !important;
    height: 60px !important;
    flex: 0 0 48px !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    color: var(--primary-color) !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
}

.premium-wizard #otp-inputs .otp-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1) !important;
    transform: translateY(-2px) !important;
    outline: none !important;
}

.premium-wizard #otp-inputs .otp-input.filled {
    background: #f8fafc !important;
    border-color: var(--primary-color) !important;
}

.resend-timer {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 15px;
}

.resend-link { color: var(--primary-color); font-weight: 600; text-decoration: none; cursor: pointer; }

.resend-link.disabled { color: #cbd5e1; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   13. RESIDENCY SELECTION (verify_identity)
   ═══════════════════════════════════════════════════════════ */
.residency-card-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.residency-card {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.residency-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.08);
}

.residency-card.selected {
    border-color: var(--primary-color);
    background: rgba(26, 58, 82, 0.04);
}

.residency-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.residency-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(26, 58, 82, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    margin-right: 16px;
    flex-shrink: 0;
}

.residency-card.selected .residency-icon { background: var(--primary-color); color: #fff; }

.residency-info h4 { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 3px; }

.residency-info p  { font-size: 13px; color: #64748b; margin: 0; }

.residency-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.residency-card.selected .residency-radio-dot {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.residency-card.selected .residency-radio-dot::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}

.identity-fields { margin-top: 4px; }

.field-group          { margin-bottom: 20px; }

.field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.field-group label i  { color: var(--primary-color); }

.field-group input,
.field-group select {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 0 16px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
}

.field-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 44px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.field-group input:focus,
.field-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.08);
}

.divider { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }

/* ═══════════════════════════════════════════════════════════
   14. DOCUMENT UPLOAD
   ═══════════════════════════════════════════════════════════ */
.document-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; margin-bottom: 32px; }

.document-upload-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.25s ease;
    position: relative;
    cursor: pointer;
}

.document-upload-item:hover {
    border-color: #1a3a52;
    box-shadow: 0 4px 12px rgba(26, 58, 82, 0.08);
}

.document-upload-item.uploaded {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.03);
}

.doc-icon-wrapper {
    width: 52px;
    height: 52px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #1a3a52;
    margin-right: 18px;
    flex-shrink: 0;
}

.document-upload-item.uploaded .doc-icon-wrapper { background: rgba(5, 150, 105, 0.1); color: #059669; }

.doc-details { flex: 1; min-width: 0; }

.doc-title { font-size: 15px; font-weight: 700; color: #1a3a52; margin-bottom: 3px; }

.doc-hint  { font-size: 12px; color: #94a3b8; margin: 0; }

.file-name {
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.doc-status-icon { font-size: 22px; color: #059669; display: none; margin-right: 14px; }

.document-upload-item.uploaded .doc-status-icon { display: block; }

.btn-select-file {
    padding: 9px 18px;
    background: #f1f5f9;
    color: #1a3a52;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-select-file:hover                              { background: #1a3a52; color: #fff; }

.document-upload-item.uploaded .btn-select-file     { background: #dcfce7; color: #059669; }

.file-input { display: none; }

.tips-box {
    background: rgba(57, 148, 223, 0.07);
    border-left: 3px solid #1a3a52;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13.5px;
    color: #1a3a52;
}

.tips-box ul { margin: 6px 0 0; padding-left: 18px; }

.tips-box ul li { margin-bottom: 3px; }

/* ═══════════════════════════════════════════════════════════
   15. LIVENESS CHECK
   ═══════════════════════════════════════════════════════════ */
.liveness-wrapper { max-width: 460px; margin: 0 auto; }

/* Status bar */
.liveness-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.liveness-status-bar--active   { background: #f0fdf4; border-color: #86efac; color: #166534; }
.liveness-status-bar--captured { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.liveness-status-bar--verifying{ background: #fefce8; border-color: #fde047; color: #854d0e; }
.liveness-status-bar--success  { background: #f0fdf4; border-color: #4ade80; color: #166534; }
.liveness-status-bar--error    { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

.status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.3s;
}
.status-dot--active    { background: #22c55e; animation: pulse-dot 1.4s ease-in-out infinite; }
.status-dot--captured  { background: #3b82f6; }
.status-dot--verifying { background: #eab308; animation: pulse-dot 0.8s ease-in-out infinite; }
.status-dot--success   { background: #16a34a; }
.status-dot--error     { background: #ef4444; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

/* Alerts */
.liveness-alert {
    display: none;
    align-items: flex-start;
    gap: 14px;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.liveness-alert i { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.liveness-alert strong { display: block; margin-bottom: 2px; }

.liveness-alert--warn {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.liveness-alert--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e3a8a;
}

/* Camera box */
.camera-box {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #0f172a;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

#video-preview          { width: 100%; height: 100%; object-fit: cover; display: none; }
#captured-image-preview { width: 100%; height: 100%; object-fit: cover; display: none; }

.camera-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.camera-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    padding: 24px;
    text-align: center;
}
.camera-placeholder-inner i   { font-size: 52px; }
.camera-placeholder-inner p   { font-size: 14px; margin: 0; line-height: 1.5; }

/* Face oval — animated dashed border */
.face-oval {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 68%;
    border: 2.5px dashed rgba(255,255,255,0.6);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    animation: oval-pulse 2.5s ease-in-out infinite;
}
@keyframes oval-pulse {
    0%, 100% { border-color: rgba(255,255,255,0.55); }
    50%       { border-color: rgba(99,202,141,0.9); }
}

#canvas-capture { display: none; }

/* Instruction hint */
.liveness-hint {
    display: none;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 14px;
}
.liveness-hint i { color: #0b2540; flex-shrink: 0; }

/* Attempt tracker */
.attempt-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}
.attempt-tracker-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.attempt-pills { display: flex; gap: 8px; }
.attempt-pill {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #94a3b8;
    transition: all 0.3s ease;
}
.attempt-pill.active { border-color: #0b2540; color: #0b2540; background: #e8eef5; }
.attempt-pill.failed { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }

/* Circular capture button */
.camera-controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }

.btn-capture-circle {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: #0b2540;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px #0b2540, 0 4px 16px rgba(0,0,0,0.22);
    color: #fff;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}
.btn-capture-circle:hover  { background: #163d66; transform: scale(1.06); }
.btn-capture-circle:active { transform: scale(0.95); }

/* Upload fallback */
.selfie-upload-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 360px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 0;
}
.selfie-upload-zone:hover { border-color: #0b2540; background: #f0f4f8; }
.selfie-upload-inner {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; color: #64748b; text-align: center; padding: 24px;
}
.selfie-upload-inner i     { font-size: 48px; color: #0b2540; opacity: 0.7; }
.selfie-upload-inner strong{ font-size: 15px; color: #0f172a; }
.selfie-upload-inner span  { font-size: 12.5px; }

.selfie-upload-preview-img {
    width: 100%; border-radius: 16px;
    border: 2.5px solid #0b2540;
    display: block;
    max-height: 360px;
    object-fit: cover;
}
.selfie-reupload-btn {
    display: flex; align-items: center; gap: 6px;
    margin: 10px auto 0;
    background: none;
    border: 1.5px solid #0b2540;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px; font-weight: 600; color: #0b2540;
    cursor: pointer; transition: background 0.2s;
}
.selfie-reupload-btn:hover { background: #e8eef5; }

/* ═══════════════════════════════════════════════════════════
   16. INVESTMENT / FUND SELECTION
   ═══════════════════════════════════════════════════════════ */

/* Page header row */
.fund-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.fund-select-hint {
    display: none;
    align-items: center;
    gap: 6px;
    background: #d1fae5;
    color: #065f46;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.fund-select-hint i { font-size: 14px; }

/* Grid */
.investment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Skeleton loaders */
.inv-skeleton {
    border-radius: 16px;
    height: 180px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

/* Empty / error state */
.inv-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
}
.inv-empty-state i    { font-size: 48px; margin-bottom: 16px; }
.inv-empty-state p    { font-size: 14px; line-height: 1.6; margin: 0; color: #64748b; }
.inv-empty-state--error i { color: #fca5a5; }

/* Card */
.investment-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.investment-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s;
}
.investment-card:hover {
    border-color: #93b4cc;
    box-shadow: 0 4px 16px rgba(11,37,64,0.09);
    transform: translateY(-1px);
}
.investment-card.selected {
    border-color: var(--primary-color);
    background: #f0f5fa;
    box-shadow: 0 0 0 1px var(--primary-color), 0 4px 16px rgba(11,37,64,0.1);
    transform: translateY(-1px);
}
.investment-card.selected::before { background: var(--primary-color); }

/* Check circle */
.inv-check-wrap { flex-shrink: 0; padding-top: 2px; }

.inv-check {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    color: transparent;
    font-size: 11px;
}
.investment-card:hover .inv-check { border-color: #93b4cc; }
.investment-card.selected .inv-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Body */
.inv-body { flex: 1; min-width: 0; }

.inv-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.inv-name {
    font-weight: 700;
    font-size: 14.5px;
    color: #0f172a;
    line-height: 1.35;
    flex: 1;
}

/* Risk badge */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.risk-badge i { font-size: 9px; }

.risk-low     { background: #dcfce7; color: #166534; }
.risk-medium  { background: #fef9c3; color: #854d0e; }
.risk-high    { background: #fee2e2; color: #991b1b; }
.risk-default { background: #e0e7ff; color: #3730a3; }

/* Description */
.inv-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 12px;
}

/* Stats */
.inv-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid #e8eef4;
    padding-top: 12px;
    flex-wrap: wrap;
}
.inv-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 110px;
}
.inv-stat + .inv-stat { border-left: 1px solid #e8eef4; padding-left: 14px; margin-left: 14px; }
.inv-stat i {
    font-size: 15px;
    color: #94a3b8;
    flex-shrink: 0;
}
.investment-card.selected .inv-stat i { color: var(--primary-color); }
.inv-stat-label {
    display: block;
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 2px;
}
.inv-stat-value {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}
.inv-stat--highlight .inv-stat-value { color: #166534; }
.investment-card.selected .inv-stat--highlight .inv-stat-value { color: #166534; }

/* Floating selection bar */
.fund-selection-bar {
    background: #0b2540;
    color: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 20px;
    animation: slide-up 0.25s ease;
}
@keyframes slide-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fund-selection-bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.fund-sel-count {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-shrink: 0;
}
.fund-sel-num   { font-size: 28px; font-weight: 800; line-height: 1; }
.fund-sel-label { font-size: 13px; opacity: 0.75; }
.fund-sel-names {
    font-size: 12.5px;
    opacity: 0.65;
    font-weight: 500;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 16px;
    flex: 1;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   17. REVIEW DETAILS
   ═══════════════════════════════════════════════════════════ */

/* Progress badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d1fae5;
    color: #065f46;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
}

/* Membership card */
.review-membership-card {
    background: linear-gradient(135deg, #0b2540 0%, #163d66 100%);
    border-radius: 18px;
    padding: 24px 24px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.review-membership-card::before {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 130px; height: 130px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.rmc-avatar {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.rmc-info { flex: 1; min-width: 0; }
.rmc-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 5px;
    word-break: break-word;
}
.rmc-skeleton {
    display: inline-block;
    width: 180px; height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    animation: shimmer 1.4s infinite;
    background-size: 200% 100%;
}
.rmc-meta {
    font-size: 13px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.rmc-meta strong { opacity: 1; color: #fff; }
.rmc-dot { opacity: 0.4; }

/* Section header & badges */
.review-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}
.review-section--editable { border-color: #e2e8f0; }

.review-section-header {
    background: #f8fafc;
    padding: 13px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.review-section--editable .review-section-header {
    background: #f0f7ff;
    border-bottom-color: #bfdbfe;
}
.review-section-header > i    { color: var(--primary-color); font-size: 15px; flex-shrink: 0; }
.review-section-header h5 {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.review-section-header .edit-link {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Section badges */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}
.section-badge i { font-size: 10px; }
.section-badge--lock     { background: #f1f5f9; color: #64748b; }
.section-badge--verified { background: #d1fae5; color: #065f46; }
.section-badge--edit     { background: #dbeafe; color: #1e40af; }

/* Review rows (locked data) */
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    gap: 16px;
}
.review-row:last-child { border-bottom: none; }
.review-label {
    font-size: 13px;
    color: #64748b;
    flex-shrink: 0;
    min-width: 130px;
}
.review-value-locked {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-value-locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #cbd5e1;
    flex-shrink: 0;
}

/* Inline edit widget (pencil → input) */
.rfv { display: flex; align-items: center; }

.rfv-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rfv-value {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.rfv-edit-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.review-row:hover .rfv-edit-btn { color: var(--primary-color); }
.rfv-edit-btn:hover { background: #e8eef5; }

.rfv-edit {
    display: none;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.rfv-edit input {
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    min-width: 180px;
    max-width: 260px;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11,37,64,0.07);
    transition: box-shadow 0.2s;
}
.rfv-edit input:focus { box-shadow: 0 0 0 3px rgba(11,37,64,0.14); }

.rfv-save-btn {
    width: 30px; height: 30px;
    background: #0b2540;
    color: #fff;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.rfv-save-btn:hover { background: #163d66; }

.rfv-cancel-btn {
    width: 30px; height: 30px;
    background: #fff;
    color: #94a3b8;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: border-color 0.15s, color 0.15s;
}
.rfv-cancel-btn:hover { border-color: #ef4444; color: #ef4444; }

/* Products list */
.review-products-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
}
.rpc-check {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #0b2540;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.rpc-name  { flex: 1; font-size: 14px; font-weight: 600; color: #0f172a; }
.rpc-code  { font-size: 11px; font-weight: 700; color: #94a3b8; background: #f1f5f9; padding: 2px 8px; border-radius: 6px; flex-shrink: 0; }

.review-empty-msg {
    font-size: 13.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.review-empty-msg--error { color: #dc2626; }
.review-empty-msg i { flex-shrink: 0; }

/* Skeleton loader (inline) */
.loading-row {
    height: 16px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    width: 120px;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   18. SHARED ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
.loading-skeleton {
    border-radius: 14px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    height: 110px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   19. RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .document-upload-item { flex-wrap: wrap; gap: 12px; }
    .btn-select-file      { width: 100%; justify-content: center; }

    .review-row           { flex-direction: column; align-items: flex-start; gap: 6px; }
    .review-value-locked  { text-align: left; }
    .review-membership-card { flex-direction: column; text-align: center; }
    .rmc-meta             { justify-content: center; }
    .rfv-edit input       { min-width: 0; width: 100%; max-width: 100%; }
    .investment-grid      { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .membership-card  { padding: 16px 18px; }
    .membership-icon  { width: 40px; height: 40px; font-size: 18px; margin-right: 14px; }

    .premium-wizard #otp-inputs.otp-container { gap: 8px !important; }
    .premium-wizard #otp-inputs .otp-input   { width: 38px !important; height: 50px !important; flex: 0 0 38px !important; font-size: 18px !important; }

    .inv-stats { flex-direction: column; gap: 6px; }
}
