:root{
  --bg:#071612;
  --bg-2:#0a2019;
  --panel:#10261f;
  --panel-2:#123026;
  --border:#3a6a57;
  --text:#eef8f2;
  --muted:#b7d5c4;
  --accent:#c39a3f;
  --success:#37b36f;
  --warning:#d8a84e;
  --danger:#ef4444;
  --shadow:0 12px 34px rgba(0,0,0,.34);
  --radius:14px;
  --core-decision-bg:rgba(96,108,56,.32);
  --core-decision-border:rgba(148,163,98,.66);
  --core-simulation-bg:rgba(34,111,94,.28);
  --core-simulation-border:rgba(84,168,146,.62);
  --core-executive-bg:rgba(46,125,50,.30);
  --core-executive-border:rgba(102,182,106,.66);
  --core-gate-bg:rgba(26,47,37,.32);
  --core-gate-border:rgba(180,140,90,.64);
}

*{box-sizing:border-box}

html{
  font-size:110%;
  scroll-behavior:smooth;
}

html,body{
  margin:0;
  padding:0;
  background:radial-gradient(ellipse at top, #0f2a1f 0%, #081c15 40%, #04120d 100%);
  color:var(--text);
  font-family:"Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

body{
  min-height:100vh;
}

a{
  color:var(--accent);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

.wr-shell{
  width:min(1400px,94%);
  margin:28px auto;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.wr-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.wr-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

/* — Brand Emblem (official logo → Systems Library) — */
.wr-brand-emblem{
  display:inline-flex;
  text-decoration:none;
  flex-shrink:0;
}
.wr-brand-logo{
  width:52px;
  height:52px;
  border-radius:14px;
  object-fit:contain;
  display:block;
  background:rgba(255,255,255,.03);
  box-shadow:0 0 0 1px rgba(212,175,55,.25), 0 8px 24px rgba(0,0,0,.28);
  transition:box-shadow .18s;
}
.wr-brand-emblem:hover .wr-brand-logo{
  box-shadow:0 0 0 2px rgba(212,175,55,.5), 0 10px 28px rgba(0,0,0,.38);
}

/* — Institutional plate — */
.wr-brand-plate{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.wr-brand-tagline{
  font-size:.7rem;
  color:rgba(195,154,63,.7);
  letter-spacing:.04em;
  margin-top:1px;
}

.wr-brand-sub{
  font-size:.8rem;
  color:var(--muted);
  margin-top:2px;
  text-decoration:none;
  transition:color .15s;
}
.wr-brand-sub:hover{
  color:var(--accent);
}

.wr-product-status{
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid #446756;
  background:rgba(13,33,27,.75);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.03em;
  color:#deeee5;
}

.wr-product-status-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#37b36f;
  box-shadow:0 0 8px rgba(55,179,111,.45);
}

.wr-product-status.is-warn .wr-product-status-dot{
  background:#d8a84e;
  box-shadow:0 0 8px rgba(216,168,78,.45);
}

.wr-product-status.is-danger .wr-product-status-dot{
  background:#ef4444;
  box-shadow:0 0 8px rgba(239,68,68,.45);
}

.wr-brand-name{
  font-size:.95rem;
  letter-spacing:.08em;
  font-weight:700;
}

.wr-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.wr-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  color:#f0e5cc;
  background:rgba(15,38,31,.82);
}

.wr-back:hover{
  text-decoration:none;
  border-color:#a98339;
  background:rgba(22,49,40,.94);
}

.layer-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.layer-link{
  padding:9px 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  border:1px solid rgba(230,211,163,.35);
  color:#f7f1d0;
  background:rgba(8,28,21,.75);
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.layer-link:hover{
  text-decoration:none;
  border-color:rgba(230,211,163,.55);
}

.layer-link.active{
  background:rgba(230,211,163,.16);
  border-color:rgba(230,211,163,.75);
  color:#e6d3a3;
}

.layer-link.layer-link-performance{
  background:linear-gradient(135deg, rgba(230,211,163,.18), rgba(16,185,129,.16));
  color:#f7f1d0;
  border:1px solid rgba(230,211,163,.55);
  box-shadow:none;
}

.layer-link.layer-link-performance:hover{
  background:linear-gradient(135deg, rgba(230,211,163,.28), rgba(16,185,129,.22));
  border-color:rgba(230,211,163,.8);
}

.wr-lang-switch{
  display:flex;
  gap:8px;
}

.wr-lang-btn{
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  border:1px solid transparent;
  background:#2a0f12;
  color:#e74c3c;
  border-radius:999px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:all .2s ease;
}

.wr-lang-btn:hover{
  opacity:.85;
}

.wr-lang-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#e74c3c;
  box-shadow:0 0 8px rgba(239,68,68,.5);
}

.wr-lang-btn.active,
.wr-lang-btn.is-active{
  background:#0f2f1f;
  border-color:#2ecc71;
  color:#2ecc71;
}

.wr-lang-btn.inactive{
  background:#2a0f12;
  border-color:#e74c3c;
  color:#e74c3c;
}

.wr-lang-btn.active .wr-lang-dot,
.wr-lang-btn.is-active .wr-lang-dot{
  background:#2ecc71;
  box-shadow:0 0 8px rgba(34,197,94,.5);
}

.wr-hero{
  margin-bottom:16px;
}

.hero-warroom {
  display: block;
  margin-bottom: 24px;
}

.hero-warroom-content {
  min-width: 0;
}

.warroom-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px 0;
}

.warroom-title-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.warroom-title h1 {
  font-size: 28px;
  margin: 0;
}

.wr-command-strip{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  padding:10px 12px;
}

.wr-command-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 11px;
  border:1px solid #4e6f60;
  border-radius:999px;
  background:rgba(15,34,28,.75);
  color:var(--text);
  font-size:.88rem;
  font-weight:700;
}

.wr-command-link:hover{
  text-decoration:none;
  border-color:#7ea18f;
  background:rgba(20,42,35,.88);
}

.wr-command-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
}

.wr-command-dot--ok{
  background:#37b36f;
  box-shadow:0 0 8px rgba(55,179,111,.45);
}

.wr-command-dot--warn{
  background:#d8a84e;
  box-shadow:0 0 8px rgba(216,168,78,.45);
}

.wr-command-dot--gate{
  background:#4f6f5d;
  box-shadow:0 0 8px rgba(146,105,131,.34);
}

.wr-title{
  margin:0 0 10px 0;
  font-size:1.68rem;
  font-weight:700;
  color:var(--text);
}

.wr-subtitle{
  margin:4px 0 0 0;
  color:var(--muted);
}

/* — Product Chip — */
.wr-product-chip{
  display:inline-flex;
  flex-direction:column;
  gap:4px;
  margin-top:10px;
  padding:8px 14px;
  border:1px solid #3a6a57;
  border-radius:6px;
  background:rgba(10,32,25,.75);
  font-size:.76rem;
  font-weight:600;
  letter-spacing:.04em;
}
.wr-product-chip-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.wr-product-chip-label{
  color:var(--accent);
  min-width:62px;
}
.wr-product-chip-value{
  color:var(--text);
}
.wr-product-chip-dot{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#37b36f;
  box-shadow:0 0 7px rgba(55,179,111,.5);
  margin-right:4px;
}
.wr-product-chip.is-warn .wr-product-chip-dot{
  background:#d8a84e;
  box-shadow:0 0 7px rgba(216,168,78,.5);
}
.wr-product-chip.is-danger .wr-product-chip-dot{
  background:#ef4444;
  box-shadow:0 0 7px rgba(239,68,68,.5);
}

/* =========================================================
   HOMOLOGACION WARROOM <> PERFORMANCE
========================================================= */

.operational-module-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 43, 31, 0.94), rgba(4, 19, 15, 0.98));
  border: 1px solid rgba(255, 212, 90, 0.35);
  box-shadow: 0 0 26px rgba(255, 212, 90, 0.10), inset 0 0 18px rgba(255, 212, 90, 0.04), 0 16px 34px rgba(0, 0, 0, 0.38);
}

.wr-module-incident { border-left: 4px solid #FFD45A; }
.wr-module-state { border-left: 4px solid #7CFF6B; }
.wr-module-decision { border-left: 4px solid #FFD45A; }
.wr-module-simulation { border-left: 4px solid #55F6E8; }
.wr-module-executive { border-left: 4px solid #7CFF6B; }
.wr-module-gate { border-left: 4px solid #FF7C37; }
.wr-module-routes { border-left: 4px solid #55F6E8; }

.module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.module-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(124, 255, 107, 0.65);
  background: rgba(20, 90, 35, 0.22);
  box-shadow: 0 0 14px rgba(57, 255, 136, 0.25), inset 0 0 12px rgba(57, 255, 136, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7CFF6B;
  font-size: 18px;
}

.module-icon-target::before { content: "◎"; }
.module-icon-alert::before { content: "⚠"; }
.module-icon-decision::before { content: "⌬"; }
.module-icon-chart::before { content: "◫"; }
.module-icon-action::before { content: "⚡"; }
.module-icon-gate::before { content: "⇥"; }
.module-icon-log::before { content: "▤"; }

.module-title {
  margin: 0;
  color: #fff1b8;
  font-size: 1.12rem;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.module-subtitle {
  margin: 3px 0 0;
  color: rgba(213, 255, 219, 0.70);
  font-size: .84rem;
  line-height: 1.35;
}

.module-body {
  display: grid;
  gap: 8px;
}

.tactical-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  margin: 7px 0;
}

.tactical-label {
  color: #9fffb3;
  font-weight: 800;
}

.tactical-value {
  color: #f4fff2;
  font-weight: 600;
}

.status-pill,
.tactical-alert-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-pill--green {
  color: #d9ffe0;
  border: 1px solid rgba(94, 255, 130, 0.68);
  background: linear-gradient(180deg, rgba(25, 122, 48, 0.72), rgba(8, 58, 28, 0.92));
}

.status-pill--orange {
  color: #fff0d6;
  border: 1px solid rgba(255, 124, 55, 0.72);
  background: linear-gradient(180deg, rgba(168, 77, 22, 0.75), rgba(82, 30, 10, 0.95));
}

.status-pill--amber {
  color: #fff6c9;
  border: 1px solid rgba(255, 213, 91, 0.72);
  background: linear-gradient(180deg, rgba(126, 101, 20, 0.72), rgba(53, 42, 8, 0.95));
}

.status-pill--neutral {
  color: #bfffd0;
  border: 1px solid rgba(124, 255, 107, 0.38);
  background: rgba(12, 64, 34, 0.58);
}

.technical-stamp {
  font-family: Consolas, monospace;
  text-transform: none;
}

.system-response-box {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 213, 91, 0.72);
  background: linear-gradient(180deg, rgba(40, 37, 12, 0.76), rgba(5, 20, 15, 0.92));
  box-shadow: 0 0 16px rgba(255, 213, 91, 0.08), inset 0 0 14px rgba(255, 213, 91, 0.04);
}

.system-response-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #0b140b;
  background: #ffe17a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.system-response-text {
  color: #fff6c9;
  font-weight: 800;
  line-height: 1.4;
}

.alert-strip {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid #FF7C37;
  border-radius: 10px;
  background: rgba(92, 31, 8, 0.28);
}

.tactical-alert-value {
  color: #fff0d6;
  border: 1px solid rgba(255, 124, 55, 0.72);
  background: linear-gradient(180deg, rgba(168, 77, 22, 0.75), rgba(82, 30, 10, 0.95));
  text-transform: none;
}

.tactical-timeline {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  margin: 9px 0;
  padding: 12px;
  border: 1px solid rgba(76, 255, 139, 0.18);
  border-radius: 14px;
  background: rgba(6, 21, 16, 0.54);
}

.timeline-stamp {
  color: #fff1b8;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.timeline-body {
  display: grid;
  gap: 4px;
}

.timeline-empty {
  grid-template-columns: 1fr;
  color: #d0e2d7;
}

.wr-section-title{
  font-size:1.1rem;
  letter-spacing:.03em;
  margin:0 0 10px 0;
}

.wr-icon{
  display:inline-flex;
  margin-right:8px;
  filter:saturate(.85);
}

.wr-modules{
  margin-bottom:16px;
}

.wr-module-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.wr-module-card{
  border:1px solid var(--border);
  border-left:4px solid #6a8d7f;
  border-radius:12px;
  padding:14px;
  background:linear-gradient(180deg,rgba(20,43,35,.94),rgba(19,42,34,.9));
  box-shadow:var(--shadow);
  overflow:hidden;
}

.wr-section--decision,
.wr-section--simulation,
.wr-section--executive,
.wr-section--gate{
  overflow:hidden;
}

.wr-shell .wr-module-grid .wr-module-card.wr-module-card--decision,
.wr-shell .wr-module-grid .wr-module-card.wr-module-card--simulation,
.wr-shell .wr-module-grid .wr-module-card.wr-module-card--executive,
.wr-shell .wr-module-grid .wr-module-card.wr-module-card--gate,
.wr-shell .wr-card.wr-section--decision,
.wr-shell .wr-card.wr-section--simulation,
.wr-shell .wr-card.wr-section--executive,
.wr-shell .wr-card.wr-section--gate{
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.25), var(--shadow);
}

.wr-shell .wr-module-grid .wr-module-card.wr-module-card--decision,
.wr-shell .wr-card.wr-section--decision{
  border:1px solid #e6d3a3;
  border-left:4px solid #e6d3a3;
  background:linear-gradient(135deg, #3a3412, #1c1f10) !important;
}

.wr-shell .wr-module-grid .wr-module-card.wr-module-card--simulation,
.wr-shell .wr-card.wr-section--simulation{
  border:1px solid #4fd1c5;
  border-left:4px solid #4fd1c5;
  background:linear-gradient(135deg, #0f2a2a, #0a1f1f) !important;
}

.wr-shell .wr-module-grid .wr-module-card.wr-module-card--executive,
.wr-shell .wr-card.wr-section--executive{
  border:1px solid #2ecc71;
  border-left:4px solid #2ecc71;
  background:linear-gradient(135deg, #123d2b, #0b2a1f) !important;
}

.wr-shell .wr-module-grid .wr-module-card.wr-module-card--gate,
.wr-shell .wr-card.wr-section--gate{
  border:1px solid #b48ead !important;
  border-left:4px solid #b48ead !important;
  background:linear-gradient(135deg, #2a1623, #140b12) !important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.25), 0 0 0 1px rgba(150,110,130,.18), 0 14px 36px rgba(24,18,24,.28);
}

.wr-module-card h3{
  margin:0 0 8px;
  font-size:1.02rem;
}

.wr-module-card p{
  margin:6px 0 0;
  color:#d7ebdf;
}

.wr-trans{
  color:#e4c57d;
  font-weight:600;
}

.wr-state-header{
  margin:0 0 10px;
  scroll-margin-top:84px;
}

section,
.module,
.wr-card,
.wr-command-strip,
.wr-modules {
  margin-bottom: 16px;
}

.wr-card{
  background:linear-gradient(180deg,var(--panel),var(--panel-2));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px 16px;
  margin:0 0 16px 0;
  box-shadow:var(--shadow);
  scroll-margin-top:84px;
}

.wr-kv{
  margin:8px 0;
  color:var(--text);
}

.wr-kv strong{
  color:var(--muted);
  font-weight:600;
}

.wr-state-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:700;
  border:1px solid transparent;
}

.wr-state-pill--ok{
  background:rgba(55,179,111,.14);
  color:#a8e5c3;
  border-color:rgba(55,179,111,.34);
}

.wr-state-pill--warn{
  background:rgba(216,168,78,.16);
  color:#f0d497;
  border-color:rgba(216,168,78,.36);
}

.wr-state-pill--danger{
  background:rgba(239,68,68,.14);
  color:#f8b1b1;
  border-color:rgba(239,68,68,.34);
}

.wr-state-pill--neutral{
  background:rgba(111,153,134,.14);
  color:#cde2d8;
  border-color:rgba(111,153,134,.34);
}

.wr-list{
  margin:10px 0 0 18px;
  padding:0;
}

.wr-list li{
  margin:8px 0;
  color:var(--text);
}

.wr-code{
  margin-top:10px;
  background:#071a14;
  color:#e9f4ee;
  border:1px solid rgba(46,125,90,.4);
  border-radius:12px;
  padding:14px 16px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  font-family:Consolas, monospace;
  font-size:.95rem;
}

.table,
.table-container{
  background:#071a14;
  border:1px solid rgba(46,125,90,.4);
  border-radius:12px;
}

.table th,
.table-container th{
  background:#0c241c;
  color:#e6d3a3;
}

.explain-box{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid rgba(230,211,163,.2);
  border-radius:10px;
  background:rgba(230,211,163,.05);
  color:var(--muted);
  font-size:.85rem;
  line-height:1.4;
}

.incident-context{
  background:linear-gradient(135deg, #0b2a1f, #071a14);
  border:1px solid #2ecc71;
  border-radius:10px;
  padding:14px;
  margin-bottom:16px;
  opacity:0;
  transform:translateY(6px);
  transition:all .3s ease;
}

.incident-context.active{
  opacity:1;
  transform:translateY(0);
}

.incident-context-title{
  color:#e6d3a3;
  font-weight:700;
  margin-bottom:6px;
  font-size:.9rem;
}

.incident-context-body{
  color:var(--muted);
  font-size:.95rem;
  margin-bottom:8px;
  white-space:pre-wrap;
  word-break:break-word;
}

.incident-context-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.incident-meta-pill{
  font-size:.8rem;
  padding:4px 8px;
  border-radius:6px;
  background:rgba(16,185,129,.12);
  border:1px solid rgba(46,204,113,.5);
  color:#d1fae5;
}

.flow-entry{
  margin-bottom:12px;
  padding:10px 14px;
  border:1px solid rgba(230,211,163,.25);
  border-radius:8px;
  background:rgba(16,185,129,.06);
  color:#e6d3a3;
  font-size:.8rem;
  opacity:0;
  transform:translateY(6px);
  transition:all .35s ease;
}

.flow-entry.active{
  opacity:1;
  transform:translateY(0);
}

.wr-badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  margin-right:8px;
  border:1px solid transparent;
}

.wr-badge--ok{
  background:rgba(34,197,94,.12);
  color:#86efac;
  border-color:rgba(34,197,94,.28);
}

.wr-badge--warn{
  background:rgba(216,168,78,.14);
  color:#f7d890;
  border-color:rgba(216,168,78,.35);
}

.wr-badge--danger{
  background:rgba(239,68,68,.12);
  color:#fca5a5;
  border-color:rgba(239,68,68,.28);
}

.wr-alert{
  border-left:4px solid var(--warning);
  padding-left:12px;
}

.wr-form-inline{
  margin-top:10px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.wr-select{
  background:#132d24;
  color:var(--text);
  border:1px solid #4d7262;
  border-radius:10px;
  padding:8px 10px;
}

.wr-btn{
  background:var(--accent);
  color:#1a2218;
  border:1px solid #e3c57f;
  border-radius:10px;
  padding:8px 12px;
  font-weight:600;
  cursor:pointer;
}

.wr-btn:hover{
  filter:brightness(1.08);
}

.lang{
  display:none;
}

html[data-lang="es"] .lang-es,
html[data-lang="en"] .lang-en{
  display:inline;
}

html[data-lang="es"] p.lang-es,
html[data-lang="en"] p.lang-en{
  display:block;
}

@media (max-width:980px){
  .wr-module-grid{
    grid-template-columns:1fr;
  }

  .tactical-row,
  .timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width:760px){
  .wr-shell{
    width:min(1400px,96%);
    margin:18px auto;
  }

  .main-container {
    padding: 16px;
  }

  .wr-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .wr-top-actions{
    width:100%;
    justify-content:flex-start;
  }

  .layer-nav{
    width:100%;
  }

  .wr-title{
    font-size:1.65rem;
    margin-bottom:10px;
  }

  .hero-warroom {
    margin-bottom: 18px;
  }

  .warroom-title h1 {
    font-size: 24px;
  }

  /* =========================================================
     UNIFIED NAV — WARROOM overrides
  ========================================================= */

  .wr-topbar--unified {
    align-items: center;
    gap: 12px;
  }

  .wr-top-actions--unified {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff1b8;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
  }

  .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    background: currentColor;
    flex-shrink: 0;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
  }

  .nav-icon--incident {
    color: #7CFF6B;
    mask-image: url('/assets/icons/incident.svg');
    -webkit-mask-image: url('/assets/icons/incident.svg');
  }

  .nav-icon--warroom {
    color: #FFD45A;
    mask-image: url('/assets/icons/warroom.svg');
    -webkit-mask-image: url('/assets/icons/warroom.svg');
  }

  .nav-icon--performance {
    color: #55F6E8;
    mask-image: url('/assets/icons/performance.svg');
    -webkit-mask-image: url('/assets/icons/performance.svg');
  }

  .nav-icon--brand {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 5px;
  }

  .wr-back.nav-btn {
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(216, 184, 79, 0.45);
    background: rgba(18, 34, 22, 0.78);
    color: #fff1b8;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-decoration: none;
  }

  .wr-back.nav-btn:hover {
    border-color: rgba(216, 184, 79, 0.72);
    box-shadow: 0 0 20px rgba(34, 255, 128, 0.08);
  }

  /* Hero icon and title parity with Performance */
  .wr-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .hero-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    background: currentColor;
    flex-shrink: 0;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
  }

  .hero-icon--warroom {
    color: #FFD45A;
    mask-image: url('/assets/icons/warroom.svg');
    -webkit-mask-image: url('/assets/icons/warroom.svg');
  }

  /* Ensure no inherited oversized image styles in topbar */
  .wr-topbar--unified .brand-logo {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
  }

  .wr-topbar--unified .nav-icon--brand {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
  }
  }
}

/* =========================================================
   CABINA — NAV CANONICA (PATTERN PERFORMANCE)
========================================================= */

.wr-topbar.pd-topbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff1b8;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.layer-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.layer-link {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(216, 184, 79, 0.45);
  color: #fff1b8;
  background: rgba(18, 34, 22, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 0 1px rgba(216, 184, 79, 0.06);
}

.layer-link:hover {
  text-decoration: none;
  border-color: rgba(216, 184, 79, 0.72);
  box-shadow: 0 0 20px rgba(34, 255, 128, 0.08);
}

.layer-link.active {
  background: linear-gradient(135deg, rgba(16, 96, 58, 0.45), rgba(11, 33, 24, 0.88));
  border-color: rgba(74, 255, 146, 0.62);
  color: #d8ffe4;
  box-shadow: 0 0 28px rgba(34, 255, 128, 0.10);
}

.layer-link.layer-link-performance {
  background: linear-gradient(135deg, rgba(20, 96, 61, 0.38), rgba(11, 27, 21, 0.94));
  color: #f7f1d0;
  border: 1px solid rgba(74, 255, 146, 0.55);
  box-shadow: 0 0 0 1px rgba(216, 184, 79, 0.08), 0 0 28px rgba(34, 255, 128, 0.10), inset 0 0 18px rgba(34, 255, 128, 0.04);
}

.layer-link.layer-link-performance:hover {
  background: linear-gradient(135deg, rgba(24, 118, 72, 0.44), rgba(13, 33, 25, 0.98));
  border-color: rgba(216, 184, 79, 0.80);
}

.pd-top-actions,
.wr-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pd-link,
.wr-back {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(216, 184, 79, 0.65);
  background: rgba(18, 34, 22, 0.78);
  color: #fff1b8;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.pd-link:hover,
.wr-back:hover {
  border-color: rgba(74, 255, 146, 0.62);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(34, 255, 128, 0.08);
}

.pd-lang-switch,
.wr-lang-switch {
  display: flex;
  gap: 8px;
}

.pd-lang-btn,
.wr-lang-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(216, 184, 79, 0.36);
  background: rgba(18, 34, 22, 0.78);
  color: #fff1b8;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.pd-lang-btn:hover,
.wr-lang-btn:hover {
  opacity: 0.85;
}

.pd-lang-btn.active,
.pd-lang-btn.is-active,
.wr-lang-btn.active,
.wr-lang-btn.is-active {
  background: rgba(16, 96, 58, 0.45);
  border-color: rgba(74, 255, 146, 0.62);
  color: #d8ffe4;
  box-shadow: 0 0 28px rgba(34, 255, 128, 0.10);
}

.pd-lang-btn.inactive,
.wr-lang-btn.inactive {
  background: rgba(25, 20, 20, 0.84);
  border-color: rgba(255, 107, 107, 0.42);
  color: #ffc2c2;
}

.wr-lang-dot {
  display: none;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  flex-shrink: 0;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.nav-icon--incident {
  color: #7CFF6B;
  mask-image: url('/assets/icons/incident.svg');
  -webkit-mask-image: url('/assets/icons/incident.svg');
}

.nav-icon--warroom {
  color: #FFD45A;
  mask-image: url('/assets/icons/warroom.svg');
  -webkit-mask-image: url('/assets/icons/warroom.svg');
}

.nav-icon--performance {
  color: #55F6E8;
  mask-image: url('/assets/icons/performance.svg');
  -webkit-mask-image: url('/assets/icons/performance.svg');
}

.nav-icon--brand {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 5px;
}

.wr-brand,
.wr-brand-plate,
.wr-brand-sub,
.wr-brand-tagline,
.wr-product-status {
  display: none;
}

@media (max-width: 900px) {
  .wr-topbar.pd-topbar {
    align-items: flex-start;
  }

  .pd-top-actions,
  .wr-top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
