/* Signup Wizard Styles */
:root {
    --primary-color: #0d6efd;
    --error-color: #dc3545;
    --success-color: #198754;
    --border-color: #dee2e6;
    --input-bg: #fff;
    --text-color: #333;
    --hint-color: #6c757d;
}

* {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    min-height: 100%;
    margin: 0;
}

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    padding: 20px 0;
}

.signup-container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.signup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.signup-header h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    color: var(--text-color);
}

.signup-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.signup-header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    /* Ensure visible */
    display: inline-block;
}

/* Wizard Steps */
.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step-indicator {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #bbb;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0 10px;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.step-indicator.active .step-number {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.step-indicator.completed .step-number {
    background: var(--success-color);
}

.step-indicator.active {
    color: var(--primary-color);
}

.step-indicator.completed {
    color: var(--success-color);
}

/* Form Steps & Animation */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grids */
.row-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.row-3-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-color);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 0.2s;
    height: 38px;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.form-control.input-error {
    border-color: var(--error-color);
    background-color: #fff8f8;
}

.error-msg {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.2rem;
    display: none;
    line-height: 1;
}

/* Actions */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    height: 40px;
}

.btn-secondary {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0b5ed7;
}

/* Login Link Bottom */
.login-link-bottom {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.login-link-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Utils */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    padding: 10px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--hint-color);
    margin-top: -5px;
    margin-bottom: 10px;
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    word-break: break-word;
    /* Safety */
}

.conditional-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.conditional-field.show {
    max-height: 60px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 576px) {
    .signup-container {
        padding: 0 1rem;
    }

    .signup-header h2 {
        font-size: 1.5rem;
    }

    .wizard-steps {
        gap: 1rem;
    }

    .wizard-steps::before {
        left: 10px;
        right: 10px;
    }

    .step-indicator span {
        font-size: 0.7rem;
    }

    /* Stack all grids on mobile */
    .row-2-col,
    .row-3-col {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Try 2-col for names if fits */
    @media (min-width: 360px) {
        .row-2-col-mobile {
            grid-template-columns: 1fr 1fr;
        }
    }

    .form-control {
        height: 44px;
        font-size: 16px;
    }

    .btn {
        height: 48px;
        width: 100%;
    }

    .wizard-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .radio-grid {
        grid-template-columns: 1fr 1fr;
    }
}