/* ============================================================
   Verificacion de seguridad 'No soy un robot' (contra bots)
   ============================================================ */
.norrobot-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 5px rgba(2, 6, 23, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.norrobot-box:hover { border-color: #b6c2d3; box-shadow: 0 3px 8px rgba(2, 6, 23, .10); }
.norrobot-box.ok    { border-color: #16a34a; }
.norrobot-box.verif { border-color: #0d6efd; }

#norrobotCheck { position: absolute; opacity: 0; pointer-events: none; }

.norrobot-marca {
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border-radius: 4px;
    border: 2px solid #c1c1c1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
}
.norrobot-marca:hover { border-color: #0d6efd; }
.norrobot-marca .fa-check {
    color: #fff;
    font-size: 15px;
    transform: scale(0);
    transition: transform .18s ease;
    position: absolute;
}
#norrobotCheck:checked + .norrobot-marca { background: #16a34a; border-color: #16a34a; }
#norrobotCheck:checked + .norrobot-marca .fa-check { transform: scale(1); }
#norrobotCheck:focus-visible + .norrobot-marca { outline: 2px solid #0d6efd; outline-offset: 2px; }

.norrobot-giro {
    position: absolute;
    color: #0d6efd;
    font-size: 16px;
    opacity: 0;
}
.norrobot-giro .fa-circle-notch { animation: norrobot_spin .8s linear infinite; display: block; }
.norrobot-box.verif .norrobot-marca .fa-check { opacity: 0; }
.norrobot-box.verif .norrobot-giro { opacity: 1; }
@keyframes norrobot_spin { to { transform: rotate(360deg); } }

.norrobot-texto { flex: 1 1 auto; font-size: 14px; color: #0f172a; }

.norrobot-escudo {
    flex: 0 0 auto;
    font-size: 26px;
    color: var(--accent);
    filter: drop-shadow(0 2px 3px rgba(2, 6, 23, .18));
    transition: color .15s ease, transform .15s ease;
}
.norrobot-box.ok .norrobot-escudo {
    color: #16a34a;
    transform: scale(1.08);
}
/* ============================================================
   Bitacora de Ambulancias - Sermisalud
   Estilos del Login (diseño empresarial dinámico)
   =================================================================== */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --accent: #e63946;          /* rojo urgencias */
    --bg-dark: #e94921;
    --bg-dark-2: #ca7b15;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: #ffffff;
    --radius: 14px;
    --shadow: 0 20px 60px rgba(2, 6, 23, .25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    background: var(--card-bg);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ================= Panel de marca (izquierda) ================= */
.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 42px;
    color: var(--text-light);
    background: linear-gradient(160deg, #0b2a52 0%, #0e4a4a 55%, #14532d 100%);
    overflow: hidden;
}

/* Resplandores decorativos corporativos sobre el degradado */
.brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.18), transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(59, 130, 246, 0.22), transparent 50%);
}

/* Anillo animado decorativo */
.brand-panel::before {
    content: "";
    position: absolute;
    z-index: 1;
    width: 420px;
    height: 420px;
    border: 1.5px dashed rgba(255, 255, 255, .15);
    border-radius: 50%;
    top: -140px;
    right: -140px;
    animation: spin 40s linear infinite;
}

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

.brand-content { position: relative; z-index: 1; }

.brand-logo {
    width: 150px;
    padding: 16px 20px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    margin-bottom: 28px;
    animation: pulse-soft 3s ease-in-out infinite;
}
.brand-logo img { max-width: 100%; max-height: 64px; display: block; }

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

.brand-panel h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.brand-panel h1 span { color: #cb4c12; }

.brand-panel p { color: var(--text-muted); line-height: 1.6; }

.brand-features {
    list-style: none;
    margin-top: 34px;
    display: grid;
    gap: 14px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .95rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.brand-features i { color: #38bdf8; font-size: 1.1rem; }

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: .8rem;
    color: var(--text-muted);
}

/* ================= Panel del formulario (derecha) ================= */
.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px 48px 28px;
}

.mobile-logo { display: none; }

.login-card h2 {
    font-size: 1.55rem;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-card h2 i { color: var(--primary); }

.login-subtitle {
    color: var(--text-muted);
    font-size: .92rem;
    margin: 6px 0 26px;
}

/* ---- Alertas (flash messages) ---- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: .88rem;
    margin-bottom: 18px;
    animation: slide-in .25s ease;
}

@keyframes slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

/* ---- Formulario ---- */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--bg-dark-2);
    margin-bottom: 7px;
}

.input-icon { position: relative; }

.input-icon input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: .95rem;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-icon input:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, .12);
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .95rem;
    pointer-events: none;
}

/* Icono de foco cuando el input esta activo */
input:focus ~ .input-icon-left,
.input-icon input:focus + .input-icon-left { color: var(--primary); }

.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    font-size: .9rem;
    transition: color .2s, background .2s;
}

.toggle-pass:hover { color: var(--primary); background: #eff6ff; }

/* ---- Opciones: recordarme / olvido contrasena ---- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    margin-bottom: 22px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox input { accent-color: var(--primary); transform: scale(1.15); }

.forgot {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forgot:hover { text-decoration: underline; }

/* ---- Boton principal ---- */
.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 24px rgba(31, 114, 238, 0.35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}

.btn-login:hover  { transform: translateY(-2px); filter: brightness(1.05); }
.btn-login:active { transform: translateY(0); box-shadow: 0 5px 14px rgba(13,110,253,.3); }

/* ---- Separador y pie del card ---- */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0 14px;
    color: var(--text-muted);
    font-size: .8rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.divider span { padding: 0 12px; }

.register-hint {
    text-align: center;
    font-size: .84rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-hint i { color: var(--primary); }

/* ---- Marca de desarrollo (logo Baron) ---- */
.baron-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.baron-logo {
    width: 72px;
    height: auto;
    opacity: .85;
    transition: opacity .2s, transform .2s;
}

.baron-logo:hover { opacity: 1; transform: scale(1.05); }

.baron-caption {
    font-size: .7rem;
    letter-spacing: .5px;
    color: var(--text-muted);
}

.baron-caption strong {
    color: #b8860b;
    font-weight: 600;
}

.form-footer {
    margin-top: auto;
    padding-top: 26px;
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
}

/* ================= Responsive ================= */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 460px;
        min-height: auto;
    }

    .brand-panel { display: none; }

    .form-panel { padding: 40px 32px 24px; }

    .mobile-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin-bottom: 24px;
        color: var(--text-light);
    }
    .mobile-logo h1 { width: 100%; }

    .mobile-logo i {
        font-size: 2.4rem;
        color: var(--accent);
        background: rgba(199, 67, 6, 0.08);
        padding: 18px;
        border-radius: 18px;
    }

    .mobile-logo img {
        max-width: 120px;
        max-height: 52px;
    }

    .mobile-logo h1 { font-size: 1.3rem; color: #0f172a !important; }
}
