/* Same palette and density as the desktop panel (app/web/index.html). */
:root { color-scheme: dark; --fondo: #0f141b; --panel: #131a23; --borde: #1f2833; --texto: #e6edf3; --tenue: #8b98a8; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font: 13px system-ui, sans-serif; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 16px; border-bottom: 1px solid var(--borde); }
header h1 { margin: 0; font-size: 17px; letter-spacing: 1.5px; white-space: nowrap; }
#identity { color: var(--tenue); font-size: 12px; }
#price { font-size: 15px; font-weight: 800; white-space: nowrap; }
#source { color: #f5c542; font-size: 12px; overflow-wrap: anywhere; }
.botones { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.botones .rotulo { color: var(--tenue); font-size: 12px; margin-right: 2px; }
button { font: inherit; font-size: 11px; padding: 2px 8px; background: var(--panel); color: var(--tenue);
  border: 1px solid var(--borde); border-radius: 4px; cursor: pointer; }
button[aria-pressed="true"] { background: #26364a; color: var(--texto); border-color: #6fa8ff; font-weight: 700; }
button:disabled { cursor: wait; }
:focus-visible { outline: 2px solid #8edbff; outline-offset: 2px; }
[hidden] { display: none !important; }
#notice { margin: 0; padding: 0 16px; color: var(--tenue); font-size: 12px; overflow-wrap: anywhere; }
#notice:empty { display: none; }
#login { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; padding: 1rem 16px; }
label { display: grid; gap: .3rem; }
input { font: inherit; padding: .4rem; background: var(--fondo); color: var(--texto); border: 1px solid #40516a; border-radius: 4px; }
#login button { font-size: 13px; padding: .45rem 1rem; }
/* Strike columns at the left share the price scale of the chart, which takes the remaining width. */
main { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); height: calc(100vh - 92px); min-height: 460px;
  border-bottom: 1px solid var(--borde); }
#chart { position: relative; min-width: 0; min-height: 0; }
#columns { position: relative; display: grid; grid-template-columns: repeat(4, 67px) 1fr 1fr; width: max(420px, 26vw);
  min-height: 0; border-right: 1px solid var(--borde); }
.col { position: relative; border-left: 1px solid var(--borde); min-height: 0; overflow: hidden; }
.col canvas { position: absolute; left: 0; top: 0; }
.col .titulo { position: absolute; left: 0; right: 0; top: 40px; display: grid; padding: 3px 2px; text-align: center;
  background: rgba(15, 20, 27, 0.85); color: var(--tenue); font-weight: 700; font-size: 11px; letter-spacing: 1px; z-index: 2; }
.col .titulo:empty { display: none; }
.grupo { position: absolute; top: 0; height: 40px; display: grid; place-items: center; padding: 0 4px; text-align: center;
  background: rgba(15, 20, 27, 0.92); border-bottom: 1px solid var(--borde); color: var(--texto); font-weight: 800;
  font-size: 11px; letter-spacing: 1px; line-height: 13px; z-index: 3; pointer-events: none; }
.g-trace { left: 0; width: 268px; font-size: 12px; letter-spacing: 2px; }
.g-total { left: 268px; width: calc((100% - 268px) / 2); border-left: 1px solid var(--borde); }
.g-next { left: calc(268px + (100% - 268px) / 2); width: calc((100% - 268px) / 2); border-left: 1px solid var(--borde); }
.capa { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.nombre-nivel { position: absolute; left: 12px; font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 3px;
  color: #0f141b; white-space: nowrap; transform: translateY(-50%); }
.flujo { position: absolute; top: 0; width: 0; border-left: 1px dashed; }
.flujo span { position: absolute; left: 4px; padding: 1px 4px; background: var(--fondo); border: 1px solid currentColor;
  border-radius: 3px; font-size: 9px; font-weight: 800; line-height: 12px; white-space: nowrap; }
/* The vendored chart injects this rule as an inline <style>, which the CSP blocks: same rule from here. */
a#tv-attr-logo { --fill: #131722; --stroke: #fff; position: absolute; left: 10px; bottom: 10px; height: 19px; width: 35px;
  margin: 0; padding: 0; border: 0; z-index: 3; }
a#tv-attr-logo[data-dark] { --fill: #D1D4DC; --stroke: #131722; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 6px 16px; color: var(--tenue); font-size: 12px; }
footer a { color: var(--tenue); }
#private { padding: 0 16px 1rem; }
#private h2 { font-size: 15px; margin: .8rem 0 .3rem; }
#private p { color: var(--tenue); font-size: 12px; margin: 0 0 .6rem; }
#levels { display: flex; flex-wrap: wrap; gap: 1rem; }
#levels form { flex: 1 1 200px; padding: .6rem; border-top: 3px solid; display: grid; gap: .4rem; }
#levels input { width: 100%; }
#levels button, #clear { font-size: 12px; padding: .35rem .8rem; }
.level-0 { border-color: violet !important; }
.level-1 { border-color: red !important; }
.level-2 { border-color: orange !important; }
.level-3 { border-color: green !important; }
#clear { margin-top: .8rem; }
@media (max-width: 700px) { main { grid-template-columns: 1fr; height: 70vh; } #columns { display: none; } }
