/* ============================================================
   RESET E BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-50: #eff6ff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --success: #16a34a;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* ============================================================
   CONTAINER PRINCIPAL
   ============================================================ */
.register-container {
    width: 100%;
    max-width: 520px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    padding: 40px 36px 32px;
    position: relative;
    animation: fadeInUp 0.6s ease;
    max-height: 98vh;
    overflow-y: auto;
}

.register-container::-webkit-scrollbar {
    width: 4px;
}
.register-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}
.register-container::-webkit-scrollbar-track {
    background: transparent;
}

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

/* ============================================================
   HEADER
   ============================================================ */
.register-header {
    text-align: center;
    margin-bottom: 28px;
}

.register-header .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-radius: 16px;
    color: var(--white);
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.register-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.register-header h1 span {
    color: var(--primary);
}

.register-header p {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================================
   STEP INDICATOR
   ============================================================ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    transition: var(--transition);
}

.step-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.step-dot.done {
    background: var(--success);
}

.step-line {
    width: 32px;
    height: 2px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: var(--transition);
}

.step-line.done {
    background: var(--success);
}

.step-label {
    text-align: center;
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 28px;
}

.step-label span {
    font-weight: 600;
    color: var(--gray-600);
}

/* ============================================================
   STEPS
   ============================================================ */
.step-content {
    display: none;
    animation: fadeInStep 0.4s ease;
}

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

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

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.step-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================================
   FORMULÁRIO - MESMO ESTILO DO LOGIN
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--gray-400);
    margin-right: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-800);
    transition: var(--transition);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

select.form-control {
    appearance: auto;
    cursor: pointer;
}

select.form-control option {
    padding: 8px;
}

small {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: 12px;
}

.required-badge {
    color: #ef4444;
    font-size: 0.9em;
}

.hint-text {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 4px;
}

/* ============================================================
   ROLE SELECTION (STEP 1)
   ============================================================ */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    text-align: center;
}

.role-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.role-option.active {
    border-color: var(--primary);
    background: var(--primary-50);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.role-option i {
    font-size: 32px;
    color: var(--gray-400);
    transition: var(--transition);
}

.role-option.active i {
    color: var(--primary);
}

.role-option .role-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

.role-option .role-desc {
    font-size: 13px;
    color: var(--gray-500);
}

/* ============================================================
   ACESSIBILIDADE (STEP 3)
   ============================================================ */
.acessibilidade-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.acessibilidade-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    color: var(--gray-700);
}

.acessibilidade-options input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.condicao-acessibilidade {
    display: none;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.condicao-acessibilidade.visible {
    display: block;
}

/* ============================================================
   SENHA REQUISITOS (STEP 4)
   ============================================================ */
.password-requirements {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.password-requirements p {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements ul li {
    font-size: 13px;
    color: var(--gray-500);
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements ul li .fa-check {
    color: var(--success);
    font-size: 12px;
}

.password-requirements ul li .fa-times {
    color: #ef4444;
    font-size: 12px;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.step-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-prev {
    flex: 1;
    padding: 12px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-prev:hover {
    background: var(--gray-200);
}

.btn-next {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.3);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-submit {
    flex: 2;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.3);
}

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

/* ============================================================
   WHATSAPP - MESMO ESTILO DO LOGIN
   ============================================================ */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #059669, #10b981);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.20);
}

.whatsapp-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.30);
}

.whatsapp-link i {
    font-size: 20px;
}

/* ============================================================
   ALERTAS - MESMO ESTILO DO LOGIN
   ============================================================ */
.alert {
    display: none;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alert-error {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: var(--success);
}

.alert-info {
    background: #eff6ff;
    border: 2px solid #93c5fd;
    color: #2563eb;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 480px) {
    .register-container {
        padding: 28px 20px 24px;
        border-radius: 16px;
        max-height: 100vh;
    }

    .register-header h1 {
        font-size: 20px;
    }

    .register-header .icon-wrapper {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .form-control {
        font-size: 13px;
        padding: 10px 12px;
    }

    .role-selection {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .role-option {
        padding: 16px 12px;
    }

    .role-option i {
        font-size: 24px;
    }

    .role-option .role-title {
        font-size: 14px;
    }

    .role-option .role-desc {
        font-size: 12px;
    }

    .step-title {
        font-size: 18px;
    }

    .step-buttons {
        flex-direction: column;
    }

    .btn-prev {
        order: 2;
    }

    .btn-next, .btn-submit {
        order: 1;
    }

    .step-line {
        width: 20px;
    }

    .step-dot {
        width: 8px;
        height: 8px;
    }

    .acessibilidade-options {
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .register-container {
        padding: 20px 14px 18px;
    }

    .register-header h1 {
        font-size: 18px;
    }

    .register-header .icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .role-selection {
        grid-template-columns: 1fr;
    }

    .step-line {
        width: 14px;
    }
}