/* ============================================================
   Login — Estilos (estilo dulox.cl)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@500;600;700;800&display=swap');

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

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.login-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.2);
    padding: 44px 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    color: #232323;
    margin-top: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.login-logo p {
    color: #868686;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 400;
}

/* Formulario */
.form-grupo {
    margin-bottom: 20px;
}

.form-grupo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #232323;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-grupo input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #232323;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-grupo input:focus {
    outline: none;
    border-color: #e30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
    background: #fff;
}

.form-grupo input::placeholder {
    color: #a3a3a3;
}

/* Toggle visibilidad password (ojito) */
.password-wrapper {
    position: relative;
}
.password-wrapper input {
    padding-right: 44px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #6b6b6b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.password-toggle:hover {
    background: #f1f1f1;
    color: #232323;
}
.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.25);
}

/* Botón */
.btn-login {
    width: 100%;
    padding: 13px;
    background: #e30613;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: #c00510;
    transform: translateY(-1px);
}

.btn-login:active {
    background: #a0040d;
    transform: translateY(0);
}

.btn-login:disabled {
    background: #d4d4d4;
    cursor: not-allowed;
    transform: none;
}

/* Mensajes flash */
.flash {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #e30613;
}

.flash-exito {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid #16a34a;
}

.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

.flash-advertencia {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #ea580c;
}

/* Errores de campo */
.campo-error input {
    border-color: #ef4444;
}

.error-texto {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* Responsive móvil */
@media (max-width: 480px) {
    .login-container {
        padding: 12px;
    }

    .login-card {
        padding: 30px 24px;
    }

    .login-logo img {
        max-width: 140px;
    }

    .login-logo h1 {
        font-size: 20px;
    }

    .form-grupo input {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 14px 14px;
    }

    .btn-login {
        padding: 14px;
        font-size: 16px;
    }
}
