* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-container {
    width: 100%;
    max-width: 550px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.form-header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.form-header h2 { font-size: 28px; margin-bottom: 10px; }
.form-header p { opacity: 0.9; font-size: 16px; }

.registration-form { padding: 30px; }

.form-group { margin-bottom: 20px; }

/* Fila para Sexo y Fecha */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.input-with-icon { position: relative; }

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a11cb;
    font-size: 18px;
    z-index: 1;
}

/* Dropdown de IntlTelInput */
.iti__country-list {
    z-index: 100 !important;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: white;
    outline: none;
}

/* Cambia el borde cuando hay error en el campo */
.form-group input.error,
.form-group select.error {
    border-color: #d32f2f;
}

.input-with-icon input { padding-left: 50px; }

.form-group input:focus,
.form-group select:focus {
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

/* Estilos para mensajes de error */
.error-message {
    background-color: #ffeaea;
    color: #d32f2f;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 4px solid #d32f2f;
    font-size: 0.85rem;
    animation: slideDown 0.3s ease-out;
}

/* Error global (no específico de campo) */
.error-message.global-error {
    margin-bottom: 25px;
    margin-top: 0;
}

/* Error específico de campo */
.error-message.field-error {
    margin-bottom: 5px;
}

.error-message i {
    font-size: 18px;
    color: #d32f2f;
    margin-top: 1px;
    flex-shrink: 0;
}

.error-content {
    flex-grow: 1;
}

.error-content p {
    margin: 0;
    line-height: 1.4;
}

.error-content p:not(:last-child) {
    margin-bottom: 5px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

.login-link {
    text-align: center;
    padding: 25px 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 15px;
    line-height: 1.4;
}

.login-link a {
    color: #6a11cb;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.login-link a:hover { text-decoration: underline; }

.iti { width: 100%; }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-container { border-radius: 0; max-width: 100%; min-height: 100vh; }
    body { padding: 0; }
    .login-link { padding-bottom: 40px; }
    
    .error-message {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}