/* LLOG Escritorio 3.2.0 — menú de perfil y ventana de acceso */
.llescm-trig{display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 3px;border-radius:999px;border:2px solid transparent;text-decoration:none!important;cursor:pointer;line-height:1;-webkit-tap-highlight-color:transparent;vertical-align:middle}
.llescm-trig-av{width:34px;height:34px;border-radius:50%;background:#111827;color:#fff;display:inline-flex;align-items:center;justify-content:center;font:600 13px/1 'IBM Plex Sans',-apple-system,'Segoe UI',sans-serif;overflow:hidden}
.llescm-trig-av img{width:100%;height:100%;object-fit:cover;display:block}
.llescm-v-oscuro{color:#111827}.llescm-v-oscuro[aria-expanded="true"]{border-color:#E5E7EB}
.llescm-v-blanco{color:#fff;background:rgba(255,255,255,.12)}.llescm-v-blanco .llescm-trig-av{background:#fff;color:#111827}
.llescm-v-blanco[aria-expanded="true"]{border-color:#fff}
.llescm-v-movil{padding:0;width:44px;height:44px;justify-content:center;color:var(--llogm-head-ico,#111114)}
.llescm-v-movil .llescm-trig-av{width:32px;height:32px}
.llescm-anon{padding:0;width:44px;height:44px;justify-content:center}
.llescm-v-blanco.llescm-anon{background:transparent}

.llescm-fondo{position:fixed;inset:0;z-index:99990;background:transparent}
.llescm-panel{position:fixed;z-index:99991;width:330px;max-height:calc(100vh - 90px);overflow:auto;background:#fff;color:#111827;border:1px solid #E5E7EB;border-radius:12px;box-shadow:0 18px 44px rgba(17,24,39,.2);font:14px/1.45 'IBM Plex Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;animation:llescmIn .16s ease-out}
.llescm-panel *,.llescm-login *{box-sizing:border-box}
.llescm-panel a{text-decoration:none!important}
@keyframes llescmIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.llescm-asa{display:none}
.llescm-cargando{display:flex;align-items:center;gap:10px;padding:22px 18px;color:#6B7280}
.llescm-cargando span{width:16px;height:16px;border:2px solid #E5E7EB;border-top-color:#C8102E;border-radius:50%;animation:llescmGiro .7s linear infinite}
@keyframes llescmGiro{to{transform:rotate(360deg)}}

.llescm-yo{display:flex;gap:14px;align-items:center;padding:18px 18px 14px}
.llescm-av{position:relative;width:56px;height:56px;border-radius:50%;background:#111827;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;flex-shrink:0}
.llescm-av img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.llescm-av i{position:absolute;right:-2px;bottom:-2px;width:18px;height:18px;border-radius:50%;background:#16A34A;border:3px solid #fff}
.llescm-av-s{width:38px;height:38px;font-size:13px}
.llescm-yo-t{display:flex;flex-direction:column;gap:3px;min-width:0}
.llescm-yo-t b{font-size:16px;line-height:1.2}
.llescm-yo-t small{font-size:13px;color:#6B7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.llescm-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
.llescm-chips em{font-style:normal;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#C8102E;border:1px solid #C8102E;border-radius:999px;padding:2px 8px}
.llescm-chips em.ok{color:#166534;border-color:#BBF7D0;background:#DCFCE7}
.llescm-asesor{margin:0 14px 12px;padding:12px;background:#F7F8FA;border:1px solid #E5E7EB;border-radius:10px;display:flex;align-items:center;gap:10px}
.llescm-asesor-t{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.llescm-asesor-t small{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#6B7280}
.llescm-asesor-t b{font-size:14px}
.llescm-wa{width:40px;height:40px;border-radius:8px;background:#C8102E;color:#fff!important;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.llescm-cal{width:42px;flex-shrink:0;text-align:center;border:1px solid #E5E7EB;border-radius:6px;overflow:hidden;background:#fff;display:flex;flex-direction:column}
.llescm-cal small{background:#111827;color:#fff;font-size:10px;font-weight:600;text-transform:uppercase;padding:2px 0}
.llescm-cal b{font-size:16px;padding:2px 0}
.llescm-stats{margin:0 14px 12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #E5E7EB;border-radius:10px;overflow:hidden}
.llescm-st{padding:10px 4px;text-align:center;color:inherit!important}
.llescm-st+.llescm-st{border-left:1px solid #E5E7EB}
.llescm-st b{display:block;font-size:18px;font-variant-numeric:tabular-nums;color:#111827}
.llescm-st b.llescm-st-ambar{color:#B45309}.llescm-st b.llescm-st-rojo{color:#C8102E}
.llescm-st span{font-size:11px;color:#6B7280}
.llescm-nav{border-top:1px solid #F1F2F4;padding:6px 0}
.llescm-nav a{display:flex;align-items:center;gap:12px;min-height:40px;padding:8px 18px;color:#111827!important;font-size:14px}
.llescm-nav a:hover,.llescm-nav a:focus-visible{background:#F5F6F8}
.llescm-nav a svg{color:#4B5563;flex-shrink:0}
.llescm-nav a span{flex:1}
.llescm-nav a em{font-style:normal;font-size:12px;font-weight:600;background:#EEF0F3;border-radius:999px;padding:1px 8px}
.llescm-sonido{border-top:1px solid #F1F2F4;display:flex;align-items:center;gap:12px;padding:10px 18px;color:#4B5563}
.llescm-sonido span{flex:1;color:#111827}
.llescm-sw{position:relative;width:42px;height:24px;border:0;border-radius:999px;background:#D1D5DB;cursor:pointer;padding:0;flex-shrink:0}
.llescm-sw i{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:left .15s}
.llescm-sw[aria-checked="true"]{background:#16A34A}.llescm-sw[aria-checked="true"] i{left:21px}
.llescm-salir{border-top:1px solid #F1F2F4;display:flex;align-items:center;gap:12px;padding:12px 18px;color:#C8102E!important}
.llescm-salir:hover{background:#FFF5F6}
.llescm-anon-b{padding:22px 20px;display:flex;flex-direction:column;gap:12px;text-align:center}
.llescm-anon-ic{align-self:center;width:56px;height:56px;border-radius:50%;background:#F3F4F6;color:#6B7280;display:inline-flex;align-items:center;justify-content:center}
.llescm-anon-b b{font-size:16px}.llescm-anon-b span{font-size:13px;color:#6B7280}

.llescm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid #E5E7EB;border-radius:8px;background:#fff;color:#111827!important;font-weight:600;font-size:14px;line-height:1.2;font-family:inherit;cursor:pointer;text-decoration:none!important}
.llescm-btn-p{background:#C8102E;border-color:#C8102E;color:#fff!important}
.llescm-btn-p:hover{background:#9B0C23}
.llescm-btn-l{min-height:50px;font-size:15px;width:100%}
.llescm-btn[disabled]{opacity:.6;cursor:wait}

/* Ventana de acceso */
.llescm-login{position:fixed;inset:0;z-index:99995;display:flex;align-items:center;justify-content:center;font:14px/1.45 'IBM Plex Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#111827}
.llescm-login[hidden]{display:none}
.llescm-login-fondo{position:absolute;inset:0;background:rgba(17,24,39,.55)}
.llescm-login-caja{position:relative;width:420px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 60px rgba(17,24,39,.35);animation:llescmIn .2s ease-out}
.llescm-login-top{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 0}
.llescm-logo{border:2px solid #C8102E;color:#C8102E;font-weight:800;font-size:15px;padding:1px 8px}
.llescm-x{border:0;background:transparent;font-size:26px;line-height:1;color:#6B7280;cursor:pointer;width:40px;height:40px}
.llescm-tabs{display:grid;grid-template-columns:1fr 1fr;margin:14px 22px 0;background:#F3F4F6;border-radius:8px;padding:4px}
.llescm-tab{min-height:38px;border:0;border-radius:6px;background:transparent;font-weight:600;font-size:14px;font-family:inherit;color:#6B7280;cursor:pointer}
.llescm-tab.es-activa{background:#fff;color:#111827;box-shadow:0 1px 2px rgba(17,24,39,.12)}
.llescm-form{padding:18px 22px 24px;display:flex;flex-direction:column;gap:14px}
.llescm-form[hidden]{display:none}
.llescm-form h2{margin:0;font-size:20px;font-weight:700;font-family:inherit;color:#111827}
.llescm-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;color:#374151}
.llescm-form input[type=text],.llescm-form input[type=password]{width:100%;height:46px;padding:0 13px;border:1px solid #D1D5DB;border-radius:8px;font-size:16px;font-family:inherit;color:#111827;background:#fff}
.llescm-form input:focus{outline:2px solid #C8102E;outline-offset:1px;border-color:#C8102E}
.llescm-fila{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.llescm-fila a{color:#C8102E!important;font-weight:500}
.llescm-chk{flex-direction:row!important;align-items:center;gap:8px!important;min-height:40px;font-weight:400!important}
.llescm-chk input{width:18px;height:18px;margin:0}
.llescm-error{margin:0;padding:10px 12px;border-radius:8px;background:#FFE4E6;color:#9F1239;font-size:13px}
.llescm-qr{margin:0;display:flex;gap:10px;align-items:center;padding:10px 12px;background:#F7F8FA;border-radius:8px;font-size:13px;color:#4B5563}
.llescm-qr svg{flex-shrink:0;color:#374151}
.llescm-txt{margin:0;color:#4B5563}

/* ============ Móvil: hoja inferior sobre la barra de LLOG Móvil ============ */
@media (max-width:900px){
  .llescm-fondo{background:rgba(17,24,39,.5);bottom:calc(var(--llogm-bar,0px) * var(--llogm-on,0) + env(safe-area-inset-bottom) * var(--llogm-on,0))}
  .llescm-panel{left:0!important;right:0!important;top:auto!important;width:auto;bottom:calc(var(--llogm-bar,0px) * var(--llogm-on,0) + env(safe-area-inset-bottom) * var(--llogm-on,0));max-height:calc(100dvh - var(--llogm-head,56px) - var(--llogm-bar,0px) * var(--llogm-on,0) - 24px);border-radius:18px 18px 0 0;border:0;box-shadow:0 -10px 30px rgba(17,24,39,.2);animation:llescmSube .26s cubic-bezier(.2,.8,.2,1)}
  @keyframes llescmSube{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
  .llescm-asa{display:block;width:40px;height:5px;border-radius:999px;background:#D1D5DB;margin:10px auto 0}
  .llescm-nav a{min-height:48px;font-size:15px;padding:0 20px}
  .llescm-sonido,.llescm-salir{min-height:52px;padding:0 20px}
  .llescm-wa{width:44px;height:44px}
  .llescm-login{align-items:flex-end}
  .llescm-login-fondo{bottom:calc(var(--llogm-bar,0px) * var(--llogm-on,0) + env(safe-area-inset-bottom) * var(--llogm-on,0))}
  .llescm-login-caja{width:100%;max-width:none;border-radius:18px 18px 0 0;margin-bottom:calc(var(--llogm-bar,0px) * var(--llogm-on,0) + env(safe-area-inset-bottom) * var(--llogm-on,0));max-height:calc(100dvh - var(--llogm-bar,0px) * var(--llogm-on,0) - 16px);animation:llescmSube .26s cubic-bezier(.2,.8,.2,1)}
  .llescm-login-caja .llescm-asa{display:block}
  .llescm-login-top{padding-top:6px}
  /* Con el teclado abierto la barra estorba: se esconde y la hoja baja hasta el borde. */
  html.llescm-teclado .llogm-bar{display:none!important}
  html.llescm-teclado .llescm-login-caja{margin-bottom:0}
  html.llescm-teclado .llescm-login-fondo{bottom:0}
}
@media (prefers-reduced-motion:reduce){.llescm-panel,.llescm-login-caja{animation:none}.llescm-sw i{transition:none}}
