/* =====================================================================
   v4 · MÁQUINAS EN CÍRCULOS, OJITO SIN TÍTULOS, TABLERO HORIZONTAL,
        INSPECCIÓN PRE-OPERACIONAL Y LLAVE DE ENCENDIDO
   ===================================================================== */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Menú inicial: máquinas en círculos ---------- */
.machine-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: start; }
.mcard { clip-path: none; background: none; border: 0; align-items: center; text-align: center; gap: 4px; padding: 6px 4px; }
.mcard .mring { position: relative; width: 190px; height: 190px; border-radius: 50%; padding: 6px; border: 1px solid var(--line-faint); margin-bottom: 8px;
  background: conic-gradient(from 210deg, rgba(255,196,20,.0), rgba(255,196,20,.35), rgba(255,196,20,0) 40%); }
.mcard.active .mring { width: 230px; height: 230px; border-color: var(--line); box-shadow: 0 0 0 6px rgba(255,196,20,.06), 0 14px 40px rgba(0,0,0,.5); }
.mcard .mring::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed rgba(255,196,20,.25); }
.mcard.active:not(:disabled):hover .mring::after { animation: spin 14s linear infinite; border-color: var(--accent); }
.mthumb { width: 100%; height: 100% !important; border-radius: 50%; overflow: hidden; border: 0; position: relative; background: #23262a; }
.mthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mthumb.photo { background: #fff url(assets/maquina-416e.jpg) 2% 50% / 330% auto no-repeat; }
.mtag { top: auto; bottom: -2px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 2; }
.mcard.soon { opacity: 1; filter: none; }
.mcard.soon .mthumb img { filter: grayscale(.35) brightness(.85); }
.mcard.soon .mtag { background: #2c2f33; color: #ffb21a; border-color: rgba(255,178,26,.5); }
.mcard small { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--text-faint); }
.mcard b { font-size: 22px; font-weight: 700; color: var(--text); }
.mcard.active b { font-size: 30px; color: var(--accent); }
.mcard .mspec { justify-content: center; }
.mcard .mgo { border-radius: 30px; padding: 10px 22px; margin-top: 6px; }
.credit { font-family: var(--mono); font-size: 9px; color: var(--text-faint); text-decoration: none; margin-top: 2px; }
.credit:hover { color: var(--accent); }
@media (max-width: 900px) { .machine-grid { grid-template-columns: 1fr 1fr; } .mcard.active { grid-column: span 2; } .mcard .mring { width: 140px; height: 140px; } .mcard.active .mring { width: 190px; height: 190px; } }

/* ---------- Paneles sin títulos: solo un ojito ---------- */
.eye-btn.corner { position: absolute; top: 6px; right: 18px; z-index: 5; width: 22px; height: 22px; margin: 0; background: rgba(14,15,17,.75); border-color: transparent; border-radius: 50%; }
.eye-btn.corner:hover { border-color: var(--line); }
#detail .body { padding-top: 12px; }
#detail.min, #specs.min, #inspPanel.min { width: 44px !important; height: 34px; overflow: hidden; }
#detail.min .eye-btn.corner, #specs.min .eye-btn.corner, #inspPanel.min .eye-btn.corner { right: 11px; }
.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) 28px; }
.tab { font-size: 9px; letter-spacing: .03em; min-width: 0; overflow: hidden; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs-eye { align-self: center; justify-self: center; margin: 0; width: 24px; height: 24px; border-radius: 50%; border-color: transparent; }
#left.min { width: 44px; bottom: auto; }
#left.min .tabs { grid-template-columns: 1fr; border: 0; padding: 5px 0; }
#left.min .tab { display: none; }
#left.collapsed .tabs { grid-template-columns: 1fr; }

/* ---------- Joysticks y tablero horizontal ---------- */
#joyWrap { bottom: 78px; align-items: flex-end; gap: 10px; }
.joy-col { gap: 4px; position: relative; }
.joy-col > .eye-btn.sm { align-self: center; border-radius: 50%; background: rgba(14,15,17,.7); }
.joy-col.min { gap: 0; }
.joy-col.min .pkeys { display: none; }
.pkeys { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--text-faint); }
.pad { width: 150px; height: 150px; }
.knob { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.knob::after { inset: 19px; }
.dash { position: relative; pointer-events: auto; align-self: flex-end; background: linear-gradient(180deg, #2a2d31, #16181b); border: 1px solid #3c4046; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); padding: 8px 34px 8px 8px; }
.dash .eye-btn.corner { top: 6px; right: 6px; }
.dash.min { padding: 4px; } .dash.min .dash-body { display: none; } .dash.min .eye-btn.corner { position: static; }
.dash-body { display: flex; align-items: stretch; gap: 8px; padding: 0; }
.dash-modes { display: flex; flex-direction: column; gap: 5px; margin: 0; width: 74px; }
.dash-modes .jm { flex: 1; flex-direction: column; gap: 3px; font-size: 9.5px; padding: 6px 4px; }
.dash-modes .jm svg { width: 20px; height: 20px; }
.lcd { width: 470px; padding: 5px 8px 6px; }
.lcd.dark { filter: brightness(.35) saturate(.4); }
.lcd-row { display: grid; grid-template-columns: 104px 1fr 104px 134px; gap: 8px; align-items: center; }
.lcd .g b { top: 36%; font-size: 18px; }
.lcd-mid { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.eng-row { display: flex; align-items: center; gap: 6px; font-size: 8.5px; letter-spacing: .1em; color: #7fa7c9; line-height: 1.2; }
.eng-row .eng { margin: 0; }
.lcd-icons { grid-template-columns: repeat(4, 1fr); margin: 0; width: 100%; }
.lcd-side { display: flex; flex-direction: column; gap: 4px; }
.lcd-side .lb { grid-template-columns: 14px 1fr; }
.lcd-side .lb svg { grid-row: auto; }
.lcd-side .lb.flow { display: flex; align-items: baseline; gap: 3px; border: 0; padding: 0; text-align: left; }
.lcd-side .lb.flow small { display: inline; margin-right: 2px; }
.lcd-side .lb.flow .sess { margin-left: auto; font-size: 8.5px; color: #7fa7c9; }
.lcd-side .hm-row { padding: 3px 5px; gap: 4px; }
.lcd-side .hm-row b { font-size: 15px; }
.lcd-side .hm-btn { width: 20px; height: 20px; }
.dash .holds { margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.dash .hold-row { grid-template-columns: 36px 28px 28px; font-size: 9.5px; font-family: var(--mono); letter-spacing: .06em; }
.dash .hb { padding: 4px 0; font-size: 11px; }
@media (max-width: 1350px) { .lcd { width: 400px; } .lcd-row { grid-template-columns: 90px 1fr 90px 120px; } .pad { width: 128px; height: 128px; } }
@media (max-width: 1150px) { .dash .holds { display: none; } .lcd { width: 340px; } .lcd-row { grid-template-columns: 80px 1fr 80px; } .lcd-side { display: none; } }

/* ---------- Inspección pre-operacional ---------- */
#inspPanel { top: 66px; left: 12px; width: 318px; max-height: calc(100% - 160px); display: none; flex-direction: column; z-index: 18; }
#inspPanel.show { display: flex; }
#inspPanel .body { overflow-y: auto; padding: 12px 14px 14px; }
#inspPanel.min .body { display: none; }
.insp-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 26px; }
.insp-top .ring { width: 44px; height: 44px; transform: rotate(-90deg); flex: none; }
.insp-top .rbg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; }
.insp-top .rfg { fill: none; stroke: #45d483; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .3s; }
.insp-top b { display: block; font-family: var(--mono); font-size: 20px; color: var(--text); font-weight: 500; }
.insp-top small { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--accent); }
.insp-list { display: flex; flex-direction: column; gap: 2px; }
.ii { display: flex; align-items: center; gap: 9px; padding: 4px 6px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-dim); border-left: 2px solid transparent; }
.ii:hover { background: rgba(255,255,255,.04); color: var(--text); }
.ii.cur { border-left-color: var(--accent); background: rgba(255,196,20,.07); color: var(--text); }
.ii .ic { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 700;
  border: 2px dashed var(--accent); color: var(--accent); }
.ii.s1 .ic { border: 2px solid #45d483; background: rgba(69,212,131,.15); color: #45d483; }
.ii.s2 .ic { border: 2px solid #ff3b30; background: rgba(255,59,48,.15); color: #ff3b30; }
.ii em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--text-faint); }
.insp-card { margin-top: 10px; border: 1px solid var(--line-soft); padding: 10px 11px; background: rgba(255,196,20,.04); }
.ic-h { display: flex; align-items: center; gap: 8px; }
.ic-h .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #141517; font-family: var(--mono); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.ic-h b { font-size: 16px; } .ic-h em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--accent); }
.insp-card p { margin: 8px 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-dim); }
.ib { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ib button { padding: 9px 4px; font-family: var(--disp); font-weight: 700; font-size: 13px; letter-spacing: .06em; cursor: pointer; border-radius: 20px; }
.iok { background: #45d483; border: 1px solid #45d483; color: #0d1a12; }
.iobs { background: none; border: 1px solid #ff3b30; color: #ff6b5f; }
.iok:hover { filter: brightness(1.1); } .iobs:hover { background: rgba(255,59,48,.12); }
.ins-done { text-align: center; color: #45d483; font-weight: 700; font-size: 18px; letter-spacing: .06em; }
.ins-done small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10px; color: var(--text-dim); letter-spacing: .06em; font-weight: 400; }

/* ---------- Llave de encendido ---------- */
#keyPanel { position: fixed; right: 14px; bottom: 84px; z-index: 18; background: linear-gradient(180deg, #2a2d31, #16181b); border: 1px solid #3c4046; border-radius: 14px; padding: 8px 34px 8px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
body.menu #keyPanel { display: none; }
body.joy #keyPanel { bottom: 300px; }
#keyPanel.min { padding: 4px; } #keyPanel.min .kbody { display: none; } #keyPanel.min .eye-btn.corner { position: static; }
#keyPanel .eye-btn.corner { top: 6px; right: 6px; }
.kbody { display: flex; align-items: center; gap: 10px; }
.kswitch { width: 92px; height: 92px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.kswitch svg { width: 100%; height: 100%; display: block; }
.kbez { fill: #0e0f11; stroke: #4a4e55; stroke-width: 3; }
.kface { fill: url(#none); fill: #1c1e21; stroke: #2f3237; stroke-width: 1; }
.kl { font-family: var(--mono); font-size: 9px; font-weight: 700; fill: #9aa3ad; }
.kslot { fill: #2a2c30; stroke: #55595f; stroke-width: 2; }
.kbow { fill: #c9ccd1; stroke: #6b7076; stroke-width: 1.2; }
.kblade { fill: #4a4e55; }
#kLock { display: none; }
.klock { fill: #ff3b30; } .klockarc { fill: none; stroke: #ff3b30; stroke-width: 2.4; }
#keyPanel.locked #kKey { opacity: .25; }
#keyPanel.locked #kLock { display: block; }
#keyPanel.locked .kswitch { cursor: not-allowed; }
#keyPanel.contact .kbez { stroke: #ffb21a; }
#keyPanel.run .kbez { stroke: #45d483; filter: drop-shadow(0 0 4px rgba(69,212,131,.7)); }
#keyPanel.attn .kswitch { animation: keyAttn 1.1s ease-in-out infinite; }
@keyframes keyAttn { 50% { box-shadow: 0 0 0 8px rgba(255,196,20,.25); } }
.kinfo { display: flex; flex-direction: column; gap: 3px; min-width: 132px; }
.kinfo b { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--text); font-weight: 500; }
#keyPanel.locked .kinfo b { color: #ff6b5f; } #keyPanel.run .kinfo b { color: #45d483; } #keyPanel.contact:not(.run) .kinfo b { color: #ffb21a; }
.kinfo small { font-size: 12px; color: var(--text-dim); line-height: 1.3; }
.kfin { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 8px; border-radius: 16px; cursor: pointer;
  background: rgba(255,59,48,.12); border: 1px solid rgba(255,59,48,.6); color: #ff8a80; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.kfin svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.kfin:hover { background: rgba(255,59,48,.25); }
#keyPanel.locked .kfin { display: none; }
@media (max-width: 900px) { #keyPanel { bottom: 80px; } .kinfo { display: none; } .kswitch { width: 70px; height: 70px; } }
