/* Komponenten-Renderer der Runtime-Widgets — 1:1 aus dem Bestand.
 *
 * BEFUND (2026-08-04): der Port zeigte fuer ALLE VIER Bestands-Renderer nur
 * eine Platzhalterhuelle mit dem Text "Komponenten-Renderer folgt (Interim)".
 * Die Aufloesung des Renderer-Schluessels war da, die Groessenvorgaben waren
 * da, der Stil-Preset war da — nur gezeichnet hat sie niemand.
 *
 * Vue kapselt diese Regeln ueber ein data-v-Attribut (`<style scoped>`). Im
 * Light DOM gibt es das nicht, und die vier Renderer benutzen DIESELBEN
 * Klassennamen (.alarm-row, .dot, .compact, .section-label, …). Deshalb ist
 * jede Regel mit ihrem Elementnamen praefixiert — dieselbe Kapselung, nur von
 * Hand. Erzeugt aus den Bestandsdateien; Werte unveraendert.
 *
 * Zu den harten Farbwerten: die vier Renderer sind ein SKIN, kein
 * Maskenhintergrund. Der Bestand zeichnet sie in allen vier Themes gleich —
 * das feste Industriebild IST ihr Zweck. Die Zahl unten ist gemessen: der
 * Bestand hat in denselben vier Dateien exakt dieselben 107 Fundstellen. Sie
 * ist festgenagelt, damit die Ausnahme kein Schlupfloch wird: kommt eine
 * einzige harte Farbe dazu, schlaegt der Waechter wieder an.
 *
 * @allow-hardcoded-color-file: Widget-Skin, im Bestand themenunabhaengig (erwartet: 107)
 */


/* ===== CoreLiveWidgetHud.vue -> <cw-core-live-widget-hud> ===== */

cw-core-live-widget-hud .live-widget {
  --bg-1: var(--core-color-surface-live-1, rgba(6, 16, 48, 0.92));
  --bg-2: var(--core-color-surface-live-2, rgba(10, 24, 64, 0.82));
  --line: var(--core-color-line-primary, rgba(40, 196, 255, 0.9));
  --line-soft: var(--core-color-line-soft, rgba(40, 196, 255, 0.32));
  --text-main: var(--core-color-text-main, #d9fbff);
  --text-soft: var(--core-color-text-soft, rgba(180, 240, 255, 0.84));
  --cyan: var(--core-color-accent-cyan, #38d9ff);
  --blue: var(--core-color-accent-blue, #2f7dff);
  --green: var(--core-color-accent-green, #63ff65);
  --yellow: var(--core-color-accent-yellow, #d4ff38);
  --red: var(--core-color-accent-red, #ff6b6b);
  --shadow-cyan:
    var(
      --core-shadow-glow-cyan,
      0 0 10px rgba(56, 217, 255, 0.6),
      0 0 24px rgba(56, 217, 255, 0.22)
    );
  position: relative;
  width: 100%;
  min-width: 320px;
  color: var(--text-main);
  padding: 22px 22px 18px;
  background:
    linear-gradient(180deg, rgba(12, 24, 72, 0.95), rgba(5, 12, 40, 0.92)),
    radial-gradient(circle at 80% 18%, rgba(74, 255, 175, 0.12), transparent 24%),
    radial-gradient(circle at 14% 8%, rgba(56, 217, 255, 0.14), transparent 26%);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(70, 221, 255, 0.12),
    inset 0 0 28px rgba(56, 217, 255, 0.08),
    0 0 0 1px rgba(40, 196, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

cw-core-live-widget-hud .live-widget.preset-core-industrial-hud {
  --core-color-accent-cyan: #38d9ff;
  --core-color-accent-green: #63ff65;
}

cw-core-live-widget-hud .live-widget.preset-avangers {
  --core-color-surface-live-1: rgba(5, 12, 44, 0.96);
  --core-color-surface-live-2: rgba(6, 20, 66, 0.86);
  --core-color-line-primary: rgba(73, 230, 255, 0.95);
  --core-color-line-soft: rgba(73, 230, 255, 0.38);
  --core-color-accent-cyan: #49e6ff;
  --core-color-accent-green: #8dff38;
  --core-color-accent-yellow: #f5ff54;
  --core-color-accent-red: #ff4f95;
  clip-path: polygon(0 22px, 22px 0, calc(100% - 86px) 0, 100% 16px, 100% calc(100% - 18px), calc(100% - 22px) 100%, 18px 100%, 0 calc(100% - 26px));
  border-radius: 0;
  border-color: rgba(73, 230, 255, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(85, 236, 255, 0.22),
    inset 0 0 34px rgba(45, 207, 255, 0.12),
    0 0 0 1px rgba(56, 213, 255, 0.2),
    0 0 32px rgba(23, 128, 255, 0.18),
    0 20px 52px rgba(0, 2, 16, 0.68);
}

cw-core-live-widget-hud .live-widget.preset-avangers .title,
cw-core-live-widget-hud .live-widget.preset-avangers .eyebrow,
cw-core-live-widget-hud .live-widget.preset-avangers .metric-label,
cw-core-live-widget-hud .live-widget.preset-avangers .footer-label,
cw-core-live-widget-hud .live-widget.preset-avangers .badge {
  font-family: var(--core-font-display, "Rajdhani", "Orbitron", "Roboto Condensed", "Segoe UI", Arial, sans-serif);
  letter-spacing: 0.12em;
}

cw-core-live-widget-hud .live-widget.preset-avangers .kpi-value {
  text-shadow:
    0 0 16px rgba(70, 230, 255, 0.76),
    0 0 34px rgba(70, 230, 255, 0.24);
}

cw-core-live-widget-hud .live-widget.preset-avangers .bars-panel,
cw-core-live-widget-hud .live-widget.preset-avangers .kpi-panel,
cw-core-live-widget-hud .live-widget.preset-avangers .footer-box {
  border-color: rgba(79, 228, 255, 0.28);
}

cw-core-live-widget-hud .live-widget.preset-avangers .metric-fill,
cw-core-live-widget-hud .live-widget.preset-avangers .metric-glow {
  background: linear-gradient(90deg, #37ffd4 0%, #91ff35 46%, #2dd0ff 100%);
}

cw-core-live-widget-hud .alert-wing {
  position: absolute;
  top: 34%;
  width: 22px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd7ea;
  background: linear-gradient(180deg, rgba(255, 90, 150, 0.94) 0%, rgba(173, 26, 78, 0.94) 100%);
  border: 1px solid rgba(255, 132, 184, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 220, 0.2),
    0 0 14px rgba(255, 79, 149, 0.34);
  z-index: 2;
}

cw-core-live-widget-hud .alert-wing span {
  transform: none;
}

cw-core-live-widget-hud .alert-wing-left {
  left: 8px;
  clip-path: polygon(0 12px, 100% 0, 100% 100%, 0 calc(100% - 12px));
}

cw-core-live-widget-hud .alert-wing-right {
  right: 8px;
  clip-path: polygon(0 0, 100% 12px, 100% calc(100% - 12px), 0 100%);
}

cw-core-live-widget-hud .live-widget.preset-avangers::after {
  border-color: rgba(70, 222, 255, 0.3);
  clip-path: polygon(0 18px, 18px 0, calc(100% - 78px) 0, 100% 18px, 100% calc(100% - 24px), calc(100% - 22px) 100%, 18px 100%, 0 calc(100% - 20px));
}

cw-core-live-widget-hud .live-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 2px,
    transparent 6px
  );
  mix-blend-mode: screen;
  opacity: 0.32;
  pointer-events: none;
}

cw-core-live-widget-hud .live-widget::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(55, 176, 255, 0.18);
  border-radius: 16px;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 72px) 0, 100% 18px, 100% calc(100% - 24px), calc(100% - 22px) 100%, 18px 100%, 0 calc(100% - 18px));
  pointer-events: none;
}

cw-core-live-widget-hud .chrome {
  position: absolute;
  border-color: var(--cyan);
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(56, 217, 255, 0.55));
}

cw-core-live-widget-hud .chrome-top-left {
  top: 10px;
  left: 10px;
  width: 120px;
  height: 44px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-top-left-radius: 14px;
}

cw-core-live-widget-hud .chrome-top-right {
  top: 10px;
  right: 10px;
  width: 220px;
  height: 34px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-top-right-radius: 14px;
}

cw-core-live-widget-hud .chrome-bottom-right {
  right: 18px;
  bottom: 14px;
  width: 124px;
  height: 18px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-bottom-right-radius: 10px;
}

cw-core-live-widget-hud .widget-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

cw-core-live-widget-hud .eyebrow {
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-shadow: var(--shadow-cyan);
}

cw-core-live-widget-hud .title {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

cw-core-live-widget-hud .badge {
  align-self: center;
  padding: 8px 12px;
  border: 1px solid rgba(56, 217, 255, 0.35);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: rgba(14, 34, 88, 0.72);
  box-shadow: inset 0 0 16px rgba(56, 217, 255, 0.08);
}

cw-core-live-widget-hud .main-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
}

cw-core-live-widget-hud .kpi-panel,
cw-core-live-widget-hud .bars-panel,
cw-core-live-widget-hud .footer-box {
  border: 1px solid rgba(55, 176, 255, 0.18);
  background: linear-gradient(180deg, rgba(7, 17, 52, 0.78), rgba(8, 20, 58, 0.48));
  border-radius: 14px;
  box-shadow: inset 0 0 16px rgba(56, 217, 255, 0.04);
}

cw-core-live-widget-hud .kpi-panel {
  position: relative;
  padding: 18px 18px 16px;
  min-height: 235px;
}

cw-core-live-widget-hud .kpi-label,
cw-core-live-widget-hud .metric-label,
cw-core-live-widget-hud .footer-label {
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

cw-core-live-widget-hud .kpi-value {
  margin-top: 16px;
  line-height: 0.9;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #f3feff;
  text-shadow: 0 0 12px rgba(56, 217, 255, 0.65), 0 0 28px rgba(56, 217, 255, 0.22);
}

cw-core-live-widget-hud .kpi-unit {
  font-size: 0.62em;
  margin-left: 0.02em;
}

cw-core-live-widget-hud .micro-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 132px;
  margin-top: 18px;
  opacity: 0.72;
}

cw-core-live-widget-hud .micro-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(68, 210, 255, 0.75);
  box-shadow: 0 0 10px rgba(68, 210, 255, 0.45);
}

cw-core-live-widget-hud .signal-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

cw-core-live-widget-hud .signal-row span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(56, 217, 255, 0.18);
  border: 1px solid rgba(56, 217, 255, 0.2);
}

cw-core-live-widget-hud .signal-row span.active {
  background: linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow: 0 0 10px rgba(99, 255, 101, 0.55);
}

cw-core-live-widget-hud .bars-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

cw-core-live-widget-hud .metric-row {
  display: grid;
  grid-template-columns: 118px 1fr 54px;
  align-items: center;
  gap: 12px;
}

cw-core-live-widget-hud .metric-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(27, 52, 120, 0.76), rgba(17, 32, 74, 0.52));
  border: 1px solid rgba(56, 217, 255, 0.18);
}

cw-core-live-widget-hud .metric-fill,
cw-core-live-widget-hud .metric-glow {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

cw-core-live-widget-hud .metric-fill {
  background: linear-gradient(90deg, #4fff7d 0%, #bafc1f 40%, #33d1ff 100%);
}

cw-core-live-widget-hud .metric-glow {
  filter: blur(10px);
  opacity: 0.5;
  background: linear-gradient(90deg, rgba(79, 255, 125, 0.9), rgba(186, 252, 31, 0.8), rgba(51, 209, 255, 0.75));
}

cw-core-live-widget-hud .metric-value,
cw-core-live-widget-hud .footer-value {
  color: #d9fbff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(56, 217, 255, 0.4);
}

cw-core-live-widget-hud .widget-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: 18px;
}

cw-core-live-widget-hud .footer-box {
  padding: 16px 18px;
}

cw-core-live-widget-hud .footer-value {
  margin-top: 10px;
  font-size: 2rem;
}

cw-core-live-widget-hud .alarm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 1.1rem;
}

cw-core-live-widget-hud .alarm-dots {
  display: flex;
  gap: 12px;
}

cw-core-live-widget-hud .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0.2;
}

cw-core-live-widget-hud .dot.on {
  opacity: 1;
}

cw-core-live-widget-hud .dot-red {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
}

cw-core-live-widget-hud .dot-yellow {
  background: #ffe45b;
  box-shadow: 0 0 12px rgba(255, 228, 91, 0.5);
}

cw-core-live-widget-hud .dot-green {
  background: var(--green);
  box-shadow: 0 0 12px rgba(99, 255, 101, 0.5);
}

cw-core-live-widget-hud .dot-cyan {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 217, 255, 0.5);
}

cw-core-live-widget-hud .state-productive .badge {
  color: var(--green);
  border-color: rgba(99, 255, 101, 0.4);
  box-shadow: inset 0 0 18px rgba(99, 255, 101, 0.08);
}

cw-core-live-widget-hud .state-setup .badge {
  color: #ffe45b;
  border-color: rgba(255, 228, 91, 0.35);
}

cw-core-live-widget-hud .state-disturbance .badge {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.35);
}

cw-core-live-widget-hud .state-idle .badge {
  color: var(--cyan);
}

cw-core-live-widget-hud .selected {
  box-shadow:
    inset 0 0 0 1px rgba(70, 221, 255, 0.14),
    inset 0 0 28px rgba(56, 217, 255, 0.12),
    0 0 0 1px rgba(40, 196, 255, 0.12),
    0 0 22px rgba(56, 217, 255, 0.18),
    0 18px 48px rgba(0, 0, 0, 0.48);
}

cw-core-live-widget-hud .compact {
  width: min(100%, 560px);
}

cw-core-live-widget-hud .compact .main-grid,
cw-core-live-widget-hud .compact .widget-footer {
  grid-template-columns: 1fr;
}

cw-core-live-widget-hud .compact .kpi-panel {
  min-height: auto;
}

@media (max-width: 720px) {
  
  cw-core-live-widget-hud .live-widget {
      padding: 18px;
    }
  
  cw-core-live-widget-hud .main-grid,
  cw-core-live-widget-hud .widget-footer {
      grid-template-columns: 1fr;
    }
  
  cw-core-live-widget-hud .metric-row {
      grid-template-columns: 100px 1fr 48px;
    }
  
  cw-core-live-widget-hud .kpi-value {
      font-size: clamp(3.4rem, 14vw, 5.5rem);
    }
}



/* ===== CoreLiveWidgetPolygonal.vue -> <cw-core-live-widget-polygonal> ===== */

cw-core-live-widget-polygonal .poly-widget {
  --bg-dark: rgba(4, 13, 44, 0.95);
  --bg-mid: rgba(7, 23, 70, 0.92);
  --line: rgba(43, 191, 255, 0.88);
  --line-soft: rgba(43, 191, 255, 0.2);
  --cyan: #39dcff;
  --cyan-soft: rgba(57, 220, 255, 0.8);
  --blue: #327dff;
  --green: #66ff62;
  --yellow: #d8ff37;
  --red: #ff6d6d;
  --text-main: #e8fcff;
  --text-soft: rgba(194, 240, 255, 0.82);
  position: relative;
  width: min(100%, 980px);
  min-height: 600px;
  padding: 88px 28px 26px;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% 0%, rgba(49, 142, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(4, 10, 34, 0.97), rgba(3, 9, 28, 0.96));
  border: 1px solid rgba(49, 191, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(71, 201, 255, 0.08),
    inset 0 0 36px rgba(56, 162, 255, 0.08),
    0 14px 42px rgba(0, 0, 0, 0.36);
  animation: avengersWidgetPulse 5.2s ease-in-out infinite;
  clip-path: polygon(0 60px, 34px 0, 85% 0, 91% 26px, 98% 26px, 100% 46px, 100% calc(100% - 76px), calc(100% - 38px) 100%, 66% 100%, 62% calc(100% - 26px), 18% calc(100% - 26px), 10% 100%, 4% 100%, 0 calc(100% - 34px));
}

cw-core-live-widget-polygonal .poly-widget.runtime-live {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

cw-core-live-widget-polygonal .poly-widget__frame,
cw-core-live-widget-polygonal .poly-widget__scanlines,
cw-core-live-widget-polygonal .poly-widget__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

cw-core-live-widget-polygonal .poly-widget__frame {
  border: 1px solid rgba(62, 180, 255, 0.26);
  clip-path: polygon(10px 60px, 42px 10px, calc(85% - 12px) 10px, calc(91% - 6px) 34px, calc(98% - 6px) 34px, calc(100% - 10px) 50px, calc(100% - 10px) calc(100% - 82px), calc(100% - 44px) calc(100% - 10px), calc(66% + 6px) calc(100% - 10px), calc(62% + 4px) calc(100% - 34px), calc(18% + 8px) calc(100% - 34px), calc(10% - 2px) calc(100% - 10px), 12px calc(100% - 10px), 10px calc(100% - 40px));
  box-shadow: inset 0 0 18px rgba(57, 220, 255, 0.08);
  animation: avengersFramePulse 4.8s ease-in-out infinite;
}

cw-core-live-widget-polygonal .poly-widget__scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.24;
  mix-blend-mode: screen;
  animation: avengersScanDrift 6s linear infinite;
}

cw-core-live-widget-polygonal .poly-widget__grid {
  background:
    radial-gradient(circle at 50% 46%, rgba(52, 175, 255, 0.08), transparent 26%),
    radial-gradient(circle, rgba(50, 184, 255, 0.55) 0.8px, transparent 1px);
  background-size: auto, 24px 24px;
  background-position: center, 0 0;
  opacity: 0.16;
  animation: avengersGridPulse 4.4s ease-in-out infinite;
}

cw-core-live-widget-polygonal .poly-widget__tab {
  position: absolute;
  top: 18px;
  left: 30px;
  width: 340px;
  min-height: 84px;
  padding: 16px 20px 14px;
  background: linear-gradient(180deg, rgba(8, 28, 80, 0.92), rgba(7, 17, 52, 0.84));
  border: 1px solid rgba(57, 220, 255, 0.28);
  box-shadow:
    0 0 16px rgba(50, 158, 255, 0.18),
    inset 0 0 16px rgba(57, 220, 255, 0.08);
  animation: avengersTabPulse 3.8s ease-in-out infinite;
  clip-path: polygon(0 18px, 16px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

cw-core-live-widget-polygonal .poly-widget__tab-label {
  color: var(--cyan);
  font-size: 0.88rem;
  letter-spacing: 0.36em;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(57, 220, 255, 0.6);
}

cw-core-live-widget-polygonal .poly-widget__tab-title {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

cw-core-live-widget-polygonal .poly-widget__status-pill {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(57, 220, 255, 0.28);
  background: rgba(7, 24, 70, 0.66);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  box-shadow: inset 0 0 14px rgba(57, 220, 255, 0.06);
  animation: avengersStatusPulse 2.9s ease-in-out infinite;
}

cw-core-live-widget-polygonal .poly-widget__main {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

cw-core-live-widget-polygonal .panel-shape {
  position: relative;
  background: linear-gradient(180deg, rgba(6, 20, 64, 0.8), rgba(6, 15, 48, 0.45));
  border: 1px solid rgba(57, 220, 255, 0.15);
  box-shadow: inset 0 0 16px rgba(57, 220, 255, 0.04);
}

cw-core-live-widget-polygonal .poly-widget__kpi-panel {
  min-height: 288px;
  padding: 22px 22px 20px;
  clip-path: polygon(0 16px, 12px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 12px) 100%, 0 100%);
}

cw-core-live-widget-polygonal .poly-widget__metrics {
  min-height: 288px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 14px, 100% calc(100% - 16px), calc(100% - 14px) 100%, 0 100%, 0 20px);
}

cw-core-live-widget-polygonal .section-label,
cw-core-live-widget-polygonal .metric-label,
cw-core-live-widget-polygonal .secondary-label {
  color: var(--cyan);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

cw-core-live-widget-polygonal .kpi-value {
  margin-top: 18px;
  line-height: 0.9;
  font-size: clamp(5rem, 8vw, 8rem);
  font-weight: 800;
  color: #f2feff;
  letter-spacing: -0.05em;
  text-shadow:
    0 0 12px rgba(89, 232, 255, 0.72),
    0 0 32px rgba(50, 162, 255, 0.22);
  animation: avengersValuePulse 3.2s ease-in-out infinite;
}

cw-core-live-widget-polygonal .kpi-unit {
  font-size: 0.62em;
  margin-left: 0.02em;
}

cw-core-live-widget-polygonal .micro-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 146px;
  margin-top: 22px;
}

cw-core-live-widget-polygonal .micro-matrix span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(74, 223, 255, 0.78);
  box-shadow: 0 0 8px rgba(74, 223, 255, 0.4);
}

cw-core-live-widget-polygonal .signal-row {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

cw-core-live-widget-polygonal .signal-row span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(52, 148, 255, 0.14);
  border: 1px solid rgba(57, 220, 255, 0.16);
}

cw-core-live-widget-polygonal .signal-row span.active {
  background: linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow: 0 0 10px rgba(102, 255, 98, 0.5);
}

cw-core-live-widget-polygonal .metric-row {
  display: grid;
  grid-template-columns: 110px 1fr 54px;
  gap: 12px;
  align-items: center;
}

cw-core-live-widget-polygonal .metric-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(12, 39, 105, 0.88), rgba(12, 26, 74, 0.52));
  border: 1px solid rgba(57, 220, 255, 0.14);
}

cw-core-live-widget-polygonal .metric-fill,
cw-core-live-widget-polygonal .metric-glow {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

cw-core-live-widget-polygonal .metric-fill {
  background: linear-gradient(90deg, #67ff63 0%, #d7ff37 42%, #3edcff 100%);
}

cw-core-live-widget-polygonal .metric-glow {
  filter: blur(10px);
  opacity: 0.56;
  background: linear-gradient(90deg, rgba(103, 255, 99, 0.9), rgba(215, 255, 55, 0.82), rgba(62, 220, 255, 0.74));
  animation: avengersBarGlow 2.6s ease-in-out infinite;
}

cw-core-live-widget-polygonal .metric-value,
cw-core-live-widget-polygonal .secondary-value,
cw-core-live-widget-polygonal .temp-value,
cw-core-live-widget-polygonal .alarm-text {
  color: var(--text-main);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 220, 255, 0.28);
}

cw-core-live-widget-polygonal .secondary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(57, 220, 255, 0.1);
}

cw-core-live-widget-polygonal .secondary-value {
  font-size: 2rem;
}

cw-core-live-widget-polygonal .poly-widget__footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 18px;
}

cw-core-live-widget-polygonal .poly-widget__alarm,
cw-core-live-widget-polygonal .poly-widget__temp {
  padding: 20px 22px;
}

cw-core-live-widget-polygonal .panel-shape--footer-left {
  clip-path: polygon(0 14px, 12px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 12px) 100%, 0 100%);
}

cw-core-live-widget-polygonal .panel-shape--footer-right {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 14px, 100% calc(100% - 18px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

cw-core-live-widget-polygonal .alarm-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 1.05rem;
}

cw-core-live-widget-polygonal .alarm-dots {
  display: flex;
  gap: 14px;
}

cw-core-live-widget-polygonal .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.22;
}

cw-core-live-widget-polygonal .dot.on {
  opacity: 1;
  animation: avengersDotPulse 2.2s ease-in-out infinite;
}

cw-core-live-widget-polygonal .dot-red { background: var(--red); box-shadow: 0 0 12px rgba(255, 109, 109, 0.52); }

cw-core-live-widget-polygonal .dot-yellow { background: #ffe65c; box-shadow: 0 0 12px rgba(255, 230, 92, 0.48); }

cw-core-live-widget-polygonal .dot-green { background: var(--green); box-shadow: 0 0 12px rgba(102, 255, 98, 0.5); }

cw-core-live-widget-polygonal .dot-cyan { background: var(--cyan); box-shadow: 0 0 12px rgba(57, 220, 255, 0.5); }

cw-core-live-widget-polygonal .temp-value {
  margin-top: 10px;
  font-size: 3.4rem;
  line-height: 1;
}

cw-core-live-widget-polygonal .poly-widget__corner {
  position: absolute;
  border-color: rgba(215, 248, 255, 0.95);
  filter: drop-shadow(0 0 8px rgba(72, 196, 255, 0.42));
  animation: avengersCornerPulse 4.6s ease-in-out infinite;
}

cw-core-live-widget-polygonal .poly-widget__corner--tl {
  top: 18px;
  left: 16px;
  width: 86px;
  height: 34px;
  border-top: 2px solid;
  border-left: 2px solid;
}

cw-core-live-widget-polygonal .poly-widget__corner--tr {
  top: 18px;
  right: 144px;
  width: 94px;
  height: 2px;
  border-top: 2px solid;
}

cw-core-live-widget-polygonal .poly-widget__corner--br {
  right: 18px;
  bottom: 18px;
  width: 122px;
  height: 34px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-bottom-right-radius: 10px;
}

cw-core-live-widget-polygonal .state-productive .poly-widget__status-pill {
  color: var(--green);
  border-color: rgba(102, 255, 98, 0.34);
}

cw-core-live-widget-polygonal .state-setup .poly-widget__status-pill {
  color: #ffe65c;
  border-color: rgba(255, 230, 92, 0.32);
}

cw-core-live-widget-polygonal .state-disturbance .poly-widget__status-pill {
  color: var(--red);
  border-color: rgba(255, 109, 109, 0.32);
}

cw-core-live-widget-polygonal .selected {
  box-shadow:
    inset 0 0 0 1px rgba(71, 201, 255, 0.08),
    inset 0 0 36px rgba(56, 162, 255, 0.12),
    0 0 20px rgba(57, 220, 255, 0.16),
    0 16px 44px rgba(0, 0, 0, 0.4);
}

cw-core-live-widget-polygonal .compact {
  width: min(100%, 720px);
  min-height: auto;
}

cw-core-live-widget-polygonal .compact .poly-widget__main,
cw-core-live-widget-polygonal .compact .poly-widget__footer {
  grid-template-columns: 1fr;
}

cw-core-live-widget-polygonal .compact .poly-widget__tab {
  width: 280px;
}

@keyframes avengersWidgetPulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(71, 201, 255, 0.08),
      inset 0 0 36px rgba(56, 162, 255, 0.08),
      0 14px 42px rgba(0, 0, 0, 0.36);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(71, 201, 255, 0.14),
      inset 0 0 46px rgba(56, 162, 255, 0.16),
      0 0 18px rgba(57, 220, 255, 0.16),
      0 18px 50px rgba(0, 0, 0, 0.42);
    filter: brightness(1.04);
  }
}

@keyframes avengersFramePulse {
  0%, 100% {
    opacity: 0.82;
    box-shadow: inset 0 0 18px rgba(57, 220, 255, 0.08);
  }
  50% {
    opacity: 1;
    box-shadow:
      inset 0 0 26px rgba(57, 220, 255, 0.14),
      0 0 14px rgba(57, 220, 255, 0.12);
  }
}

@keyframes avengersScanDrift {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(8px);
  }
}

@keyframes avengersGridPulse {
  0%, 100% {
    opacity: 0.14;
  }
  50% {
    opacity: 0.24;
  }
}

@keyframes avengersTabPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 0 16px rgba(50, 158, 255, 0.18),
      inset 0 0 16px rgba(57, 220, 255, 0.08);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      0 0 22px rgba(50, 158, 255, 0.28),
      0 0 30px rgba(57, 220, 255, 0.12),
      inset 0 0 18px rgba(57, 220, 255, 0.12);
  }
}

@keyframes avengersStatusPulse {
  0%, 100% {
    box-shadow: inset 0 0 14px rgba(57, 220, 255, 0.06);
  }
  50% {
    box-shadow:
      inset 0 0 18px rgba(57, 220, 255, 0.14),
      0 0 14px rgba(57, 220, 255, 0.14);
  }
}

@keyframes avengersValuePulse {
  0%, 100% {
    text-shadow:
      0 0 12px rgba(89, 232, 255, 0.72),
      0 0 32px rgba(50, 162, 255, 0.22);
  }
  50% {
    text-shadow:
      0 0 16px rgba(89, 232, 255, 0.96),
      0 0 42px rgba(50, 162, 255, 0.34),
      0 0 56px rgba(57, 220, 255, 0.18);
  }
}

@keyframes avengersBarGlow {
  0%, 100% {
    opacity: 0.46;
    filter: blur(10px);
  }
  50% {
    opacity: 0.78;
    filter: blur(12px);
  }
}

@keyframes avengersDotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.86;
  }
}

@keyframes avengersCornerPulse {
  0%, 100% {
    opacity: 0.78;
    filter: drop-shadow(0 0 8px rgba(72, 196, 255, 0.42));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(72, 196, 255, 0.62));
  }
}

@media (prefers-reduced-motion: reduce) {
  
  cw-core-live-widget-polygonal .poly-widget,
  cw-core-live-widget-polygonal .poly-widget__frame,
  cw-core-live-widget-polygonal .poly-widget__scanlines,
  cw-core-live-widget-polygonal .poly-widget__grid,
  cw-core-live-widget-polygonal .poly-widget__tab,
  cw-core-live-widget-polygonal .poly-widget__status-pill,
  cw-core-live-widget-polygonal .kpi-value,
  cw-core-live-widget-polygonal .metric-glow,
  cw-core-live-widget-polygonal .dot.on,
  cw-core-live-widget-polygonal .poly-widget__corner {
      animation: none !important;
    }
}

@media (max-width: 860px) {
  
  cw-core-live-widget-polygonal .poly-widget {
      min-height: auto;
      padding-top: 102px;
    }
  
  cw-core-live-widget-polygonal .poly-widget__main,
  cw-core-live-widget-polygonal .poly-widget__footer {
      grid-template-columns: 1fr;
    }
  
  cw-core-live-widget-polygonal .poly-widget__tab {
      width: 280px;
    }
  
  cw-core-live-widget-polygonal .poly-widget__status-pill {
      top: 28px;
      right: 22px;
      font-size: 0.8rem;
    }
}



/* ===== CoreBaseWidgetHorizontal.vue -> <cw-core-base-widget-horizontal> ===== */

cw-core-base-widget-horizontal .base-widget {
  --bg-dark: rgba(4, 13, 44, 0.97);
  --bg-mid: rgba(7, 23, 70, 0.94);
  --line: rgba(43, 191, 255, 0.9);
  --line-soft: rgba(43, 191, 255, 0.22);
  --cyan: #39dcff;
  --blue: #327dff;
  --green: #66ff62;
  --yellow: #d8ff37;
  --red: #ff6d6d;
  --text-main: #e8fcff;
  --text-soft: rgba(194, 240, 255, 0.82);
  position: relative;
  box-sizing: border-box;
  width: min(100%, 980px);
  min-height: 600px;
  padding: 84px 58px 64px 72px;
  color: var(--text-main);
  background:
    radial-gradient(circle at 52% 0%, rgba(49, 142, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(4, 10, 34, 0.97), rgba(3, 9, 28, 0.98));
  border: none;
  border-radius: 34px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(177, 249, 255, 0.24),
    inset 0 0 36px rgba(56, 162, 255, 0.08),
    0 0 28px rgba(57, 220, 255, 0.26),
    0 18px 46px rgba(0, 0, 0, 0.42);
  clip-path: polygon(54px 0, calc(100% - 152px) 0, calc(100% - 118px) 18px, calc(100% - 26px) 18px, 100% 48px, 100% calc(100% - 44px), calc(100% - 28px) 100%, 64px 100%, 28px calc(100% - 20px), 0 calc(100% - 20px), 0 48px, 18px 18px);
}

cw-core-base-widget-horizontal .base-widget::before,
cw-core-base-widget-horizontal .base-widget__outline,
cw-core-base-widget-horizontal .base-widget__frame,
cw-core-base-widget-horizontal .base-widget__scanlines,
cw-core-base-widget-horizontal .base-widget__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

cw-core-base-widget-horizontal .base-widget::before {
  content: '';
  inset: 12px;
  border-radius: 28px;
  box-shadow: inset 0 0 28px rgba(57, 220, 255, 0.1);
}

cw-core-base-widget-horizontal .base-widget__outline {
  z-index: 3;
  overflow: visible;
}

cw-core-base-widget-horizontal .base-widget__outline-main,
cw-core-base-widget-horizontal .base-widget__outline-inner,
cw-core-base-widget-horizontal .base-widget__outline-glow,
cw-core-base-widget-horizontal .base-widget__outline-accent {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

cw-core-base-widget-horizontal .base-widget__outline-glow {
  stroke: rgba(45, 219, 255, 0.38);
  stroke-width: 11;
  filter: blur(5px);
}

cw-core-base-widget-horizontal .base-widget__outline-main {
  stroke: rgba(186, 250, 255, 0.98);
  stroke-width: 3;
  filter: drop-shadow(0 0 7px rgba(57, 220, 255, 0.72));
}

cw-core-base-widget-horizontal .base-widget__outline-inner {
  stroke: rgba(42, 201, 255, 0.62);
  stroke-width: 1.5;
}

cw-core-base-widget-horizontal .base-widget__outline-accent {
  stroke: rgba(240, 254, 255, 0.95);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(57, 220, 255, 0.62));
}

cw-core-base-widget-horizontal .base-widget__frame {
  inset: 18px;
  border: none;
  border-radius: 26px;
  opacity: 0.9;
}

cw-core-base-widget-horizontal .base-widget__scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.22;
  mix-blend-mode: screen;
}

cw-core-base-widget-horizontal .base-widget__grid {
  background:
    radial-gradient(circle at 50% 44%, rgba(52, 175, 255, 0.08), transparent 28%),
    radial-gradient(circle, rgba(50, 184, 255, 0.55) 0.8px, transparent 1px);
  background-size: auto, 24px 24px;
  opacity: 0.16;
}

cw-core-base-widget-horizontal .base-widget__left-latch {
  position: absolute;
  left: 8px;
  top: 212px;
  width: 42px;
  height: 144px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(46, 214, 255, 0.42), rgba(17, 133, 217, 0.22));
  border: 1px solid rgba(82, 232, 255, 0.42);
  border-radius: 18px;
  clip-path: polygon(0 20px, 18px 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 20px));
  box-shadow: 0 0 18px rgba(57, 220, 255, 0.18);
  z-index: 1;
}

cw-core-base-widget-horizontal .base-widget__left-latch span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #9be9ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

cw-core-base-widget-horizontal .base-widget__header,
cw-core-base-widget-horizontal .base-widget__main,
cw-core-base-widget-horizontal .base-widget__footer {
  position: relative;
  z-index: 2;
}

cw-core-base-widget-horizontal .base-widget__header-label {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(57, 220, 255, 0.6);
}

cw-core-base-widget-horizontal .base-widget__header-title {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

cw-core-base-widget-horizontal .base-widget__status-pill {
  position: absolute;
  top: 44px;
  right: 56px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(57, 220, 255, 0.28);
  background: rgba(7, 24, 70, 0.7);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  z-index: 2;
}

cw-core-base-widget-horizontal .base-widget__main {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  margin-top: 30px;
}

cw-core-base-widget-horizontal .panel-shape {
  position: relative;
  background: linear-gradient(180deg, rgba(6, 20, 64, 0.74), rgba(6, 15, 48, 0.42));
  border: 1px solid rgba(57, 220, 255, 0.15);
  box-shadow: inset 0 0 16px rgba(57, 220, 255, 0.04);
}

cw-core-base-widget-horizontal .base-widget__kpi-panel {
  min-height: 230px;
  padding: 24px 24px 22px;
  clip-path: polygon(0 16px, 12px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 10px) 100%, 0 100%);
}

cw-core-base-widget-horizontal .base-widget__metrics {
  min-height: 230px;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 14px, 100% calc(100% - 16px), calc(100% - 14px) 100%, 0 100%, 0 18px);
}

cw-core-base-widget-horizontal .section-label,
cw-core-base-widget-horizontal .metric-label,
cw-core-base-widget-horizontal .secondary-label {
  color: var(--cyan);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

cw-core-base-widget-horizontal .kpi-value {
  margin-top: 18px;
  line-height: 0.9;
  font-size: clamp(5rem, 8vw, 8rem);
  font-weight: 800;
  color: #f2feff;
  letter-spacing: -0.05em;
  text-shadow:
    0 0 12px rgba(89, 232, 255, 0.72),
    0 0 32px rgba(50, 162, 255, 0.22);
}

cw-core-base-widget-horizontal .kpi-unit {
  font-size: 0.62em;
  margin-left: 0.02em;
}

cw-core-base-widget-horizontal .micro-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 146px;
  margin-top: 22px;
}

cw-core-base-widget-horizontal .micro-matrix span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(74, 223, 255, 0.78);
  box-shadow: 0 0 8px rgba(74, 223, 255, 0.4);
}

cw-core-base-widget-horizontal .signal-row {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

cw-core-base-widget-horizontal .signal-row span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(52, 148, 255, 0.14);
  border: 1px solid rgba(57, 220, 255, 0.16);
}

cw-core-base-widget-horizontal .signal-row span.active {
  background: linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow: 0 0 10px rgba(102, 255, 98, 0.5);
}

cw-core-base-widget-horizontal .metric-row {
  display: grid;
  grid-template-columns: 168px 1fr 54px;
  gap: 12px;
  align-items: center;
}

cw-core-base-widget-horizontal .metric-label-group {
  min-width: 0;
}

cw-core-base-widget-horizontal .metric-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

cw-core-base-widget-horizontal .metric-current,
cw-core-base-widget-horizontal .metric-range {
  color: rgba(194, 240, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.04em;
}

cw-core-base-widget-horizontal .metric-current {
  color: rgba(232, 252, 255, 0.94);
  font-weight: 600;
}

cw-core-base-widget-horizontal .metric-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(12, 39, 105, 0.88), rgba(12, 26, 74, 0.52));
  border: 1px solid rgba(57, 220, 255, 0.14);
}

cw-core-base-widget-horizontal .metric-fill,
cw-core-base-widget-horizontal .metric-glow {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

cw-core-base-widget-horizontal .metric-fill {
  background: linear-gradient(90deg, #67ff63 0%, #d7ff37 42%, #3edcff 100%);
}

cw-core-base-widget-horizontal .metric-glow {
  filter: blur(10px);
  opacity: 0.56;
  background: linear-gradient(90deg, rgba(103, 255, 99, 0.9), rgba(215, 255, 55, 0.82), rgba(62, 220, 255, 0.74));
}

cw-core-base-widget-horizontal .metric-value,
cw-core-base-widget-horizontal .secondary-value,
cw-core-base-widget-horizontal .temp-value,
cw-core-base-widget-horizontal .alarm-text {
  color: var(--text-main);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 220, 255, 0.28);
}

cw-core-base-widget-horizontal .secondary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(57, 220, 255, 0.1);
}

cw-core-base-widget-horizontal .secondary-value {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

cw-core-base-widget-horizontal .base-widget__footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  margin-top: 18px;
}

cw-core-base-widget-horizontal .base-widget__alarm,
cw-core-base-widget-horizontal .base-widget__temp {
  min-height: 66px;
  padding: 14px 22px;
}

cw-core-base-widget-horizontal .panel-shape--footer-left {
  clip-path: polygon(0 14px, 12px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 12px) 100%, 0 100%);
}

cw-core-base-widget-horizontal .panel-shape--footer-right {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 14px, 100% calc(100% - 16px), calc(100% - 14px) 100%, 0 100%, 0 16px);
}

cw-core-base-widget-horizontal .alarm-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 1.05rem;
}

cw-core-base-widget-horizontal .alarm-dots {
  display: flex;
  gap: 14px;
}

cw-core-base-widget-horizontal .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.22;
}

cw-core-base-widget-horizontal .dot.on {
  opacity: 1;
}

cw-core-base-widget-horizontal .dot-red { background: var(--red); box-shadow: 0 0 12px rgba(255, 109, 109, 0.52); }

cw-core-base-widget-horizontal .dot-yellow { background: #ffe65c; box-shadow: 0 0 12px rgba(255, 230, 92, 0.48); }

cw-core-base-widget-horizontal .dot-green { background: var(--green); box-shadow: 0 0 12px rgba(102, 255, 98, 0.5); }

cw-core-base-widget-horizontal .dot-cyan { background: var(--cyan); box-shadow: 0 0 12px rgba(57, 220, 255, 0.5); }

cw-core-base-widget-horizontal .temp-value {
  margin-top: 6px;
  font-size: 2.45rem;
  line-height: 1;
}

cw-core-base-widget-horizontal .runtime-live {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 72px 58px 70px 72px;
}

cw-core-base-widget-horizontal .runtime-live .base-widget__header-title {
  font-size: 1.65rem;
}

cw-core-base-widget-horizontal .runtime-live .base-widget__main {
  margin-top: 26px;
}

cw-core-base-widget-horizontal .runtime-live .base-widget__kpi-panel,
cw-core-base-widget-horizontal .runtime-live .base-widget__metrics {
  min-height: 214px;
}

cw-core-base-widget-horizontal .runtime-live .base-widget__footer {
  margin-top: 16px;
}

cw-core-base-widget-horizontal .runtime-live .base-widget__alarm,
cw-core-base-widget-horizontal .runtime-live .base-widget__temp {
  min-height: 60px;
  padding-top: 12px;
  padding-bottom: 12px;
}

cw-core-base-widget-horizontal .state-productive .base-widget__status-pill {
  color: var(--green);
  border-color: rgba(102, 255, 98, 0.34);
}

cw-core-base-widget-horizontal .state-setup .base-widget__status-pill {
  color: #ffe65c;
  border-color: rgba(255, 230, 92, 0.32);
}

cw-core-base-widget-horizontal .state-disturbance .base-widget__status-pill {
  color: var(--red);
  border-color: rgba(255, 109, 109, 0.32);
}

cw-core-base-widget-horizontal .selected {
  box-shadow:
    inset 0 0 0 1px rgba(71, 201, 255, 0.08),
    inset 0 0 36px rgba(56, 162, 255, 0.12),
    0 0 20px rgba(57, 220, 255, 0.16),
    0 16px 44px rgba(0, 0, 0, 0.4);
}

cw-core-base-widget-horizontal .compact {
  width: min(100%, 760px);
  min-height: auto;
  padding-left: 48px;
}

cw-core-base-widget-horizontal .compact .base-widget__main,
cw-core-base-widget-horizontal .compact .base-widget__footer {
  grid-template-columns: 1fr;
}

cw-core-base-widget-horizontal .compact .base-widget__header-title {
  font-size: 1.45rem;
}

cw-core-base-widget-horizontal .compact .base-widget__left-latch {
  left: 6px;
  top: 184px;
  height: 124px;
}

@media (max-width: 860px) {
  
  cw-core-base-widget-horizontal .base-widget {
      min-height: auto;
      padding-top: 96px;
      padding-left: 48px;
    }
  
  cw-core-base-widget-horizontal .base-widget__main,
  cw-core-base-widget-horizontal .base-widget__footer {
      grid-template-columns: 1fr;
    }
  
  cw-core-base-widget-horizontal .base-widget__status-pill {
      top: 28px;
      right: 22px;
      font-size: 0.8rem;
    }
}



/* ===== CoreBaseWidgetVertical.vue -> <cw-core-base-widget-vertical> ===== */

cw-core-base-widget-vertical .base-widget-vertical {
  --line: rgba(43, 191, 255, 0.9);
  --cyan: #39dcff;
  --blue: #327dff;
  --green: #66ff62;
  --red: #ff6d6d;
  --text-main: #e8fcff;
  --text-soft: rgba(194, 240, 255, 0.82);
  position: relative;
  box-sizing: border-box;
  width: min(100%, 460px);
  height: 760px;
  min-height: 760px;
  padding: 170px 52px 76px 58px;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% 0%, rgba(49, 142, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(4, 10, 34, 0.97), rgba(3, 9, 28, 0.98));
  border: none;
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(177, 249, 255, 0.24),
    inset 0 0 36px rgba(56, 162, 255, 0.08),
    0 0 28px rgba(57, 220, 255, 0.26),
    0 18px 46px rgba(0, 0, 0, 0.42);
  clip-path: polygon(68px 0, calc(100% - 146px) 0, calc(100% - 132px) 18px, calc(100% - 70px) 18px, 100% 76px, 100% 36%, calc(100% - 28px) 42%, calc(100% - 28px) 78%, 100% calc(100% - 130px), calc(100% - 92px) 100%, 132px 100%, 86px calc(100% - 34px), 0 calc(100% - 126px), 0 76px, 34px 36px);
}

cw-core-base-widget-vertical .base-widget-vertical::before,
cw-core-base-widget-vertical .base-widget-vertical__outline,
cw-core-base-widget-vertical .base-widget-vertical__frame,
cw-core-base-widget-vertical .base-widget-vertical__scanlines,
cw-core-base-widget-vertical .base-widget-vertical__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

cw-core-base-widget-vertical .base-widget-vertical::before {
  content: '';
  inset: 12px;
  border-radius: 28px;
  box-shadow: inset 0 0 28px rgba(57, 220, 255, 0.12);
}

cw-core-base-widget-vertical .base-widget-vertical__outline {
  z-index: 3;
  overflow: visible;
}

cw-core-base-widget-vertical .base-widget-vertical__outline-main,
cw-core-base-widget-vertical .base-widget-vertical__outline-inner,
cw-core-base-widget-vertical .base-widget-vertical__outline-glow,
cw-core-base-widget-vertical .base-widget-vertical__outline-accent {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

cw-core-base-widget-vertical .base-widget-vertical__outline-glow {
  stroke: rgba(45, 219, 255, 0.4);
  stroke-width: 11;
  filter: blur(5px);
}

cw-core-base-widget-vertical .base-widget-vertical__outline-main {
  stroke: rgba(186, 250, 255, 0.98);
  stroke-width: 3;
  filter: drop-shadow(0 0 7px rgba(57, 220, 255, 0.72));
}

cw-core-base-widget-vertical .base-widget-vertical__outline-inner {
  stroke: rgba(42, 201, 255, 0.62);
  stroke-width: 1.5;
}

cw-core-base-widget-vertical .base-widget-vertical__outline-accent {
  stroke: rgba(240, 254, 255, 0.95);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(57, 220, 255, 0.62));
}

cw-core-base-widget-vertical .base-widget-vertical__frame {
  inset: 18px;
  border: none;
  border-radius: 26px;
  opacity: 0.92;
}

cw-core-base-widget-vertical .base-widget-vertical__scanlines {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.22;
  mix-blend-mode: screen;
}

cw-core-base-widget-vertical .base-widget-vertical__grid {
  background:
    radial-gradient(circle at 50% 42%, rgba(52, 175, 255, 0.08), transparent 30%),
    radial-gradient(circle, rgba(50, 184, 255, 0.55) 0.8px, transparent 1px);
  background-size: auto, 24px 24px;
  opacity: 0.16;
}

cw-core-base-widget-vertical .base-widget-vertical__tab,
cw-core-base-widget-vertical .base-widget-vertical__status-pill,
cw-core-base-widget-vertical .base-widget-vertical__kpi,
cw-core-base-widget-vertical .base-widget-vertical__metrics,
cw-core-base-widget-vertical .base-widget-vertical__footer {
  position: relative;
  z-index: 2;
}

cw-core-base-widget-vertical .base-widget-vertical__left-rail,
cw-core-base-widget-vertical .base-widget-vertical__right-rail {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  pointer-events: none;
}

cw-core-base-widget-vertical .base-widget-vertical__left-rail {
  left: 18px;
  top: 118px;
  width: 34px;
  height: 202px;
  background: linear-gradient(180deg, rgba(46, 214, 255, 0.42), rgba(13, 106, 195, 0.24));
  border: 1px solid rgba(82, 232, 255, 0.44);
  clip-path: polygon(0 18px, 16px 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 18px));
  box-shadow: 0 0 18px rgba(57, 220, 255, 0.2);
}

cw-core-base-widget-vertical .base-widget-vertical__right-rail {
  right: 18px;
  top: 246px;
  width: 42px;
  height: 204px;
  background: linear-gradient(180deg, rgba(255, 92, 82, 0.62), rgba(203, 28, 72, 0.34));
  border: 1px solid rgba(255, 128, 118, 0.5);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  box-shadow: 0 0 22px rgba(255, 74, 94, 0.22);
}

cw-core-base-widget-vertical .base-widget-vertical__left-rail span,
cw-core-base-widget-vertical .base-widget-vertical__right-rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #b9f3ff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

cw-core-base-widget-vertical .base-widget-vertical__right-rail span {
  color: #ffd7d7;
}

cw-core-base-widget-vertical .base-widget-vertical__tab {
  position: absolute;
  top: 44px;
  left: 80px;
  width: min(226px, calc(100% - 170px));
  min-height: 112px;
  padding: 68px 18px 14px;
  background: linear-gradient(90deg, rgba(46, 214, 255, 0.34), rgba(17, 133, 217, 0.18));
  border: 1px solid rgba(82, 232, 255, 0.42);
  border-radius: 18px;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 38px) 0, 100% 28px, 100% 100%, 0 100%);
  box-shadow: 0 0 18px rgba(57, 220, 255, 0.18);
}

cw-core-base-widget-vertical .base-widget-vertical__emblem {
  position: absolute;
  top: 16px;
  left: 22px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(82, 232, 255, 0.42);
  background:
    radial-gradient(circle at 50% 50%, transparent 31%, rgba(57, 220, 255, 0.88) 32%, rgba(57, 220, 255, 0.88) 35%, transparent 36%),
    linear-gradient(180deg, rgba(48, 132, 255, 0.22), rgba(8, 24, 70, 0.58));
  box-shadow:
    inset 0 0 16px rgba(57, 220, 255, 0.16),
    0 0 18px rgba(57, 220, 255, 0.22);
}

cw-core-base-widget-vertical .base-widget-vertical__emblem span {
  position: absolute;
  inset: 12px 25px;
  border-radius: 999px;
  background: rgba(57, 220, 255, 0.84);
  box-shadow: 0 0 10px rgba(57, 220, 255, 0.42);
}

cw-core-base-widget-vertical .base-widget-vertical__tab-label {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(57, 220, 255, 0.6);
}

cw-core-base-widget-vertical .base-widget-vertical__tab-title {
  margin-top: 8px;
  color: var(--text-main);
  font-size: 1.36rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

cw-core-base-widget-vertical .base-widget-vertical__status-pill {
  position: absolute;
  top: 82px;
  right: 58px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(57, 220, 255, 0.28);
  background: rgba(7, 24, 70, 0.72);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

cw-core-base-widget-vertical .panel-shape {
  background: linear-gradient(180deg, rgba(6, 20, 64, 0.76), rgba(6, 15, 48, 0.44));
  border: 1px solid rgba(57, 220, 255, 0.16);
  box-shadow: inset 0 0 16px rgba(57, 220, 255, 0.05);
}

cw-core-base-widget-vertical .base-widget-vertical__kpi {
  min-height: 190px;
  padding: 22px 24px 20px;
  clip-path: polygon(0 18px, 16px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 14px) 100%, 0 100%);
}

cw-core-base-widget-vertical .section-label,
cw-core-base-widget-vertical .metric-label,
cw-core-base-widget-vertical .secondary-label {
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

cw-core-base-widget-vertical .kpi-value {
  margin-top: 18px;
  line-height: 0.9;
  font-size: clamp(4.8rem, 12vw, 7.2rem);
  font-weight: 800;
  color: #f2feff;
  letter-spacing: 0;
  text-shadow:
    0 0 12px rgba(89, 232, 255, 0.72),
    0 0 32px rgba(50, 162, 255, 0.22);
}

cw-core-base-widget-vertical .kpi-unit {
  font-size: 0.58em;
  margin-left: 0.04em;
}

cw-core-base-widget-vertical .micro-matrix {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 170px;
  margin-top: 24px;
}

cw-core-base-widget-vertical .micro-matrix span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(74, 223, 255, 0.78);
  box-shadow: 0 0 8px rgba(74, 223, 255, 0.4);
}

cw-core-base-widget-vertical .signal-row {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

cw-core-base-widget-vertical .signal-row span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(52, 148, 255, 0.14);
  border: 1px solid rgba(57, 220, 255, 0.16);
}

cw-core-base-widget-vertical .signal-row span.active {
  background: linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow: 0 0 10px rgba(102, 255, 98, 0.5);
}

cw-core-base-widget-vertical .base-widget-vertical__metrics {
  margin-top: 16px;
  min-height: 178px;
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 16px) 100%, 0 100%, 0 18px);
}

cw-core-base-widget-vertical .metric-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

cw-core-base-widget-vertical .metric-label-group {
  min-width: 0;
}

cw-core-base-widget-vertical .metric-submeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

cw-core-base-widget-vertical .metric-current,
cw-core-base-widget-vertical .metric-range {
  color: rgba(194, 240, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.04em;
}

cw-core-base-widget-vertical .metric-current {
  color: rgba(232, 252, 255, 0.94);
  font-weight: 600;
}

cw-core-base-widget-vertical .metric-track {
  position: relative;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(12, 39, 105, 0.88), rgba(12, 26, 74, 0.52));
  border: 1px solid rgba(57, 220, 255, 0.14);
}

cw-core-base-widget-vertical .metric-fill,
cw-core-base-widget-vertical .metric-glow {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

cw-core-base-widget-vertical .metric-fill {
  background: linear-gradient(90deg, #67ff63 0%, #d7ff37 42%, #3edcff 100%);
}

cw-core-base-widget-vertical .metric-glow {
  filter: blur(10px);
  opacity: 0.56;
  background: linear-gradient(90deg, rgba(103, 255, 99, 0.9), rgba(215, 255, 55, 0.82), rgba(62, 220, 255, 0.74));
}

cw-core-base-widget-vertical .metric-value,
cw-core-base-widget-vertical .secondary-value,
cw-core-base-widget-vertical .temp-value,
cw-core-base-widget-vertical .alarm-text {
  color: var(--text-main);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 220, 255, 0.28);
}

cw-core-base-widget-vertical .secondary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(57, 220, 255, 0.1);
}

cw-core-base-widget-vertical .secondary-value {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(0.95rem, 2.1vw, 1.28rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

cw-core-base-widget-vertical .base-widget-vertical__footer {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 14px;
  margin-top: 16px;
}

cw-core-base-widget-vertical .base-widget-vertical__alarm,
cw-core-base-widget-vertical .base-widget-vertical__temp {
  min-height: 62px;
  padding: 12px 16px;
}

cw-core-base-widget-vertical .base-widget-vertical__alarm {
  clip-path: polygon(0 14px, 12px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 12px) 100%, 0 100%);
}

cw-core-base-widget-vertical .base-widget-vertical__temp {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 14px, 100% calc(100% - 16px), calc(100% - 14px) 100%, 0 100%, 0 16px);
}

cw-core-base-widget-vertical .alarm-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

cw-core-base-widget-vertical .alarm-dots {
  display: flex;
  gap: 10px;
}

cw-core-base-widget-vertical .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  opacity: 0.22;
}

cw-core-base-widget-vertical .dot.on {
  opacity: 1;
}

cw-core-base-widget-vertical .dot-red { background: var(--red); box-shadow: 0 0 12px rgba(255, 109, 109, 0.52); }

cw-core-base-widget-vertical .dot-yellow { background: #ffe65c; box-shadow: 0 0 12px rgba(255, 230, 92, 0.48); }

cw-core-base-widget-vertical .dot-green { background: var(--green); box-shadow: 0 0 12px rgba(102, 255, 98, 0.5); }

cw-core-base-widget-vertical .dot-cyan { background: var(--cyan); box-shadow: 0 0 12px rgba(57, 220, 255, 0.5); }

cw-core-base-widget-vertical .temp-value {
  margin-top: 6px;
  font-size: 2rem;
  line-height: 1;
}

cw-core-base-widget-vertical .state-productive .base-widget-vertical__status-pill {
  color: var(--green);
  border-color: rgba(102, 255, 98, 0.34);
}

cw-core-base-widget-vertical .state-setup .base-widget-vertical__status-pill {
  color: #ffe65c;
  border-color: rgba(255, 230, 92, 0.32);
}

cw-core-base-widget-vertical .state-disturbance .base-widget-vertical__status-pill {
  color: var(--red);
  border-color: rgba(255, 109, 109, 0.32);
}

cw-core-base-widget-vertical .selected {
  box-shadow:
    inset 0 0 0 1px rgba(71, 201, 255, 0.08),
    inset 0 0 36px rgba(56, 162, 255, 0.12),
    0 0 20px rgba(57, 220, 255, 0.16),
    0 16px 44px rgba(0, 0, 0, 0.4);
}

cw-core-base-widget-vertical .compact {
  width: min(100%, 420px);
  min-height: auto;
  padding: 158px 34px 30px;
}

cw-core-base-widget-vertical .compact .base-widget-vertical__tab {
  left: 58px;
  width: min(330px, calc(100% - 170px));
}

cw-core-base-widget-vertical .runtime-live {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 166px 54px 82px 58px;
}

cw-core-base-widget-vertical .runtime-live .base-widget-vertical__kpi {
  min-height: 184px;
}

cw-core-base-widget-vertical .runtime-live .base-widget-vertical__metrics {
  min-height: 170px;
}

cw-core-base-widget-vertical .runtime-live .base-widget-vertical__footer {
  margin-top: 14px;
}

@media (max-width: 620px) {
  
  cw-core-base-widget-vertical .base-widget-vertical {
      min-height: auto;
      padding: 166px 30px 30px;
    }
  
  cw-core-base-widget-vertical .base-widget-vertical__tab {
      left: 52px;
      width: calc(100% - 104px);
    }
  
  cw-core-base-widget-vertical .base-widget-vertical__status-pill {
      top: 112px;
      right: 28px;
    }
  
  cw-core-base-widget-vertical .base-widget-vertical__footer {
      grid-template-columns: 1fr;
    }
}

