/* auth.css - Diseño moderno para formularios de registro UNFV */

/* Variables heredadas de dashboard.css, pero las definimos por si acaso */
:root {
    --unfv-maroon: #7f1d1d;
    --unfv-maroon-dark: #5a1414;
    --unfv-maroon-light: #fef2f2;
    --unfv-blue: #1e3a8a;
    --unfv-blue-light: #eff6ff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --bg-global: #f1f5f9;
    --white: #ffffff;
    --font-family: 'Montserrat', sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 12px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    min-height: 100vh;
    background-color: var(--bg-global);
}

/* ========== CONTENEDOR PRINCIPAL ========== */
.auth-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 20px 60px;
}

/* ========== TARJETA DEL FORMULARIO ========== */
.auth-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 580px;
    overflow: hidden;
}

/* ========== HEADER DEL FORMULARIO ========== */
.auth-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 32px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, var(--unfv-maroon-light) 0%, #fff 100%);
}

.auth-header svg {
    width: 28px;
    height: 28px;
    color: var(--unfv-maroon);
    flex-shrink: 0;
}

.auth-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========== FORMULARIO ========== */
.auth-card form {
    padding: 28px 32px 32px;
}

/* ========== MENSAJE DE ERROR ========== */
.form-error {
    background-color: #fef2f2;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

.form-error::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E");
    background-size: contain;
    flex-shrink: 0;
}

.form-error.visible {
    display: flex;
}

/* ========== SECCIONES DEL FORMULARIO ========== */
.form-section {
    margin-bottom: 28px;
}

.form-section:last-of-type {
    margin-bottom: 8px;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--unfv-maroon);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--unfv-maroon-light);
}

.form-section-title svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ========== CAMPOS ========== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #f8fafc;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--unfv-maroon);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

/* Select con flecha personalizada */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* ========== BOTONES ========== */
.auth-actions {
    margin-top: 28px;
}

.auth-actions .btn-primary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    background-color: var(--unfv-maroon);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(127, 29, 29, 0.2);
}

.auth-actions .btn-primary:hover {
    background-color: var(--unfv-maroon-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -2px rgba(127, 29, 29, 0.3);
}

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

.auth-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-actions .btn-primary svg {
    width: 18px;
    height: 18px;
}

/* ========== LINKS INFERIORES ========== */
.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.auth-links a {
    color: var(--unfv-maroon);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-links a:hover {
    color: var(--unfv-maroon-dark);
}

.auth-links a svg {
    width: 16px;
    height: 16px;
}

.auth-links p {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.auth-links p a {
    font-weight: 700;
}

/* ========== LOGIN & RECUPERAR PASSWORD (estilo legacy) ========== */
.auth-container form {
    background: #ffffff;
    padding: 40px 35px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 380px;
    text-align: center;
}

.auth-container form b {
    display: block;
    color: var(--unfv-maroon);
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--unfv-maroon);
    padding-bottom: 10px;
}

.auth-container form p {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container input[type="email"] {
    width: 100%;
    padding: 10px 5px;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    margin-top: 5px;
    font-family: var(--font-family);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.auth-container input[type="text"]:focus,
.auth-container input[type="password"]:focus,
.auth-container input[type="email"]:focus {
    border-bottom: 2px solid var(--unfv-maroon);
}

.auth-container input[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: var(--unfv-maroon);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(127, 29, 29, 0.4);
}

.auth-container input[type="submit"]:hover {
    background-color: var(--unfv-maroon-dark);
    box-shadow: 0 6px 10px -2px rgba(127, 29, 29, 0.3);
}

.auth-container a {
    text-decoration: none;
    color: var(--unfv-blue);
    font-size: 14px;
    transition: color 0.2s;
}

.auth-container a:hover {
    color: var(--unfv-maroon);
}

.auth-container a p {
    text-align: center;
    margin-top: 12px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .auth-container {
        padding: 24px 16px 40px;
    }

    .auth-card {
        border-radius: var(--radius-md);
    }

    .auth-header {
        padding: 22px 20px;
    }

    .auth-header h2 {
        font-size: 1.2rem;
    }

    .auth-card form {
        padding: 22px 20px 26px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
