/* ============================================================
   PediChateando — Acceso al panel (templates/layouts/acceso.html, js/acceso.js): login, 2º factor y contraseña nueva.
   Tablet de aluminio con el panel de ejemplo + formulario. Clara a propósito. Las clases cl-* son las que usan
   canal-login.js, canal-login-totp.js y login-nueva-password.js (no renombrar).
   ============================================================ */
:root {
  --fondo: #f5f7ff; --fondo2: #ffffff; --tinta: #0f1530; --suave: #5b6488; --linea: #e3e7f5;
  --azul: #3d6bff; --violeta: #8b5cf6; --menta: #12b981; --error: #c62828; --campo: #ffffff;
  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-dato: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.55 var(--f-texto); overflow-x: hidden; }

.ac-pagina { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.15fr .85fr; position: relative; isolation: isolate; }
.ac-malla { position: fixed; inset: -20%; z-index: -1; filter: blur(70px); opacity: .55; pointer-events: none; }
.ac-malla i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; animation: ac-flota 22s ease-in-out infinite alternate; }
.ac-malla i:nth-child(1) { background: #b9c8ff; left: 5%; top: 10%; }
.ac-malla i:nth-child(2) { background: #d9c6ff; left: 35%; top: 45%; animation-delay: -7s; }
.ac-malla i:nth-child(3) { background: #b8f0d9; left: -5%; top: 55%; animation-delay: -14s; }
@keyframes ac-flota { to { transform: translate(8vmax, -6vmax) scale(1.15); } }

/* ---------- tablet ---------- */
.ac-escena { display: grid; place-items: center; align-content: center; gap: 18px; padding: 40px 30px; perspective: 1600px; position: relative; min-width: 0; }
.ac-tablet { width: min(640px, 100%); aspect-ratio: 4 / 3; border-radius: 34px; padding: 14px; position: relative;
  background: linear-gradient(145deg, #ffffff, #dfe3ee 45%, #f4f6fb 70%, #cfd5e3);
  box-shadow: 0 0 0 1px rgba(15,21,48,.08), 0 40px 80px -20px rgba(61,107,255,.35), 0 18px 30px -12px rgba(15,21,48,.25);
  transform: rotateY(10deg) rotateX(6deg) rotateZ(-1deg); transition: transform .25s ease-out; }
.ac-tablet::before { content: ""; position: absolute; top: 50%; left: 6px; width: 5px; height: 5px; border-radius: 50%; background: #9aa3bb; transform: translateY(-50%); }
.ac-pantalla { height: 100%; border-radius: 22px; overflow: hidden; background: #f8f9fe; display: grid; grid-template-columns: 54px 1fr; color: #0f1530; position: relative; }
.ac-pantalla::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.55), transparent 30%); pointer-events: none; }
.ac-barra { background: #fff; border-right: 1px solid #e8ebf6; display: grid; align-content: start; justify-items: center; gap: 12px; padding-top: 12px; }
.ac-barra span { width: 30px; height: 30px; border-radius: 9px; background: #eef1fc; display: grid; place-items: center; font-size: 14px; }
.ac-barra span.on { background: linear-gradient(135deg, var(--azul), var(--violeta)); }
.ac-contenido { padding: 14px 16px; display: grid; grid-template-rows: auto auto 1fr; gap: 12px; min-width: 0; }
.ac-saludo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ac-saludo b { font: 800 clamp(14px, 2vw, 19px) var(--f-display); letter-spacing: -0.03em; }
.ac-saludo small { font: 600 10.5px var(--f-dato); color: #7a83a6; white-space: nowrap; }
.ac-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-kpi { background: #fff; border: 1px solid #e8ebf6; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.ac-kpi small { display: block; font-size: 10px; color: #7a83a6; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-kpi b { font: 700 clamp(13px, 2vw, 18px)/1.2 var(--f-dato); font-variant-numeric: tabular-nums; }
.ac-kpi em { font-style: normal; font-size: 10px; color: var(--menta); font-weight: 700; }
.ac-abajo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; min-height: 0; }
.ac-caja { background: #fff; border: 1px solid #e8ebf6; border-radius: 12px; padding: 9px 10px; min-width: 0; overflow: hidden; display: grid; align-content: start; gap: 6px; }
.ac-caja h4 { margin: 0; font: 700 11px var(--f-dato); letter-spacing: .06em; text-transform: uppercase; color: #7a83a6; }
.ac-fila { display: flex; align-items: center; gap: 7px; font-size: 11.5px; animation: ac-entra .5s cubic-bezier(.2,.9,.3,1.2) both; }
.ac-fila i { width: 18px; height: 18px; border-radius: 6px; flex: none; display: grid; place-items: center; font-style: normal; font-size: 10px; color: #fff; }
.ac-fila span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-fila b { font: 700 10.5px var(--f-dato); color: var(--menta); }
@keyframes ac-entra { from { opacity: 0; transform: translateX(-10px); } }
.ac-grafico { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.ac-grafico div { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #8b5cf6, #3d6bff); transform-origin: bottom; animation: ac-crece 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ac-crece { from { transform: scaleY(0); } }
.ac-ejes { display: flex; justify-content: space-between; font: 600 9px var(--f-dato); color: #9aa3bb; }
.ac-ejemplo { margin: 0; font-size: 12.5px; color: var(--suave); }

.ac-nota { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--fondo2); border: 1px solid var(--linea); border-radius: 16px; padding: 10px 14px; font-size: 13.5px;
  box-shadow: 0 18px 40px -16px rgba(15,21,48,.35); animation: ac-deriva 7s ease-in-out infinite; max-width: 240px; }
.ac-nota i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; flex: none; }
.ac-nota small { display: block; color: var(--suave); font-size: 12px; }
.ac-n1 { top: 12%; left: 4%; } .ac-n1 i { background: #dcfce7; }
.ac-n2 { bottom: 14%; right: 4%; animation-delay: -3.5s; } .ac-n2 i { background: #ede9fe; }
@keyframes ac-deriva { 50% { transform: translateY(-10px); } }

/* ---------- formulario ---------- */
.ac-lado { display: grid; align-content: center; padding: 40px clamp(20px, 5vw, 64px); background: rgba(255,255,255,.82); backdrop-filter: blur(20px); border-left: 1px solid var(--linea); min-width: 0; }
.ac-form { width: 100%; max-width: 400px; justify-self: center; display: grid; gap: 18px; }
.ac-marca { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-bottom: 14px; justify-self: start; }
.ac-palabra { font: 800 25px/1 var(--f-display); letter-spacing: -0.05em; display: inline-flex; align-items: baseline; }
.ac-palabra .chat { font-weight: 300; letter-spacing: -0.035em; color: var(--suave); }
.ac-palabra .cursor { width: 3px; height: .9em; background: var(--menta); margin-left: 3px; transform: translateY(.1em); border-radius: 2px; animation: ac-titila 1.1s steps(1) infinite; }
@keyframes ac-titila { 50% { opacity: 0; } }
.ac-form h1 { font: 800 clamp(30px, 3.6vw, 42px)/1.02 var(--f-display); letter-spacing: -0.045em; margin: 0; text-wrap: balance; }
.ac-form h1 span { font-weight: 300; color: var(--suave); }
.ac-sub { margin: -6px 0 4px; color: var(--suave); }
.ac-seguro { margin: 4px 0 0; text-align: center; font: 600 12px var(--f-dato); color: var(--suave); }

.cl-form { display: grid; gap: 16px; }
.cl-campo { display: grid; gap: 7px; }
.cl-campo > span:first-child { font-weight: 600; font-size: 14px; }
.cl-campo input, .cl-campo textarea { width: 100%; border-radius: 16px; border: 1.5px solid var(--linea); background: var(--campo); color: var(--tinta);
  font: 500 16px var(--f-texto); transition: border-color .2s, box-shadow .2s; }
.cl-campo input { height: 54px; padding: 0 16px; }
.cl-campo textarea { padding: 12px 16px; resize: vertical; }
.cl-campo input::placeholder { color: #9aa3bb; }
.cl-campo input:focus, .cl-campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(61,107,255,.18); }
.cl-campo input[aria-invalid="true"] { border-color: var(--error); }
.cl-pass { position: relative; display: block; }
.cl-pass input { padding-right: 52px; }
.cl-pass button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 16px; padding: 8px; border-radius: 10px; }
.cl-pass button:focus-visible { outline: 3px solid var(--violeta); outline-offset: 2px; }

.cl-btn { height: 58px; border: 0; border-radius: 18px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 24px;
  font: 700 16.5px var(--f-texto); color: #fff; position: relative; overflow: hidden; text-decoration: none;
  background: linear-gradient(135deg, var(--azul), var(--violeta)); box-shadow: 0 18px 36px -14px rgba(61,107,255,.8); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.cl-btn::after { content: "→"; width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 20px; transition: transform .3s; }
.cl-btn::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); transition: left .7s; }
.cl-btn:hover { transform: translateY(-2px); } .cl-btn:hover::after { transform: translateX(3px); } .cl-btn:hover::before { left: 130%; }
.cl-btn:focus-visible { outline: 3px solid var(--violeta); outline-offset: 3px; }
.cl-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.cl-btn-link { height: 48px; padding-left: 18px; font-size: 15px; }
.cl-btn-link::after { width: 34px; height: 34px; }

.cl-mensaje { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(18,185,129,.12); }
.cl-mensaje.error { background: rgba(198,40,40,.08); color: var(--error); }
.cl-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
.cl-links a { color: var(--azul); font-weight: 700; text-decoration: none; }
.cl-links a:hover { text-decoration: underline; }
.cl-links-extra { justify-content: center; }
.cl-texto { font-size: 15px; margin: 0; color: var(--suave); }
.cl-texto strong { color: var(--tinta); }
.cl-chico { font-size: 13px; word-break: break-all; }
.cl-qr { display: flex; justify-content: center; background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--linea); margin: 0 auto; width: max-content; }
.cl-codigos { background: #eef1fc; border-radius: 12px; padding: 12px; font: 600 15px/1.7 var(--f-dato); text-align: center; margin: 0; }
.cl-captcha { display: flex; justify-content: center; }

@media (max-width: 960px) {
  .ac-pagina { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: start; }
  .ac-lado { order: -1; border-left: 0; border-bottom: 1px solid var(--linea); padding-block: 36px; }
  .ac-escena { padding: 30px 16px 50px; }
  .ac-tablet { transform: none; }
  .ac-nota { display: none; }
}
@media (max-width: 520px) { .ac-barra { display: none; } .ac-pantalla { grid-template-columns: 1fr; } .ac-abajo { grid-template-columns: 1fr; } .ac-abajo .ac-caja + .ac-caja { display: none; } }
@media (prefers-reduced-motion: reduce) { .ac-malla i, .ac-nota, .ac-palabra .cursor, .ac-fila, .ac-grafico div { animation: none !important; } }

/* pie legal (fragments/pie-legal.html, V57) */
.ac-pie-legal { color: #5b6478; }
