/* ---------------------------------------------------------------- acceso (multiusuario)
   Estilo 2026-10-15: tipografía Inter con ajustes de lectura (ss01/cv11, interletrado negativo en títulos), iconos
   de línea en lugar de emojis, superficies claras con bordes finos y un único acento de marca. */
.auth-screen { --brand-navy: #0B2545; --brand-ink: #0A1628; --brand-teal: #13A3C2; --brand-orange: #F26B3A;
  --auth-text: #0F172A; --auth-muted: #64748B; --auth-line: #E2E8F0;
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); padding: 0;
  place-items: stretch; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11", "cv05"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.auth-screen[hidden] { display: none; }
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 20px;
  padding: 56px clamp(28px, 5vw, 80px); color: #fff;
  background: radial-gradient(90% 70% at 10% 0%, rgba(19,163,194,.28) 0%, transparent 60%),
              radial-gradient(70% 60% at 100% 100%, rgba(242,107,58,.16) 0%, transparent 65%),
              linear-gradient(165deg, #071426 0%, var(--brand-ink) 40%, #0C2F45 100%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 30% 40%, #000 0%, transparent 75%); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-logo-tile { width: 112px; height: 112px; border-radius: 28px; display: grid; place-items: center;
  background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 20px 50px rgba(0,0,0,.35); }
.auth-logo-tile img { width: 84px; height: 84px; }
.auth-tag { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; letter-spacing: .01em;
  color: rgba(255,255,255,.86); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.auth-title { margin: 0; font-size: clamp(46px, 5.4vw, 72px); line-height: .98; font-weight: 700; letter-spacing: -.045em;
  background: linear-gradient(180deg, #fff 30%, #BFE8F2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lead { margin: 0; max-width: 32ch; font-size: 18px; line-height: 1.55; font-weight: 400; letter-spacing: -.01em; color: rgba(226,232,240,.86); }
.auth-note { display: flex; gap: 14px; align-items: flex-start; max-width: 460px; margin-top: 8px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.auth-note-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(19,163,194,.18); color: #7FD9EC; }
.auth-note-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-note strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.auth-note span { font-size: 13.5px; line-height: 1.5; color: rgba(226,232,240,.75); }
.auth-side { position: relative; z-index: 2; display: grid; place-items: center; padding: 40px 24px; background: linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%); }
.auth-card { width: min(460px, 100%); background: #fff; color: var(--auth-text); border-radius: 24px; padding: 40px 36px;
  border: 1px solid var(--auth-line); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 30px 60px -20px rgba(15,23,42,.18);
  display: flex; flex-direction: column; gap: 26px; }
.auth-card-head { display: flex; gap: 14px; align-items: center; }
.auth-mini-logo { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-ink); }
.auth-mini-logo img { width: 34px; height: 34px; }
.auth-kicker { display: none; }
.auth-card h2 { margin: 0 0 2px; font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -.03em; color: var(--auth-text); }
.auth-card .muted { margin: 0; color: var(--auth-muted); font-size: 14.5px; line-height: 1.45; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; font-weight: 500; font-size: 13.5px; color: #334155; letter-spacing: -.005em; }
.auth-field[hidden], .auth-remember[hidden] { display: none; }
.auth-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 12px;
  border: 1px solid #DCE3EC; background: #FBFCFE; transition: border-color .15s, box-shadow .15s, background .15s; }
.auth-input svg { flex: none; width: 19px; height: 19px; fill: none; stroke: #94A3B8; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s; }
.auth-input:focus-within { border-color: var(--brand-teal); background: #fff; box-shadow: 0 0 0 4px rgba(19,163,194,.14); }
.auth-input:focus-within svg { stroke: var(--brand-teal); }
.auth-screen .auth-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15.5px;
  font-weight: 400; letter-spacing: -.01em; color: var(--auth-text); height: 100%; padding: 0; box-shadow: none; }
.auth-screen .auth-input input::placeholder { color: #A3AEBD; }
.auth-show { border: 0; background: none; color: #0E6C8C; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 4px; border-radius: 8px; }
.auth-show:hover { color: var(--brand-navy); text-decoration: underline; text-underline-offset: 3px; }
.auth-remember { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #1E293B; cursor: pointer; }
.auth-remember input { width: 18px; height: 18px; accent-color: #0E6C8C; margin-top: 2px; }
.auth-remember strong { font-weight: 500; }
.auth-remember small { display: block; margin-top: 2px; color: var(--auth-muted); font-size: 12.5px; }
.auth-screen .auth-submit { height: 52px; border: 0; border-radius: 12px; cursor: pointer; color: #fff; font-size: 15.5px; font-weight: 600;
  letter-spacing: -.01em; background: linear-gradient(180deg, #13304F 0%, var(--brand-ink) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(10,22,40,.2), 0 10px 22px -8px rgba(10,22,40,.45);
  transition: transform .12s, box-shadow .15s, filter .15s; }
.auth-submit:hover { filter: brightness(1.12); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible, .auth-show:focus-visible { outline: 3px solid rgba(19,163,194,.45); outline-offset: 2px; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #EEF2F6; font-size: 12px; color: #94A3B8; }
.auth-card .error { color: #B42318; font-size: 13.5px; min-height: 1em; }
/* enlaces públicos y resultados (crear cuenta, recuperar, consultar) */
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: -6px; }
.auth-links[hidden] { display: none; }
.auth-links button { border: 0; background: none; padding: 6px 2px; color: #0E6C8C; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.auth-links button:hover { color: var(--brand-navy); text-decoration: underline; text-underline-offset: 3px; }
.auth-links button[hidden] { display: none; }
.auth-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-screen .auth-input input:not(:first-child) { padding-left: 0; }
.auth-screen .auth-input:not(:has(svg)) { padding-left: 16px; }
.auth-result { padding: 18px; border-radius: 14px; background: #F0F9FB; border: 1px solid #CBEAF1; color: var(--auth-text); }
.auth-result h3 { margin: 0 0 6px; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.auth-result p { margin: 6px 0; font-size: 14px; line-height: 1.5; }
.auth-code strong { display: inline-block; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px dashed #13A3C2;
  font-size: 20px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.platform-btn[data-badge]:not([data-badge=""])::after { content: attr(data-badge); margin-left: 8px; min-width: 20px; padding: 1px 7px;
  border-radius: 999px; background: #E5484D; color: #fff; font-size: 12px; font-weight: 700; }
.request-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.request-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.request-item > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.request-approve { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; width: 100%; }
.request-approve label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.request-approve input, .request-approve select { min-width: 110px; }
.request-actions { display: flex; gap: 8px; margin-left: auto; }
/* Portátiles (pantalla baja, p. ej. 1366×768 con la barra del navegador): todo cabe sin desplazarse ni verse enorme */
@media (min-width: 861px) and (max-height: 860px) {
  .auth-hero { gap: 14px; padding: 32px clamp(28px, 4vw, 64px); }
  .auth-logo-tile { width: 84px; height: 84px; border-radius: 22px; }
  .auth-logo-tile img { width: 62px; height: 62px; }
  .auth-title { font-size: clamp(40px, min(4.6vw, 8vh), 60px); }
  .auth-lead { font-size: 16px; line-height: 1.5; }
  .auth-note { padding: 12px 14px; margin-top: 4px; }
  .auth-side { padding: 20px 24px; overflow-y: auto; }
  .auth-card { width: min(420px, 100%); padding: 26px 30px; gap: 16px; border-radius: 20px; }
  .auth-mini-logo { width: 40px; height: 40px; border-radius: 12px; }
  .auth-mini-logo img { width: 28px; height: 28px; }
  .auth-card h2 { font-size: 22px; }
  .auth-card .muted { font-size: 13.5px; }
  .auth-form { gap: 12px; }
  .auth-field { gap: 5px; font-size: 13px; }
  .auth-input { height: 44px; }
  .auth-screen .auth-input input { font-size: 15px; }
  .auth-screen .auth-submit { height: 46px; }
  .auth-foot { padding-top: 12px; }
}
@media (min-width: 861px) and (max-height: 700px) {
  .auth-hero { gap: 10px; padding: 22px clamp(24px, 3.5vw, 56px); }
  .auth-logo-tile { width: 64px; height: 64px; border-radius: 18px; }
  .auth-logo-tile img { width: 46px; height: 46px; }
  .auth-title { font-size: clamp(34px, 7vh, 48px); }
  .auth-lead { font-size: 15px; }
  .auth-note span { font-size: 12.5px; }
  .auth-card { padding: 20px 26px; gap: 12px; }
  .auth-form { gap: 10px; }
  .auth-input { height: 40px; }
  .auth-screen .auth-submit { height: 42px; }
  .auth-foot { padding-top: 10px; font-size: 11.5px; }
}
@media (max-width: 860px) {
  /* móvil: la página entera cabe en la pantalla; respeta la zona segura (muesca / barra de estado) y nada sobresale */
  .auth-screen { display: flex; flex-direction: column; min-height: 100dvh; background: #F1F5F9; overflow-x: hidden; }
  .auth-hero { flex: none; padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 22px; gap: 10px;
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "logo title" "lead lead"; align-items: center; column-gap: 14px; }
  .auth-hero::after { background-size: 28px 28px; }
  .auth-logo-tile { grid-area: logo; width: 52px; height: 52px; border-radius: 14px; }
  .auth-logo-tile img { width: 38px; height: 38px; }
  .auth-tag { display: none; }
  .auth-title { grid-area: title; font-size: 34px; letter-spacing: -.04em; }
  .auth-lead { grid-area: lead; max-width: none; font-size: 14.5px; line-height: 1.45; }
  .auth-note { display: none; }
  .auth-side { flex: 1; display: block; margin: 0; padding: 16px 14px calc(env(safe-area-inset-bottom, 0px) + 20px); background: transparent; }
  .auth-card { width: 100%; max-width: 480px; margin: 0 auto; box-sizing: border-box; padding: 22px 18px; border-radius: 18px; gap: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 12px 28px -14px rgba(15,23,42,.22); }
  .auth-mini-logo { display: none; }
  .auth-card h2 { font-size: 22px; }
  .auth-card .muted { font-size: 13.5px; }
  .auth-form { gap: 14px; }
  .auth-input { height: 48px; }
  .auth-screen .auth-input input { font-size: 16px; }   /* 16 px: iOS no amplía la página al escribir */
  .auth-screen .auth-submit { height: 50px; }
  .auth-foot { padding-top: 14px; font-size: 11.5px; }
}
}
.user-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.user-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.user-item > div:first-child { display: flex; flex-direction: column; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- panel de plataforma */
.platform-btn { width: 100%; margin-top: 8px; justify-content: center; }
.platform-btn[hidden] { display: none; }
.platform-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.platform-stats .stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.platform-stats .stat span { color: var(--muted); font-size: 13px; }
.platform-stats .stat strong { font-size: 26px; }
.table-wrap { overflow-x: auto; }
.platform-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.platform-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.platform-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.platform-table td:last-child { text-align: right; }
.pill.state-ok { background: rgba(22,163,74,.14); color: #15803d; }
.pill.state-bad { background: rgba(220,38,38,.14); color: #b91c1c; }
.client-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
#clientDetail h4 { margin: 18px 0 8px; }
.card-title-row input[type=search] { max-width: 240px; }
@media (max-width: 860px) {
  .platform-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-title-row input[type=search] { max-width: none; width: 100%; }
}
.auth-form[hidden] { display: none; }
.platform-audit summary { cursor: pointer; list-style: none; }
.platform-audit summary h3 { display: inline; }
.audit-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 320px; overflow: auto; font-size: 13px; }
.audit-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }

/* ---------------------------------------------------------------- publicar en Producción (solo LAB) */
.promotion-card[hidden] { display: none; }
.promotion-versions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.promotion-versions > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.promotion-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.promotion-steps { margin: 12px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.promotion-steps .ok { color: #15803d; font-weight: 600; }
.promotion-steps .error { color: #b91c1c; }
@media (max-width: 860px) { .promotion-versions { grid-template-columns: 1fr; } }
.block-edit { width: 100%; grid-column: 1 / -1; margin-top: 6px; font: inherit; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); resize: vertical; }
.block-edit:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.result-actions [hidden] { display: none; }

.block-row.needs-review { border-left: 3px solid #d97706; padding-left: 8px; }
.block-warning { display: block; color: #b45309; font-weight: 600; margin-top: 2px; }
@media (prefers-color-scheme: dark) { .block-warning { color: #fbbf24; } }

.step-head .mode-toggle { margin-left: auto; align-self: flex-start; white-space: nowrap; }
.auto-mode-info { margin: 4px 0 8px; }

/* Arranque: logo mientras se comprueba la sesión (ni login ni sistema hasta saberlo) */
.boot-splash { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px;
  color: var(--muted, #8a8f98); font-size: 14px; }
.boot-splash img { width: 64px; height: 64px; border-radius: 16px; opacity: .9; }
.boot-splash[hidden] { display: none; }
