/* =====================================================================
   Zenith AutoOS — RSE: painel de controle (central) + página /traseiras
   O painel usa unidades em: o contêiner define o font-size.
   ===================================================================== */
.rsx { display: flex; flex-direction: column; gap: 0.9em; font-family: "Rajdhani", "Inter", system-ui, sans-serif; color: #e2e8f0; min-height: 0; }
.rsx-sec { padding: 0.8em 0.9em; border-radius: 0.9em; background: linear-gradient(170deg, rgba(20, 26, 40, 0.92), rgba(8, 11, 20, 0.95)); border: 1px solid rgba(148, 163, 184, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.rsx-h { font-size: 0.78em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #7dd3fc; margin-bottom: 0.6em; display: flex; justify-content: space-between; gap: 0.6em; }
.rsx-live { font-style: normal; color: #4ade80; letter-spacing: 0.04em; text-transform: none; font-weight: 600; }
.rsx-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45em; }
.rsx-app { appearance: none; display: flex; flex-direction: column; align-items: center; gap: 0.3em; padding: 0.6em 0.3em; border-radius: 0.75em; border: 1px solid rgba(148, 163, 184, 0.16); background: rgba(255, 255, 255, 0.035); color: #cbd5e1; font: 700 0.86em "Rajdhani", system-ui, sans-serif; cursor: pointer; transition: all 0.15s ease; }
.rsx-app-ic { width: 2.2em; height: 2.2em; display: grid; place-items: center; border-radius: 0.6em; background: var(--ac); color: #fff; font-size: 1.15em; box-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.4); }
.rsx-app:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.rsx-app.on { color: #fff; border-color: var(--ac); background: color-mix(in srgb, var(--ac) 18%, transparent); box-shadow: 0 0 0.9em color-mix(in srgb, var(--ac) 40%, transparent); }
.rsx-now { display: flex; flex-direction: column; gap: 0.15em; margin-bottom: 0.5em; }
.rsx-now-t { font-size: 1.05em; color: #fff; line-height: 1.15; }
.rsx-now-s { font-size: 0.8em; color: #94a3b8; }
.rsx-items { display: flex; flex-direction: column; gap: 0.3em; margin-bottom: 0.5em; }
.rsx-items:empty { display: none; }
.rsx-items button { appearance: none; text-align: left; padding: 0.4em 0.6em; border-radius: 0.5em; border: 1px solid rgba(148, 163, 184, 0.14); background: rgba(255, 255, 255, 0.03); color: #cbd5e1; font: 600 0.82em "Rajdhani", system-ui, sans-serif; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsx-items button.on { color: #fff; border-color: rgba(56, 189, 248, 0.55); background: rgba(56, 189, 248, 0.14); }
.rsx-trans { display: flex; justify-content: center; gap: 0.6em; }
.rsx-trans button { appearance: none; width: 2.6em; height: 2.6em; border-radius: 50%; border: 1px solid rgba(148, 163, 184, 0.22); background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 1em; cursor: pointer; }
.rsx-trans button { display: grid; place-items: center; }
.rsx-trans svg { width: 46%; height: 46%; }
.rsx-trans .rsx-play { width: 3.1em; height: 3.1em; background: linear-gradient(135deg, #0ea5e9, #6366f1); border-color: transparent; font-size: 1.1em; }
.rsx-media.is-off .rsx-trans, .rsx-media.is-off .rsx-items { opacity: 0.35; pointer-events: none; }
.rsx-tog { display: flex; flex-direction: column; gap: 0.35em; margin-bottom: 0.55em; }
.rsx-tog button, .rsx-seg button { appearance: none; display: flex; align-items: center; gap: 0.5em; padding: 0.45em 0.6em; border-radius: 0.55em; border: 1px solid rgba(148, 163, 184, 0.16); background: rgba(255, 255, 255, 0.035); color: #cbd5e1; font: 600 0.84em "Rajdhani", system-ui, sans-serif; cursor: pointer; text-align: left; }
.rsx-tog button i { flex-shrink: 0; width: 0.55em; height: 0.55em; border-radius: 50%; background: #475569; }
.rsx-tog button.on { color: #fff; border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.12); }
.rsx-tog button.on i { background: #38bdf8; box-shadow: 0 0 0.5em #38bdf8; }
.rsx-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; margin-bottom: 0.55em; }
.rsx-seg button { justify-content: center; }
.rsx-seg button.on { color: #fff; border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.14); }
.rsx-rng { display: grid; grid-template-columns: 3.6em auto 1fr auto auto; align-items: center; gap: 0.4em; font-size: 0.84em; font-weight: 600; margin-top: 0.3em; }
.rsx-rng:last-child { grid-template-columns: 3.6em 1fr auto; }
.rsx-rng input { width: 100%; accent-color: #38bdf8; }
.rsx-rng button { appearance: none; width: 1.7em; height: 1.7em; border-radius: 50%; border: 1px solid rgba(148, 163, 184, 0.22); background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer; font-weight: 700; }
.rsx-rng b { min-width: 2.6em; text-align: right; color: #fff; }

/* =====================================================================
   Página /traseiras — 2 molduras iguais à da central, lado a lado
   ===================================================================== */
.rse-page { margin: 0; height: 100vh; overflow: hidden; background: radial-gradient(70% 60% at 55% 35%, #0b1428 0%, #000 70%); color: #e2e8f0; font-family: "Rajdhani", "Inter", system-ui, sans-serif; display: grid; grid-template-columns: clamp(220px, 17vw, 330px) minmax(0, 1fr); }
.rse-page * { box-sizing: border-box; }
.rse-side { display: flex; flex-direction: column; gap: 1.2vh; padding: 2.2vh 1vw; min-height: 0; font-size: clamp(11px, 0.82vw, 16px); }
.rse-side-logo { width: 78%; align-self: center; height: auto; filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.25)); }
.rse-back { display: inline-flex; align-items: center; gap: 0.4em; align-self: flex-start; padding: 0.45em 0.9em; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(255, 255, 255, 0.04); color: #cbd5e1; text-decoration: none; font-weight: 700; font-size: 0.95em; }
.rse-back:hover { color: #fff; border-color: rgba(56, 189, 248, 0.6); }
.rse-side-note { font-size: 0.8em; color: #94a3b8; line-height: 1.35; margin: 0; }
.rse-side-note b { color: #7dd3fc; }
.rse-side .rsx { overflow: auto; scrollbar-width: thin; }
.rse-main { display: flex; flex-direction: column; justify-content: center; gap: 2vh; padding: 2vh 2vw 2vh 0; min-width: 0; }
.rse-title { text-align: center; }
.rse-title h1 { margin: 0; font-size: clamp(18px, 1.6vw, 30px); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.rse-title p { margin: 0.4em 0 0; font-size: clamp(12px, 0.85vw, 16px); color: #94a3b8; }
.rse-units { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vw; align-items: start; }
.rse-unit { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1vh; min-width: 0; }
.rse-device { position: relative; width: 100%; aspect-ratio: 724 / 470; max-height: 70vh; }
.rse-device .central-bezel { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
/* recorte do LCD da mesma moldura da central (viewBox recortado 150 110 724 470) */
.rse-lcd { position: absolute; left: 7.928%; top: 12.936%; width: 81.657%; height: 71.106%; border-radius: 1.2% / 2.1%; overflow: hidden; background: #000; pointer-events: none; cursor: not-allowed; }
.rse-lcd canvas { width: 100%; height: 100%; display: block; }
.rse-glare { position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 26%, rgba(255, 255, 255, 0) 27%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 3px 14px rgba(0, 0, 0, 0.55); }
.rse-unit figcaption { font-size: clamp(11px, 0.8vw, 15px); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #7dd3fc; text-align: center; }
.rse-unit figcaption small { display: block; letter-spacing: 0.06em; font-weight: 600; color: #64748b; text-transform: none; margin-top: 0.2em; }
.rse-chain { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6em; font-size: clamp(11px, 0.78vw, 14px); color: #94a3b8; }
.rse-chain span { padding: 0.35em 0.8em; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.2); background: rgba(255, 255, 255, 0.03); }
.rse-chain span b { color: #e2e8f0; }
@media (max-width: 900px) {
  .rse-page { grid-template-columns: 1fr; height: auto; overflow: auto; }
  .rse-units { grid-template-columns: 1fr; }
  .rse-main { padding: 2vh 3vw; }
}

/* =====================================================================
   Central — aba "Telas traseiras" vira o CONTROLE das telas
   ===================================================================== */
.central-lcd[data-screen="rear"] #c-rear { display: grid; }
#c-rear.c-rsc { grid-template-rows: auto minmax(0, 1fr); grid-template-columns: none; gap: 1.6cqh; padding: 2cqh 1.6cqw; background: radial-gradient(80% 90% at 30% 10%, rgba(56, 189, 248, 0.12), transparent 60%), linear-gradient(165deg, #0b1020 0%, #05070d 100%); }
.rsc-head { display: flex; align-items: center; gap: 1.2cqw; }
.rsc-back { appearance: none; display: inline-flex; align-items: center; gap: 0.4cqw; padding: 0.8cqh 1cqw; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(255, 255, 255, 0.05); color: #e2e8f0; font: 700 2.2cqh "Rajdhani", system-ui, sans-serif; cursor: pointer; }
.rsc-back svg { width: 2.4cqh; height: 2.4cqh; }
.rsc-title { flex: 1; min-width: 0; }
.rsc-title h2 { margin: 0; font: 700 3cqh "Rajdhani", system-ui, sans-serif; color: #fff; }
.rsc-title small { font-size: 1.8cqh; color: #94a3b8; }
.rsc-open { display: inline-flex; align-items: center; gap: 0.5cqw; padding: 0.9cqh 1.2cqw; border-radius: 999px; background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; font: 700 2cqh "Rajdhani", system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.rsc-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6cqw; min-height: 0; }
.rsc-preview { display: flex; flex-direction: column; gap: 1cqh; min-height: 0; }
.rsc-preview-lbl { font: 700 1.7cqh "Rajdhani", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: #7dd3fc; }
.rsc-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 1.4cqh; overflow: hidden; background: #000; border: 0.5cqh solid #0b0d11; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 1cqh 3cqh rgba(0, 0, 0, 0.6); }
.rsc-screen canvas { width: 100%; height: 100%; display: block; }
.rsc-chain { font-size: 1.6cqh; color: #94a3b8; line-height: 1.4; margin: 0; }
.rsc-chain b { color: #e2e8f0; }
.rsc-ctl { min-height: 0; overflow: auto; scrollbar-width: thin; font-size: 2.05cqh; }
.rsc-ctl.rsx { gap: 1.2cqh; }
