@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Colores de la Marca */
    --primary-blue: #2a52be;
    --primary-blue-darker: #20419e; /* Para estados hover/active */
    --primary-blue-light-shadow: rgba(42, 82, 190, 0.25); /* Sombra ligera del color principal */

    /* Colores de Estado */
    --success-green: #0f8a4e; /* Para iconos de éxito */
    --valid-input-border-green: #28a745; /* Para bordes de inputs válidos */
    --error-color: #dc3545; /* Nuevo: Un rojo estándar para errores/invalidación */
    --warning-color: #F5B027; /* Para estados de advertencia */

    /* Grises Neutros para Fondo, Texto y Bordes */
    --text-dark: #222222;
    --text-secondary: #717171;
    --background-light-gray: #F7F7F7;
    --border-neutral-gray: #DDDDDD;
    --white: #FFFFFF;
    
    --placeholder-focused-color: var(--text-secondary); /* Color del placeholder al enfocar */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light-gray);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- CONTAINER PRINCIPAL --- */
.login-container {
    text-align: center;
    max-width: 500px;
}

.main-icon {
    font-size: 60px;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

h1 {
    font-size: 36px;
    font-weight: 700;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 10px;
    margin-bottom: 40px;
}

/* --- BOTÕES DE ESCOLHA --- */
.choice-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.choice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 18px;
    font-weight: 600;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-neutral-gray);
    background-color: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-blue);
}

.choice-btn i {
    font-size: 24px;
    color: var(--primary-blue);
}

/* --- LINKS DE CADASTRO --- */
.register-links {
    margin-top: 40px;
    font-size: 15px;
    color: var(--text-secondary);
}
.link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}
.link:hover {
    text-decoration: underline;
}

/* --- ESTILOS DOS MODAIS --- */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center; justify-content: center;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal-card {
    position: relative;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.modal-card h2 { font-size: 24px; margin-bottom: 10px; }
.modal-card p { color: var(--text-secondary); line-height: 1.5; margin-bottom: 30px; }

.input-group { position: relative; margin-bottom: 25px; }
.input-group i { 
    position: absolute; left: 18px; top: 16px;
    color: var(--text-secondary);
    font-size: 20px;
    transition: color 0.2s ease;
}
.input-group:focus-within i {
    color: var(--primary-blue);
}

.input-group input {
    width: 100%;
    padding: 16px 18px 16px 55px;
    border: 1px solid var(--border-neutral-gray);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue-light-shadow);
}

/* NUEVO: Feedback Visual para Campos Inválidos */
.input-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.25);
}
.input-group input:invalid:focus {
    border-color: var(--primary-blue); /* El borde principal de foco prevalece */
    box-shadow: 0 0 0 2px var(--primary-blue-light-shadow);
}

/* NUEVO: Animación Sutil para el Placeholder */
.input-group input::placeholder {
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.input-group input:focus::placeholder {
    color: var(--placeholder-focused-color);
    transform: translateX(5px);
    opacity: 0.7;
}


/* --- ESTILOS PARA LOS MENSAJES DE INFORMACIÓN DE LOS INPUTS (Colapso) --- */
.input-info-message {
    display: flex;
    align-items: flex-start;
    font-size: 0.85em;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 4px;
    line-height: 1.4;
    position: relative;

    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    overflow: hidden;
    
    opacity: 0;
    transform: translateY(-5px);
    visibility: hidden;
    pointer-events: none;

    transition: 
        max-height 0.4s ease-out, 
        padding-top 0.4s ease-out, padding-bottom 0.4s ease-out, 
        margin-top 0.4s ease-out, 
        border-color 0.4s ease-out, 
        opacity 0.3s ease, 
        transform 0.3s ease, 
        visibility 0.3s ease;
}

.input-info-message i {
    margin-right: 8px;
    color: var(--primary-blue);
    font-size: 1.1em;
    flex-shrink: 0;
    position: static;
    transform: none;
    top: auto;
    left: auto;
}

.input-info-message.visible {
    max-height: 100px;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-top: 5px;
    border: 1px solid var(--border-neutral-gray);
    border-left: 3px solid var(--primary-blue);
    
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}


.submit-btn {
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--primary-blue);
    color: var(--white);
    transition: background-color 0.2s ease;
}
.submit-btn:hover { background-color: var(--primary-blue-darker); }
.submit-btn:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
}

.close-icon-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--background-light-gray);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.close-icon-btn:hover { 
    background-color: var(--border-neutral-gray);
    color: var(--primary-blue);
}

#forgot-token-link {
    display: block;
    margin-top: 20px;
    color: var(--primary-blue);
}

#feedback-modal .modal-icon { font-size: 48px; margin-bottom: 15px; }
#feedback-modal .modal-icon.success { color: var(--success-green); }
#feedback-modal .modal-icon.error { color: var(--primary-blue); }