/* =====================================================================
   v5 · PANTALLA INICIAL PULSANTE, MODO TRABAJO, DOCK VERTICAL, LLAVE SIMPLE,
        TABLERO ABAJO CON OPCIONES, PROBLEMAS, CHECK LIST ✓ / ✕
   ===================================================================== */
/* ---------- Pantalla inicial: círculo pulsante con anillo de carga ---------- */
#splash { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 45%, #2b2e33 0%, #121315 72%); transition: opacity .6s, visibility .6s; }
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.sp-ring { position: relative; width: min(300px, 62vw); aspect-ratio: 1; }
.sp-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sp-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 8; }
.sp-fg { fill: none; stroke: #ffc414; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0 100; filter: drop-shadow(0 0 6px rgba(255,196,20,.7)); }
.sp-img { position: absolute; inset: 26px; border-radius: 50%; background: #f2b40c url(assets/splash-brocad.jpg) center 42% / cover no-repeat;
  box-shadow: 0 0 0 3px #141517, 0 0 40px rgba(255,196,20,.35); animation: spPulse 1.6s ease-in-out infinite; }
@keyframes spPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px #141517, 0 0 26px rgba(255,196,20,.25); } 50% { transform: scale(1.045); box-shadow: 0 0 0 3px #141517, 0 0 60px rgba(255,196,20,.6); } }
.sp-pct { font-family: var(--mono); font-size: 15px; letter-spacing: .3em; color: #ffc414; }

/* ---------- Logomarca: vuelve al inicio ---------- */
.home-link { cursor: pointer; }
#homeLogo { display: none; position: fixed; top: 10px; left: 14px; height: 34px; z-index: 62; filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)); }
body.work #homeLogo, body.ui-hidden #homeLogo { display: block; }

/* ---------- Menú superior: solo íconos, sin efectos de desplazamiento ---------- */
.qbtn span, .qbtn:hover span, .qbtn.accent span { display: none !important; }
.qbtn { width: 36px; min-width: 36px; padding: 0; justify-content: center; transition: none; }
.qbtn.accent { width: 36px; }

/* ---------- Modo trabajo: solo logo, llave, tablero y joystick ---------- */
body.work #left, body.work #detail, body.work #specs, body.work #dock, body.work #topbar, body.work #quick,
body.work #compass, body.work .frame-corner, body.work .crosshair, body.work #showUI, body.work #inspPanel { display: none !important; }
body.work #joyWrap { left: 14px; right: 14px; }

/* ---------- Barra de menú inferior → vertical a la derecha ---------- */
#dock { left: auto; right: 10px; top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; padding: 5px; gap: 2px; }
#dock::before, #dock::after { display: none; }
#dock .dbtn { min-width: 0; width: 40px; height: 38px; padding: 0; justify-content: center; }
#dock .dbtn span { display: none; }
#dock .dsep { width: auto; height: 1px; margin: 3px 4px; }
#dock .dock-eye { margin: 2px auto; }
#dock.min { padding: 4px; }
#detail { right: 62px; }
#specs { right: 62px; }
#quick { right: 62px; }
.hud-readouts { margin-right: 230px; }

/* ---------- Llave de encendido: solo el círculo ---------- */
#keyPanel { right: 16px; bottom: 16px; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 50%; width: 96px; height: 96px; }
body.joy #keyPanel { bottom: 200px; }
#keyPanel .kswitch { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.kmini { position: absolute; z-index: 3; width: 28px; height: 28px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: #1b1d20; border: 1px solid #44484e; color: var(--text-dim); margin: 0; }
.kmini svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.kmini:hover { color: var(--accent); border-color: var(--accent); }
.kjoy { top: -6px; left: -10px; }
.kjoy.on { color: #141517; background: var(--accent); border-color: var(--accent); }
#keyPanel .eye-btn.kmini { top: -6px; right: -6px; width: 24px; height: 24px; }
#keyPanel.min { width: 24px; height: 24px; }
#keyPanel.min > :not(.eye-btn) { display: none !important; }
#keyPanel.min .eye-btn.kmini { position: static; }
.krep { position: absolute; left: -66px; bottom: 6px; width: 56px; height: 56px; border-radius: 50%; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: #1b1d20; border: 1px solid #44484e; color: var(--text-faint); font-family: var(--mono); box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.krep svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.krep b { font-size: 12px; font-weight: 500; color: var(--text-dim); line-height: 1.1; }
.krep small { font-size: 8px; }
.krep:disabled { cursor: default; opacity: .75; }
.krep.ready { border-color: #45d483; color: #45d483; animation: repPulse 1.3s ease-in-out infinite; }
.krep.ready b { color: #fff; }
.krep.busy { animation: spin 1s linear infinite; }
@keyframes repPulse { 50% { box-shadow: 0 0 0 7px rgba(69,212,131,.22); } }
#keyPanel.attn .kswitch { animation: keyAttn 1.1s ease-in-out infinite; }

/* ---------- Tablero bien abajo ---------- */
#joyWrap { bottom: 6px; }
.dash { padding: 6px 32px 6px 6px; border-radius: 10px; }
.dash-opts { display: grid; grid-template-columns: repeat(4, 32px); grid-auto-rows: 32px; gap: 4px; align-content: center; }
.dopt { padding: 0; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9.5px;
  background: linear-gradient(180deg, #34383d, #222528); border: 1px solid #43474d; color: var(--text-dim); box-shadow: 0 2px 0 #0e0f10; }
.dopt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dopt b { font-weight: 700; font-size: 10px; }
.dopt:active { transform: translateY(1px); box-shadow: none; }
.dopt.on { color: #45d483; border-color: rgba(69,212,131,.6); box-shadow: inset 0 0 8px rgba(69,212,131,.2), 0 2px 0 #0e0f10; }
.dopt[data-opt="park"].on { color: #ff5a4f; border-color: rgba(255,90,79,.6); box-shadow: inset 0 0 8px rgba(255,90,79,.2), 0 2px 0 #0e0f10; }
.lcd-icons { grid-template-columns: repeat(6, 1fr); }
.lcd-icons i { height: 16px; font-size: 7.5px; }
.lcd-icons i[data-ic="temp"].lit, .lcd-icons i[data-ic="filter"].lit, .lcd-icons i[data-ic="water"].lit, .lcd-icons i[data-ic="ground"].lit { color: #ffb21a; background: rgba(255,178,26,.14); }
.lcd-icons i.blink { animation: lampBlink .7s steps(2, start) infinite; }
@keyframes lampBlink { to { visibility: hidden; } }
@media (max-width: 1350px) { .dash-opts { grid-template-columns: repeat(2, 30px); grid-auto-rows: 30px; } }
@media (max-width: 1150px) { .dash-opts { display: none; } }

/* ---------- Problema en el trabajo ---------- */
.dprob { display: none; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; padding: 0; cursor: pointer; z-index: 6;
  background: #ff3b30; border: 2px solid #141517; color: #fff; align-items: center; justify-content: center; animation: probPulse 1s ease-in-out infinite; }
.dprob svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.dprob.on { display: flex; }
@keyframes probPulse { 50% { box-shadow: 0 0 0 9px rgba(255,59,48,.3); } }
#probCard { display: none; position: fixed; left: 50%; bottom: 168px; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); z-index: 40;
  background: rgba(24,10,10,.95); border: 1px solid #ff3b30; border-radius: 10px; padding: 12px 14px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.6); }
#probCard.show { display: block; }
.pc-h { display: flex; align-items: center; gap: 8px; }
.pc-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; padding: 2px 7px; background: #ff3b30; color: #fff; border-radius: 3px; }
.pc-tag.ter { background: #e8a21b; color: #141517; }
.pc-h em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: #ff8a80; }
.pc-t { display: block; margin: 7px 0 4px; font-size: 18px; color: #fff; }
#probCard ol { margin: 0 0 10px; padding-left: 18px; color: #e8d6d4; font-size: 13.5px; line-height: 1.45; }
#probCard li::marker { color: #ff8a80; font-family: var(--mono); }
.pc-b { display: flex; justify-content: center; gap: 18px; }
.pc-b button { width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1; }
.pc-ok { background: #45d483; border: 2px solid #45d483; color: #0d1a12; }
.pc-no { background: none; border: 2px solid #ff3b30; color: #ff6b5f; }
.pc-b button:hover { filter: brightness(1.15); transform: scale(1.05); }

/* ---------- Check list: solo ✓ y ✕ ---------- */
#inspPanel { width: 300px; }
.insp-top { gap: 12px; margin-bottom: 6px; }
.insp-top b { font-size: 22px; }
.ig { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; margin: 8px 0 3px; padding-bottom: 2px; border-bottom: 1px dashed var(--line-faint); }
.ii { gap: 7px; padding: 3px 4px; font-size: 12.5px; }
.ii .ic { width: auto; min-width: 28px; height: 20px; border-radius: 10px; padding: 0 4px; font-size: 9.5px; border-width: 1px; }
.ii .nm { flex: 1; line-height: 1.2; }
.ib-ok, .ib-no { width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer; flex: none; font-size: 14px; font-weight: 700; line-height: 1; background: none; }
.ib-ok { border: 1.5px solid rgba(69,212,131,.55); color: #45d483; }
.ib-no { border: 1.5px solid rgba(255,59,48,.55); color: #ff6b5f; }
.ib-ok:hover { background: rgba(69,212,131,.18); } .ib-no:hover { background: rgba(255,59,48,.18); }
.ii.s1 .ib-ok { background: #45d483; color: #0d1a12; border-color: #45d483; }
.ii.s2 .ib-no { background: #ff3b30; color: #fff; border-color: #ff3b30; }
.ii.s1 .ib-no, .ii.s2 .ib-ok { opacity: .35; }
