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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-page, linear-gradient(135deg, #1e4a7a 0%, #0f172a 100%));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary, #1e293b);
    transition: background 0.3s, color 0.3s;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card, white);
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-card, 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2));
    transition: background 0.3s;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1e4a7a, #2c6e9e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px -1px rgba(30, 74, 122, 0.3);
}

.login-header h1 {
    font-size: 1.3rem; /* Estandarizado */
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}

.login-header p {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary, #475569);
}

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

.input-icon-wrapper i:first-child {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 2.5rem; /* Ajustado el padding-right a 2.75rem para dar espacio al ojo */
    border: 1px solid var(--input-border, #cbd5e1);
    background: var(--input-bg, white);
    color: var(--text-primary, #1e293b);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

/* Ocultar el ojo nativo y el botón de limpiar en navegadores Chromium / Edge / IE */
.input-icon-wrapper input::-ms-reveal,
.input-icon-wrapper input::-ms-clear {
    display: none;
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary, #1e4a7a);
    box-shadow: 0 0 0 3px rgba(30, 74, 122, 0.1);
}

.toggle-password {
    position: absolute;
    right: 0.5rem; /* Posicionado adecuadamente dentro del input */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--accent-primary, #1e4a7a);
    background-color: rgba(148, 163, 184, 0.15); /* Fondo sutil adaptativo */
}

.forgot-password-link {
    text-align: right;
    margin-bottom: 1.5rem;
}

.forgot-password-link a, .back-to-login a {
    color: var(--accent-primary, #1e4a7a);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password-link a:hover, .back-to-login a:hover {
    color: var(--text-primary, #0f172a);
    text-decoration: underline;
}

.back-to-login {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1e4a7a, #2c6e9e);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(30, 74, 122, 0.3);
}

.alert {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
