:root{
  /* v2-aligned palette — WARROOM layer (amber/gold) */
  --bg:#040609;
  --bg-2:#070c14;
  --panel:#0a1218;
  --panel-2:#0f1825;
  --border:#2a3f5a;
  --text:#d9e6ff;
  --muted:#9fb0c9;
  --accent:#ffbe55;
  --accent-dim:rgba(255,190,85,.65);
  --layer-color:rgba(255,190,85,.9);
  --layer-glow:rgba(255,190,85,.55);
  --success:#43db7c;
  --warning:var(--woper-warning);
  --danger:var(--woper-danger);
  --shadow:var(--woper-shadow-soft);
  --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(circle at 18% 8%, #050a10 0%, #020304 50%, #000000 100%);
  color:var(--text);
  font-family:var(--woper-font-display);
  font-size:0.95rem;
  line-height:1.5;
}

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:var(--woper-warning);
  box-shadow:0 0 8px rgba(216,168,78,.45);
}

.wr-product-status.is-danger .wr-product-status-dot{
  background:var(--woper-danger);
  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:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* ── nav icons via CSS (span.nav-icon) ── */
.nav-icon--incident::before  { content:'⦿ '; }
.nav-icon--warroom::before   { content:'◈ '; }
.nav-icon--performance::before{ content:'▥ '; }
.nav-icon--cabina::before    { content:'⛨ '; }

.layer-link{
  padding:6px 10px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:0.87rem;
  border:1px solid #2a3f5a;
  color:#d7e3ff;
  background:rgba(12,19,33,.85);
  display:inline-flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
  transition:all 0.2s ease;
}

.layer-link:hover{
  text-decoration:none;
  border-color:rgba(83,217,255,.35);
  box-shadow:0 0 8px rgba(83,217,255,.15);
  color:#ffffff;
}

/* Layer-specific colors */
.layer-link[href*="INCIDENT_REPORT_ENGINE"]{
  border-color:rgba(255,61,87,.72);
  color:#ffd1d8;
  background:rgba(72,14,24,.9);
}
.layer-link[href*="INCIDENT_REPORT_ENGINE"]:hover{
  box-shadow:0 0 12px rgba(255,61,87,.45);
}

.layer-link.active,
.layer-link[href*="WARROOM"].active{
  border-color:rgba(255,190,85,.85);
  color:#ffe3b0;
  background:rgba(58,39,9,.9);
  box-shadow:0 0 20px rgba(255,190,85,.45);
}

.layer-link.layer-link-performance,
.layer-link[href*="PERFORMANCE"]{
  border-color:rgba(83,217,255,.75);
  color:#c6eeff;
  background:rgba(8,36,53,.9);
}
.layer-link.layer-link-performance:hover,
.layer-link[href*="PERFORMANCE"]:hover{
  box-shadow:0 0 12px rgba(83,217,255,.35);
}
.layer-link.layer-link-performance.active{
  box-shadow:0 0 20px rgba(83,217,255,.55);
}

.layer-link.layer-link-cabina,
.layer-link[href*="CABINA"]{
  border-color:rgba(67,219,124,.72);
  color:#c5ffd8;
  background:rgba(9,49,27,.9);
}
.layer-link.layer-link-cabina:hover,
.layer-link[href*="CABINA"]:hover{
  box-shadow:0 0 12px rgba(67,219,124,.35);
}

.wr-lang-switch{
  display:flex;
  gap:8px;
}

.wr-lang-switch{
  display:flex;
  border:1px solid #2a3a57;
  border-radius:10px;
  overflow:hidden;
}

.wr-lang-btn{
  padding:8px 11px;
  border:0;
  border-radius:0;
  font-size:0.82rem;
  font-weight:700;
  background:#0a1218;
  color:#b5c4df;
  cursor:pointer;
  transition:all 0.2s ease;
  letter-spacing:0.04em;
}

.wr-lang-btn:hover{
  background:rgba(15,28,45,.8);
  color:#d7e3ff;
}

.wr-lang-btn.active,
.wr-lang-btn.is-active{
  background:#1f3a52;
  color:#ffffff;
}

.wr-lang-btn.inactive{
  background:#0a1218;
  color:#b5c4df;
}

/* hide old dot — no longer needed */
.wr-lang-dot{ display:none; }

.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-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 #2a3f5a;
  border-radius:6px;
  background:rgba(7,12,24,.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:var(--woper-warning);
  box-shadow:0 0 7px rgba(216,168,78,.5);
}
.wr-product-chip.is-danger .wr-product-chip-dot{
  background:var(--woper-danger);
  box-shadow:0 0 7px rgba(239,68,68,.5);
}

.wr-performance-bridge{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

.wr-performance-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:12px;
  background:linear-gradient(135deg,#9a6208,#d9961d,#f5bd2f);
  color:#fff;
  font-weight:700;
  border:1px solid rgba(255,210,90,.85);
  box-shadow:0 0 12px rgba(255,200,70,.35);
  cursor:pointer;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
  font-size:.85rem;
  line-height:1.2;
}

.wr-performance-link:hover{
  transform:translateY(-1px);
  box-shadow:0 0 16px rgba(255,200,70,.48);
  filter:saturate(1.05);
  text-decoration:none;
}

.wr-performance-link:focus-visible{
  outline:2px solid rgba(255,224,130,.95);
  outline-offset:2px;
}

/* =========================================================
   HOMOLOGACION WARROOM <> PERFORMANCE
========================================================= */

.operational-module-card {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.96), rgba(4, 9, 18, 0.99));
  border: 1px solid rgba(255, 190, 85, 0.35);
  box-shadow: 0 0 22px rgba(255, 190, 85, 0.10), inset 0 0 16px rgba(255, 190, 85, 0.03), 0 16px 34px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease;
}

.operational-module-card:hover {
  border-color: rgba(255, 190, 85, 0.5);
}

.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 var(--woper-cyan); }
.wr-module-executive { border-left: 4px solid #7CFF6B; }
.wr-module-gate { border-left: 4px solid #FF7C37; }
.wr-module-routes { border-left: 4px solid var(--woper-cyan); }

.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(255, 190, 85, 0.55);
  background: rgba(58, 39, 9, 0.35);
  box-shadow: 0 0 12px rgba(255, 190, 85, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffbe55;
  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: #d9e6ff;
  font-size: 1.12rem;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.module-subtitle {
  margin: 3px 0 0;
  color: rgba(153, 176, 201, 0.80);
  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: #9fb0c9;
  font-weight: 700;
}

.tactical-value {
  color: #d9e6ff;
  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: #c6d9f7;
  border: 1px solid rgba(78, 168, 255, 0.38);
  background: rgba(10, 24, 46, 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(78, 168, 255, 0.18);
  border-radius: 14px;
  background: rgba(5, 12, 22, 0.54);
  transition: border-color 0.2s ease;
}

.timeline-item:hover {
  border-color: rgba(83, 217, 255, 0.3);
}

.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 #4a6280;
  border-radius:12px;
  padding:14px;
  background:linear-gradient(180deg,rgba(10,18,28,.94),rgba(6,12,22,.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 var(--woper-gold-soft);
  border-left:4px solid var(--woper-gold-soft);
  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:var(--woper-gold-soft);
}

.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:var(--woper-gold-soft);
  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:var(--woper-gold-soft);
  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: var(--woper-cyan);
    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(83, 217, 255, 0.5);
    box-shadow: 0 0 12px rgba(83, 217, 255, 0.2);
  }

  /* 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: #d9e6ff;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

/* layer-link canonical — see .layer-nav block earlier in this file */

.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: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(78, 168, 255, 0.5);
  background: rgba(10, 18, 28, 0.85);
  color: #d9e6ff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pd-link:hover,
.wr-back:hover {
  border-color: rgba(83, 217, 255, 0.6);
  text-decoration: none;
  box-shadow: 0 0 12px rgba(83, 217, 255, 0.2);
}

/* wr-lang-switch + wr-lang-btn canonical — see .wr-lang-btn block earlier in this file */

.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: var(--woper-cyan);
  mask-image: url('/assets/icons/performance.svg');
  -webkit-mask-image: url('/assets/icons/performance.svg');
}

.nav-icon--cabina {
  color: #00c16a;
  mask-image: url('/assets/icons/shield-check.svg');
  -webkit-mask-image: url('/assets/icons/shield-check.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;
  }
}

/* ── v1.3: Core module badges ───────────────────────────────────── */
.wr-core-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
  line-height: 1.4;
  border: 1px solid currentColor;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-core-badge--decision {
  color: #e4c57d;
  background: rgba(228, 197, 125, 0.12);
  border-color: rgba(228, 197, 125, 0.45);
}

.wr-core-badge--simulation {
  color: #4fd1c5;
  background: rgba(79, 209, 197, 0.10);
  border-color: rgba(79, 209, 197, 0.40);
}

.wr-core-badge--executive {
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.10);
  border-color: rgba(46, 204, 113, 0.40);
}

.wr-core-badge--gate {
  color: #d46fac;
  background: rgba(180, 142, 173, 0.12);
  border-color: rgba(180, 142, 173, 0.45);
}

@media (max-width: 600px) {
  .wr-module-grid {
    grid-template-columns: 1fr;
  }
  .wr-core-badge {
    font-size: 0.63rem;
  }
}
