/* Solid · estilos solo de la muestra navegable (panel "Muestra" y marco de teléfono).
   No forman parte del producto: no copiar a Django. */
body.is-login { background: #0F1418; }
#app[hidden], #login-view[hidden], #field-view[hidden] { display: none !important; }

/* Panel de la muestra */
.demo { position: fixed; z-index: 95; right: 16px; bottom: 16px; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; max-width: calc(100vw - 32px); font-family: var(--font-ui); }
.demo-toggle { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(27, 35, 44, .9); color: #F2F4F6; font: 600 13px var(--font-ui); cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.demo-toggle:hover { border-color: rgba(249, 169, 0, .6); }
.demo-toggle .cube { width: 20px; height: 20px; }
.demo-body { width: 300px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px); overflow: auto; padding: 14px; border-radius: 14px; background: rgba(27, 35, 44, .95); border: 1px solid rgba(255, 255, 255, .12); color: #F2F4F6; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7); display: flex; flex-direction: column; gap: 10px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.demo-body .eyebrow { color: #94A0AD; }
.demo-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.demo-role { padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); color: #C4CCD5; text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.25; }
.demo-role:hover { border-color: rgba(255, 255, 255, .35); color: #FFFFFF; }
.demo-role[aria-current="true"] { background: rgba(249, 169, 0, .16); border-color: rgba(249, 169, 0, .6); color: #FFFFFF; font-weight: 600; }
.demo-screens { display: flex; flex-direction: column; gap: 2px; }
.demo-screens a, .demo-tools a, .demo-tools button { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; color: #C4CCD5; text-decoration: none; font: 500 13px var(--font-ui); background: none; border: 0; cursor: pointer; text-align: left; }
.demo-screens a:hover, .demo-tools a:hover, .demo-tools button:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.demo-tools { display: flex; flex-direction: column; gap: 2px; }
.demo-tools button[aria-pressed="true"] { color: #FFC93C; }
.demo :focus-visible { outline: 2px solid #F9A900; outline-offset: 2px; }

/* Escenario del técnico: teléfono + guía del flujo */
.field-stage { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; width: min(1180px, 100%); margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 80px; }
body.is-field { background: radial-gradient(60% 55% at 72% 45%, rgba(249, 169, 0, .16), transparent 70%), repeating-linear-gradient(30deg, rgba(27, 32, 39, .035) 0 1px, transparent 1px 28px), repeating-linear-gradient(150deg, rgba(27, 32, 39, .035) 0 1px, transparent 1px 28px), var(--bg); }
.field-guide { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.field-guide h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.field-guide > p { color: var(--text-2); font-size: 15px; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: flow; }
.flow button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.flow button:hover { background: var(--surface); border-color: var(--line); }
.flow button[aria-current="true"] { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.flow .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font: 700 12px var(--font-ui); }
.flow button[aria-current="true"] .n { background: var(--brand); color: var(--brand-ink); }
.flow b { display: block; font-weight: 600; }
.flow small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.phone { position: relative; width: 390px; height: min(844px, calc(100dvh - 64px)); min-height: 640px; border-radius: 52px; padding: 11px; background: linear-gradient(150deg, #3A4651, #1B232C 38%, #0F1418 70%, #2E3B47); box-shadow: 0 60px 110px -36px rgba(15, 20, 24, .6), 0 0 0 1px rgba(15, 20, 24, .5), inset 0 0 0 1.5px rgba(255, 255, 255, .14), inset 0 0 0 5px #0F1418; }
.phone::before { content: ""; position: absolute; z-index: 2; top: 22px; left: 50%; width: 112px; height: 32px; margin-left: -56px; border-radius: 16px; background: #05070A; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); pointer-events: none; }
.phone::after { content: ""; position: absolute; right: -3px; top: 180px; width: 3px; height: 70px; border-radius: 0 2px 2px 0; background: linear-gradient(180deg, #3A4651, #1B232C); }
.dark-preview .phone, :root[data-theme="dark"] .phone { box-shadow: 0 60px 110px -36px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08), inset 0 0 0 1.5px rgba(255, 255, 255, .14), inset 0 0 0 5px #0F1418; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 42px; background: var(--bg); display: block; }
.phone-net { position: absolute; top: -40px; right: 0; display: flex; gap: 8px; align-items: center; }
@media (max-width: 980px) {
  .field-stage { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .field-guide { display: none; }
  .phone { width: 100%; height: 100dvh; min-height: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; }
  .phone iframe { border-radius: 0; }
  .phone::before, .phone::after { display: none; }
  .phone-net { display: none; }
}

.toasts { bottom: 64px; }
body.is-login .demo { bottom: auto; top: 16px; flex-direction: column; }

/* El botón "Muestra" queda compacto para no tapar contenido; se abre al pasar o al tocar */
.demo-toggle { gap: 0; padding: 0 10px; opacity: .82; transition: opacity var(--t-fast), gap var(--t), padding var(--t); }
.demo-toggle > span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width var(--t) var(--ease-out); }
.demo-toggle:hover, .demo-toggle:focus-visible, .demo[data-expanded="1"] .demo-toggle { opacity: 1; gap: 8px; padding: 0 12px 0 10px; }
.demo-toggle:hover > span, .demo-toggle:focus-visible > span, .demo[data-expanded="1"] .demo-toggle > span { max-width: 90px; }
.demo-toggle > .i:last-child { display: none; }
.demo[data-expanded="1"] .demo-toggle > .i:last-child, .demo-toggle:hover > .i:last-child { display: block; }
