/* ============================================================
   APPLICATION WIZARD CSS
   Organized by component/step
   Mobile-first responsive
   ============================================================ */

/* ===== LANGUAGE OVERLAY (Step 0) ===== */
.lang-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.lang-overlay-card {
    background: white;
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
    position: relative;
}

.lang-overlay-logo {
    margin-bottom: 20px;
    background: #173356;
    border-radius: 16px;
    padding: 16px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lang-overlay-logo img {
    height: 48px;
    object-fit: contain;
}

.lang-overlay-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--gray-900, #1e293b);
    margin-bottom: 4px;
    line-height: 1.3;
}
.lang-overlay-sub {
    font-size: 0.92rem;
    color: var(--gray-500, #64748b);
    margin-bottom: 28px;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid var(--gray-200, #e2e8f0);
    border-radius: 14px;
    text-decoration: none;
    color: var(--gray-800, #1e293b);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}
.lang-option:hover {
    border-color: var(--primary, #1a365d);
    background: rgba(26,54,93,0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.lang-option .lang-flag {
    font-size: 1.6rem;
    line-height: 1;
}
.lang-option .lang-check {
    margin-left: auto;
    color: var(--success, #38a169);
    font-size: 0.85rem;
}
.lang-option-active {
    border-color: var(--primary, #1a365d);
    background: rgba(26,54,93,0.06);
    box-shadow: 0 0 0 3px rgba(23,51,86,0.12);
}

.lang-overlay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-600, #475569);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1rem;
    transition: all 0.15s;
}
.lang-overlay-close:hover {
    background: var(--gray-200, #e2e8f0);
    color: var(--gray-800, #1e293b);
}

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

/* ===== LANGUAGE SWITCHER (in header) ===== */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.lang-switcher {
    position: relative;
}
.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 8px 14px;
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.lang-switcher-btn:hover {
    background: rgba(255,255,255,0.25);
}
.lang-switcher-btn .lang-flag {
    font-size: 1.2rem;
}
.lang-switcher-btn i {
    font-size: 0.7rem;
    margin-left: 2px;
    transition: transform 0.2s;
}
.lang-switcher.open .lang-switcher-btn i {
    transform: rotate(180deg);
}

.lang-switcher-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}
.lang-switcher.open .lang-switcher-dropdown {
    display: block;
    animation: fadeIn 0.2s ease;
}

.lang-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700, #334155);
    text-decoration: none;
    transition: background 0.15s;
}
.lang-dd-item:hover { background: var(--gray-50, #f8fafc); }
.lang-dd-item.active {
    background: rgba(26,54,93,0.06);
    color: var(--primary, #1a365d);
}
.lang-dd-item .lang-flag { font-size: 1.2rem; }
.lang-dd-item i { margin-left: auto; font-size: 0.75rem; color: var(--success, #38a169); }

/* ===== WIZARD CORE ===== */
.form-wizard {
    background: var(--white, #fff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,0.08));
    padding: var(--space-xl, 32px);
    max-width: 980px;
    margin: 0 auto;
}

.step-heading {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--gray-900, #1e293b);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--gray-100, #f1f5f9);
}
.step-heading i {
    color: var(--primary, #1a365d);
    font-size: 1.1rem;
}

/* Progress bar */
.wizard-progress {
    display: flex;
    gap: 4px;
    padding: 16px 0 24px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.wizard-progress::-webkit-scrollbar { display: none; }

.progress-step {
    flex: 1;
    min-width: 60px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 2px solid var(--gray-300, #cbd5e0);
    border-radius: 50%;
    background: white;
    margin: 0 auto 6px;
    font-weight: 900;
    font-size: 13px;
    color: var(--gray-500, #64748b);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}
.progress-step.active .step-number {
    border-color: var(--primary, #1a365d);
    background: var(--primary, #1a365d);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(26,54,93,0.12);
}
.progress-step.completed .step-number {
    border-color: var(--success, #38a169);
    background: var(--success, #38a169);
    color: white;
}
.progress-step.completed .step-number::before {
    content: '✓';
    font-weight: 900;
}

.step-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.progress-step.active .step-label { color: var(--primary, #1a365d); }
.progress-step.completed .step-label { color: var(--success, #38a169); }

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: var(--gray-200, #e2e8f0);
    z-index: 0;
}
.progress-step.completed:not(:last-child)::after { background: var(--success, #38a169); }

/* Steps */
.form-step { display: none; animation: fadeIn 0.3s ease; }
.form-step.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ── 3-колоночный ряд ─────────────────────────── */
.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .form-row-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    /* На планшете третий элемент занимает всю ширину */
    .form-row-3 .form-group:nth-child(3) {
        grid-column: 1 / -1;
    }
}


/* Form layout */
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field-error {
    font-size: 0.82rem;
    color: var(--danger, #e53e3e);
    margin-top: 4px;
    min-height: 0;
}
.is-invalid {
    border-color: var(--danger, #e53e3e) !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    font-size: 0.95rem;
}

/* ===== INTERNATIONAL PHONE INPUT ===== */
.intl-phone-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.intl-phone-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-300, #cbd5e0);
    border-right: none;
    border-radius: var(--radius-md, 8px) 0 0 var(--radius-md, 8px);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-700, #334155);
    white-space: nowrap;
    transition: background 0.15s;
    min-width: 100px;
}
.intl-phone-flag:hover { background: var(--gray-100, #f1f5f9); }
.intl-phone-flag .iti-flag { font-size: 1.3rem; line-height: 1; }
.intl-phone-flag i { font-size: 0.65rem; color: var(--gray-400); margin-left: 2px; }

.intl-phone-input {
    border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0 !important;
    flex: 1;
    min-width: 0;
}

.intl-phone-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    max-height: 320px;
    overflow: hidden;
}
.intl-phone-dropdown.open { display: block; animation: fadeIn 0.15s ease; }

.intl-phone-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}
.intl-phone-search-wrap i { color: var(--gray-400); font-size: 0.85rem; }
.intl-phone-search {
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
    background: transparent;
}

.intl-phone-list {
    max-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.intl-phone-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.1s;
    border-bottom: 1px solid var(--gray-50, #f8fafc);
}
.intl-phone-item:hover { background: var(--gray-50, #f8fafc); }
.intl-phone-item.active { background: rgba(26,54,93,0.06); font-weight: 700; }
.intl-phone-item .iti-emoji { font-size: 1.3rem; width: 28px; text-align: center; }
.intl-phone-item .iti-name { flex: 1; color: var(--gray-700, #334155); }
.intl-phone-item .iti-dial { color: var(--gray-500, #64748b); font-weight: 700; font-size: 0.82rem; }
.intl-phone-item.separator {
    border-bottom: 2px solid var(--gray-200, #e2e8f0);
    margin-bottom: 2px;
}

/* ===== EMAIL VERIFICATION ===== */
.email-verify-wrap { position: relative; }

.email-verify-row {
    margin-top: 8px;
}

.email-code-row {
    margin-top: 10px;
    text-align: center;
}

.email-code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.code-digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 900;
    border: 2px solid var(--gray-300, #cbd5e0);
    border-radius: 10px;
    outline: none;
    transition: all 0.15s;
    font-family: 'Courier New', monospace;
    color: var(--gray-900, #1e293b);
    background: white;
}
.code-digit:focus {
    border-color: var(--primary, #1a365d);
    box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
}
.code-digit.filled {
    border-color: var(--success, #38a169);
    background: rgba(56,161,105,0.04);
}
.code-digit.error {
    border-color: var(--danger, #e53e3e);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.email-code-status {
    font-size: 0.85rem;
    margin-top: 4px;
    min-height: 20px;
}
.email-code-status.success { color: var(--success, #38a169); }
.email-code-status.error { color: var(--danger, #e53e3e); }
.email-code-status.info { color: var(--gray-600, #475569); }

.email-verified-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    background: rgba(56,161,105,0.08);
    color: var(--success, #38a169);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
}
.email-verified-badge i { font-size: 1rem; }

.btn-accent {
    background: var(--accent, #f59e0b);
    color: white;
    border: none;
    font-weight: 700;
}
.btn-accent:hover { opacity: 0.9; }
.btn-link {
    background: none;
    border: none;
    color: var(--primary, #1a365d);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}

/* ===== LANGUAGES TABLE (Step 2) ===== */
.languages-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--gray-200, #e2e8f0);
    background: white;
}
.languages-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 540px;
    font-size: 0.9rem;
}
.languages-table th,
.languages-table td {
    padding: 12px 10px;
    border: 1px solid var(--gray-200, #e2e8f0);
    text-align: center;
}
.languages-table th {
    background: var(--gray-50, #f8fafc);
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
}
.languages-table td:first-child {
    text-align: left;
    font-weight: 700;
    background: var(--gray-50, #f8fafc);
    position: sticky;
    left: 0;
    min-width: 120px;
}
.language-radio { width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary, #1a365d); }

/* ===== REPEATERS (Step 3 & 4) ===== */
.repeater-item {
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.repeater-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200, #e2e8f0);
}
.repeater-item-title { font-weight: 800; color: var(--gray-800, #1e293b); font-size: 0.95rem; }
.remove-repeater-btn {
    background: var(--danger, #e53e3e);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.15s;
    font-size: 0.85rem;
}
.remove-repeater-btn:active { transform: scale(0.9); }

.add-repeater-btn {
    width: 100%;
    background: transparent;
    border: 2px dashed var(--primary, #1a365d);
    color: var(--primary, #1a365d);
    border-radius: 12px;
    padding: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.92rem;
}
.add-repeater-btn:hover { background: rgba(26,54,93,0.04); }

/* ===== PHOTO UPLOAD (Step 5) ===== */
.photo-upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) { .photo-upload-container { grid-template-columns: 1fr 1fr; } }

/* ===== SMART CAPTURE CARDS (Step 5) ===== */
.sc-card {
    background: var(--gray-50, #f8fafc);
    border: 2px solid rgba(23,51,86,0.2);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    transition: border-color 0.3s;
}
.sc-card.required { border-color: rgba(23,51,86,0.35); }
.sc-card.sc-completed { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.02); }
.sc-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 14px;
}
.sc-card-title { font-weight: 800; font-size: 0.95rem; color: var(--gray-900, #1e293b); display: flex; align-items: center; gap: 6px; }
.sc-card-sub { font-size: 0.82rem; color: var(--gray-500, #64748b); margin-top: 2px; }
.badge-smart {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 16px;
    font-weight: 900; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary, #173356), #2d5a9e);
    color: white; white-space: nowrap;
}

/* Start state */
.sc-start-box {
    text-align: center; padding: 20px 16px;
    background: white; border: 2px dashed rgba(23,51,86,0.2);
    border-radius: 12px;
}
.sc-start-ico { font-size: 40px; color: var(--gray-300, #cbd5e0); margin-bottom: 12px; }
.btn-sc-camera {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 20px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #173356), #2d5a9e);
    color: white; font-weight: 800; font-size: 1rem;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(23,51,86,0.25);
    min-height: 52px;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.btn-sc-camera:hover { box-shadow: 0 5px 18px rgba(23,51,86,0.35); }
.btn-sc-camera:active { transform: scale(0.98); }
.btn-sc-camera i { font-size: 1.15rem; }
.sc-divider { margin: 10px 0; color: var(--gray-400, #94a3b8); font-size: 0.8rem; font-weight: 700; }
.btn-sc-upload {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 16px; border: 2px solid var(--gray-300, #cbd5e0);
    border-radius: 10px; background: transparent;
    color: var(--gray-600, #475569); font-weight: 700; font-size: 0.92rem;
    cursor: pointer; transition: 0.15s;
    min-height: 48px;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.btn-sc-upload:hover { border-color: var(--primary, #173356); color: var(--primary); }
.btn-sc-upload:active { transform: scale(0.98); }
.badge-optional-sc {
    padding: 3px 10px; border-radius: 12px;
    font-size: 0.7rem; font-weight: 700;
    background: var(--gray-100, #f1f5f9); color: var(--gray-500, #64748b);
    white-space: nowrap;
}

/* Camera state */
.sc-cam-viewport {
    position: relative; width: 100%;
    background: #000; border-radius: 12px; overflow: hidden;
}
.sc-cam-viewport video {
    width: 100%; display: block;
    min-height: 300px; max-height: 480px;
    object-fit: cover;
}
.sc-guide { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.sc-guide svg { width: 100%; height: 100%; }

.sc-instr {
    position: absolute; bottom: 14px; left: 0; right: 0;
    text-align: center; z-index: 10;
    font-size: 0.88rem; font-weight: 800; color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    padding: 8px 14px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(3px);
}

.sc-flash {
    position: absolute; inset: 0; z-index: 25;
    background: #fff; opacity: 0; pointer-events: none;
    transition: opacity 0.1s;
}
.sc-flash.fire { opacity: 1; transition: none; }

.sc-cam-btns {
    display: flex; align-items: center; justify-content: center;
    gap: 18px; padding: 12px 0;
}
.sc-btn-round {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--gray-100, #f1f5f9); border: none;
    color: var(--gray-700, #334155); cursor: pointer;
    display: grid; place-items: center; font-size: 1rem;
    transition: background 0.2s;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.sc-btn-round:hover { background: var(--gray-200, #e2e8f0); }
.sc-btn-shutter {
    width: 64px; height: 64px; border-radius: 50%;
    border: 4px solid var(--primary, #173356);
    background: transparent; cursor: pointer;
    position: relative; transition: all 0.15s;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.sc-btn-shutter span {
    position: absolute; inset: 5px; border-radius: 50%;
    background: var(--primary, #173356); transition: 0.15s;
}
.sc-btn-shutter:hover span { background: #2d5a9e; }
.sc-btn-shutter:active { transform: scale(0.9); }

/* Preview — single photo or two columns */
.sc-preview-row {
    margin-bottom: 12px;
}
.sc-preview-row.two-cols {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (max-width: 420px) { .sc-preview-row.two-cols { grid-template-columns: 1fr; } }
.sc-prev-label {
    font-size: 0.78rem; font-weight: 800; color: var(--gray-600, #475569);
    margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
}
.sc-prev-img {
    border-radius: 10px; overflow: hidden;
    border: 2px solid var(--gray-200, #e2e8f0);
    background: #eee;
}
.sc-prev-img img { width: 100%; display: block; max-height: 420px; object-fit: contain; }
.sc-prev-main { border-color: #22c55e; box-shadow: 0 3px 12px rgba(34,197,94,0.12); }
.sc-preview-btns { display: flex; gap: 10px; }
.sc-preview-btns .btn { flex: 1; min-height: 48px; font-size: 0.95rem; }

/* Processing */
.sc-proc-box {
    text-align: center; padding: 36px 16px;
    background: white; border-radius: 12px;
    border: 1px solid var(--gray-200, #e2e8f0);
}
.sc-spinner {
    width: 40px; height: 40px; margin: 0 auto 12px;
    border: 3px solid var(--gray-200, #e2e8f0);
    border-top-color: var(--primary, #173356);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sc-proc-text { font-weight: 800; font-size: 0.95rem; color: var(--gray-800, #1e293b); margin-bottom: 4px; }
.sc-proc-sub { font-size: 0.82rem; color: var(--gray-500, #64748b); }

/* Done */
.sc-done-row {
    display: flex; align-items: center; gap: 16px;
    padding: 12px; background: rgba(34,197,94,0.04);
    border: 2px solid rgba(34,197,94,0.2);
    border-radius: 12px;
}
@media (max-width: 480px) { .sc-done-row { flex-direction: column; text-align: center; } }
.sc-done-thumb {
    width: 100px; height: auto;
    object-fit: cover; border-radius: 8px;
    border: 2px solid #22c55e; flex-shrink: 0;
}
.sc-done-badge {
    font-weight: 800; font-size: 0.95rem; color: #22c55e;
    display: flex; align-items: center; gap: 5px;
    margin-bottom: 8px;
}

.photo-card {
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 14px;
    padding: 20px;
}
.photo-card.required {
    border-color: rgba(26,54,93,0.25);
    background: linear-gradient(to right, rgba(26,54,93,0.02), transparent);
}
.photo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.photo-title { font-weight: 900; color: var(--gray-900, #1e293b); font-size: 0.95rem; }
.photo-subtitle { color: var(--gray-600, #475569); font-size: 0.85rem; margin-top: 2px; }
.badge-required {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--danger, #e53e3e);
    color: white;
    white-space: nowrap;
}
.badge-optional { background: var(--gray-500, #64748b); }

.photo-upload-area {
    position: relative;
    min-height: 180px;
    border: 2px dashed var(--gray-300, #cbd5e0);
    border-radius: 12px;
    background: white;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}
.photo-upload-area:hover { border-color: var(--primary, #1a365d); background: rgba(26,54,93,0.01); }
.photo-upload-area.has-file {
    border-style: solid;
    border-color: var(--success, #38a169);
    background: rgba(56,161,105,0.02);
}
.upload-icon { font-size: 36px; color: var(--gray-400); margin-bottom: 8px; }
.upload-text { font-weight: 800; color: var(--gray-800, #1e293b); font-size: 0.92rem; }
.upload-subtext { color: var(--gray-500); font-size: 0.85rem; margin-top: 4px; }
.camera-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary, #1a365d);
    color: white;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    font-size: 0.85rem;
}
.photo-input { display: none !important; }

.file-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    z-index: 1;
}
.file-info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    border-radius: 0 0 10px 10px;
}
.remove-file {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--danger, #e53e3e);
    color: white;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}

.mobile-capture-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}
.mobile-capture-buttons .btn { flex: 1; min-width: 120px; font-size: 0.82rem; }
@media (min-width: 768px) { .mobile-capture-buttons { display: none; } }

.uploaded-files-info {
    background: var(--gray-50, #f8fafc);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ===== SIGNATURE (Step 6) ===== */
.signature-container { margin-top: 24px; }
#signatureCanvas {
    width: 100% !important;
    height: 200px !important;
    border: 2px solid var(--gray-300, #cbd5e0) !important;
    border-radius: 12px !important;
    background: white !important;
    touch-action: none !important;
    display: block !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: crosshair;
}
.signature-hint {
    font-size: 0.85rem;
    color: var(--gray-600, #475569);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.signature-controls {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.signature-controls .btn { min-width: 140px; }
.signature-error {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(229,62,62,0.08);
    color: #c53030;
    border-left: 3px solid var(--danger, #e53e3e);
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.88rem;
}
.signature-error.show { display: flex; }

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-content {
    width: min(980px, 95vw);
    max-height: 85vh;
    overflow: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 28px;
    animation: slideUp 0.3s ease;
}
.modal-header {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--gray-900, #1e293b);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200, #e2e8f0);
}
.modal-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200, #e2e8f0);
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 800;
    font-size: 0.9rem;
}
.modal-footer-bar div { display: flex; gap: 8px; }

.position-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) { .position-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .position-grid { grid-template-columns: repeat(3, 1fr); } }

.position-item {
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 12px;
    padding: 12px 14px;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.position-item:hover { border-color: var(--primary, #1a365d); box-shadow: 0 2px 8px rgba(0,0,0,0.06); transform: translateY(-1px); }
.position-item input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary, #1a365d); flex-shrink: 0; }
.position-title { font-weight: 800; color: var(--gray-900, #1e293b); font-size: 0.9rem; margin-bottom: 2px; }
.position-info { font-size: 0.82rem; color: var(--gray-600, #475569); margin-top: 2px; }

/* ===== WIZARD NAVIGATION ===== */
.wizard-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200, #e2e8f0);
    flex-wrap: wrap;
}
#stepInfo {
    flex: 1;
    text-align: center;
    color: var(--gray-600, #475569);
    font-weight: 800;
    font-size: 0.88rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-wizard { padding: 20px 16px; }
    .lang-overlay-card { padding: 28px 20px; }
    .lang-grid { grid-template-columns: 1fr; }
    .lang-option { padding: 12px 14px; }
    .page-header-flex { flex-direction: column; }
    .code-digit { width: 38px; height: 46px; font-size: 1.1rem; }
    .intl-phone-flag { min-width: 90px; padding: 0 8px; }
}

@media (max-width: 480px) {
    .form-wizard { padding: 16px 12px; }
    .wizard-navigation { gap: 8px; }
    #stepInfo { width: 100%; order: 3; }
    .step-label { font-size: 9px; }
    .step-number { width: 32px; height: 32px; font-size: 12px; }
    .progress-step:not(:last-child)::after { top: 16px; }
    .code-digit { width: 34px; height: 42px; font-size: 1rem; }
}

/* ===== FOCUS ===== */
:focus-visible { outline: 2px solid var(--accent, #f59e0b); outline-offset: 2px; }

/* ===== HELPERS ===== */
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 20px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 20px; }
.d-block { display: block; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500, #64748b); }
.w-100 { width: 100%; }