/* =====================================================
   CSS REFINADO - REGISTER - PAPO REDAÇÃO
   Design alinhado, elegante e profissional
   ===================================================== */

/* =====================================================
   VARIÁVEIS CSS E DESIGN TOKENS
   ===================================================== */
:root {
    /* Cores Primárias */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #0ea5e9;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Cores Neutras - Light Mode */
    --surface: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-main: #0f172a;
    --text-light: #475569;
    --text-lighter: #64748b;
    --border: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-button: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-bg: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    
    /* Sombras Refinadas */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
    --shadow-primary-lg: 0 8px 24px 0 rgba(37, 99, 235, 0.35);
    
    /* Bordas Refinadas */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transições Suaves */
    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   RESET E BASE
   ===================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px; /* Padrão atualizado para acessibilidade (16px -> 18px) */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   SKIP LINK (Acessibilidade)
   ===================================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* =====================================================
   ELEMENTOS DE FUNDO
   ===================================================== */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
    contain: layout style paint;
}

.bg-shapes div {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    z-index: 0;
    will-change: transform;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -20px, 0);
    }
}

/* =====================================================
   CONTAINER PRINCIPAL
   ===================================================== */
.register-container {
    width: 100%;
    max-width: 550px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 10;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* =====================================================
   HEADER
   ===================================================== */
.header {
    background: var(--gradient-button);
    padding: 24px 30px 30px;
    color: white;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.menu-toggle {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition-base);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.menu-toggle .icon-svg {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.logo {
    flex: 0 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    transition: var(--transition-base);
}

.logo-link:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.logo-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
    border-radius: 8px;
}

.logo-emoji {
    font-size: 1.75rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.login-link {
    flex: 0 0 auto;
    font-size: 0.875rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.login-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.login-link:active {
    transform: translateY(0);
}

.login-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* =====================================================
   PROGRESS CONTAINER
   ===================================================== */
.progress-container {
    position: relative;
    margin-top: 0;
    padding-top: 8px;
}

.progress-track {
    background: rgba(255, 255, 255, 0.15);
    height: 3px;
    width: 100%;
    border-radius: var(--radius-full);
    position: absolute;
    top: 18px;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
}

.step-circle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 3;
}

.step-indicator.active .step-circle {
    background: white;
    color: var(--primary);
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.step-indicator.completed .step-circle {
    background: var(--success);
    color: white;
}

.step-indicator.completed .step-circle::after {
    content: '✓';
    font-size: 0.875rem;
}

.step-label {
    margin-top: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: var(--transition-base);
}

.step-indicator.active .step-label {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.step-indicator.completed .step-label {
    color: rgba(255, 255, 255, 0.9);
}

/* =====================================================
   FORM CONTENT
   ===================================================== */
.form-content {
    padding: 30px;
}

.step-form {
    display: none !important;
    animation: fadeIn 0.4s ease-out;
    opacity: 0;
    visibility: hidden;
}

.step-form.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
}


h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.01em;
}

p.subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* =====================================================
   ROLE GRID
   ===================================================== */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.role-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--surface);
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.role-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.role-card:hover {
    border-color: var(--primary);
    transform: translate3d(0, -5px, 0);
    box-shadow: var(--shadow-md);
}

.role-card.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.role-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: inline-block;
    transition: var(--transition-base);
    filter: grayscale(0.3);
}

.role-card:hover .role-icon,
.role-card.selected .role-icon {
    transform: scale(1.1) rotate(5deg);
    filter: grayscale(0);
}

.role-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
    font-size: 1rem;
}

.role-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* =====================================================
   FORM GROUP
   ===================================================== */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .icon-emoji.icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1;
    user-select: none;
    transition: var(--transition-base);
    opacity: 0.7;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper .toggle-password:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.input-wrapper .toggle-password:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition-base);
    background: var(--surface);
    color: var(--text-main);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select {
    padding-left: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
}

textarea {
    padding-left: 14px;
}

textarea {
    resize: vertical;
    min-height: 70px;
    max-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

input:focus ~ .icon-emoji.icon-left,
select:focus ~ .icon-emoji.icon-left,
textarea:focus ~ .icon-emoji.icon-left {
    transform: translateY(-50%) scale(1.1);
}

input.error,
select.error,
textarea.error {
    border-color: var(--error);
}

.error-msg {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 5px;
    display: none;
}

.error-msg.show {
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* Checkbox Grid para Disciplinas de Professor */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    background: var(--surface);
    font-size: 0.8125rem;
}

.checkbox-item:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

/* =====================================================
   PASSWORD STRENGTH - REFORÇADO
   ===================================================== */
.password-strength {
    height: 6px;
    background: var(--border);
    margin-top: 12px;
    border-radius: var(--radius-full);
    overflow: hidden;
    display: none;
    position: relative;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.strength-text {
    font-size: 0.75rem;
    margin-top: 8px;
    text-align: right;
    color: var(--text-light);
    font-weight: 600;
    min-height: 18px;
}

/* Lista de Requisitos de Senha */
.password-requirements {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    display: none;
    animation: slideDown 0.3s ease-out;
}

.password-requirements.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.8125rem;
    transition: var(--transition-base);
}

.requirement-item .req-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.requirement-item .req-text {
    color: var(--text-light);
    transition: var(--transition-base);
}

.requirement-item.requirement-met .req-text {
    color: var(--success);
    font-weight: 500;
}

.requirement-item.requirement-met {
    animation: requirementCheck 0.3s ease-out;
}

@keyframes requirementCheck {
    0% {
        transform: translate3d(-5px, 0, 0);
    }
    50% {
        transform: translate3d(5px, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* Estados de input de senha */
.input-wrapper input[type="password"].valid,
.input-wrapper input[type="text"].valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2310b981' d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 50px center;
    background-size: 18px;
    padding-right: 75px;
}

.input-wrapper input[type="password"].valid:focus,
.input-wrapper input[type="text"].valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-prev {
    background: #f3f4f6;
    color: var(--text-main);
}

.btn-prev:not(:disabled):hover {
    background: #e5e7eb;
    transform: translate3d(0, -1px, 0);
}

.btn-prev:not(:disabled):active {
    transform: translateY(0);
}

.btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-next {
    background: var(--gradient-button);
    color: white;
    flex: 1;
    justify-content: center;
    box-shadow: var(--shadow-primary);
}

.btn-next:not(:disabled):hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: var(--shadow-primary-lg);
}

.btn-next:not(:disabled):active {
    transform: translateY(0);
}

.btn-next:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* =====================================================
   OTIMIZAÇÕES DE PERFORMANCE
   ===================================================== */
.register-container {
    contain: layout style paint;
    transform: translateZ(0); /* Force GPU acceleration */
}

.step-form {
    contain: layout style;
    will-change: opacity, transform;
}

/* Remover will-change após animação para economizar recursos */
.step-form.active {
    will-change: auto;
}

/* Otimizar animações com GPU */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 50px, 0) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Melhorias de acessibilidade */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading state */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Melhorar feedback visual dos botões */
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-next:not(:disabled):hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: var(--shadow-primary-lg);
}

.btn-prev:not(:disabled):hover {
    transform: translate3d(0, -1px, 0);
}

/* =====================================================
   SUCCESS SCREEN
   ===================================================== */
.success-screen {
    text-align: center;
    display: none;
    padding: 40px 20px;
}

.success-screen.show {
    display: block;
}

.success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

@keyframes popIn {
    from {
        transform: scale3d(0, 0, 1);
        opacity: 0;
    }
    to {
        transform: scale3d(1, 1, 1);
        opacity: 1;
    }
}

/* Loading Spinner na tela de sucesso */
.success-screen .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto 0;
}

/* =====================================================
   CHECKBOX STYLING
   ===================================================== */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

input[type="checkbox"] + label {
    cursor: pointer;
}

/* Terms Group Styling */
.terms-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    transition: var(--transition-base);
    cursor: pointer;
}

.terms-group:hover {
    border-color: var(--primary);
}

.terms-group:has(input:focus) {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.terms-group input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary, #2563eb);
    background-color: transparent !important;
    border: 2px solid var(--border, rgba(255, 255, 255, 0.3)) !important;
    border-radius: 4px;
}

.terms-group label {
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.terms-group a {
    color: var(--primary);
    text-decoration: underline;
    transition: var(--transition-base);
}

.terms-group a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.terms-group a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Optional Label */
.optional-label {
    color: var(--text-lighter);
    font-weight: 400;
    font-size: 0.9em;
}

/* =====================================================
   RESPONSIVIDADE COMPLETA
   ===================================================== */

/* Tablets grandes e iPads (1024px+) */
@media (min-width: 1024px) {
    .register-container {
        max-width: 600px;
    }
}

/* Tablets pequenos (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .register-container {
        max-width: 550px;
    }
    
    .form-content {
        padding: 32px;
    }
}

/* Telefones grandes (414px - 767px) */
@media (min-width: 414px) and (max-width: 767px) {
    body {
        padding: 16px;
    }

    .register-container {
        max-width: 100%;
        border-radius: var(--radius-lg);
    }

    .form-content {
        padding: 28px;
    }
}

/* Telefones médios e pequenos (até 600px) */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .register-container {
        border-radius: 0;
        height: 100vh;
        height: -webkit-fill-available;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    }

    .header {
        padding: 20px 16px 24px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
    }

    .header-top {
        margin-bottom: 20px;
        gap: 12px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-emoji {
        font-size: 1.5rem;
    }

    .login-link {
        font-size: 0.8125rem;
        padding: 8px 16px;
    }

    .form-content {
        padding: 20px 16px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .role-grid,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .role-card {
        min-height: 120px;
        padding: 20px;
    }

    .step-indicator {
        width: 25%;
    }

    .step-label {
        font-size: 0.5625rem;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .step-indicator.active .step-circle {
        transform: scale(1.1);
    }

    .step-label {
        font-size: 0.625rem;
        margin-top: 8px;
    }

    .buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        min-height: 48px;
    }

    h2 {
        font-size: 1.375rem;
    }

    .subtitle {
        font-size: 0.9375rem;
    }
}

/* Menu Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        top: 20px;
        left: 20px;
    }
}

/* Telefones muito pequenos (até 480px) */
@media (max-width: 480px) {
    .header {
        padding: 16px 12px 20px;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .login-link {
        align-self: flex-end;
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .logo-link {
        gap: 10px;
    }

    .form-content {
        padding: 16px 12px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .role-card {
        padding: 20px;
    }

    .buttons {
        flex-direction: column-reverse;
    }

    .btn-prev {
        width: 100%;
        justify-content: center;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
