/* ========================================
   Frontal Trust - Digital Onboarding
   ======================================== */

:root {
    --ft-primary: #1B2A4A;
    --ft-primary-light: #2C3E6B;
    --ft-accent: #5B8FA8;
    --ft-bg: #F0F2F5;
    --ft-card-bg: #FFFFFF;
    --ft-text: #1B2A4A;
    --ft-text-muted: #6c757d;
    --ft-border: #dee2e6;
    --ft-success: #198754;
    --ft-danger: #dc3545;
    --ft-radius: 12px;
    --ft-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* ---- Base ---- */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--ft-bg);
    color: var(--ft-text);
    margin: 0;
    padding: 0;
}

/* ---- Header ---- */
.site-header {
    background-color: var(--ft-primary);
    padding: 14px 24px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-brand {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.brand-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 3px;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 3px;
}

/* ---- Main Layout ---- */
.site-main {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 60px;
}

/* ---- Card Panel ---- */
.enrollment-container {
    width: 100%;
    max-width: 640px;
}

.card-panel {
    background: var(--ft-card-bg);
    border-radius: var(--ft-radius);
    box-shadow: var(--ft-shadow);
    padding: 40px;
}

@media (max-width: 576px) {
    .card-panel {
        padding: 24px 20px;
    }
}

/* ---- Typography ---- */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ft-text);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--ft-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---- Person Type Selector ---- */
.person-type-selector {
    display: flex;
    gap: 16px;
}

.person-type-option {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.person-type-card {
    border: 2px solid var(--ft-border);
    border-radius: var(--ft-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.person-type-card:hover {
    border-color: var(--ft-primary-light);
    background-color: #f8f9fa;
}

.person-type-option input:checked + .person-type-card {
    border-color: var(--ft-primary);
    background-color: #f0f4ff;
    box-shadow: 0 0 0 1px var(--ft-primary);
}

.person-icon {
    color: var(--ft-primary);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .person-type-selector {
        flex-direction: column;
    }
}

/* ---- Buttons ---- */
.btn-enrollment {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--ft-primary);
    border-color: var(--ft-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ft-primary-light);
    border-color: var(--ft-primary-light);
}

.btn-outline-secondary.btn-enrollment:hover {
    background-color: var(--ft-bg);
}

.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.15rem rgba(27, 42, 74, 0.25);
    border-color: var(--ft-primary-light);
}

/* ---- Form Controls ---- */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--ft-border);
    padding: 10px 14px;
}

.form-control-lg {
    padding: 14px 16px;
    font-size: 1rem;
}

/* ---- Links ---- */
.link-action {
    color: var(--ft-primary);
    text-decoration: underline;
    font-weight: 500;
}

.link-action:hover {
    color: var(--ft-primary-light);
}

.terms-link {
    color: var(--ft-primary);
    text-decoration: underline;
}

/* ---- Already Client ---- */
.already-client {
    border-top: 1px solid var(--ft-border);
    padding-top: 20px;
}

/* ---- OTP Input ---- */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.otp-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--ft-border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
    caret-color: var(--ft-primary);
}

.otp-input:focus {
    border-color: var(--ft-primary);
    box-shadow: 0 0 0 2px rgba(27, 42, 74, 0.15);
}

@media (max-width: 400px) {
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 1.2rem;
    }
    .otp-container {
        gap: 8px;
    }
}

/* ---- Step Progress ---- */
.step-progress {
    padding: 0 0 20px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.step-pending .step-circle {
    background-color: var(--ft-bg);
    color: var(--ft-text-muted);
    border: 2px solid var(--ft-border);
}

.step-active .step-circle {
    background-color: var(--ft-primary);
    color: #fff;
    border: 2px solid var(--ft-primary);
}

.step-completed .step-circle {
    background-color: var(--ft-success);
    color: #fff;
    border: 2px solid var(--ft-success);
}

.step-label {
    font-size: 0.75rem;
    color: var(--ft-text-muted);
}

.step-active .step-label {
    color: var(--ft-primary);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: var(--ft-border);
    margin: 20px 8px 0;
}

.step-line-completed {
    background-color: var(--ft-success);
}

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed var(--ft-border);
    border-radius: var(--ft-radius);
    padding: 30px;
    text-align: center;
    transition: border-color 0.2s ease;
    background-color: #fafbfc;
}

.upload-area:hover {
    border-color: var(--ft-primary-light);
    background-color: #f0f4ff;
}

/* ---- Confirmation Summary ---- */
.confirmation-summary {
    background-color: #fafbfc;
    border-radius: var(--ft-radius);
    padding: 24px;
    border: 1px solid var(--ft-border);
}

.summary-section h5 {
    font-weight: 600;
    margin-bottom: 4px;
}

/* ---- Alerts ---- */
.alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ---- Validation ---- */
.text-danger {
    font-size: 0.85rem;
}

.field-validation-error {
    font-size: 0.85rem;
    color: var(--ft-danger);
}