:root {
    --loggin-background-color: #f1f5f9; /* Off-white / Slate suave corporativo */
    --primary: #2563eb;               /* Azul tecnológico */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-alpha: rgba(37, 99, 235, 0.08);
    --primary-alpha-strong: rgba(37, 99, 235, 0.15);
    --text-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --danger: #ef4444;
}

/* REINICIO Y ESTILOS BASE (RESET) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--loggin-background-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 60%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Tarjeta Central */
.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Cabecera del Login */
.login-card-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container-cloud {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid var(--primary-alpha-strong);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.05);
}

.brand-logo-svg {
    width: 42px;
    height: 42px;
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
}

.login-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.login-card-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Formulario */
form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8fafc;
}

input:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-alpha-strong);
}

/* Ocultar/mostrar contraseña */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--primary);
}

.eye-icon {
    width: 18px;
    height: 18px;
}

/* Mensajes de error */
.error-message {
    font-size: 0.78rem;
    color: var(--danger);
    font-weight: 500;
    min-height: 16px;
}

.input-group.has-error input {
    border-color: var(--danger);
    background-color: #fff5f5;
}

.alert-error {
    background-color: #fff5f5;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* Opciones extras */
.login-options {
    display: flex;
    align-items: center;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    background-color: #fff;
}

.remember-me input:checked + .checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.remember-me input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Botón de Ingresar */
.btn-submit {
    background-color: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
