:root {
  --bg: #080d12;
  --surface: #0d141b;
  --surface-2: #121c25;
  --surface-3: #17232d;
  --line: rgba(203, 221, 231, .12);
  --line-strong: rgba(203, 221, 231, .22);
  --text: #f2f6f7;
  --muted: #8da0ad;
  --muted-2: #657580;
  --cyan: #42d9c8;
  --cyan-bright: #72f4e5;
  --blue: #4e8dff;
  --red: #f2253d;
  --amber: #f1af4b;
  --violet: #a67cff;
  --sidebar: 244px;
  --topbar: 98px;
  --radius: 18px;
  --font: "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 76% -20%, rgba(66, 217, 200, .07), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button { color: inherit; font: inherit; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 30px 22px 22px;
  background: rgba(7, 12, 17, .94);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 38px; }
.brand-word { font-size: 23px; font-weight: 850; letter-spacing: .07em; }
.brand-mark {
  position: relative;
  width: 35px; height: 35px;
  display: grid; place-items: center;
  transform: rotate(45deg);
  border: 2px solid var(--red);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(242, 37, 61, .2);
}
.brand-mark i {
  position: absolute;
  width: 19px; height: 3px;
  background: var(--red);
  border-radius: 4px;
  transform: rotate(-45deg);
}
.brand-mark i:first-child { transform: rotate(-45deg) translate(-4px, -4px); }
.brand-mark i:last-child { transform: rotate(-45deg) translate(4px, 4px); }
.site-identity { margin: 38px 4px 34px; }
.site-identity span, .site-identity strong { display: block; }
.site-identity span { margin-bottom: 7px; color: var(--muted-2); font-size: 11px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.site-identity strong { font-size: 17px; letter-spacing: .01em; }

.primary-nav { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); transform: translateX(2px); }
.nav-item.is-active { color: var(--text); background: rgba(66,217,200,.09); }
.nav-item.is-active::before {
  content: "";
  position: absolute; left: -22px;
  width: 3px; height: 28px;
  background: var(--cyan);
  box-shadow: 0 0 15px rgba(66,217,200,.55);
}
.nav-item svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span:not(.nav-count) { font-weight: 620; }
.nav-count { min-width: 22px; padding: 3px 7px; color: #1b1307; background: var(--amber); border-radius: 20px; font-size: 11px; font-weight: 800; text-align: center; }
.sidebar-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.user-avatar { width: 36px; height: 36px; display: grid; place-items: center; color: var(--cyan); background: rgba(66,217,200,.1); border: 1px solid rgba(66,217,200,.24); border-radius: 50%; font-size: 12px; font-weight: 800; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer span { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.icon-button { background: transparent; border: 0; color: var(--muted); cursor: pointer; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(28px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
}
.eyebrow, .section-kicker {
  margin: 0 0 7px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.topbar h1 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 680; letter-spacing: -.025em; }
.topbar-status { display: flex; align-items: center; gap: 28px; }
.data-health { display: flex; align-items: center; gap: 11px; }
.data-health strong, .data-health span { display: block; }
.data-health strong { font-size: 12px; }
.data-health span { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.data-health.is-stale .live-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(241,175,75,.1), 0 0 16px rgba(241,175,75,.45); animation: none; }
.data-health.is-stale strong { color: var(--amber); }
.live-dot, .status-beacon {
  width: 9px; height: 9px;
  display: inline-block;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(66,217,200,.1), 0 0 16px rgba(66,217,200,.5);
  animation: beacon 2.4s ease-out infinite;
}
#system-clock { min-width: 77px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }

.view { display: none; padding: 36px clamp(28px, 4vw, 64px) 70px; animation: view-in .45s cubic-bezier(.2,.75,.2,1); }
.view.is-visible { display: block; }
.operations-lead {
  position: relative;
  min-height: 335px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.operations-lead::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .45;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, transparent, black 55%, transparent);
}
.lead-copy { position: relative; z-index: 1; }
.lead-copy .section-kicker { display: flex; align-items: center; gap: 10px; color: var(--cyan); }
.lead-copy h2 { max-width: 720px; margin: 18px 0 20px; font-size: clamp(35px, 4vw, 61px); line-height: .98; letter-spacing: -.052em; font-weight: 720; }
.lead-copy h2 span { color: transparent; -webkit-text-stroke: 1px rgba(242,246,247,.55); }
.lead-copy > p:last-child { color: var(--muted); font-size: 14px; }
.live-orbit { position: relative; width: 300px; height: 300px; justify-self: center; }
.orbit { position: absolute; inset: 15px; border: 1px solid rgba(66,217,200,.18); border-radius: 50%; }
.orbit-a::after, .orbit-b::after {
  content: ""; position: absolute; width: 8px; height: 8px; top: -4px; left: 50%;
  background: var(--cyan); border-radius: 50%; box-shadow: 0 0 20px var(--cyan);
}
.orbit-a { animation: orbit-spin 13s linear infinite; }
.orbit-b { inset: 42px; border-style: dashed; animation: orbit-spin 18s linear infinite reverse; }
.orbit-core {
  position: absolute; inset: 78px;
  display: grid; place-content: center;
  background: radial-gradient(circle, rgba(66,217,200,.15), rgba(13,20,27,.95) 70%);
  border: 1px solid rgba(66,217,200,.25);
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 0 50px rgba(66,217,200,.08);
}
.orbit-core strong { font-size: 42px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.orbit-core small { margin-top: 2px; color: var(--cyan); font-size: 11px; letter-spacing: .18em; }
.orbit-label { position: absolute; color: var(--muted-2); font-size: 9px; letter-spacing: .15em; }
.orbit-label-a { top: 20px; right: 30px; }.orbit-label-b { bottom: 48px; left: 2px; }.orbit-label-c { right: 8px; bottom: 80px; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.metric-strip article { position: relative; min-width: 0; padding: 28px 26px 26px 0; }
.metric-strip article + article { padding-left: 26px; border-left: 1px solid var(--line); }
.metric-strip article > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-strip article div { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 4px; }
.metric-strip strong { font-size: clamp(25px, 2.7vw, 36px); font-weight: 640; letter-spacing: -.045em; font-variant-numeric: tabular-nums; transition: color .25s, text-shadow .25s; }
.metric-strip small { color: var(--muted); font-size: 11px; }
.metric-strip em { color: var(--muted-2); font-size: 10px; font-style: normal; }
.metric-strip .trend-up { color: var(--cyan); }
.value-changed { color: var(--cyan-bright) !important; text-shadow: 0 0 16px rgba(66,217,200,.4); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 42px; padding: 44px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h3 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 7px; }
.chart-legend i { width: 16px; height: 2px; display: inline-block; }
.legend-hydro { background: var(--cyan); }.legend-thermal { background: var(--violet); }
.chart-stage { position: relative; height: 310px; margin-top: 25px; }
.chart-stage svg { width: 100%; height: 100%; overflow: visible; }
.grid-lines line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.hydro-line { stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(66,217,200,.25)); }
.thermal-line { stroke: var(--violet); }
.chart-axis text { fill: var(--muted-2); font-size: 10px; }
.chart-cursor { position: absolute; top: 20px; bottom: 26px; right: 2%; width: 1px; background: rgba(255,255,255,.2); }
.chart-cursor::before { content: ""; position: absolute; top: 30%; left: -4px; width: 9px; height: 9px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 12px var(--cyan); }
.chart-cursor span { position: absolute; top: calc(30% - 14px); right: 12px; width: 44px; height: 26px; border-radius: 5px; background: var(--surface-3); }
.text-button { padding: 0; background: transparent; border: 0; color: var(--cyan); font-size: 11px; font-weight: 700; cursor: pointer; }
.event-list { margin-top: 25px; }
.event { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.event-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.event.warning .event-icon { color: #211406; background: var(--amber); }
.event.info .event-icon { color: var(--cyan); background: rgba(66,217,200,.1); border: 1px solid rgba(66,217,200,.25); }
.event strong, .event p, .event time { display: block; margin: 0; }
.event strong { font-size: 12px; }.event p, .event time { margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.event-value { color: var(--amber); font-size: 11px; font-weight: 700; }
.quiet-state { display: flex; align-items: center; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.quiet-state > span { color: var(--cyan); }.quiet-state p { margin: 0; color: var(--muted); font-size: 11px; }
.quiet-state strong { color: var(--text); }

.fleet-section { padding-top: 44px; }
.fleet-table { margin-top: 22px; }
.fleet-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1.4fr .8fr .65fr .75fr .65fr;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
button.fleet-row:hover { background: rgba(255,255,255,.025); transform: translateX(4px); }
.fleet-header { min-height: 34px; color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.plant-name { display: flex; align-items: center; gap: 13px; }
.plant-name strong, .plant-name small { display: block; }
.plant-name strong { color: var(--text); font-size: 12px; }.plant-name small { margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.plant-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 800; }
.plant-symbol.hydro { color: var(--cyan); background: rgba(66,217,200,.1); border: 1px solid rgba(66,217,200,.22); }
.plant-symbol.thermal { color: var(--violet); background: rgba(166,124,255,.1); border: 1px solid rgba(166,124,255,.22); }
.state-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; }.state-dot.online { background: var(--cyan); box-shadow: 0 0 9px rgba(66,217,200,.55); }
.signal { position: relative; width: 14px; height: 10px; display: inline-block; margin-right: 5px; border-right: 2px solid var(--cyan); border-radius: 50%; transform: rotate(-45deg); }
.sparkline { width: 75px; height: 24px; display: inline-block; }
.sparkline svg { width: 100%; height: 100%; }
.sparkline path { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.view-intro { min-height: 100px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.view-intro h2 { margin: 0 0 25px; font-size: clamp(28px, 3.2vw, 43px); font-weight: 680; letter-spacing: -.04em; }
.view-note { color: var(--cyan); font-size: 12px; }
.diagram-legend { display: flex; gap: 20px; color: var(--muted); font-size: 10px; }
.diagram-legend span { display: flex; align-items: center; gap: 7px; }
.diagram-legend i { width: 14px; height: 3px; display: inline-block; }
.diagram-legend .energized { background: var(--cyan); }.diagram-legend .open-state { background: var(--amber); }.diagram-legend .unknown-state { background: var(--muted-2); }
.singleline-stage { position: relative; min-height: 680px; margin-top: 24px; overflow: hidden; background-image: radial-gradient(circle, rgba(141,160,173,.14) 1px, transparent 1px); background-size: 22px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.singleline-toolbar { position: absolute; z-index: 3; top: 18px; right: 18px; display: flex; align-items: center; background: rgba(8,13,18,.9); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.singleline-toolbar button, .singleline-toolbar span { height: 34px; min-width: 34px; display: grid; place-items: center; background: transparent; border: 0; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.singleline-toolbar button { cursor: pointer; }.singleline-toolbar .fit-button { width: auto; padding: 0 12px; border-right: 0; }
.singleline-svg { width: 100%; min-width: 900px; height: 650px; }
.bus line { stroke: var(--cyan); stroke-width: 7; filter: url(#line-glow); }
.bus text { fill: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.feeder > line, .feeder > path:not(.energy-pulse) { fill: none; stroke: #627a85; stroke-width: 3; }
.breaker { fill: var(--surface); stroke: var(--cyan); stroke-width: 3; }
.generator { fill: var(--surface); stroke: var(--cyan); stroke-width: 4; filter: drop-shadow(0 0 13px rgba(66,217,200,.15)); }
.thermal-generator { stroke: var(--violet); }
.energy-pulse { fill: none; stroke: var(--cyan-bright); stroke-width: 4; stroke-dasharray: 4 24; filter: drop-shadow(0 0 5px var(--cyan)); animation: flow-up 1.1s linear infinite; }
.energy-pulse.delay-1 { animation-delay: -.25s; }.energy-pulse.delay-2 { animation-delay: -.5s; }.energy-pulse.delay-3 { stroke: var(--violet); animation-delay: -.75s; }
.equipment-label { fill: var(--text); font-size: 37px; font-weight: 300; }
.equipment-name { fill: var(--text); font-size: 14px; font-weight: 750; letter-spacing: .06em; }
.equipment-value { fill: var(--cyan); font-size: 13px; font-weight: 700; }
.mobile-unifilar { display: none; }

.quipico-total { text-align: right; }.quipico-total span, .quipico-total strong { display: block; }.quipico-total span { color: var(--muted); font-size: 10px; }.quipico-total strong { margin-top: 4px; font-size: 26px; }.quipico-total b { font-weight: 650; }
.process-stage { margin-top: 24px; border-bottom: 1px solid var(--line); }
.process-svg { width: 100%; height: auto; max-height: 500px; overflow: visible; }
.water-channel { fill: none; stroke: rgba(45,120,255,.18); stroke-width: 26; stroke-linecap: round; }
.water-motion { fill: none; stroke: url(#water-gradient); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 14 22; animation: water-flow 1.3s linear infinite; }
.process-node { fill: var(--surface-2); stroke: rgba(78,141,255,.35); }
.process-svg text { fill: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.process-svg .process-reading { fill: var(--text); font-size: 23px; letter-spacing: -.02em; }
.turbine-ring { fill: var(--surface-2); stroke: var(--cyan); stroke-width: 4; filter: drop-shadow(0 0 20px rgba(66,217,200,.15)); }
.turbine-runner { fill: rgba(66,217,200,.5); animation: runner-spin 3s linear infinite; }
.turbine-hub { fill: var(--cyan-bright); }
.shaft { stroke: var(--cyan); stroke-width: 8; }
.generator-unit { fill: var(--surface-2); stroke: var(--cyan); stroke-width: 4; }
.generator-g { fill: var(--text) !important; font-size: 48px !important; font-weight: 350 !important; }
.process-svg .node-caption { fill: var(--muted); font-size: 11px; }.process-svg .node-value { fill: var(--cyan); font-size: 13px; }
.power-route { fill: none; stroke: rgba(66,217,200,.25); stroke-width: 9; }
.power-motion { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-dasharray: 7 20; animation: power-flow 1.2s linear infinite; }
.transformer { fill: var(--surface-2); stroke: var(--cyan); stroke-width: 3; }
.process-metrics { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); }
.process-metrics article { padding: 24px 20px; border-right: 1px solid var(--line); }
.process-metrics article:last-child { border-right: 0; }
.process-metrics span, .process-metrics strong, .process-metrics small { display: block; }
.process-metrics span { color: var(--muted); font-size: 10px; }.process-metrics strong { margin: 7px 0 4px; font-size: 23px; }.process-metrics b { font-weight: 650; }.process-metrics small { color: var(--cyan); font-size: 9px; }
.process-metrics .metric-warning small { color: var(--amber); }
.compact-trend { padding-top: 38px; }
.mini-history { height: 150px; margin-top: 24px; }

.range-selector, .event-filters { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.range-selector button, .event-filters button { padding: 8px 13px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); font-size: 10px; cursor: pointer; }
.range-selector button.is-selected, .event-filters button.is-selected { background: var(--surface-3); color: var(--text); }
.frequency-focus { display: grid; grid-template-columns: 240px 1fr; min-height: 390px; padding: 50px 0 35px; border-bottom: 1px solid var(--line); }
.frequency-summary { padding-top: 30px; }
.frequency-summary > span { color: var(--muted); font-size: 11px; }.frequency-summary > strong { display: block; margin: 10px 0 18px; font-size: 42px; letter-spacing: -.05em; }.frequency-summary b { font-weight: 640; }.frequency-summary small { color: var(--muted); font-size: 12px; }
.frequency-summary p { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 10px; }.frequency-summary i { width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 8px var(--cyan); }
.frequency-chart { min-width: 0; height: 300px; }
.frequency-chart svg, .mini-history svg { width: 100%; height: 100%; overflow: visible; }
.frequency-chart .normal-band { fill: rgba(66,217,200,.055); }
.frequency-chart .nominal { stroke: rgba(255,255,255,.22); stroke-dasharray: 4 7; }
.frequency-chart .freq-line { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.frequency-chart text, .mini-history text { fill: var(--muted-2); font-size: 9px; }
.trend-list { display: grid; }
.trend-series { display: grid; grid-template-columns: 4px 1fr auto; align-items: center; gap: 17px; min-height: 76px; padding: 14px 17px; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.trend-series > i { width: 3px; height: 30px; border-radius: 5px; }.series-cyan { background: var(--cyan); }.series-blue { background: var(--blue); }.series-violet { background: var(--violet); }
.trend-series strong, .trend-series small { display: block; }.trend-series strong { font-size: 12px; }.trend-series small { margin-top: 5px; color: var(--muted-2); font-size: 10px; }.trend-series > b { color: var(--muted); font-size: 12px; }
.trend-series.is-active { background: rgba(66,217,200,.035); }

.geo-stage { position: relative; height: min(670px, calc(100vh - 280px)); min-height: 480px; margin-top: 24px; overflow: hidden; background: radial-gradient(circle at 70% 60%, rgba(66,217,200,.07), transparent 30%), #0b1218; border: 1px solid var(--line); border-radius: var(--radius); }
.geo-grid { position: absolute; inset: -10%; transform: perspective(700px) rotateX(58deg) rotateZ(-9deg) scale(1.2); transform-origin: center; background-image: linear-gradient(rgba(141,160,173,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(141,160,173,.09) 1px, transparent 1px); background-size: 50px 50px; }
.geo-road { position: absolute; width: 70%; height: 2px; background: rgba(141,160,173,.17); transform: rotate(-24deg); }.road-a { left: 8%; top: 45%; }.road-b { right: -5%; top: 65%; transform: rotate(18deg); }
.map-plant { position: absolute; display: flex; align-items: center; gap: 11px; padding: 9px 13px 9px 9px; background: rgba(13,20,27,.94); border: 1px solid var(--line-strong); border-radius: 13px; text-align: left; cursor: pointer; box-shadow: 0 15px 40px rgba(0,0,0,.24); transition: transform .2s, border-color .2s; }
.map-plant:hover { transform: translateY(-4px); border-color: rgba(66,217,200,.5); }
.map-plant::after { content: ""; position: absolute; left: 25px; top: 100%; width: 1px; height: 24px; background: var(--cyan); }
.map-plant > i { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(66,217,200,.1); border: 1px solid rgba(66,217,200,.25); border-radius: 50%; color: var(--cyan); font-style: normal; font-weight: 800; }
.map-plant strong, .map-plant small { display: block; }.map-plant strong { font-size: 11px; }.map-plant small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.map-quipico { left: 17%; top: 19%; }.map-ica { left: 53%; top: 24%; }.map-andahuasi { left: 34%; top: 62%; }.map-villacuri { right: 10%; top: 68%; }
.geo-coordinates { position: absolute; left: 20px; bottom: 20px; color: var(--muted-2); font-size: 9px; letter-spacing: .1em; }

.events-summary { display: grid; grid-template-columns: repeat(3, 1fr); padding: 35px 0; border-bottom: 1px solid var(--line); }
.events-summary div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.events-summary strong, .events-summary span { display: block; }.events-summary strong { font-size: 31px; }.events-summary span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.events-table { margin-top: 30px; }
.events-row { min-height: 65px; display: grid; grid-template-columns: .75fr .8fr .9fr 1.5fr .55fr; align-items: center; gap: 18px; padding: 10px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.events-row strong { color: var(--text); font-size: 11px; }.events-header { min-height: 34px; color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.severity { width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; }.severity.warning { background: var(--amber); box-shadow: 0 0 8px rgba(241,175,75,.5); }.severity.info { background: var(--cyan); }

.prototype-note { position: fixed; z-index: 40; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 11px; padding: 9px 11px; background: rgba(8,13,18,.94); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 35px rgba(0,0,0,.35); backdrop-filter: blur(15px); }
.prototype-note span { padding: 4px 6px; color: #1a1003; background: var(--amber); border-radius: 4px; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.prototype-note p { margin: 0; color: var(--muted); font-size: 9px; }.prototype-note button { background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.mobile-nav { display: none; }

.login-body { min-height: 100vh; overflow: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); }
.login-atmosphere {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 67% 45%, rgba(66,217,200,.12), transparent 27%),
    linear-gradient(135deg, #080e13, #0b141b);
  border-right: 1px solid var(--line);
}
.login-brand { position: absolute; z-index: 4; top: 42px; left: 48px; display: flex; align-items: center; gap: 12px; }
.login-grid { position: absolute; inset: -10%; opacity: .65; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 76px 76px; mask-image: radial-gradient(circle at 66% 47%, black, transparent 68%); transform: perspective(800px) rotateX(54deg) translateY(20%); }
.login-energy { position: absolute; right: 10%; top: 18%; width: min(42vw, 520px); aspect-ratio: 1; }
.login-energy .orbit-a { inset: 0; }.login-energy .orbit-b { inset: 13%; }
.login-energy-core { position: absolute; inset: 30%; display: grid; place-items: center; color: var(--cyan); background: rgba(8,13,18,.82); border: 1px solid rgba(66,217,200,.28); border-radius: 50%; font-size: clamp(34px,5vw,70px); font-weight: 250; letter-spacing: .12em; box-shadow: 0 0 70px rgba(66,217,200,.1); }
.login-message { position: absolute; z-index: 3; left: 7%; bottom: 9%; }
.login-message p { margin: 0 0 18px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.login-message h1 { margin: 0; font-size: clamp(38px,4.5vw,66px); line-height: .98; letter-spacing: -.055em; }
.login-message h1 span { color: transparent; -webkit-text-stroke: 1px rgba(242,246,247,.5); }
.login-message small { display: block; margin-top: 25px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 45px clamp(34px,5vw,80px); background: #0b1117; }
.login-form-wrap { width: min(100%, 390px); }
.login-form-wrap .section-kicker { display: flex; align-items: center; gap: 10px; color: var(--cyan); }
.login-form-wrap h2 { margin: 25px 0 8px; font-size: 39px; letter-spacing: -.045em; }
.login-description { max-width: 330px; margin: 0 0 34px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.login-alert { margin-bottom: 20px; padding: 12px 14px; color: var(--amber); background: rgba(241,175,75,.08); border-left: 2px solid var(--amber); font-size: 11px; line-height: 1.5; }
.login-alert.login-error { color: #ff8694; background: rgba(242,37,61,.08); border-color: var(--red); }
.login-form-wrap form { display: grid; gap: 20px; }
.login-form-wrap label span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.login-form-wrap input { width: 100%; height: 50px; padding: 0 14px; background: #101921; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.login-form-wrap input:focus { border-color: rgba(66,217,200,.55); box-shadow: 0 0 0 3px rgba(66,217,200,.08); }
.login-submit { height: 52px; display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding: 0 17px; background: var(--red); border: 0; border-radius: 8px; color: white; font-size: 11px; font-weight: 750; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(242,37,61,.22); }
.login-submit:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.login-submit span { font-size: 20px; font-weight: 350; }
.login-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; }
.login-foot span { display: flex; align-items: center; gap: 7px; }.login-foot i { width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 7px var(--cyan); }

@keyframes beacon { 0%,100% { box-shadow: 0 0 0 4px rgba(66,217,200,.08), 0 0 12px rgba(66,217,200,.4); } 50% { box-shadow: 0 0 0 8px rgba(66,217,200,0), 0 0 18px rgba(66,217,200,.6); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes runner-spin { to { transform: rotate(360deg); } }
@keyframes water-flow { to { stroke-dashoffset: -36; } }
@keyframes power-flow { to { stroke-dashoffset: -27; } }
@keyframes flow-up { to { stroke-dashoffset: -28; } }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 1100px) {
  :root { --sidebar: 82px; }
  .sidebar { padding-inline: 15px; }
  .brand-word, .site-identity, .nav-item span:not(.nav-count), .sidebar-footer > div:not(.user-avatar), .sidebar-footer .icon-button { display: none; }
  .brand { justify-content: center; }
  .primary-nav { margin-top: 54px; }
  .nav-item { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-item.is-active::before { left: -15px; }
  .nav-count { position: absolute; top: 3px; right: 3px; min-width: 17px; padding: 2px 4px; }
  .sidebar-footer { display: flex; justify-content: center; }
  .overview-grid { grid-template-columns: 1fr; }
  .attention-panel { padding-top: 35px; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --topbar: 76px; }
  body { padding-bottom: 74px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { position: sticky; z-index: 15; top: 0; padding: 0 19px; background: rgba(8,13,18,.9); backdrop-filter: blur(18px); }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 18px; }
  .topbar-status { gap: 10px; }
  .data-health > div, #system-clock { display: none; }
  .live-dot { width: 8px; height: 8px; }
  .view { padding: 23px 18px 46px; }
  .operations-lead { min-height: 420px; display: block; padding-top: 21px; }
  .operations-lead::before { background-size: 48px 48px; mask-image: linear-gradient(180deg, transparent, black 30%, transparent); }
  .lead-copy h2 { margin-top: 16px; font-size: clamp(35px, 12vw, 48px); }
  .lead-copy > p:last-child { max-width: 260px; line-height: 1.6; }
  .live-orbit { position: absolute; right: -50px; bottom: -30px; width: 270px; height: 270px; opacity: .88; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip article, .metric-strip article + article { padding: 20px 13px 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .metric-strip article:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
  .metric-strip strong { font-size: 27px; }
  .overview-grid { gap: 0; padding: 34px 0; }
  .chart-legend { display: none; }
  .chart-stage { height: 235px; margin-left: -18px; margin-right: -4px; }
  .attention-panel { margin-top: 20px; }
  .fleet-section { padding-top: 34px; }
  .fleet-header { display: none; }
  .fleet-row { grid-template-columns: 1fr auto; gap: 8px; padding: 13px 3px; }
  .fleet-row > span:nth-child(2), .fleet-row > span:nth-child(4), .fleet-row > span:nth-child(5) { display: none; }
  .fleet-row > span:nth-child(3) { font-size: 11px; text-align: right; }
  .section-heading h3 { font-size: 17px; }
  .section-heading .text-button { align-self: center; }
  .view-intro { min-height: 84px; align-items: flex-start; }
  .view-intro h2 { max-width: 260px; font-size: 29px; line-height: 1.02; }
  .diagram-legend { display: none; }
  .singleline-stage { min-height: 0; overflow: visible; background: transparent; border: 0; }
  .singleline-toolbar, .singleline-svg { display: none; }
  .mobile-unifilar { display: block; }
  .mobile-bus { position: relative; display: flex; justify-content: space-between; padding: 15px 16px; background: rgba(66,217,200,.09); border-top: 3px solid var(--cyan); color: var(--muted); font-size: 10px; }
  .mobile-bus strong { color: var(--text); }
  .mobile-feeder { position: relative; width: calc(100% - 18px); min-height: 74px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; margin-left: 18px; padding: 10px 11px; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
  .mobile-feeder::before { content: ""; position: absolute; left: -18px; top: 0; bottom: 50%; width: 18px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); }
  .mobile-feeder i { width: 32px; height: 32px; border: 2px solid var(--cyan); border-radius: 50%; }
  .mobile-feeder.thermal i { border-color: var(--violet); }
  .mobile-feeder strong, .mobile-feeder small { display: block; }.mobile-feeder strong { font-size: 12px; }.mobile-feeder small { margin-top: 5px; color: var(--muted); font-size: 10px; }.mobile-feeder b { color: var(--muted); font-size: 20px; }
  .quipico-total { min-width: 100px; }
  .quipico-total strong { font-size: 19px; }
  .process-stage { overflow: hidden; }
  .process-svg { width: 790px; max-width: none; height: 350px; transform: translateX(-270px); }
  .process-metrics { grid-template-columns: 1fr 1fr; }
  .process-metrics article { padding: 18px 12px; border-bottom: 1px solid var(--line); }
  .process-metrics article:nth-child(even) { border-right: 0; }
  .process-metrics strong { font-size: 20px; }
  .frequency-focus { grid-template-columns: 1fr; padding-top: 25px; }
  .frequency-summary { padding: 0; }
  .frequency-summary > strong { font-size: 36px; }
  .frequency-chart { height: 230px; margin-top: 20px; }
  .range-selector button { padding-inline: 9px; }
  .geo-stage { min-height: 560px; height: calc(100vh - 220px); }
  .map-plant { max-width: 165px; }.map-plant > i { width: 30px; height: 30px; }.map-plant small { white-space: nowrap; }
  .map-quipico { left: 4%; top: 12%; }.map-ica { left: 48%; top: 31%; }.map-andahuasi { left: 9%; top: 58%; }.map-villacuri { right: 4%; top: 76%; }
  .events-summary { padding: 25px 0; }.events-summary div + div { padding-left: 14px; }
  .events-row { grid-template-columns: 1fr auto; padding: 15px 3px; }
  .events-row > *:nth-child(3), .events-row > *:nth-child(5) { display: none; }
  .events-row > strong { grid-column: 1 / -1; grid-row: 2; }
  .events-header { display: none; }
  .mobile-nav {
    position: fixed; z-index: 30; inset: auto 0 0;
    height: calc(66px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(6,1fr);
    padding: 5px 5px env(safe-area-inset-bottom);
    background: rgba(8,13,18,.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }
  .mobile-nav button { display: grid; place-items: center; gap: 2px; padding: 4px 1px; background: transparent; border: 0; color: var(--muted-2); font-size: 8px; font-weight: 700; }
  .mobile-nav button span { font-size: 18px; font-weight: 400; line-height: 1; }
  .mobile-nav button.is-active { color: var(--cyan); }
  .prototype-note { left: auto; right: 10px; bottom: 76px; justify-content: center; padding: 7px 8px; }
  .prototype-note p { display: none; }
  .login-body { padding-bottom: 0; overflow: auto; }
  .login-shell { grid-template-columns: 1fr; }
  .login-atmosphere { min-height: 255px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-brand { top: 28px; left: 24px; transform: scale(.86); transform-origin: left top; }
  .login-energy { width: 250px; right: -40px; top: -12px; opacity: .75; }
  .login-message { left: 24px; bottom: 28px; }
  .login-message p, .login-message small { display: none; }
  .login-message h1 { font-size: 32px; }
  .login-panel { min-height: calc(100vh - 255px); padding: 34px 24px 42px; place-items: start center; }
  .login-form-wrap h2 { font-size: 34px; margin-top: 18px; }
  .login-description { margin-bottom: 27px; }
}

@media (max-width: 390px) {
  .lead-copy h2 { font-size: 38px; }
  .metric-strip strong { font-size: 24px; }
  .prototype-note p { max-width: 150px; }
}

/* CVC Energía — sistema visual operativo */
:root {
  --bg: #070b18;
  --surface: #0c1224;
  --surface-2: #111a31;
  --surface-3: #172141;
  --line: rgba(184, 195, 255, .12);
  --line-strong: rgba(184, 195, 255, .24);
  --text: #f7f8ff;
  --muted: #a0a9c5;
  --muted-2: #707b9c;
  --cyan: #7186ff;
  --cyan-bright: #a5b2ff;
  --blue: #3d55d8;
  --violet: #94a3ff;
  --red: #e93545;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 82% -10%, rgba(61, 85, 216, .17), transparent 34%),
    linear-gradient(180deg, #080d1d, #070b18 48%);
}
button:focus-visible, a:focus-visible { outline-color: #8da0ff; }
.sidebar { background: rgba(6, 10, 23, .96); }
.cvc-brand { min-height: 64px; }
.cvc-brand img {
  width: 154px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.site-identity { margin-top: 22px; }
.site-identity strong { font-size: 15px; }
.powered-by {
  margin: 15px 2px 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.powered-by strong { color: #f06a76; font-size: 10px; letter-spacing: .13em; }
.icon-button { color: var(--muted); text-decoration: none; font-size: 9px; font-weight: 750; }
.mobile-logout { display: none; }
.nav-item.is-active { background: rgba(90, 113, 241, .14); }
.nav-item.is-active::before { background: #7186ff; box-shadow: 0 0 18px rgba(113, 134, 255, .68); }
.user-avatar {
  color: #c7ceff;
  background: rgba(84, 105, 226, .16);
  border-color: rgba(113, 134, 255, .35);
}
.operations-lead {
  min-height: 310px;
  background:
    linear-gradient(90deg, rgba(7, 11, 24, .96) 0%, rgba(7, 11, 24, .72) 48%, rgba(7, 11, 24, .92) 100%),
    url("../img/imagen1.jpg") center / cover no-repeat;
}
.operations-lead::before { opacity: .28; }
.lead-copy { padding-left: clamp(22px, 3vw, 42px); }
.lead-copy h2 { max-width: 800px; }
.lead-copy h2 span {
  color: rgba(247, 248, 255, .45);
  -webkit-text-stroke: 0;
}
.live-orbit { width: 275px; height: 275px; }
.orbit-core { background: radial-gradient(circle, rgba(113,134,255,.21), rgba(12,18,36,.96) 72%); }
.legend-hydro { background: #89a2ff; }
.legend-thermal { background: #b792ff; }
.hydro-line { stroke: #89a2ff; filter: drop-shadow(0 0 6px rgba(113,134,255,.35)); }
.thermal-line { stroke: #b792ff; }
.plant-symbol.demand {
  color: #b3c0ff;
  background: rgba(82, 105, 225, .12);
  border-color: rgba(113, 134, 255, .3);
}
.prototype-note span { color: #11152c; background: #aab6ff; }

.system-topology { min-width: 1080px; }
.system-topology .grid-voltage text {
  fill: var(--muted-2);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}
.system-topology .secondary-bus line { stroke: rgba(113, 134, 255, .75); }
.system-topology .site-node rect {
  fill: rgba(13, 20, 42, .96);
  stroke: rgba(156, 171, 255, .22);
  stroke-width: 1;
}
.system-topology .site-node:hover rect,
.system-topology .quipico-node rect { stroke: rgba(137, 162, 255, .66); }
.system-topology .site-eyebrow {
  fill: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.system-topology .site-title { fill: var(--text); font-size: 18px; font-weight: 680; }
.system-topology .site-value { fill: #9eafff; font-size: 12px; font-weight: 650; }
.system-topology .node-connector { fill: none; stroke: #7186ff; stroke-width: 2; }
.system-topology .generator-bank > text:first-child {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}
.system-topology .generator-bank > path { fill: none; stroke: rgba(113,134,255,.55); stroke-width: 2; }
.system-topology .generator-bank circle {
  fill: rgba(78, 96, 197, .1);
  stroke: #7186ff;
  stroke-width: 2;
}
.system-topology .generator-bank g text {
  fill: var(--text);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
}
.system-topology .bank-note { fill: var(--muted-2); font-size: 10px; }

.measured-stage { overflow: hidden; }
.machine-visual {
  position: relative;
  min-height: 420px;
  padding: 44px clamp(28px, 4vw, 64px);
  background:
    radial-gradient(circle at 76% 42%, rgba(88, 109, 230, .14), transparent 30%),
    linear-gradient(rgba(169,180,239,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169,180,239,.055) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
}
.machine-caption span, .machine-caption strong { display: block; }
.machine-caption span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.machine-caption strong { margin-top: 7px; font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.machine-shaft {
  position: absolute;
  left: 9%;
  right: 15%;
  top: 54%;
  height: 8px;
  background: linear-gradient(90deg, #5367dc, #a6b2ff);
  box-shadow: 0 0 18px rgba(113,134,255,.28);
}
.machine-shaft::after {
  content: "";
  position: absolute;
  inset: -2px 0;
  background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(255,255,255,.7) 17px 20px);
  animation: shaft-flow 1.6s linear infinite;
}
.machine-unit, .bearing { position: absolute; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.machine-unit i {
  position: relative;
  z-index: 2;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  background: #111a31;
  border: 3px solid #7186ff;
  border-radius: 50%;
  color: #dbe0ff;
  font-size: 42px;
  font-style: normal;
  box-shadow: 0 0 0 12px rgba(113,134,255,.06), 0 18px 42px rgba(0,0,0,.28);
}
.machine-unit b, .bearing b {
  position: absolute;
  top: 74px;
  left: 50%;
  width: 150px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.turbine-unit { left: 9%; }
.turbine-unit i::before, .turbine-unit i::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 8px dashed #899cff;
  border-radius: 50%;
  animation: runner-spin 8s linear infinite;
}
.generator-machine { left: 79%; }
.bearing { top: 50%; }
.bearing i {
  position: relative;
  z-index: 3;
  width: 34px;
  height: 58px;
  display: block;
  background: #0c1328;
  border: 2px solid #a6b2ff;
  border-radius: 7px;
  box-shadow: 0 0 18px rgba(113,134,255,.25);
}
.bearing b { top: 48px; width: 135px; }
.bearing em {
  position: absolute;
  bottom: 48px;
  left: 50%;
  min-width: 86px;
  padding: 7px 9px;
  transform: translateX(-50%);
  color: #cfd5ff;
  background: rgba(10,15,32,.92);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 10px;
  font-style: normal;
}
.bearing-radial { left: 31%; }
.bearing-axial { left: 48%; }
.bearing-axial i { border-color: var(--amber); }
.bearing-generator { left: 94%; }
.speed-dial {
  position: absolute;
  right: 4%;
  top: 38px;
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  background: radial-gradient(circle, rgba(113,134,255,.16), rgba(10,15,32,.96));
  border: 1px solid rgba(137,162,255,.3);
  border-radius: 50%;
  text-align: center;
}
.speed-dial span, .speed-dial small { color: var(--muted-2); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.speed-dial strong { margin: 4px 0 2px; font-size: 28px; font-variant-numeric: tabular-nums; }
.machine-legend { display: none; }
@keyframes shaft-flow { to { transform: translateX(20px); } }

.login-atmosphere {
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(8,13,31,.88), rgba(20,31,95,.56)),
    url("../img/images.jpg") center / cover no-repeat;
}
.login-atmosphere::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(4,7,18,.88));
}
.login-grid { opacity: .18; }
.login-brand img { width: 220px; height: auto; filter: brightness(0) invert(1); }
.login-message h1 span { color: rgba(247,248,255,.58); -webkit-text-stroke: 0; }
.login-submit { background: #3148cb; }
.login-submit:hover { box-shadow: 0 12px 30px rgba(71,94,231,.28); }
.login-form-wrap input:focus { border-color: rgba(113,134,255,.65); box-shadow: 0 0 0 3px rgba(113,134,255,.1); }

@media (max-width: 1100px) {
  .cvc-brand img { width: 48px; max-width: none; object-fit: cover; object-position: left; }
  .powered-by { display: none; }
}

@media (max-width: 760px) {
  .mobile-logout {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 8px;
    color: var(--muted);
    border-left: 1px solid var(--line);
    font-size: 9px;
    font-weight: 750;
    text-decoration: none;
  }
  .operations-lead { min-height: 440px; background-position: 38% center; }
  .lead-copy { padding-left: 0; }
  .lead-copy h2 { font-size: clamp(33px, 11vw, 45px); line-height: 1.01; }
  .lead-copy > p:last-child { max-width: 290px; }
  .mobile-feeder small b { color: inherit; font-size: inherit; }
  .mobile-feeder.demand i { border-color: #8fa0ff; border-style: dashed; }
  .machine-visual { min-height: 500px; padding: 28px 20px; }
  .machine-caption strong { font-size: 20px; }
  .machine-shaft { left: 15%; right: 15%; top: 56%; }
  .machine-unit i { width: 76px; height: 76px; font-size: 30px; }
  .turbine-unit { left: 2%; }
  .generator-machine { left: 78%; }
  .bearing-radial { left: 25%; }
  .bearing-axial { left: 49%; }
  .bearing-generator { left: 98%; }
  .bearing em { bottom: 58px; }
  .bearing b { display: none; }
  .machine-unit b { top: 55px; font-size: 9px; }
  .machine-legend {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.3;
    text-align: center;
  }
  .machine-legend span { display: grid; justify-items: center; gap: 7px; }
  .machine-legend i { width: 18px; height: 2px; background: #8fa0ff; }
  .machine-legend span:nth-child(2) i { background: var(--amber); }
  .speed-dial { right: 18px; top: 88px; width: 104px; height: 104px; }
  .speed-dial strong { font-size: 24px; }
  .login-atmosphere { min-height: 290px; background-position: center 58%; }
  .login-brand { top: 24px; left: 24px; transform: none; }
  .login-brand img { width: 160px; }
  .login-message { bottom: 25px; }
  .login-message h1 { font-size: 30px; }
  .login-panel { min-height: calc(100vh - 290px); }
}

/* Visores de ingeniería: SVG originales completos */
.system-topology,
.mobile-unifilar { display: none !important; }
.singleline-stage {
  min-height: 720px;
  background: #f5f7fb;
  border-color: rgba(124, 140, 225, .26);
}
.singleline-toolbar {
  gap: 0;
  background: rgba(7, 11, 24, .96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
.singleline-toolbar .fit-button { border-right: 1px solid var(--line); white-space: nowrap; }
.singleline-toolbar .fit-button:last-child { border-right: 0; }
.diagram-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.diagram-canvas.is-dragging { cursor: grabbing; }
.diagram-canvas .svg-host {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
}
.diagram-canvas .svg-host > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.singleline-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}
.singleline-stage:fullscreen .diagram-canvas { inset: 0; }
.running-state { background: #f13f4f !important; }
.stopped-state { background: #3acb78 !important; }
.fault-state { background: #f4b24f !important; }
.register-note {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}
.detail-register { padding-top: 40px; }
.data-table-scroll {
  margin-top: 20px;
  overflow: auto;
  border-top: 1px solid var(--line-strong);
}
.operation-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.operation-table th,
.operation-table td {
  height: 48px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
.operation-table th {
  height: 38px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.operation-table th:first-child,
.operation-table td:first-child { text-align: left; }
.operation-table td:first-child { color: var(--text); font-weight: 650; }
.operation-table tr:hover td { background: rgba(113, 134, 255, .045); }
.equipment-state {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.equipment-state i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}
.equipment-state.running i { background: #f13f4f; box-shadow: 0 0 8px rgba(241,63,79,.45); }
.equipment-state.stopped i { background: #3acb78; }
.equipment-state.fault i { background: #f4b24f; }
.equipment-state.online i { background: #7186ff; box-shadow: 0 0 8px rgba(113,134,255,.45); }
.measurement-live { color: #d7dcff; font-weight: 650; }

.geo-stage {
  height: min(820px, calc(100vh - 230px));
  min-height: 640px;
  background: #f4f5f8;
}
.geo-svg-viewer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f4f5f8;
}
.geo-svg-viewer .svg-host {
  width: 100%;
  height: 100%;
  display: block;
}
.geo-svg-viewer .svg-host > svg { width: 100%; height: 100%; display: block; }
.geo-stage > .geo-grid,
.geo-stage > .geo-road,
.geo-stage > .map-plant,
.geo-stage > .geo-coordinates { display: none; }
.geo-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 42px;
  padding-top: 42px;
}
.geo-data-grid > div { min-width: 0; }
.compact-table { min-width: 580px; }
.share-bar {
  width: 100%;
  height: 5px;
  overflow: hidden;
  background: rgba(113,134,255,.1);
}
.share-bar i { display: block; height: 100%; background: #7186ff; }

@media (max-width: 760px) {
  .singleline-stage {
    min-height: 68svh;
    overflow: hidden;
    background: #f5f7fb;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
  }
  .singleline-toolbar {
    display: flex;
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: flex-end;
  }
  .singleline-toolbar button,
  .singleline-toolbar span { height: 38px; }
  .singleline-toolbar .fit-button { padding-inline: 9px; font-size: 9px; }
  .diagram-canvas { inset: 52px 0 0; }
  .register-note { display: none; }
  .detail-register { padding-top: 30px; }
  .data-table-scroll { margin-right: -18px; }
  .operation-table { min-width: 760px; }
  .operation-table th,
  .operation-table td { padding-inline: 10px; }
  .geo-stage {
    min-height: 68svh;
    height: 68svh;
    border-radius: 10px;
  }
  .geo-svg-viewer { overflow: auto; place-items: start; }
  .geo-svg-viewer .svg-host {
    width: 1040px;
    max-width: none;
    height: 870px;
  }
  .geo-data-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; }
  #view-map .view-intro { flex-wrap: wrap; }
  #view-map .view-note { width: 100%; margin: -12px 0 8px; }
  .geo-data-grid > div,
  .data-table-scroll { min-width: 0; max-width: 100%; }
  .compact-table { min-width: 580px; }
}
