/* Estilos comunes para las páginas de autenticación (login, registro, recuperar contraseña) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Contenedor principal para login/registro */
.auth-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

/* Contenedor más ancho para formularios de registro */
.auth-container-wide {
    max-width: 600px;
}

/* Header de autenticación */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #718096;
    font-size: 12px;
}

/* Botones principales */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Botones secundarios */
.btn-secondary {
    width: 100%;
    padding: 14px;
    background: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.alert-info {
    background: #bee3f8;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

/* Enlaces */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Divisor */
.divider {
    text-align: center;
    margin: 20px 0;
    color: #a0aec0;
    font-size: 14px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Secciones de formulario */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* Grid de formulario (2 columnas) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Barra de progreso para formularios multi-paso */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.progress-step:first-child::before {
    left: 50%;
    width: 50%;
}

.progress-step:last-child::before {
    right: 50%;
    width: 50%;
    left: auto;
}

.progress-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #a0aec0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.progress-step.active .progress-number {
    background: #4299e1;
    color: white;
}

.progress-step.completed .progress-number {
    background: #48bb78;
    color: white;
}

.progress-label {
    font-size: 12px;
    color: #718096;
    display: block;
}

.progress-step.active .progress-label {
    color: #2d3748;
    font-weight: 600;
}

/* Selector de tipo de usuario */
.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.type-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.type-card:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
    transform: translateY(-2px);
}

.type-card .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.type-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2d3748;
}

.type-card p {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}

/* Botones de navegación entre pasos */
.step-buttons {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.step-buttons .btn-primary,
.step-buttons .btn-secondary {
    flex: 1;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .type-selector {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .progress-bar {
        font-size: 12px;
    }
    
    .progress-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
