﻿/* =========================
   SCAN ERP - AUTH (Login)
   ========================= */

/* Reset suave para que no dependa de Bootstrap */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* Fondo general */
.scan-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background: radial-gradient(1200px 600px at 15% 15%, rgba(20,90,255,.18), transparent 55%), radial-gradient(900px 500px at 85% 75%, rgba(0,180,255,.14), transparent 55%), #f6f7fb;
}

/* Tarjeta principal */
.scan-login-card {
    width: min(1040px, 100%);
    min-height: 560px;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-columns: 1.05fr 1.15fr;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.18);
}

/* Panel izquierdo */
.scan-login-left {
    position: relative;
    padding: 40px 38px;
    color: #fff;
    background: linear-gradient(180deg, #0b5ed7 0%, #0a3f9a 45%, #082e72 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.scan-brand {
    text-align: center;
}

.scan-logo-wrap {
    width: 240px;
    height: 240px;
    /* opcional si quieres menos padding visual */
    /* padding: 10px; */
}

.scan-logo {
    width: 92%;
    height: 92%;
    object-fit: contain; /* no recorta */
    display: block;
}

.scan-brand-title {
    font-weight: 900;
    font-size: 30px;
    letter-spacing: .4px;
    margin-top: 10px;
}

.scan-brand-subtitle {
    font-size: 13px;
    opacity: .92;
    margin-top: 8px;
}

.scan-left-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.scan-pill {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
}

/* Panel derecho */
.scan-login-right {
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    /* Limita el ancho del formulario y evita que se vea “apretado” */
    .scan-login-right > * {
        max-width: 440px;
    }

/* Head */
.scan-form-head {
    margin-bottom: 22px;
}

.scan-form-title {
    font-size: 34px;
    font-weight: 900;
    color: #111827;
    line-height: 1.15;
}

.scan-form-sub {
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
}

/* Alerts */
.scan-alert {
    border-radius: 12px;
    border: 1px solid rgba(255, 193, 7, .35);
    background: rgba(255, 193, 7, .12);
    color: #6b4e00;
    padding: 10px 12px;
}

/* Labels */
.scan-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

/* Mensajes de validación (Blazor) */
.validation-message {
    font-size: 12px;
    color: #b42318;
    margin-top: 6px;
}

/* ======================================================
   Base UI: para que se vea bien incluso SIN Bootstrap
   ====================================================== */

/* Utilidades */
.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-start {
    text-align: left;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.my-4 {
    margin-top: 22px;
    margin-bottom: 22px;
}

/* Base de inputs/selects */
.form-control,
.form-select {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    color: #111827;
    transition: box-shadow .15s ease, border-color .15s ease;
}

    .form-control:focus,
    .form-select:focus {
        outline: none;
        border-color: rgba(13,110,253,.55);
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
    }

/* Base de botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: .4px;
    user-select: none;
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

    .btn:disabled {
        opacity: .75;
        cursor: not-allowed;
    }

/* Botón success si no hay Bootstrap */
.btn-success {
    background: #12b76a;
    color: #fff;
    box-shadow: 0 10px 22px rgba(18,183,106,.22);
}

    .btn-success:hover {
        filter: brightness(1.03);
        transform: translateY(-1px);
    }

/* ======================================================
   Input group: icono a la izquierda (sin Bootstrap)
   ====================================================== */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

    /* IMPORTANTE: evita que el input se encoja cuando hay botón a la derecha */
    .input-group .form-control,
    .input-group .form-select {
        min-width: 0;
        flex: 1 1 auto;
    }

.input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(0,0,0,.12);
    border-right: 0;
    background: #fff;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    min-width: 44px;
    color: #475467;
}

/* Estilos “scan-input” */
.scan-input .input-group-text {
    background: #fff;
    border-color: rgba(0,0,0,.12);
    width: 44px;
    justify-content: center;
}

.scan-input .form-control,
.scan-input .form-select {
    border-left: 0;
    border-color: rgba(0,0,0,.12);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 10px 12px;
}

/* Links & botón principal */
.scan-link {
    text-decoration: none;
    color: #0b5ed7;
    font-weight: 600;
    font-size: 13px;
}

    .scan-link:hover {
        text-decoration: underline;
    }

.scan-btn {
    width: 100%;
    border-radius: 12px;
    height: 46px;
    padding: 0 16px;
    font-weight: 900;
    letter-spacing: .6px;
    border: 0;
    background: linear-gradient(90deg, #111827, #1f2937);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0,0,0,.14);
}

    .scan-btn:hover {
        filter: brightness(1.03);
        transform: translateY(-1px);
    }

.scan-small {
    color: #6b7280;
    font-size: 13px;
}

/* Divider */
.scan-divider {
    margin: 22px 0;
    height: 1px;
    background: #eaecf0;
}

/* ======================================================
   ESTILO "ANCHO" tipo ejemplo (imagen 11)
   ====================================================== */
.scan-input-wide .form-control,
.scan-input-wide .form-select {
    height: 52px;
    font-size: 18px;
    padding: 12px 14px;
}

.scan-input-wide .input-group-text {
    min-width: 52px;
    font-size: 18px;
}

/* Botón ojo (derecha) */
.scan-eye-btn {
    height: 52px;
    min-width: 52px;
    border: 1px solid rgba(0,0,0,.12);
    border-left: 0;
    background: #fff;
    color: #475467;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}

    .scan-eye-btn:hover {
        filter: brightness(0.98);
    }

    .scan-eye-btn:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

/* Cuando hay ojo a la derecha, el input no debe tener radio derecho */
.scan-input-wide .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Link de “olvidaste contraseña” alineado a la derecha */
.scan-forgot {
    margin-top: 8px;
    text-align: right;
    font-size: 13px;
    color: #6b7280;
}

/* ======================================================
   Empresa: select + botón en fila
   ====================================================== */
.scan-empresa-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    align-items: end;
}

.scan-empresa-btn {
    height: 52px; /* igual que los inputs wide */
    width: 160px;
    border-radius: 12px;
    border: 0;
    background: #12b76a;
    color: #fff;
    font-weight: 900;
    letter-spacing: .6px;
    box-shadow: 0 10px 22px rgba(18,183,106,.22);
    cursor: pointer;
}

    .scan-empresa-btn:hover {
        filter: brightness(1.03);
        transform: translateY(-1px);
    }

/* Responsive */
@media (max-width: 920px) {
    .scan-login-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .scan-login-left {
        display: none;
    }

    .scan-login-right {
        padding: 36px 22px;
    }

        .scan-login-right > * {
            max-width: 100%;
        }
}

@media (max-width: 520px) {
    .scan-empresa-row {
        grid-template-columns: 1fr;
    }

    .scan-empresa-btn {
        width: 100%;
    }
}
