:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172033;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e3e7ee;
  --line-strong: #d0d5dd;
  --nav: #111827;
  --nav-soft: #1f2937;
  --primary: #4f46e5;
  --primary-soft: #eef2ff;
  --cyan: #0891b2;
  --good: #16803c;
  --good-soft: #ecfdf3;
  --warn: #c26a0a;
  --bad: #c43232;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.045);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-sidebar {
  width: 168px;
  height: auto;
}

.brand-edition {
  display: none;
}

.brand-logo-login {
  width: clamp(220px, 25vw, 300px);
}

.brand-symbol {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(2, 6, 17, 0.28);
}

/* CENIT production decision cockpit redesign */
:root {
  --cenit-navy: #071a2d;
  --cenit-graphite: #1e293b;
  --cenit-muted: #64748b;
  --cenit-line: #e2e8f0;
  --cenit-cyan: #0ea5e9;
  --cenit-cyan-soft: #e0f2fe;
  --cenit-shadow: 0 24px 70px rgba(7, 26, 45, 0.10);
  --cenit-shadow-soft: 0 14px 34px rgba(7, 26, 45, 0.075);
}

body {
  background:
    radial-gradient(circle at 18% -6%, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 48%, #eef2f7 100%);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(7, 26, 45, 0.92));
  color: transparent;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #ffffff;
  border-right-color: transparent;
  border-radius: 999px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c8a24a;
  transform: translateY(-50%);
}

.login-card .brand-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}

.topbar {
  min-height: 248px;
  align-items: center;
  margin-bottom: 16px;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 8%, rgba(14, 165, 233, 0.28), transparent 28%),
    linear-gradient(135deg, #071a2d 0%, #0f172a 54%, #172554 100%);
  box-shadow: var(--cenit-shadow);
}

.topbar h1 {
  max-width: 900px;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.topbar .page-subtitle {
  max-width: 760px;
  margin-top: 14px;
  color: #dbeafe;
  font-size: 16px;
  line-height: 1.55;
}

.hero-tagline {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  min-width: min(430px, 38vw);
}

.user-session,
.search input {
  border-radius: 16px;
}

.data-status {
  min-height: 50px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.96));
}

.creator-credit {
  color: #94a3b8;
  font-size: 10px;
}

.decision-cockpit {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.decision-intro,
.today-signals,
.cockpit-workbench {
  border: 1px solid var(--cenit-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--cenit-shadow-soft);
}

.decision-intro {
  padding: 22px 24px;
}

.decision-intro h2 {
  font-size: clamp(24px, 2.6vw, 38px);
  letter-spacing: -0.04em;
}

.decision-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--cenit-muted);
  font-size: 14px;
  line-height: 1.55;
}

.today-signals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.today-signals article {
  min-height: 132px;
  padding: 20px;
  border-right: 1px solid var(--cenit-line);
  background: radial-gradient(circle at 90% 12%, rgba(14, 165, 233, 0.10), transparent 28%), #ffffff;
}

.today-signals article:last-child {
  border-right: 0;
}

.today-signals span,
.cockpit-card-header span,
.cockpit-priority-row small,
.cockpit-priority-row em,
.cockpit-priority-row i,
.insight-badge,
.cockpit-insight-card dt,
.transformation-flow span {
  color: var(--cenit-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.today-signals strong {
  display: block;
  margin-top: 14px;
  color: var(--cenit-navy);
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.today-signals small {
  display: block;
  margin-top: 9px;
  color: var(--cenit-muted);
  font-size: 12px;
  line-height: 1.35;
}

.cockpit-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.cockpit-table-card,
.cockpit-insight-card,
.transformation-flow {
  border: 1px solid var(--cenit-line);
  border-radius: 20px;
  background: #ffffff;
}

.cockpit-table-card {
  overflow: hidden;
}

.cockpit-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 0 18px;
  border-bottom: 1px solid var(--cenit-line);
  background: #f8fafc;
}

.cockpit-card-header strong {
  display: block;
  margin-top: 3px;
  color: var(--cenit-navy);
  font-size: 17px;
}

.cockpit-card-header small {
  color: var(--cenit-muted);
  font-size: 12px;
  font-weight: 760;
}

.cockpit-table {
  display: grid;
}

.cockpit-priority-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 78px 126px;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--cenit-line);
  background: #ffffff;
  color: inherit;
  text-align: left;
}

.cockpit-priority-row:last-child {
  border-bottom: 0;
}

.cockpit-priority-row:hover,
.cockpit-priority-row.selected {
  background: #f0f9ff;
}

.cockpit-priority-row b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--cenit-navy);
  color: #ffffff;
  font-size: 16px;
}

.cockpit-priority-row strong {
  display: block;
  overflow: hidden;
  color: var(--cenit-graphite);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-priority-row small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-priority-row em,
.cockpit-priority-row i {
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}

.cockpit-priority-row em {
  color: var(--bad);
}

.cockpit-priority-row i {
  color: var(--cenit-cyan);
}

.cockpit-empty {
  padding: 28px;
  color: var(--cenit-muted);
  font-weight: 800;
}

.cockpit-insight-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border-color: rgba(14, 165, 233, 0.28);
}

.insight-badge {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--cenit-cyan-soft);
  color: #0369a1;
}

.cockpit-insight-card h3 {
  margin: 0;
  color: var(--cenit-navy);
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.cockpit-insight-card p {
  margin: 0;
  color: var(--cenit-graphite);
  line-height: 1.55;
}

.cockpit-insight-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.cockpit-insight-card dl div {
  padding-top: 11px;
  border-top: 1px solid var(--cenit-line);
}

.cockpit-insight-card dd {
  margin: 4px 0 0;
  color: var(--cenit-navy);
  font-weight: 850;
}

.transformation-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.transformation-flow article {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid var(--cenit-line);
  border-radius: 16px;
  background: #ffffff;
}

.transformation-flow article:nth-of-type(2) {
  border-color: rgba(14, 165, 233, 0.34);
  background: #f0f9ff;
}

.transformation-flow i {
  position: relative;
  height: 2px;
  background: var(--cenit-line);
}

.transformation-flow i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--cenit-line);
  border-right: 2px solid var(--cenit-line);
  transform: translateY(-50%) rotate(45deg);
}

.bi-toolbar {
  margin-top: 4px;
  border-radius: 20px;
}

.executive-strip,
.metrics {
  display: none;
}

.intelligence-radar {
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .topbar {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    min-width: 0;
  }

  .today-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cockpit-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar h1 {
    font-size: 34px;
  }

  .today-signals,
  .transformation-flow {
    grid-template-columns: 1fr;
  }

  .today-signals article {
    border-right: 0;
    border-bottom: 1px solid var(--cenit-line);
  }

  .today-signals article:last-child {
    border-bottom: 0;
  }

  .cockpit-priority-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .cockpit-priority-row em,
  .cockpit-priority-row i {
    display: none;
  }

  .transformation-flow i {
    width: 2px;
    height: 24px;
    justify-self: center;
  }

  .transformation-flow i::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%) rotate(135deg);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  outline: none;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 232px;
  height: 100vh;
  padding: 24px 14px 16px;
  background: var(--nav);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #67e8f9, #38bdf8);
  color: #082f49;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.brand span {
  margin-top: 2px;
  color: #9ca3af;
  font-size: 11px;
}

.edition-badge {
  display: inline-flex;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #67e8f9;
  color: #164e63;
  font-size: 8px;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin-top: 22px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: 140ms ease;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f9fafb;
}

.nav-list a.active {
  background: rgba(99, 102, 241, 0.16);
  color: #fff;
}

.icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 900;
}

.nav-list a.active .icon {
  background: #4f46e5;
  color: #fff;
}

.workspace {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.workspace span,
.workspace strong {
  display: block;
}

.workspace span {
  color: #9ca3af;
  font-size: 11px;
}

.workspace strong {
  font-size: 13px;
}

.workspace button {
  min-height: 34px;
  margin-top: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 700;
}

/* Main shell */
.main {
  min-width: 0;
  padding: 24px 28px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.page-subtitle {
  max-width: 640px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 8px;
}

.user-session {
  display: grid;
  gap: 1px;
  min-width: 190px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.user-session span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-session strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.user-session button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.session-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(7px);
}

.session-modal-backdrop[hidden] { display: none; }

.session-modal {
  width: min(900px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  padding: 24px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}

.session-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.session-modal h2 { margin: 4px 0 0; }

.session-modal > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  font-size: 24px;
  background: #eef2f7;
  cursor: pointer;
}

.session-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.session-metrics div {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.session-metrics span,
.session-metrics strong { display: block; }
.session-metrics span { color: #64748b; font-size: 12px; }
.session-metrics strong { margin-top: 4px; font-size: 24px; }

.active-session-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.active-session-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.active-session-list article div {
  display: grid;
  gap: 4px;
}

.active-session-list article span,
.active-session-list article small { color: #64748b; }

.active-session-list article button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: #fff7f7;
  cursor: pointer;
}

@media (max-width: 680px) {
  .session-metrics { grid-template-columns: 1fr; }
  .active-session-list article { align-items: flex-start; flex-direction: column; }
}

.creator-credit {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 193, 214, 0.2), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(99, 102, 241, 0.24), transparent 34%),
    #0e1525;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.2fr minmax(360px, 0.8fr);
  gap: 70px;
  align-items: center;
  width: min(1080px, calc(100% - 48px));
  min-height: 100vh;
  margin: auto;
}

.login-brand {
  color: #fff;
}

.login-brand h1 {
  max-width: 650px;
  margin: 16px 0;
  font-size: clamp(42px, 6vw, 72px);
}

.login-brand p {
  max-width: 600px;
  color: #cbd5e1;
  font-size: 17px;
}

.login-brand small,
.login-product {
  color: #67e8f9;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.login-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.login-card h2 {
  width: auto;
  padding: 0;
  background: none;
  color: var(--ink);
  font-size: 24px;
}

.login-card p {
  color: var(--muted);
}

.login-card form,
.login-card label {
  display: grid;
  gap: 8px;
}

.login-card input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.login-card form > button {
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.login-card form > button.secondary {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.login-status {
  min-height: 18px;
  margin-top: 12px;
  color: var(--good);
  font-size: 11px;
}

.login-status.error {
  color: var(--bad);
}

.login-methods {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.login-email-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.login-email-summary span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-email-summary strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.login-email-summary button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.login-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.login-method-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.login-method-tabs button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.search {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.search input {
  width: min(42vw, 520px);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

/* Data and filters */
.data-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 12px;
  padding: 0 13px;
  border: 1px solid #c7e7ee;
  border-radius: 8px;
  background: #f0fbfd;
  color: var(--muted);
  font-size: 12px;
}

.data-status > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-status strong {
  color: #155e75;
}

.freshness-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: #0e7490;
  font-size: 9px;
  font-weight: 800;
}

.loading-overlay {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 15% 18%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(99, 102, 241, 0.24), transparent 34%),
    linear-gradient(135deg, #08111f, #132547 52%, #eaf7fb);
  box-shadow: none;
}

.loading-overlay[hidden] {
  display: none;
}

.loading-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
  width: min(820px, 100%);
  padding: 24px;
  border: 1px solid rgba(219, 234, 254, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.34);
  filter: none;
}

.loading-orb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8, #22d3ee);
  box-shadow: 0 14px 32px rgba(29, 78, 216, 0.25);
}

.loading-orb::after {
  position: absolute;
  inset: 10px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  border-radius: 999px;
  content: "";
  animation: loading-spin 0.9s linear infinite;
}

.loading-kicker {
  color: #3152d4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loading-card h2 {
  margin: 2px 0 3px;
  color: var(--ink);
  font-size: 18px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.loading-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.loading-progress span {
  display: block;
  width: var(--loading-progress, 18%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3152d4, #22d3ee);
  transition: width 0.35s ease;
}

.loading-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loading-steps li {
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.loading-steps li.active,
.loading-steps li.done {
  border-color: rgba(49, 82, 212, 0.32);
  background: #eff6ff;
  color: #1d4ed8;
}

.loading-steps li.done::before {
  content: "✓ ";
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

body[data-loading="true"] {
  overflow: hidden;
}

body[data-loading="true"] .app-shell {
  max-height: 100vh;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.bi-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(180px, 1.05fr) repeat(6, minmax(92px, 0.68fr)) auto;
  gap: 9px;
  align-items: end;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.bi-toolbar-title {
  display: grid;
  gap: 3px;
  align-self: center;
  padding-left: 2px;
}

.bi-toolbar-title span,
.bi-toolbar label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bi-toolbar-title strong {
  font-size: 13px;
}

.bi-toolbar label {
  display: grid;
  gap: 4px;
}

.bi-toolbar select,
.bi-toolbar button {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
}

.bi-toolbar button {
  padding: 0 13px;
  border-color: var(--nav);
  background: var(--nav);
  color: #fff;
  font-weight: 750;
  white-space: nowrap;
}

.filter-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  margin-bottom: 10px;
}

.filter-chips,
.view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #4338ca;
  font-size: 10px;
  font-weight: 750;
}

.filter-chip b {
  margin-left: 5px;
  font-size: 12px;
  line-height: 1;
}

button.filter-chip:hover {
  border-color: #818cf8;
  background: #e0e7ff;
}

.filter-chip.neutral {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

.view-actions span {
  color: var(--muted);
  font-size: 10px;
}

.view-actions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
}

/* Executive summary */
.executive-strip {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.1fr 0.8fr;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.executive-strip article {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 92px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.executive-strip article:first-child {
  border-left: 0;
}

.executive-strip span,
.metrics span,
.report-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.executive-strip strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.executive-strip small,
.metrics small,
.report-metrics small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metrics article {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(28px, auto) auto;
  gap: 6px;
  min-width: 0;
  min-height: 132px;
  padding: 15px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metrics article::before {
  position: absolute;
  top: -1px;
  right: 14px;
  left: 14px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: #818cf8;
  content: "";
}

.metrics strong {
  font-size: 29px;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1;
}

.metrics em {
  align-self: end;
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--good-soft);
  color: var(--good);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.comparison-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--nav);
  color: #fff;
}

.comparison-strip > * {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 12px 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-strip > *:first-child {
  border-left: 0;
}

.comparison-strip span {
  color: #9ca3af;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comparison-strip strong {
  font-size: 16px;
}

.comparison-strip small {
  color: #cbd5e1;
  font-size: 9px;
}

.comparison-strip small.positive {
  color: #86efac;
}

.comparison-strip small.negative {
  color: #fca5a5;
}

.comparison-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.comparison-controls label {
  display: grid;
  gap: 6px;
}

.comparison-controls select {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-weight: 800;
}

.intelligence-radar {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #f5f7ff);
  box-shadow: var(--shadow);
}

.active-pipeline {
  margin-bottom: 14px;
}

.pipeline-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pipeline-summary span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}

.pipeline-summary b {
  color: var(--ink);
}

.pipeline-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 2px 0 8px;
}

.pipeline-insight-card {
  min-width: 0;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.025);
}

.pipeline-insight-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-insight-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-insight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 6px;
}

.pipeline-insight-card {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 46px;
  padding: 7px 12px 8px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pipeline-insight-card strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.15;
}

.pipeline-insight-card i {
  display: block;
  height: 3px;
  margin-top: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #22c1d6);
  transition: width 180ms ease, filter 180ms ease;
}

.pipeline-insight-card:hover,
.pipeline-insight-card.active {
  border-color: rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  transform: translateY(-1px);
}

.pipeline-insight-card.active::after {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c1d6;
  box-shadow: 0 0 0 4px rgba(34, 193, 214, 0.16);
  content: "";
  transform: translateY(-50%);
}

.pipeline-clear-segment {
  align-self: start;
  padding: 7px 10px;
  border: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.table.active-pipeline-table {
  max-height: min(640px, 58vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #a5b4fc #eef2ff;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.active-pipeline-table .row.head {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.05);
}

.active-pipeline-table::-webkit-scrollbar {
  width: 9px;
}

.active-pipeline-table::-webkit-scrollbar-track {
  background: #eef2ff;
}

.active-pipeline-table::-webkit-scrollbar-thumb {
  border: 2px solid #eef2ff;
  border-radius: 999px;
  background: #a5b4fc;
}

.pipeline-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 9px;
}

.pipeline-scroll-hint a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.opportunity-management {
  margin-bottom: 14px;
}

.opportunity-management.operational-panel {
  height: auto;
  min-height: 640px;
}

.management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.management-actions button {
  padding: 8px 12px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.management-actions button:hover,
.management-actions button.active {
  border-color: rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--primary);
  transform: translateY(-1px);
}

.opportunity-stage-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

.management-board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 2px 12px;
}

.management-board-heading h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.management-board-heading small {
  color: var(--muted);
  font-size: 10px;
}

.monitored-opportunities {
  display: grid;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.8), rgba(248, 250, 252, 0.96));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.monitored-opportunity-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.monitored-opportunity-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 13px;
  border: 1px solid rgba(208, 213, 221, 0.84);
  border-left: 4px solid #f59e0b;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.monitored-card-actions,
.opportunity-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.monitored-card-actions button,
.opportunity-row-actions button {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #eef2ff);
  color: var(--primary);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.monitored-card-actions button:hover,
.opportunity-row-actions button:hover {
  border-color: rgba(34, 193, 214, 0.45);
  background: linear-gradient(135deg, #ecfeff, #eef2ff);
  transform: translateY(-1px);
}

.monitored-card-actions button.danger,
.opportunity-row-actions button.danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fff5f5;
  color: #b42318;
}

.monitored-card-actions button[data-action-state="loading"],
.opportunity-row-actions button[data-action-state="loading"] {
  border-color: rgba(14, 165, 233, 0.34);
  background: #e0f2fe;
  color: #0369a1;
  cursor: wait;
}

.monitored-card-actions button[data-action-state="success"],
.opportunity-row-actions button[data-action-state="success"] {
  border-color: rgba(22, 128, 60, 0.28);
  background: #ecfdf3;
  color: #16803c;
}

.monitored-card-actions button[data-action-state="error"],
.opportunity-row-actions button[data-action-state="error"] {
  border-color: rgba(196, 50, 50, 0.28);
  background: #fff0f0;
  color: #b42318;
}

.monitored-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.monitored-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.pipeline-stage-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.pipeline-stage-column[data-pipeline-stage="Descartada"] {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.pipeline-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-stage-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-stage-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 10px;
}

.pipeline-stage-cards {
  display: grid;
  gap: 10px;
}

.pipeline-stage-card {
  display: grid;
  gap: 7px;
  min-height: 190px;
  padding: 12px;
  border: 1px solid rgba(208, 213, 221, 0.8);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.pipeline-stage-column[data-pipeline-stage="Descartada"] .pipeline-stage-card {
  opacity: 0.76;
}

.pipeline-stage-main {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.pipeline-stage-main span,
.pipeline-stage-card small,
.pipeline-stage-card i,
.pipeline-stage-card em {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
}

.pipeline-stage-main strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.pipeline-stage-card b {
  color: var(--primary);
  font-size: 10px;
}

.stage-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-card-actions button {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--primary);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.stage-card-actions button:hover {
  border-color: rgba(34, 193, 214, 0.45);
  background: #ecfeff;
  transform: translateY(-1px);
}

.pipeline-stage-card select {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.followup-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 12px;
  background: #f8fafc;
}

.followup-checklist legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.followup-checklist label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
}

.followup-checklist input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.management-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.management-detail-actions[hidden] {
  display: none;
}

.management-detail-actions button,
.management-detail-actions label {
  min-height: 38px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 850;
}

.management-detail-actions button {
  border: 1px solid rgba(79, 70, 229, 0.24);
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--primary);
  cursor: pointer;
}

.management-detail-actions label {
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.management-detail-actions select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

@media (max-width: 1180px) {
  .opportunity-stage-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .opportunity-stage-board,
  .monitored-opportunity-list,
  .management-detail-actions {
    grid-template-columns: 1fr;
  }

  .management-board-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.pipeline-stage-empty {
  padding: 14px;
  border: 1px dashed #d0d5dd;
  border-radius: 14px;
  color: var(--muted);
  font-size: 10px;
}

.active-pipeline-table .row {
  grid-template-columns: minmax(190px, 1.36fr) minmax(150px, 0.95fr) 0.56fr 0.62fr 0.58fr 0.66fr 0.66fr 0.32fr minmax(210px, 0.92fr);
}

.active-pipeline-table .row[data-active-index] {
  width: 100%;
  cursor: pointer;
}

.active-pipeline-table .row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-pipeline-table .row > span:nth-child(2),
.active-pipeline-table .row > span:nth-child(3),
.portfolio-table .row > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.active-pipeline-table .row > span:nth-child(2) small,
.active-pipeline-table .row > span:nth-child(3) small,
.portfolio-table .row > span:nth-child(2) small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-tag,
.deadline-tag,
.kam-tag,
.tranche-tag {
  display: inline-flex;
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.deadline-tag {
  background: #eef2ff;
  color: #4f46e5;
}

.deadline-tag.urgent {
  background: #fff0f0;
  color: var(--bad);
}

.deadline-tag.watch {
  background: #fff7e8;
  color: var(--warn);
}

.deadline-tag.overdue {
  background: #f1f5f9;
  color: #64748b;
}

.deadline-tag.neutral {
  background: var(--surface-soft);
  color: var(--muted);
}

.stage-tag.published {
  background: var(--good-soft);
  color: var(--good);
}

.stage-tag.closed {
  background: #fff7e8;
  color: var(--warn);
}

.kam-tag {
  background: #fff0f0;
  color: var(--bad);
}

.tranche-tag {
  background: var(--primary-soft);
  color: #4338ca;
}

.radar-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.radar-heading > span {
  color: var(--muted);
  font-size: 10px;
}

.radar-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.radar-cards button {
  display: grid;
  gap: 5px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.radar-cards button:hover,
.radar-cards button.active {
  border-color: #818cf8;
  background: #eef2ff;
}

.radar-cards span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.radar-cards strong {
  font-size: 25px;
}

.radar-cards small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.radar-watchlist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.radar-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.radar-item strong,
.radar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-item strong {
  font-size: 10px;
}

.radar-item span,
.radar-item small {
  color: var(--muted);
  font-size: 9px;
}

/* Dashboard grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.market-movements-module {
  padding: 14px;
  border: 1px solid rgba(208, 213, 221, 0.88);
  border-radius: 22px;
  background:
    radial-gradient(circle at 96% 0%, rgba(34, 193, 214, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.explorer-command-panel,
.explorer-signals,
.explorer-comparison {
  grid-column: 1 / -1;
}

.panel.explorer-command-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 22px 24px;
  border-color: rgba(56, 213, 255, 0.18);
  background:
    radial-gradient(circle at 94% -20%, rgba(99, 102, 241, 0.32), transparent 34%),
    radial-gradient(circle at 4% 110%, rgba(34, 211, 238, 0.18), transparent 30%),
    linear-gradient(135deg, #07101f 0%, #0c1a2d 52%, #151938 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.explorer-command-panel::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -30px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(56, 213, 255, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.explorer-command-panel > * {
  position: relative;
  z-index: 1;
}

.explorer-command-panel .eyebrow {
  margin: 0 0 6px;
  color: #38d5ff;
}

.explorer-command-panel h2 {
  max-width: 760px;
  margin: 2px 0 0;
  color: #f8fafc;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.explorer-command-panel .panel-context {
  display: block;
  max-width: 760px;
  margin-top: 8px;
  color: #aab6c8;
  line-height: 1.5;
}

.explorer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(520px, 100%);
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(3, 6, 17, 0.24);
}

.explorer-nav button {
  appearance: none;
  padding: 8px 11px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #dbeafe;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
  transition: 140ms ease;
  cursor: pointer;
}

.explorer-nav button:hover,
.explorer-nav button:focus-visible {
  border-color: rgba(56, 213, 255, 0.42);
  background: rgba(56, 213, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.market-filter-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.market-filter-state span {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.market-filter-state b {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-filter-state small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-filter-state button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #4338ca;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.market-movements-module [role="button"],
.market-movements-module [data-cross-status],
.market-movements-module [data-cross-category],
.market-movements-module [data-cross-buyer],
.market-movements-module [data-cross-provider] {
  cursor: pointer;
}

.market-movements-module [role="button"]:focus-visible,
.market-movements-module [data-cross-status]:focus-visible,
.market-movements-module [data-cross-category]:focus-visible,
.market-movements-module [data-cross-buyer]:focus-visible,
.market-movements-module [data-cross-provider]:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.34);
  outline-offset: 2px;
}

.market-movements-module .executive-strip article.active,
.market-movements-module .metrics article.active,
.market-movements-module .today-signals article.active,
.market-movements-module .legend-item.active,
.market-movements-module .category-bar.active,
.market-movements-module .buyer-map button.active,
.market-movements-module .competitor-filter-row.active {
  border-color: rgba(14, 165, 233, 0.72) !important;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(238, 242, 255, 0.96)) !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.12), 0 14px 34px rgba(15, 23, 42, 0.09) !important;
  transform: translateY(-1px);
}

.market-movements-module .today-signals article.active span,
.market-movements-module .today-signals article.active strong,
.market-movements-module .today-signals article.active small {
  color: #0f172a !important;
}

@media (max-width: 900px) {
  .explorer-command-panel {
    grid-template-columns: 1fr;
  }

  .explorer-nav {
    justify-content: flex-start;
    min-width: 0;
  }

  .market-filter-state span {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.explorer-signals {
  margin: 0;
}

.explorer-comparison {
  margin-bottom: 0;
}

.panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.content-grid > .panel {
  grid-column: span 4;
}

.content-grid > .panel.wide {
  grid-column: span 8;
}

.content-grid > .portfolio-mix-panel {
  grid-column: span 6;
}

.content-grid > #historicos {
  grid-column: span 6;
}

.analytics-twin {
  display: flex;
  flex-direction: column;
  height: 460px;
}

.analytics-twin > .panel-header {
  min-height: 58px;
}

.portfolio-mix-panel .mix-layout {
  flex: 1;
  align-content: center;
}

#historicos .pro-chart {
  flex: 1;
  min-height: 0;
}

.operational-panel {
  display: flex;
  flex-direction: column;
  height: 640px;
}

.operational-panel > .table {
  min-height: 0;
}

.active-pipeline.operational-panel .active-pipeline-table {
  flex: 1;
  max-height: none;
}

.renewal-report.operational-panel .renewal-table {
  flex: 1;
  max-height: none;
}

.renewal-report.operational-panel .renewal-timeline {
  flex: 0 0 190px;
  min-height: 190px;
}

.compact-analytics {
  height: 360px;
  overflow: hidden;
}

.compact-analytics > .panel-header {
  min-height: 74px;
}

#competidores #competitor-table {
  max-height: 252px;
  overflow-y: auto;
}

#competidores #competitor-table .row {
  grid-template-columns: minmax(90px, 1.2fr) 0.8fr 0.75fr 0.9fr 0.7fr;
}

.content-grid > #scoring,
.content-grid > #compradores,
.content-grid > #competidores {
  grid-column: span 4;
}

.content-grid > .panel.report-panel {
  grid-column: 1 / -1;
}

.content-grid > #exportables {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header.compact {
  margin-bottom: 12px;
}

.panel-header select,
.panel-header button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.panel-context {
  max-width: 190px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.portfolio-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.portfolio-controls select {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
}

.history-context {
  display: block;
  max-width: none;
  margin-top: 5px;
  text-align: left;
}

/* Portfolio mix */
.mix-layout {
  display: grid;
  gap: 18px;
}

.donut-block {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) 0 100%);
}

.donut::before {
  grid-area: 1 / 1;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.donut > div {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
}

.donut strong {
  font-size: 24px;
  line-height: 1;
}

.donut span,
.donut-legend span {
  color: var(--muted);
  font-size: 10px;
}

.donut-legend,
.category-bars {
  display: grid;
  gap: 7px;
}

.legend-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

button.legend-item,
button.category-bar {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.legend-item:hover,
button.category-bar:hover {
  color: var(--primary);
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-item strong {
  font-size: 10px;
}

.category-bars {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.category-bar {
  display: grid;
  grid-template-columns: minmax(94px, 0.9fr) minmax(80px, 1.15fr) 44px;
  gap: 8px;
  align-items: center;
}

.category-bar > span:first-child {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22c1d6);
}

.category-bar strong {
  font-size: 10px;
  text-align: right;
}

/* Tables */
.table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.85fr 0.75fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  text-align: left;
}

.row:first-child {
  border-top: 0;
}

.row.head {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.row:not(.head):hover {
  background: #fafbff;
}

.competitor-filter-row {
  width: 100%;
  cursor: pointer;
}

.portfolio-table {
  max-height: 348px;
  overflow-y: auto;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.portfolio-table .row {
  grid-template-columns: minmax(190px, 1.65fr) minmax(130px, 1.1fr) 0.58fr 0.45fr 0.72fr;
  width: 100%;
}

.portfolio-table button.row {
  cursor: pointer;
}

.portfolio-table .row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-table .row > span:first-child {
  display: grid;
  gap: 2px;
}

.portfolio-table .row > span:first-child strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-table small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-table .row > span:last-child {
  font-weight: 750;
  text-align: right;
}

.renewal-report {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.renewal-report .portfolio-controls button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.renewal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.renewal-summary span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}

.renewal-summary b {
  color: var(--ink);
}

.renewal-verification-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.renewal-verification-strip span {
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(241, 245, 249, 0.76));
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.renewal-verification-strip span.active {
  border-color: rgba(56, 213, 255, 0.32);
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.12), rgba(99, 102, 241, 0.10));
  color: var(--ink);
}

.renewal-verification-strip b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -0.03em;
}

.renewal-timeline {
  min-height: 190px;
  padding: 14px 14px 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    linear-gradient(to bottom, rgba(99, 102, 241, 0.04), transparent 58%),
    repeating-linear-gradient(to bottom, transparent 0 38px, rgba(148, 163, 184, 0.15) 39px);
}

.timeline-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 720px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
}

.timeline-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.timeline-legend small {
  margin-left: auto;
}

.timeline-bars {
  display: flex;
  align-items: stretch;
  gap: 7px;
  min-width: 720px;
  height: 135px;
}

.timeline-month {
  display: grid;
  grid-template-rows: 18px 1fr 20px;
  flex: 1 0 36px;
  align-items: end;
  min-width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.timeline-month > span {
  align-self: end;
  width: min(26px, 72%);
  min-height: 8px;
  margin: 0 auto;
  border-radius: 5px 5px 2px 2px;
  transition: filter 160ms ease, transform 160ms ease;
}

.timeline-month:hover > span {
  filter: brightness(1.08);
  transform: scaleX(1.08);
}

.timeline-month.active > span {
  outline: 3px solid rgba(79, 70, 229, 0.24);
  outline-offset: 2px;
  filter: saturate(1.2) brightness(1.05);
}

.timeline-month.active small,
.timeline-month.active strong {
  color: var(--primary);
}

.timeline-month strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.timeline-month small {
  align-self: center;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.year-2026 {
  background: linear-gradient(180deg, #22c1d6, #0891b2);
}

.year-2027 {
  background: linear-gradient(180deg, #818cf8, #4f46e5);
}

.year-2028 {
  background: linear-gradient(180deg, #c084fc, #7e22ce);
}

.renewal-table {
  max-height: 430px;
  overflow-y: auto;
}

.renewal-table .row {
  grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 0.98fr) minmax(120px, 0.62fr) minmax(120px, 0.62fr) minmax(140px, 0.78fr) minmax(86px, 0.46fr) minmax(90px, 0.52fr) minmax(105px, 0.58fr) minmax(210px, 0.9fr);
}

.renewal-table .row[data-renewal-index] {
  width: 100%;
  cursor: pointer;
}

.renewal-filter-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.08), rgba(34, 193, 214, 0.08));
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.renewal-filter-note button {
  padding: 6px 10px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.followup-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.followup-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.followup-form .full { grid-column: 1 / -1; }

.followup-form input,
.followup-form select,
.followup-form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.followup-form textarea {
  min-height: 84px;
  resize: vertical;
}

.followup-form button {
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.followup-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.followup-history article {
  padding: 9px 10px;
  border-left: 3px solid #818cf8;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
}

.followup-history article strong,
.followup-history article small { display: block; }
.followup-history article small { margin-top: 4px; color: var(--muted); }

.purchase-order-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.purchase-order-list article {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.purchase-order-list small { color: var(--muted); }

body[data-user-role="viewer"] .followup-form {
  display: none;
}

.renewal-table .row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-table .row > span:first-child,
.renewal-table .row > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.renewal-table small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-table .row > span:nth-child(8) {
  font-weight: 750;
  text-align: right;
}

/* Renovaciones: más capacidad operativa y acciones siempre legibles. */
.renewal-report.operational-panel {
  height: 940px;
}

.renewal-report.operational-panel .renewal-timeline {
  flex-basis: 170px;
  min-height: 170px;
}

.renewal-report.operational-panel .renewal-table {
  overflow: auto;
  scrollbar-gutter: stable;
}

.renewal-table .row {
  min-width: 1480px;
  grid-template-columns:
    minmax(220px, 1.3fr)
    minmax(180px, 0.98fr)
    minmax(118px, 0.62fr)
    minmax(118px, 0.62fr)
    minmax(138px, 0.78fr)
    minmax(84px, 0.46fr)
    minmax(126px, 0.62fr)
    minmax(92px, 0.5fr)
    minmax(300px, 1.2fr);
}

.renewal-table .row.head {
  position: sticky;
  top: 0;
  z-index: 3;
}

.renewal-table .opportunity-row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: visible;
}

.renewal-table .opportunity-row-actions button {
  flex: 0 0 auto;
  min-height: 25px;
  padding: 4px 7px;
  font-size: 8px;
  line-height: 1;
}

.remaining-tag {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 9px;
  font-weight: 850;
}

.remaining-tag.renewal-urgent {
  background: #fef2f2;
  color: #b91c1c;
}

.remaining-tag.renewal-overdue {
  background: #fff7ed;
  color: #c2410c;
}

.remaining-tag.renewal-active {
  background: #eef2ff;
  color: #4338ca;
}

.remaining-tag.renewal-success {
  background: #ecfdf5;
  color: #047857;
}

.remaining-tag.renewal-warning {
  background: #eff6ff;
  color: #1d4ed8;
}

.relevance-tag {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--primary-soft);
  color: #4338ca;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-empty,
.empty-state {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

/* Charts and lists */
.chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 214px;
  padding: 16px 10px 25px;
  border-radius: 8px;
  background: repeating-linear-gradient(to top, transparent 0, transparent 41px, #edf0f4 42px), var(--surface-soft);
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pro-chart {
  display: block;
  height: auto;
  min-height: 310px;
  padding: 12px 12px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 193, 214, 0.08), transparent 28%),
    linear-gradient(180deg, #fff, #fbfcff);
}

.pro-chart .chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 4px;
}

.pro-chart .chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: static;
  width: auto;
  height: auto;
  background: none;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.pro-chart .chart-legend span::after {
  display: none;
}

.pro-chart .chart-legend i {
  display: block;
  position: static;
  width: 18px;
  height: 3px;
  opacity: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #22c1d6);
}

.pro-chart .chart-legend strong {
  font-size: 13px;
}

.chart-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 5px 4px 8px;
}

.chart-kpis > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: baseline;
  padding: 7px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: rgba(248, 250, 252, 0.86);
}

.chart-kpis span,
.chart-kpis small {
  color: var(--muted);
  font-size: 8px;
}

.chart-kpis strong {
  font-size: 11px;
}

.chart-kpis small {
  grid-column: 1 / -1;
}

.pro-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.pro-chart .grid-line {
  stroke: #e5e7eb;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.pro-chart .axis-label,
.pro-chart .x-label {
  fill: #7b8496;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 9px;
}

.pro-chart .value-label {
  fill: #343a55;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.pro-chart .area-fill {
  fill: url(#historyArea);
}

.pro-chart .series-line {
  fill: none;
  stroke: #5b5ff2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.pro-chart .data-point circle {
  fill: #fff;
  stroke: #5b5ff2;
  stroke-width: 3;
  transition: r 140ms ease, fill 140ms ease;
}

.pro-chart .data-point:hover circle {
  r: 7;
  fill: #eef2ff;
}

.chart span {
  position: relative;
  flex: 1;
  min-width: 18px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, #6366f1, #38bdf8);
}

.chart span::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 40%);
  content: "";
  pointer-events: none;
}

.chart i {
  position: absolute;
  top: -20px;
  left: 50%;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 120ms ease;
  white-space: nowrap;
}

.chart span:hover i {
  opacity: 1;
}

.chart b {
  position: absolute;
  bottom: -20px;
  left: 50%;
  color: var(--muted);
  font-size: 9px;
  transform: translateX(-50%);
}

.score-list,
.export-list,
.team-list {
  display: grid;
  gap: 8px;
}

.score-list div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.score-list strong {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
  font-size: 14px;
}

.score-list span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-map {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(99, 102, 241, 0.12), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(8, 145, 178, 0.14), transparent 32%),
    #f8fafc;
}

.buyer-map::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#e8ecf2 1px, transparent 1px), linear-gradient(90deg, #e8ecf2 1px, transparent 1px);
  background-size: 30px 30px;
  content: "";
}

.buyer-map button {
  position: absolute;
  z-index: 1;
  top: var(--y);
  left: var(--x);
  display: grid;
  gap: 1px;
  max-width: 178px;
  min-height: 42px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #3730a3;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  transform: translate(-50%, -50%);
}

.buyer-map button strong,
.buyer-map button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-map button small {
  color: var(--muted);
  font-size: 8px;
}

.buyer-map .map-empty {
  position: absolute;
  z-index: 1;
  inset: 20px;
  display: grid;
  place-content: center;
  gap: 5px;
  text-align: center;
}

.buyer-map .map-empty strong {
  font-size: 13px;
}

.buyer-map .map-empty span {
  max-width: 270px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.trend {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.trend.up {
  background: var(--good-soft);
  color: var(--good);
}

.trend.flat {
  background: #fff7e8;
  color: var(--warn);
}

.trend.down {
  background: #fff0f0;
  color: var(--bad);
}

/* Reporting */
.executive-brief {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7f8ff, #f0fbfd);
}

.brief-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.14);
}

.brief-heading > div {
  display: grid;
  gap: 3px;
}

.brief-heading span,
.brief-grid article > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.brief-heading strong {
  font-size: 14px;
}

.brief-confidence {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: #4338ca !important;
  box-shadow: 0 0 0 1px #c7d2fe;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.brief-grid article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 110px;
  padding: 13px 14px;
  border-left: 1px solid rgba(99, 102, 241, 0.14);
}

.brief-grid article:first-child {
  border-left: 0;
}

.brief-grid article strong {
  font-size: 13px;
  line-height: 1.25;
}

.brief-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.brief-grid .brief-action {
  background: rgba(255, 255, 255, 0.55);
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.report-filters select {
  max-width: 230px;
}

.report-command {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--nav);
}

.report-command div {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 66px;
  padding: 12px 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.report-command div:first-child {
  border-left: 0;
}

.report-command span {
  color: #9ca3af;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-command strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-metrics {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.pdf-request-brief {
  display: none;
}

.pdf-generated-details {
  display: none;
}

.pdf-document-header,
.pdf-document-footer {
  display: none;
}

.report-metrics article {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.report-metrics article:first-child {
  border-color: #c7d2fe;
  background:
    radial-gradient(circle at 92% 12%, rgba(99, 102, 241, 0.16), transparent 26%),
    linear-gradient(180deg, #fff, #f6f8ff);
}

.report-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.report-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 12px;
}

.report-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fff, #f8fafc);
}

.report-table .row {
  grid-template-columns: minmax(160px, 1.35fr) 0.95fr 0.55fr 0.6fr 0.45fr;
  min-height: 42px;
}

.report-table .row > span:first-child {
  min-width: 0;
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-table .row:not(.head) > span:nth-child(2) {
  color: var(--ink);
  font-weight: 850;
}

.report-watchlist {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}

.watch-item {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #fff, #f8fafc);
}

.watch-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6366f1, #22c1d6);
  content: "";
}

.watch-item strong {
  color: var(--ink);
  font-size: 12px;
}

.watch-item span,
.watch-item small {
  color: var(--muted);
  font-size: 9px;
}

.watch-item.muted {
  border-style: dashed;
}

.report-insights {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  gap: 12px;
  margin-top: 12px;
}

.report-insights > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fff, #f8fafc);
}

.mini-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-header strong {
  font-size: 11px;
}

.mini-header span {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 7px;
  min-height: 128px;
}

.mini-bar {
  display: grid;
  flex: 1;
  grid-template-rows: 86px auto auto;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.mini-bar > span {
  align-self: end;
  width: 62%;
  min-height: 8px;
  margin: 0 auto;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #6366f1, #38bdf8);
}

.mini-bar strong {
  font-size: 9px;
}

.mini-bar small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list,
.quality-grid {
  display: grid;
  gap: 6px;
}

.compact-list > div {
  display: grid;
  gap: 2px;
  padding: 0 0 7px 0;
  border-bottom: 1px solid var(--line);
}

.compact-list > div:last-child {
  border-bottom: 0;
}

.compact-list strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list span {
  color: var(--muted);
  font-size: 9px;
}

.quality-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quality-grid > div {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.quality-grid strong {
  font-size: 16px;
}

.quality-grid span,
.quality-grid small {
  color: var(--muted);
  font-size: 9px;
}

/* Secondary panels */
.export-context {
  margin: -3px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.export-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.export-list button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
}

.export-list button:hover {
  border-color: #a5b4fc;
  background: #f7f8ff;
}

.export-list button > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
}

.export-list button strong {
  font-size: 11px;
}

.export-list button small {
  color: var(--muted);
  font-size: 9px;
}

.export-status {
  min-height: 26px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.team-list div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.team-list div > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 9px;
  font-weight: 900;
}

.team-list strong {
  font-size: 11px;
}

.team-list small {
  color: var(--muted);
  font-size: 9px;
}

/* Detail drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(440px, 95vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(16, 24, 40, 0.18);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.detail-drawer.open {
  visibility: visible;
  transform: translateX(0);
}

.detail-drawer:not(.open) {
  visibility: hidden;
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.drawer-header span {
  color: var(--muted);
  font-size: 11px;
}

.drawer-header button {
  width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 21px;
}

.drawer-score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  align-items: center;
  margin: 18px 20px;
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, #111827, #312e81);
  color: #fff;
}

.drawer-score span,
.drawer-score small {
  color: #cbd5e1;
  font-size: 10px;
}

.drawer-score strong {
  grid-row: span 2;
  font-size: 38px;
}

.drawer-body {
  padding: 0 20px 26px;
}

.drawer-body > h2 {
  font-size: 22px;
}

.drawer-body > p {
  margin: 7px 0 18px;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.detail-grid div,
.drawer-section {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-grid dt,
.drawer-section > span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
}

.drawer-section {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.drawer-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drawer-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 9px;
  font-weight: 750;
}

.score-breakdown {
  display: grid;
  gap: 5px;
}

.score-factor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.score-factor:first-child {
  border-top: 0;
}

.score-factor span {
  color: var(--ink-soft);
  font-size: 10px;
}

.score-factor strong {
  font-size: 10px;
}

.score-factor strong.positive {
  color: var(--good);
}

.score-factor strong.negative {
  color: var(--bad);
}


.drawer-external {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--nav);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.drawer-external:hover {
  background: var(--primary);
}

/* Premium BI polish layer */
body {
  background:
    radial-gradient(circle at 16% 0%, rgba(99, 102, 241, 0.12), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(8, 145, 178, 0.11), transparent 34%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  width: 248px;
  background:
    radial-gradient(circle at 20% 0%, rgba(103, 232, 249, 0.12), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #111827 52%, #0f172a 100%);
  box-shadow: 10px 0 34px rgba(15, 23, 42, 0.16);
}

.brand {
  padding-bottom: 24px;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(103, 232, 249, 0.95), rgba(99, 102, 241, 0.92));
  color: #fff;
  box-shadow: 0 12px 28px rgba(34, 193, 214, 0.24);
}

.nav-list a {
  border: 1px solid transparent;
}

.nav-list a.active {
  border-color: rgba(129, 140, 248, 0.22);
  background:
    linear-gradient(90deg, rgba(79, 70, 229, 0.24), rgba(8, 145, 178, 0.08));
  box-shadow: inset 3px 0 0 #67e8f9;
}

.main {
  padding: 26px 30px 44px;
}

.topbar {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  min-height: 156px;
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 72% 6%, rgba(103, 232, 249, 0.24), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(99, 102, 241, 0.22), transparent 34%),
    linear-gradient(135deg, #0b1220 0%, #111827 52%, #172554 100%);
  color: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.topbar::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  content: "";
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar .eyebrow {
  color: #67e8f9;
}

.topbar h1 {
  color: #fff;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.045em;
}

.topbar .page-subtitle {
  color: #cbd5e1;
  font-size: 14px;
}

.top-actions {
  align-items: stretch;
}

.user-session,
.search input {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.user-session span,
.search {
  color: #cbd5e1;
}

.user-session button {
  color: #67e8f9;
}

.search input::placeholder {
  color: rgba(226, 232, 240, 0.68);
}

.data-status,
.bi-toolbar,
.executive-strip,
.metrics article,
.comparison-strip,
.intelligence-radar,
.panel {
  border-radius: 16px;
}

.data-status {
  min-height: 46px;
  padding: 0 16px;
  border-color: #c7d2fe;
  background:
    linear-gradient(90deg, rgba(238, 242, 255, 0.92), rgba(240, 253, 250, 0.92));
}

.creator-credit {
  margin: -4px 2px 14px;
}

.bi-toolbar {
  top: 12px;
  padding: 14px;
  border-color: rgba(208, 213, 221, 0.9);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
}

.bi-toolbar select,
.bi-toolbar button,
.panel-header select,
.panel-header button,
.portfolio-controls select {
  border-radius: 10px;
}

.filter-chip,
.view-actions button,
.freshness-badge,
.pipeline-summary span,
.renewal-summary span {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.executive-strip {
  border-color: #dbe3ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.executive-strip article {
  min-height: 104px;
}

.executive-strip article:first-child {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.76), rgba(255, 255, 255, 0));
}

.executive-strip strong {
  font-size: 18px;
}

.metrics {
  gap: 12px;
}

.metrics article {
  min-height: 142px;
  border-color: #dbe3ef;
  background:
    radial-gradient(circle at 92% 12%, rgba(99, 102, 241, 0.12), transparent 24%),
    linear-gradient(180deg, #fff, #fbfcff);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metrics article:hover,
.panel:hover,
.radar-cards button:hover {
  transform: translateY(-1px);
  border-color: #c7d2fe;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
}

.metrics article::after {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 900;
  content: "BI";
}

.metrics article:nth-child(1)::after { content: "L"; }
.metrics article:nth-child(2)::after { content: "S"; }
.metrics article:nth-child(3)::after { content: "C"; }
.metrics article:nth-child(4)::after { content: "R"; }

.comparison-strip {
  background:
    radial-gradient(circle at 95% 0%, rgba(103, 232, 249, 0.16), transparent 28%),
    linear-gradient(135deg, #0f172a, #111827 55%, #1e1b4b);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.12);
}

.intelligence-radar {
  padding: 18px;
  border-color: #dbe3ef;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 193, 214, 0.14), transparent 26%),
    linear-gradient(135deg, #ffffff, #f6f8ff);
}

.radar-cards {
  gap: 10px;
}

.radar-cards button {
  min-height: 112px;
  border-color: #dbe3ef;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #fff, #fbfcff);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.radar-cards button.active {
  border-color: #818cf8;
  background:
    radial-gradient(circle at 90% 10%, rgba(103, 232, 249, 0.2), transparent 28%),
    #eef2ff;
}

.radar-cards strong {
  font-size: 30px;
  letter-spacing: -0.035em;
}

.radar-watchlist {
  gap: 10px;
}

.radar-item {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.radar-item:hover {
  border-color: #a5b4fc;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.panel {
  border-color: #dbe3ef;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.055);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.operational-panel {
  height: 660px;
}

.operational-panel .panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}

.table {
  border-color: #dbe3ef;
  border-radius: 12px;
}

.row {
  transition: background 140ms ease, color 140ms ease;
}

button.row:hover,
.competitor-filter-row:hover {
  background: #f8fbff;
  color: var(--ink);
}

.row.head {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.active-pipeline-table .row.head {
  background: rgba(248, 250, 252, 0.98);
}

.active-pipeline-table::-webkit-scrollbar-thumb,
#competidores #competitor-table::-webkit-scrollbar-thumb,
.renewal-table::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #a5b4fc;
}

.deadline-tag,
.stage-tag,
.kam-tag,
.tranche-tag,
.trend {
  min-height: 22px;
  align-items: center;
  letter-spacing: 0.01em;
}

.kam-tag {
  background: #eef2ff;
  color: #4338ca;
}

.compact-analytics {
  border-radius: 16px;
}

.score-list div {
  border-radius: 12px;
  background:
    linear-gradient(180deg, #fff, #f8fafc);
}

.score-list strong {
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #4f46e5);
}

.buyer-map {
  border-radius: 14px;
  background:
    radial-gradient(circle at 22% 22%, rgba(99, 102, 241, 0.14), transparent 30%),
    radial-gradient(circle at 78% 72%, rgba(8, 145, 178, 0.14), transparent 34%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.buyer-map button {
  border-color: rgba(129, 140, 248, 0.42);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

.pro-chart {
  border-radius: 14px;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 193, 214, 0.1), transparent 28%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.detail-drawer {
  width: min(500px, 96vw);
  border-left-color: #dbe3ef;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.22);
}

.drawer-score {
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 4%, rgba(103, 232, 249, 0.22), transparent 28%),
    linear-gradient(135deg, #0b1220, #312e81);
}

.detail-grid div,
.drawer-section {
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

/* Responsive */
@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar {
    width: 78px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .brand > div:last-child,
  .nav-list a:not(.active)::after,
  .nav-list a {
    font-size: 0;
  }

  .nav-list a {
    justify-content: center;
    padding: 0;
  }

  .workspace {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .pipeline-insights {
    grid-template-columns: 1fr;
  }

  .pipeline-insight-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-insight-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .search input {
    width: 190px;
  }
}

@media (max-width: 900px) {
  .main {
    padding: 20px;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .bi-toolbar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bi-toolbar-title {
    grid-column: span 2;
  }

  .executive-strip,
  .metrics,
  .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-title {
    grid-column: 1 / -1;
  }

  .radar-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radar-watchlist {
    grid-template-columns: 1fr;
  }

  .executive-strip article:nth-child(3) {
    border-left: 0;
  }

  .executive-strip article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .content-grid > .panel,
  .content-grid > .panel.wide,
  .content-grid > .portfolio-mix-panel,
  .content-grid > .portfolio-panel {
    grid-column: span 6;
  }

  .market-movements-module {
    padding: 12px;
  }

  .explorer-command-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .explorer-nav {
    justify-content: flex-start;
    min-width: 0;
  }

  .content-grid > .panel.report-panel {
    grid-column: 1 / -1;
  }

  .content-grid > .portfolio-mix-panel {
    grid-column: 1 / -1;
  }

  .content-grid > #historicos,
  .content-grid > #competidores,
  .content-grid > #exportables {
    grid-column: 1 / -1;
  }

  .operational-panel,
  .analytics-twin,
  .compact-analytics {
    height: auto;
  }

  .operational-panel {
    min-height: 0;
  }

  .active-pipeline.operational-panel .active-pipeline-table,
  .renewal-report.operational-panel .renewal-table {
    max-height: 430px;
  }

  .analytics-twin {
    min-height: 420px;
  }

  .compact-analytics {
    min-height: 300px;
  }

  .portfolio-table .row {
    grid-template-columns: minmax(190px, 1.5fr) minmax(120px, 1fr) 0.55fr 0.65fr;
  }

  .portfolio-table .row > span:nth-child(4) {
    display: none;
  }

  .report-insights {
    grid-template-columns: 1fr;
  }

  .active-pipeline-table .row {
    grid-template-columns: minmax(190px, 1.5fr) minmax(150px, 1fr) 0.72fr 0.58fr 0.38fr;
  }

  .active-pipeline-table .row > span:nth-child(4),
  .active-pipeline-table .row > span:nth-child(7) {
    display: none;
  }

  .export-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .login-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(100% - 28px, 520px);
    padding: 40px 0;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    width: 100%;
    height: auto;
    padding: 9px 12px;
  }

  .brand {
    min-height: 38px;
    padding: 0 12px 0 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .pipeline-insight-summary,
  .pipeline-insight-grid {
    grid-template-columns: 1fr;
  }

  .nav-list {
    display: flex;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    padding-left: 8px;
  }

  .nav-list a {
    flex: 0 0 auto;
    width: 36px;
    min-height: 36px;
  }

  .main {
    padding: 16px 12px 30px;
  }

  h1 {
    font-size: 27px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .search {
    grid-column: 1 / -1;
  }

  .search input {
    width: 100%;
  }

  .data-status {
    display: grid;
    gap: 2px;
    padding: 9px 11px;
  }

  .data-status > div {
    display: grid;
    gap: 2px;
  }

  .freshness-badge {
    width: fit-content;
  }

  .bi-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bi-toolbar-title,
  .bi-toolbar button {
    grid-column: 1 / -1;
  }

  .filter-context {
    display: grid;
    gap: 7px;
    padding-top: 7px;
  }

  .executive-strip,
  .metrics,
  .report-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-strip {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-strip > * {
    min-height: 72px;
  }

  .radar-heading {
    display: grid;
  }

  .report-metrics strong {
    font-size: 18px;
  }

  .executive-strip article {
    min-height: 100px;
    border-top: 1px solid var(--line);
  }

  .executive-strip article:nth-child(odd) {
    border-left: 0;
  }

  .metrics article {
    min-height: 140px;
  }

  .content-grid {
    display: block;
  }

  .content-grid > .panel {
    margin-bottom: 12px;
  }

  .donut-block {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .donut {
    width: 130px;
    height: 130px;
  }

  .donut::before {
    width: 82px;
    height: 82px;
  }

  .portfolio-table {
    max-height: 420px;
  }

  .active-pipeline-table .row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .active-pipeline-table .row > span:nth-child(2),
  .active-pipeline-table .row > span:nth-child(4),
  .active-pipeline-table .row > span:nth-child(5),
  .active-pipeline-table .row > span:nth-child(6),
  .active-pipeline-table .row > span:nth-child(7) {
    display: none;
  }

  .portfolio-table .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .portfolio-table .row > span:nth-child(2),
  .portfolio-table .row > span:nth-child(3),
  .portfolio-table .row > span:nth-child(4) {
    display: none;
  }

  .row.head {
    display: none;
  }

  .report-command {
    grid-template-columns: 1fr;
  }

  .brief-heading {
    align-items: flex-start;
  }

  .brief-grid {
    grid-template-columns: 1fr;
  }

  .brief-grid article {
    min-height: auto;
    border-top: 1px solid rgba(99, 102, 241, 0.14);
    border-left: 0;
  }

  .report-command div {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .report-split {
    grid-template-columns: 1fr;
  }

  .report-table .row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .report-table .row > span:nth-child(2),
  .report-table .row > span:nth-child(3) {
    display: none;
  }

  .quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* BI Pro refinement layer · 2026-06-28 */
:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --ink: #162033;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #dbe3ee;
  --primary: #3152d4;
  --cyan: #0f9fbd;
  --nav: #08111f;
}

.data-status {
  min-height: 54px;
  padding: 0 18px;
  border-color: rgba(49, 82, 212, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.94)),
    radial-gradient(circle at 92% 50%, rgba(15, 159, 189, 0.16), transparent 26%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.data-status strong {
  color: #172554;
  font-weight: 850;
}

.data-status span {
  color: #475569;
}

.freshness-badge {
  padding: 7px 11px;
  border: 1px solid rgba(49, 82, 212, 0.18);
  background: #ffffff;
  color: #3152d4;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.panel {
  border-color: rgba(203, 213, 225, 0.92);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px rgba(15, 23, 42, 0.055);
}

.content-grid {
  gap: 14px;
}

.compact-analytics {
  height: 390px;
}

.score-list {
  gap: 10px;
  max-height: 286px;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.score-list::-webkit-scrollbar {
  width: 8px;
}

.score-list::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 999px;
}

.score-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3152d4, #0f9fbd);
  border-radius: 999px;
}

.score-list .score-card,
.score-list div {
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 74px;
  padding: 11px;
  border-color: #dbeafe;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.score-list .score-card strong,
.score-list div strong {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #172554, #3152d4);
  box-shadow: 0 10px 22px rgba(49, 82, 212, 0.18);
}

.score-list .score-card span {
  font-size: 12px;
}

.score-list .score-card small {
  font-size: 9.5px;
}

.buyer-map {
  display: grid;
  gap: 8px;
  max-height: 286px;
  min-height: auto;
  overflow-y: auto;
  padding: 10px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.buyer-map::-webkit-scrollbar {
  width: 8px;
}

.buyer-map::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 999px;
}

.buyer-map::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3152d4, #0f9fbd);
  border-radius: 999px;
}

.buyer-map::before {
  display: none;
}

.buyer-map button {
  position: static;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 48px;
  padding: 10px 12px;
  border-color: #dbeafe;
  border-radius: 14px;
  color: #172554;
  text-align: left;
  transform: none;
}

.buyer-map .buyer-rank {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  background: #eff6ff;
  color: #3152d4;
  font-size: 10px;
  font-weight: 850;
}

.buyer-map button strong {
  font-size: 11px;
}

.buyer-map button small {
  justify-self: end;
  max-width: 180px;
  color: #3152d4;
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.report-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.report-card {
  min-height: 360px;
  padding: 14px;
  border-radius: 16px;
}

.report-watchlist {
  max-height: none;
  padding-right: 4px;
}

.watch-item {
  min-height: 70px;
  border-radius: 14px;
}

.watch-item strong {
  font-size: 13px;
}

.watch-item span {
  color: #334155;
  font-size: 10px;
  font-weight: 700;
}

.watch-item small {
  font-size: 9px;
}

.report-insights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-insights > section {
  min-height: 260px;
  border-radius: 16px;
}

.mini-chart {
  min-height: 170px;
}

.mini-bar {
  grid-template-rows: 112px auto auto;
}

.mini-bar > span {
  width: 54%;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #3152d4, #0f9fbd);
}

.report-table .row {
  min-height: 48px;
}

.report-table .row.head,
.active-pipeline-table .row.head,
.renewal-table .row.head {
  background: #f8fafc;
  color: #475569;
  letter-spacing: 0.04em;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 9mm 10mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff;
    color: #111827;
    font-size: 8px;
  }

  /* El PDF es un documento ejecutivo, no una impresión de toda la aplicación. */
  .main > * {
    display: none !important;
  }

  .main > #movimientos {
    display: block !important;
  }

  #movimientos > * {
    display: none !important;
  }

  #movimientos > #reporteria {
    display: block !important;
  }

  .sidebar,
  .topbar,
  .top-actions,
  .data-status,
  .creator-credit,
  .bi-toolbar,
  .filter-context,
  .intelligence-radar,
  #pipeline,
  #renovaciones,
  .portfolio-mix-panel,
  .portfolio-panel,
  #historicos,
  #scoring,
  #compradores,
  #competidores,
  #exportables,
  #equipos {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .executive-strip,
  .metrics,
  .comparison-strip {
    display: none !important;
  }

  .content-grid {
    display: block;
  }

  .report-panel {
    break-inside: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-panel > .panel-header,
  .report-command,
  .report-split,
  .renewal-report,
  .report-insights {
    display: none !important;
  }

  .pdf-document-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 7px;
    padding: 0 2px 7px;
    border-bottom: 2px solid #111827;
  }

  .pdf-document-header > div {
    display: grid;
    gap: 2px;
  }

  .pdf-document-header > div:last-child {
    justify-items: end;
    color: #64748b;
  }

  .pdf-document-header span {
    color: #64748b;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.09em;
  }

  .pdf-document-header h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1;
  }

  .pdf-document-header strong {
    color: #111827;
    font-size: 8px;
  }

  .pdf-document-header small {
    font-size: 7px;
  }

  .pdf-request-brief {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #f8fafc;
  }

  .pdf-request-brief span {
    color: #64748b;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .pdf-request-brief h2 {
    font-size: 13px;
    line-height: 1.15;
  }

  .pdf-request-brief p,
  .pdf-request-brief small {
    margin: 0;
    color: #475569;
    font-size: 7px;
    line-height: 1.3;
  }

  .pdf-generated-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
  }

  .pdf-detail-block {
    break-inside: avoid;
    padding: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 5px;
  }

  .pdf-detail-block:has(tbody tr:nth-child(9)) {
    grid-column: 1 / -1;
    break-before: page;
    break-inside: auto;
  }

  .pdf-detail-block:has(tbody tr:nth-child(9)) tr {
    break-inside: avoid;
  }

  .pdf-detail-block:has(tbody tr:nth-child(9)) table {
    font-size: 5.4px;
    line-height: 1.12;
  }

  .pdf-detail-block:has(tbody tr:nth-child(9)) th,
  .pdf-detail-block:has(tbody tr:nth-child(9)) td {
    padding: 1px 1.5px;
  }

  .pdf-detail-block thead {
    display: table-header-group;
  }

  .pdf-detail-block h3 {
    margin: 0 0 4px;
    font-size: 9px;
  }

  .pdf-detail-block table {
    width: 100%;
    border-collapse: collapse;
    font-size: 6.5px;
  }

  .pdf-detail-block th,
  .pdf-detail-block td {
    padding: 2.5px 2px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
  }

  .pdf-detail-block th {
    color: #64748b;
    font-weight: 800;
  }

  .executive-brief {
    break-inside: avoid;
    margin: 0 0 6px;
  }

  .brief-heading {
    padding: 6px 8px;
  }

  .brief-grid article {
    min-height: 58px;
    padding: 7px 8px;
  }

  .brief-grid article strong {
    font-size: 10px;
  }

  .brief-grid article p {
    font-size: 7px;
  }

  .report-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
    break-inside: avoid;
  }

  .report-metrics article {
    min-height: 52px;
    padding: 6px 8px;
  }

  .report-metrics strong {
    font-size: 14px;
  }

  .report-metrics small {
    font-size: 7px;
  }

  .pdf-document-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 6.5px;
    break-inside: avoid;
  }
}

/* Movimientos del mercado · contrato de layout aislado */
@media screen {
  #movimientos {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  #movimientos > *,
  #movimientos article,
  #movimientos section,
  #movimientos div {
    min-width: 0;
  }

  #movimientos > .explorer-command-panel,
  #movimientos > .market-filter-state,
  #movimientos > .executive-strip,
  #movimientos > .metrics,
  #movimientos > .intelligence-radar,
  #movimientos > .explorer-signals,
  #movimientos > .explorer-comparison,
  #movimientos > #reporteria,
  #movimientos > #exportables {
    grid-column: 1 / -1;
    width: 100%;
  }

  #movimientos > .portfolio-mix-panel,
  #movimientos > #historicos {
    grid-column: span 6;
    width: 100%;
  }

  #movimientos > #scoring,
  #movimientos > #compradores,
  #movimientos > #competidores {
    grid-column: span 4;
    width: 100%;
  }

  #movimientos > .executive-strip,
  #movimientos > .metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #movimientos > .explorer-signals {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  #movimientos .panel-header h2,
  #movimientos .explorer-command-panel h2,
  #movimientos .panel-context,
  #movimientos strong,
  #movimientos small {
    overflow-wrap: normal;
    word-break: normal;
  }

  #movimientos #exec-value,
  #movimientos .comparison-strip strong {
    overflow: visible;
    font-size: clamp(13px, 1.05vw, 18px);
    line-height: 1.2;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  #movimientos .explorer-command-panel {
    grid-template-columns: minmax(360px, 1fr) minmax(520px, auto);
  }

  #movimientos .explorer-nav {
    width: auto;
    max-width: 100%;
  }
}

@media screen and (max-width: 1380px) {
  #movimientos > #scoring,
  #movimientos > #compradores {
    grid-column: span 6;
  }

  #movimientos > #competidores {
    grid-column: 1 / -1;
  }

  #movimientos .explorer-command-panel {
    grid-template-columns: 1fr;
  }

  #movimientos .explorer-nav {
    justify-content: flex-start;
  }
}

@media screen and (max-width: 1050px) {
  #movimientos > .portfolio-mix-panel,
  #movimientos > #historicos,
  #movimientos > #scoring,
  #movimientos > #compradores,
  #movimientos > #competidores {
    grid-column: 1 / -1;
  }

  #movimientos > .executive-strip,
  #movimientos > .metrics,
  #movimientos > .explorer-signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 680px) {
  #movimientos {
    padding: 9px;
  }

  #movimientos > .executive-strip,
  #movimientos > .metrics,
  #movimientos > .explorer-signals {
    grid-template-columns: 1fr;
  }

  #movimientos .explorer-nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* Final CENIT cockpit enforcement layer */
.brand-mark {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(7, 26, 45, 0.92)) !important;
  color: transparent !important;
  font-size: 0 !important;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #ffffff;
  border-right-color: transparent;
  border-radius: 999px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c8a24a;
  transform: translateY(-50%);
}

.topbar {
  min-height: 248px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 8%, rgba(14, 165, 233, 0.28), transparent 28%),
    linear-gradient(135deg, #071a2d 0%, #0f172a 54%, #172554 100%) !important;
}

.decision-cockpit {
  display: grid;
}

/* CENIT premium command-center layer · production demo */
:root {
  --cenit-night: #07111f;
  --cenit-graphite: #0f172a;
  --cenit-panel: rgba(8, 18, 34, 0.82);
  --cenit-panel-soft: rgba(15, 23, 42, 0.64);
  --cenit-line: rgba(148, 163, 184, 0.22);
  --cenit-cyan: #22d3ee;
  --cenit-blue: #6366f1;
  --cenit-violet: #8b5cf6;
  --cenit-gold: #d8b35a;
  --cenit-text: #f8fafc;
  --cenit-muted: #9fb0c7;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.14), transparent 30%),
    radial-gradient(circle at 82% 6%, rgba(139, 92, 246, 0.13), transparent 28%),
    linear-gradient(180deg, #eef5fb 0%, #e7eef8 42%, #f7fafc 100%) !important;
}

.main {
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.07), transparent 420px),
    transparent !important;
}

.nav-list a {
  min-height: 46px;
  border: 1px solid transparent;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav-list a:hover,
.nav-list a.active {
  transform: translateX(2px);
  border-color: rgba(34, 211, 238, 0.28);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.10)) !important;
}

.topbar {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.20);
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 18%, rgba(34, 211, 238, 0.20), transparent 20%),
    linear-gradient(90deg, rgba(7, 17, 31, 0.96), rgba(15, 23, 42, 0.92) 52%, rgba(30, 41, 89, 0.92));
}

.topbar::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(216, 179, 90, 0.20);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(216, 179, 90, 0.08), transparent 62%);
  pointer-events: none;
}

.topbar h1 {
  max-width: 980px;
  font-size: clamp(34px, 4.2vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  color: var(--cenit-text);
}

.topbar .page-subtitle {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(15px, 1.15vw, 19px);
}

.hero-tagline {
  display: inline-flex;
  margin-top: 18px;
  padding: 9px 13px;
  border: 1px solid rgba(216, 179, 90, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(216, 179, 90, 0.10);
}

.decision-cockpit {
  position: relative;
  gap: 22px;
  padding: 28px;
  margin: 20px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, 0.18), transparent 26%),
    radial-gradient(circle at 88% 2%, rgba(139, 92, 246, 0.17), transparent 26%),
    linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(15, 23, 42, 0.92) 58%, rgba(30, 41, 59, 0.88));
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.28);
}

.decision-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 22px;
  align-items: end;
}

.decision-intro .eyebrow,
.cockpit-card-header span,
.loading-kicker {
  color: var(--cenit-cyan) !important;
}

.decision-intro h2 {
  max-width: 850px;
  margin: 0;
  color: var(--cenit-text);
  font-size: clamp(28px, 3.2vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.decision-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--cenit-muted);
  font-size: 15px;
}

.command-report-link {
  grid-row: 1 / span 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 999px;
  color: var(--cenit-text);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(34, 211, 238, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 18px 40px rgba(14, 165, 233, 0.12);
}

.today-signals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.today-signals article,
.cockpit-table-card,
.cockpit-insight-card,
.transformation-flow {
  border: 1px solid var(--cenit-line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(8, 18, 34, 0.56));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 50px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(16px);
}

.today-signals article {
  min-height: 128px;
  padding: 18px;
  border-radius: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.today-signals article:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.42);
}

.today-signals.static-market-signals article,
.today-signals.static-market-signals article:hover {
  cursor: default;
  transform: none;
  border-color: var(--cenit-line);
}

.today-signals.static-market-signals article::after {
  content: none;
  display: none;
}

.today-signals span,
.today-signals small,
.cockpit-card-header small,
.cockpit-insight-card p,
.cockpit-insight-card dt,
.market-pulse-feed span {
  color: var(--cenit-muted) !important;
}

.today-signals strong {
  display: block;
  margin: 9px 0 5px;
  color: var(--cenit-text);
  font-size: clamp(26px, 2.4vw, 40px);
  letter-spacing: -0.05em;
}

.cockpit-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(360px, 0.82fr);
  gap: 16px;
}

.cockpit-table-card,
.cockpit-insight-card {
  border-radius: 26px;
  padding: 20px;
}

.cockpit-card-header {
  align-items: start;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.cockpit-card-header strong,
.cockpit-insight-card h3,
.cockpit-insight-card dd {
  color: var(--cenit-text) !important;
}

.cockpit-opportunity-grid {
  display: grid;
  gap: 14px;
}

.opportunity-radar-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032)),
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.10), transparent 30%);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.opportunity-radar-card:hover,
.opportunity-radar-card.selected {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.52);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(99, 102, 241, 0.10)),
    rgba(255, 255, 255, 0.035);
}

.opportunity-radar-card:focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.48);
  outline-offset: 3px;
}

.opportunity-score-ring {
  --score: 0;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #0f172a 0 56%, transparent 57%),
    conic-gradient(var(--cenit-cyan) calc(var(--score) * 1%), rgba(148, 163, 184, 0.20) 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 14px 30px rgba(34, 211, 238, 0.10);
}

.opportunity-score-ring strong {
  color: var(--cenit-text);
  font-size: 24px;
  letter-spacing: -0.06em;
}

.opportunity-score-ring span {
  margin-top: 25px;
  color: var(--cenit-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opportunity-radar-topline,
.opportunity-radar-meta,
.opportunity-subscore-grid,
.opportunity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opportunity-radar-topline {
  justify-content: space-between;
  color: var(--cenit-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.opportunity-radar-topline i {
  color: #fde68a;
  font-style: normal;
}

.opportunity-radar-body h3 {
  margin: 8px 0 5px;
  color: var(--cenit-text);
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.opportunity-radar-body p {
  margin: 0 0 10px;
  color: rgba(226, 232, 240, 0.72);
}

.opportunity-radar-meta span,
.opportunity-subscore-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.opportunity-subscore-grid b {
  color: var(--cenit-cyan);
}

.opportunity-reasons {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.opportunity-reasons li {
  position: relative;
  padding-left: 15px;
  color: var(--cenit-muted);
  font-size: 12px;
}

.opportunity-reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cenit-cyan);
}

.opportunity-actions button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(34, 211, 238, 0.30);
  border-radius: 999px;
  color: var(--cenit-text);
  background: rgba(34, 211, 238, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.opportunity-actions button:hover {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.16);
}

.market-pulse-feed {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 20px;
  background: rgba(7, 17, 31, 0.38);
}

.market-pulse-feed strong {
  color: var(--cenit-text);
}

.market-pulse-feed ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pulse-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pulse-metric-grid article {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.10), transparent 36%),
    rgba(15, 23, 42, 0.46);
}

.pulse-metric-grid b {
  display: block;
  color: var(--cenit-text);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pulse-metric-grid small {
  display: block;
  margin-top: 5px;
  color: var(--cenit-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.market-pulse-feed li {
  color: #dbeafe;
  font-size: 12px;
}

.market-pulse-feed li.risk {
  color: #fca5a5;
}

.transformation-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 22px;
}

.transformation-flow article {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 16px;
  color: var(--cenit-text);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.transformation-flow i {
  display: none;
}

.loading-overlay {
  background: linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(30, 41, 89, 0.72)) !important;
  backdrop-filter: blur(16px);
}

.loading-card {
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(248, 250, 252, 0.93);
  box-shadow: 0 40px 120px rgba(2, 6, 23, 0.36);
}

@media (max-width: 1280px) {
  .today-signals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cockpit-workbench {
    grid-template-columns: 1fr;
  }

  .command-report-link {
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: auto;
  }

  .decision-cockpit {
    padding: 18px;
    border-radius: 22px;
  }

  .decision-intro,
  .today-signals,
  .transformation-flow {
    grid-template-columns: 1fr;
  }

  .opportunity-radar-card {
    grid-template-columns: 1fr;
  }
}

/* Hero composition correction: keep the strategic message readable */
.topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: 28px;
  min-height: 168px !important;
  padding: clamp(18px, 2.4vw, 26px);
}

.topbar > div:first-child {
  min-width: 0;
  max-width: 980px;
}

.topbar h1 {
  max-width: 820px;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(28px, 3.05vw, 42px);
  line-height: 1.04;
}

.topbar .page-subtitle {
  max-width: 700px;
  margin-top: 10px;
  font-size: clamp(13px, 1vw, 15px);
}

.hero-tagline {
  margin-top: 12px;
  padding: 7px 11px;
  font-size: 11px;
}

.top-actions {
  width: 100%;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 14px;
  align-self: center;
  align-content: center;
}

.user-session,
.search input {
  width: 100%;
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(15, 23, 42, 0.58) !important;
  color: var(--cenit-text) !important;
}

.search {
  display: grid;
  gap: 8px;
  color: rgba(226, 232, 240, 0.78) !important;
}

.search input {
  min-height: 44px;
  border-radius: 12px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    max-width: 720px;
  }
}

@media (max-width: 680px) {
  .topbar h1 {
    font-size: clamp(32px, 11vw, 46px);
  }
}

/* Cockpit conflict fix: remove legacy white-card behavior from the command intro */
.decision-cockpit {
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, 0.18), transparent 26%),
    radial-gradient(circle at 88% 2%, rgba(139, 92, 246, 0.17), transparent 26%),
    linear-gradient(135deg, rgba(7, 17, 31, 0.96), rgba(15, 23, 42, 0.92) 58%, rgba(30, 41, 59, 0.88)) !important;
}

.decision-intro {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.decision-intro .eyebrow {
  width: auto !important;
  height: auto !important;
  overflow-wrap: normal !important;
}

.decision-intro h2 {
  max-width: 880px;
  color: var(--cenit-text) !important;
  font-size: clamp(26px, 2.8vw, 44px) !important;
}

.decision-intro p {
  max-width: 760px;
  color: var(--cenit-muted) !important;
}

.command-report-link {
  margin-top: 16px;
}

.today-signals,
.cockpit-workbench {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Remove light bars inside the premium command center */
.decision-cockpit .cockpit-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.decision-cockpit .cockpit-card-header div,
.decision-cockpit .cockpit-card-header span,
.decision-cockpit .cockpit-card-header strong,
.decision-cockpit .cockpit-card-header small {
  background: transparent !important;
}

.decision-cockpit .cockpit-card-header span {
  color: var(--cenit-cyan) !important;
}

.decision-cockpit .cockpit-card-header strong {
  color: var(--cenit-text) !important;
}

.decision-cockpit .cockpit-card-header small {
  color: var(--cenit-muted) !important;
}

.data-status {
  border-color: rgba(34, 211, 238, 0.20) !important;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.78), rgba(30, 41, 59, 0.58)),
    radial-gradient(circle at 92% 50%, rgba(34, 211, 238, 0.12), transparent 30%) !important;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.12) !important;
}

.data-status strong {
  color: var(--cenit-text) !important;
}

.data-status span {
  color: rgba(226, 232, 240, 0.76) !important;
}

.data-status .freshness-badge,
.freshness-badge {
  border-color: rgba(34, 211, 238, 0.28) !important;
  color: #dbeafe !important;
  background: rgba(15, 23, 42, 0.62) !important;
}

/* CENIT anticipation layer · login + live command language */
:root {
  --bg-void: #030712;
  --bg-main: #050A14;
  --bg-elevated: #0B1220;
  --bg-glass: rgba(255,255,255,0.055);
  --border-subtle: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text-primary: #F7FAFC;
  --text-secondary: #A8B3C7;
  --text-muted: #6F7B90;
  --signal-cyan: #37D5FF;
  --signal-violet: #8B5CF6;
  --signal-gold: #F5C451;
  --signal-green: #35E6A3;
  --signal-red: #FF5C7A;
}

.login-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(55, 213, 255, 0.18), transparent 30%),
    radial-gradient(circle at 83% 20%, rgba(139, 92, 246, 0.18), transparent 34%),
    linear-gradient(135deg, var(--bg-void), #07111f 52%, #101827) !important;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 7% 9% 6% 45%;
  opacity: 0.55;
  pointer-events: none;
  background:
    radial-gradient(circle at 42% 16%, rgba(55, 213, 255, 0.70) 0 3px, transparent 4px),
    radial-gradient(circle at 34% 31%, rgba(245, 196, 81, 0.70) 0 2px, transparent 3px),
    radial-gradient(circle at 52% 47%, rgba(53, 230, 163, 0.70) 0 3px, transparent 4px),
    radial-gradient(circle at 45% 66%, rgba(139, 92, 246, 0.75) 0 3px, transparent 4px),
    linear-gradient(112deg, transparent 0 28%, rgba(55, 213, 255, 0.28) 28.2% 28.8%, transparent 29% 43%, rgba(139, 92, 246, 0.24) 43.2% 43.8%, transparent 44% 62%, rgba(55, 213, 255, 0.20) 62.2% 62.8%, transparent 63%);
  clip-path: polygon(42% 0, 57% 9%, 50% 22%, 61% 37%, 52% 53%, 58% 72%, 45% 100%, 37% 72%, 42% 54%, 34% 36%, 41% 20%);
  filter: drop-shadow(0 0 34px rgba(55, 213, 255, 0.34));
  animation: cenit-map-drift 12s ease-in-out infinite alternate;
}

.login-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 64% 34%, black, transparent 72%);
}

.login-shell {
  position: relative;
  z-index: 1;
}

.login-brand h1 {
  max-width: 820px;
  color: var(--text-primary) !important;
  font-size: clamp(44px, 6vw, 86px) !important;
  line-height: 0.94 !important;
  letter-spacing: -0.07em !important;
}

.login-brand p {
  max-width: 700px;
  color: var(--text-secondary) !important;
  font-size: clamp(17px, 1.35vw, 22px) !important;
}

.login-brand small {
  display: block;
  max-width: 620px;
  margin-top: 18px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 850;
}

.login-signal-cloud {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  max-width: 920px;
  margin-top: 34px;
}

.login-signal-cloud article {
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025));
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 45px rgba(2, 6, 23, 0.18);
}

.login-signal-cloud strong {
  display: block;
  color: var(--text-primary);
  font-size: 24px;
  letter-spacing: -0.05em;
}

.login-signal-cloud span {
  display: block;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-card {
  border: 1px solid var(--border-strong) !important;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.88), rgba(5, 10, 20, 0.76)) !important;
  box-shadow: 0 35px 100px rgba(2, 6, 23, 0.38), inset 0 1px 0 rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(20px);
}

.login-card h2,
.login-card label {
  color: var(--text-primary) !important;
}

.login-card p,
.login-status,
.login-email-summary span {
  color: var(--text-secondary) !important;
}

.login-card input {
  border-color: var(--border-strong) !important;
  background: rgba(255,255,255,0.065) !important;
  color: var(--text-primary) !important;
}

.login-card form > button {
  background: linear-gradient(135deg, rgba(55, 213, 255, 0.92), rgba(139, 92, 246, 0.92)) !important;
  box-shadow: 0 18px 44px rgba(55, 213, 255, 0.18);
}

.command-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.command-report-link.secondary {
  border-color: rgba(245, 196, 81, 0.28);
  color: #fde68a;
  background: rgba(245, 196, 81, 0.08);
}

.data-status {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.data-status strong {
  font-size: 14px;
}

.data-status span {
  font-size: 12px;
}

@keyframes cenit-map-drift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.48; }
  to { transform: translate3d(10px, -12px, 0) scale(1.025); opacity: 0.68; }
}

@media (prefers-reduced-motion: reduce) {
  .login-page::before {
    animation: none;
  }
}

@media (max-width: 980px) {
  .login-signal-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-signal-cloud {
    grid-template-columns: 1fr;
  }

  .data-status {
    grid-template-columns: 1fr;
  }
}

/* CENIT Executive Intelligence OS · producción demo */
:root {
  --cenit-bg-void: #030611;
  --cenit-bg-main: #050A14;
  --cenit-bg-panel: #0A1120;
  --cenit-bg-elevated: #0E1729;
  --cenit-bg-glass: rgba(255,255,255,0.055);
  --cenit-border-soft: rgba(255,255,255,0.08);
  --cenit-border-medium: rgba(255,255,255,0.14);
  --cenit-text-main: #F8FAFC;
  --cenit-text-secondary: #AAB6C8;
  --cenit-text-muted: #6F7B8F;
  --cenit-cyan: #38D5FF;
  --cenit-violet: #8B5CF6;
  --cenit-gold: #F2C94C;
  --cenit-green: #35E6A3;
  --cenit-red: #FF5C7A;
  --cenit-radius-lg: 24px;
  --cenit-radius-md: 18px;
  --cenit-radius-sm: 12px;
}

.login-page,
.app-shell {
  font-family: Inter, Manrope, Satoshi, Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
  color: var(--cenit-text-main);
  background:
    radial-gradient(circle at 18% 22%, rgba(56, 213, 255, 0.13), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(139, 92, 246, 0.13), transparent 34%),
    radial-gradient(circle at 64% 78%, rgba(242, 201, 76, 0.055), transparent 28%),
    linear-gradient(135deg, var(--cenit-bg-void) 0%, var(--cenit-bg-main) 48%, #0A1020 100%) !important;
}

.login-page::before {
  opacity: 0.34 !important;
  filter: drop-shadow(0 0 18px rgba(56, 213, 255, 0.16)) !important;
}

.login-page::after {
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    radial-gradient(circle at 32% 28%, rgba(56, 213, 255, 0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 46% 42%, rgba(139, 92, 246, 0.15) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 34%, rgba(53, 230, 163, 0.12) 0 1px, transparent 3px);
  background-size: 82px 82px, 82px 82px, 100% 100%, 100% 100%, 100% 100%;
  mask-image: radial-gradient(circle at 48% 34%, black, transparent 72%);
}

.login-brand h1 {
  font-size: clamp(42px, 5vw, 72px) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.055em !important;
  font-weight: 650 !important;
}

.login-brand p {
  font-size: clamp(18px, 2vw, 22px) !important;
  line-height: 1.5 !important;
  color: var(--cenit-text-secondary) !important;
}

.login-brand small {
  color: rgba(248, 250, 252, 0.86) !important;
  letter-spacing: -0.01em;
}

.login-signal-cloud article {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 11px;
  row-gap: 3px;
  align-items: center;
  min-height: 112px;
  padding: 16px 16px 15px;
  overflow: hidden;
  border: 1px solid var(--cenit-border-soft) !important;
  border-radius: var(--cenit-radius-md) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
    rgba(10, 17, 32, 0.52) !important;
  box-shadow:
    0 22px 60px rgba(2, 6, 17, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.login-signal-cloud article::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.5), transparent);
  opacity: 0.55;
}

.login-signal-cloud i {
  grid-row: 1 / span 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--cenit-cyan);
  font-style: normal;
  font-weight: 850;
  background: rgba(56, 213, 255, 0.095);
  border: 1px solid rgba(56, 213, 255, 0.16);
}

.login-signal-cloud strong {
  color: var(--cenit-text-main) !important;
  font-size: clamp(27px, 2.25vw, 38px) !important;
  font-weight: 760;
  line-height: 0.95;
}

.login-signal-cloud span {
  margin: 0 !important;
  color: var(--cenit-text-main) !important;
  font-size: 11px !important;
  letter-spacing: 0.12em !important;
}

.login-signal-cloud small {
  display: block;
  margin: 0;
  color: var(--cenit-text-muted) !important;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.login-card {
  border-color: var(--cenit-border-medium) !important;
  border-radius: var(--cenit-radius-lg) !important;
  background:
    linear-gradient(180deg, rgba(14, 23, 41, 0.88), rgba(5, 10, 20, 0.78)),
    var(--cenit-bg-glass) !important;
}

.login-card .eyebrow,
.decision-intro .eyebrow,
.cockpit-card-header span,
.today-signals span,
.market-radar-reading dt {
  color: var(--cenit-cyan) !important;
}

.login-card h2 {
  letter-spacing: -0.045em;
}

.login-card form > button,
.command-report-link,
.opportunity-actions button {
  border-radius: 16px !important;
  border: 1px solid rgba(56, 213, 255, 0.22) !important;
  color: var(--cenit-text-main) !important;
  background:
    linear-gradient(135deg, rgba(56, 213, 255, 0.24), rgba(139, 92, 246, 0.26)),
    rgba(255,255,255,0.035) !important;
  box-shadow: 0 14px 34px rgba(56, 213, 255, 0.11) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.login-card form > button:hover,
.command-report-link:hover,
.opportunity-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 213, 255, 0.38) !important;
  box-shadow: 0 18px 44px rgba(56, 213, 255, 0.16) !important;
}

.login-card form > button:focus-visible,
.command-report-link:focus-visible,
.opportunity-actions button:focus-visible {
  outline: 3px solid rgba(56, 213, 255, 0.34);
  outline-offset: 3px;
}

.decision-cockpit {
  border-color: rgba(255,255,255,0.09) !important;
  background:
    radial-gradient(circle at 14% 14%, rgba(56, 213, 255, 0.13), transparent 30%),
    radial-gradient(circle at 84% 6%, rgba(139, 92, 246, 0.13), transparent 26%),
    linear-gradient(135deg, rgba(5, 10, 20, 0.98), rgba(12, 19, 38, 0.96)) !important;
  box-shadow: 0 26px 80px rgba(2, 6, 17, 0.2), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.decision-intro h2 {
  color: var(--cenit-text-main) !important;
  letter-spacing: -0.055em;
}

.decision-intro > p:not(.eyebrow) {
  max-width: 760px;
  color: var(--cenit-text-secondary) !important;
}

.today-signals {
  align-items: stretch;
}

.today-signals article {
  position: relative;
  min-height: 132px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09) !important;
  border-radius: var(--cenit-radius-md) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.018)),
    rgba(14, 23, 41, 0.55) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.today-signals strong {
  color: var(--cenit-text-main) !important;
  font-size: clamp(34px, 3vw, 52px) !important;
  letter-spacing: -0.06em;
}

.today-signals small {
  color: var(--cenit-text-secondary) !important;
}

.market-live-radar {
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(280px, 0.92fr);
  gap: 18px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--cenit-radius-lg);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    rgba(10, 17, 32, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 70px rgba(2,6,17,0.18);
}

.market-radar-visual {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border: 1px solid rgba(56, 213, 255, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 213, 255, 0.12), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.09), transparent 38%),
    rgba(3, 6, 17, 0.56);
}

.radar-ring,
.radar-axis,
.radar-dot {
  position: absolute;
  display: block;
}

.radar-ring {
  inset: 50%;
  border: 1px solid rgba(56, 213, 255, 0.16);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.ring-1 { width: 120px; height: 120px; }
.ring-2 { width: 220px; height: 220px; border-color: rgba(139, 92, 246, 0.14); }
.ring-3 { width: 340px; height: 340px; border-color: rgba(255,255,255,0.08); }

.radar-axis {
  background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.16), transparent);
  transform-origin: center;
}

.axis-x {
  left: 11%;
  right: 11%;
  top: 50%;
  height: 1px;
}

.axis-y {
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(56, 213, 255, 0.16), transparent);
}

.radar-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cenit-cyan);
  box-shadow: 0 0 0 7px rgba(56, 213, 255, 0.09), 0 0 22px rgba(56, 213, 255, 0.24);
  animation: radar-breathe 4.8s ease-in-out infinite alternate;
}

.dot-opportunity { left: 64%; top: 31%; }
.dot-renewal { left: 39%; top: 62%; background: var(--cenit-green); box-shadow: 0 0 0 7px rgba(53, 230, 163, 0.08), 0 0 22px rgba(53, 230, 163, 0.2); animation-delay: 600ms; }
.dot-competitive { left: 72%; top: 67%; background: var(--cenit-gold); box-shadow: 0 0 0 7px rgba(242, 201, 76, 0.08), 0 0 22px rgba(242, 201, 76, 0.18); animation-delay: 1100ms; }
.dot-closing { left: 28%; top: 34%; background: var(--cenit-red); box-shadow: 0 0 0 7px rgba(255, 92, 122, 0.08), 0 0 22px rgba(255, 92, 122, 0.2); animation-delay: 1500ms; }

.market-radar-reading {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: rgba(3, 6, 17, 0.42);
}

.market-radar-reading h3 {
  margin: 18px 0 10px;
  color: var(--cenit-text-main);
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.market-radar-reading p,
.market-radar-reading dd {
  color: var(--cenit-text-secondary);
}

.market-radar-reading dl {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.market-radar-reading div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.market-radar-reading dt {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.opportunity-radar-card {
  border-color: rgba(56, 213, 255, 0.16) !important;
  background:
    linear-gradient(135deg, rgba(56, 213, 255, 0.085), rgba(139, 92, 246, 0.045)),
    rgba(14, 23, 41, 0.62) !important;
}

@keyframes radar-breathe {
  from { transform: scale(0.9); opacity: 0.62; }
  to { transform: scale(1.22); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .radar-dot,
  .login-card form > button,
  .command-report-link,
  .opportunity-actions button {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1120px) {
  .market-live-radar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .today-signals,
  .market-live-radar {
    grid-template-columns: 1fr !important;
  }

  .market-radar-visual {
    min-height: 230px;
  }

  .ring-3 {
    width: 280px;
    height: 280px;
  }
}

/* Radar Vivo del Mercado · interacción accionable */
.market-live-radar {
  grid-template-columns: 1fr !important;
}

.market-radar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.market-radar-header h3 {
  margin: 10px 0 0;
  color: var(--cenit-text-main);
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.market-radar-header small {
  padding: 9px 12px;
  border: 1px solid rgba(56, 213, 255, 0.16);
  border-radius: 999px;
  color: var(--cenit-text-secondary);
  background: rgba(56, 213, 255, 0.055);
  white-space: nowrap;
}

.market-radar-controls {
  display: grid;
  grid-template-columns: 1fr 0.86fr 0.9fr;
  gap: 12px;
  margin-top: 18px;
}

.market-radar-controls fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(3, 6, 17, 0.22);
}

.market-radar-controls legend {
  padding: 0 6px;
  color: var(--cenit-text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.market-radar-controls button {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--cenit-text-secondary);
  background: rgba(255,255,255,0.035);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.market-radar-controls button:hover,
.market-radar-controls button.active {
  color: var(--cenit-text-main);
  border-color: rgba(56, 213, 255, 0.32);
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.14), rgba(139, 92, 246, 0.12));
  transform: translateY(-1px);
}

.radar-priority-help {
  flex: 1 0 100%;
  color: rgba(170, 182, 200, 0.72);
  font-size: 9px;
  line-height: 1.35;
}

.market-radar-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.market-radar-visual {
  min-height: 438px;
  isolation: isolate;
  overflow: visible;
}

.market-radar-visual::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(56,213,255,0.055) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(56,213,255,0.055) 50%, transparent 50.3%);
  pointer-events: none;
}

.radar-legend {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.78);
  background: rgba(3, 6, 17, 0.52);
  font-size: 10px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.radar-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--legend-color, var(--cenit-cyan));
  box-shadow: 0 0 14px color-mix(in srgb, var(--legend-color, var(--cenit-cyan)) 42%, transparent);
}

.legend-cybersecurity { --legend-color: #ff6b8a; }
.legend-cloud { --legend-color: #9b7cff; }
.legend-connectivity { --legend-color: #38d5ff; }
.legend-datacenter { --legend-color: #f2c94c; }
.legend-services { --legend-color: #35e6a3; }

.radar-kind-key b {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(248, 250, 252, 0.82);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.82);
}

.radar-kind-key.renewal b {
  background: transparent;
}

.market-radar-nodes {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.market-radar-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: var(--node-size);
  height: var(--node-size);
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: left 420ms ease, top 420ms ease, width 260ms ease, height 260ms ease, transform 180ms ease, filter 180ms ease;
  animation: radar-node-enter 240ms ease both;
}

.market-radar-node span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--node-color, var(--cenit-cyan));
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--node-color, var(--cenit-cyan)) 14%, transparent),
    0 0 26px color-mix(in srgb, var(--node-color, var(--cenit-cyan)) 32%, transparent);
}

.market-radar-node:hover,
.market-radar-node.selected {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.16);
  filter: saturate(1.18);
}

.market-radar-node.selected span {
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--node-color, var(--cenit-cyan)) 18%, transparent),
    0 0 38px color-mix(in srgb, var(--node-color, var(--cenit-cyan)) 42%, transparent);
}

.market-radar-node::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 13px);
  width: min(320px, 42vw);
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  color: var(--cenit-text-main);
  background: rgba(3, 6, 17, 0.92);
  box-shadow: 0 18px 46px rgba(2, 6, 17, 0.42);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.market-radar-node:hover::after,
.market-radar-node:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.portfolio-cybersecurity { --node-color: #ff6b8a; }
.portfolio-cloud { --node-color: #9b7cff; }
.portfolio-connectivity { --node-color: #38d5ff; }
.portfolio-datacenter { --node-color: #f2c94c; }
.portfolio-services { --node-color: #35e6a3; }

.market-radar-node.kind-renewal {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--node-color, var(--cenit-cyan)) 80%, white);
}

.market-radar-node.kind-renewal span {
  border: 4px solid var(--node-color, var(--cenit-cyan));
  background: rgba(3, 6, 17, 0.72);
}

.market-radar-node.pulse span {
  animation: radar-node-pulse 2.6s ease-in-out infinite;
}

.market-radar-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(360px, 82%);
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  color: var(--cenit-text-secondary);
  background: rgba(3, 6, 17, 0.56);
  text-align: center;
  transform: translate(-50%, -50%);
}

.market-radar-reading {
  min-height: 438px;
}

.market-radar-reading dl {
  gap: 10px;
}

.market-radar-reading dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.market-radar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.market-radar-actions button {
  min-height: 42px;
  border: 1px solid rgba(56, 213, 255, 0.18);
  border-radius: 14px;
  color: var(--cenit-text-main);
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.11), rgba(139, 92, 246, 0.09));
  font-weight: 850;
  cursor: pointer;
}

.market-radar-actions button:hover {
  border-color: rgba(56, 213, 255, 0.32);
  transform: translateY(-1px);
}

@keyframes radar-node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.78; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes radar-node-enter {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.78); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .market-radar-node,
  .market-radar-node span,
  .market-radar-controls button,
  .market-radar-actions button {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1180px) {
  .market-radar-controls,
  .market-radar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .market-radar-header {
    flex-direction: column;
  }

  .market-radar-visual,
  .market-radar-reading {
    min-height: 360px;
  }

  .market-radar-actions {
    grid-template-columns: 1fr;
  }
}

/* Vista Inteligente CENIT · interpretación accionable */
.cockpit-insight-card {
  overflow: hidden;
}

.cockpit-executive-reading {
  margin: 10px 0 0 !important;
  padding: 14px;
  border: 1px solid rgba(56, 213, 255, 0.12);
  border-radius: 16px;
  color: var(--cenit-text-main) !important;
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.085), rgba(139, 92, 246, 0.055));
  font-size: 13px;
  line-height: 1.45;
}

.insight-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 8px;
}

.insight-primary-actions button,
.insight-recommendation-card button,
.insight-signal-grid button {
  border: 1px solid rgba(56, 213, 255, 0.18);
  border-radius: 14px;
  color: var(--cenit-text-main);
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.11), rgba(139, 92, 246, 0.09));
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.insight-primary-actions button {
  min-height: 40px;
  font-size: 11px;
}

.insight-primary-actions button:hover,
.insight-recommendation-card button:hover,
.insight-signal-grid button:hover {
  border-color: rgba(56, 213, 255, 0.34);
  transform: translateY(-1px);
}

.insight-angle-controls {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(3, 6, 17, 0.28);
}

.insight-angle-controls > strong {
  color: var(--cenit-text-main);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.insight-angle-controls fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
}

.insight-angle-controls legend {
  padding: 0 6px;
  color: var(--cenit-text-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.insight-angle-controls button {
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--cenit-text-secondary);
  background: rgba(255,255,255,0.035);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.insight-angle-controls button.active,
.insight-angle-controls button:hover {
  color: var(--cenit-text-main);
  border-color: rgba(56, 213, 255, 0.32);
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.13), rgba(139, 92, 246, 0.1));
}

.market-news-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(56, 213, 255, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(56, 213, 255, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(6, 14, 29, 0.82), rgba(15, 23, 42, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.market-news-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.market-news-card > header span {
  display: block;
  color: var(--cenit-cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.market-news-card > header strong {
  display: block;
  margin-top: 4px;
  color: var(--cenit-text);
  font-size: 18px;
  letter-spacing: -0.025em;
}

.market-news-card > header em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--cenit-muted);
  font-size: 9px;
  font-style: normal;
}

.market-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.market-news-grid article {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.market-news-grid article:hover,
.market-news-grid article:focus-visible,
.market-news-grid article.active {
  border-color: rgba(56, 213, 255, 0.42);
  background: rgba(56, 213, 255, 0.07);
  transform: translateY(-2px);
  outline: none;
}

.market-news-grid article > span {
  color: var(--cenit-cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.market-news-grid article strong {
  display: block;
  min-height: 42px;
  margin: 7px 0 6px;
  color: var(--cenit-text);
  font-size: 13px;
  line-height: 1.35;
}

.market-news-grid article p,
.market-news-card > footer {
  margin: 0;
  color: var(--cenit-muted);
  font-size: 10px;
  line-height: 1.5;
}

.market-news-card > footer {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1100px) {
  .market-news-grid {
    grid-template-columns: 1fr;
  }

  .market-news-grid article strong {
    min-height: 0;
  }
}

.market-pulse-feed {
  gap: 14px;
}

.insight-section {
  display: grid;
  gap: 10px;
}

.insight-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.insight-section-head strong {
  color: var(--cenit-text-main);
  font-size: 13px;
}

.insight-section-head span {
  color: var(--cenit-text-muted) !important;
  font-size: 10px;
  font-weight: 800;
}

.insight-recommendation-grid {
  display: grid;
  gap: 9px;
}

.insight-recommendation-card {
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
}

.insight-recommendation-card h4 {
  margin: 0;
  color: var(--cenit-text-main);
  font-size: 13px;
  line-height: 1.22;
}

.insight-recommendation-card p {
  margin: 7px 0 0 !important;
  color: var(--cenit-text-secondary) !important;
  font-size: 12px !important;
  line-height: 1.35;
}

.insight-recommendation-card small {
  display: block;
  margin-top: 6px;
  color: var(--cenit-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.insight-recommendation-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.insight-recommendation-card button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 10px;
}

.insight-recommendation-card button.secondary {
  color: var(--cenit-text-secondary);
  border-color: rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.035);
}

/* Centro de Comando · pulso competitivo observable */
.competitive-pulse-section {
  display: grid;
  gap: 11px;
}

.competitive-pulse-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.competitive-pulse-head span,
.competitive-news-reading span {
  display: block;
  color: var(--cenit-cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.competitive-pulse-head strong {
  display: block;
  margin-top: 4px;
  color: var(--cenit-text-main);
  font-size: 14px;
  line-height: 1.25;
}

.competitive-pulse-head em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(56, 213, 255, 0.17);
  border-radius: 999px;
  color: var(--cenit-text-secondary);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.competitive-pulse-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.competitive-pulse-metrics article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,0.052), rgba(255,255,255,0.022));
}

.competitive-pulse-metrics article.won {
  border-color: rgba(53, 230, 163, 0.24);
  background: linear-gradient(145deg, rgba(53, 230, 163, 0.09), rgba(255,255,255,0.02));
}

.competitive-pulse-metrics article.lost {
  border-color: rgba(255, 92, 122, 0.22);
  background: linear-gradient(145deg, rgba(255, 92, 122, 0.075), rgba(255,255,255,0.02));
}

.competitive-pulse-metrics span,
.competitive-pulse-metrics strong,
.competitive-pulse-metrics small {
  display: block;
}

.competitive-pulse-metrics span {
  color: var(--cenit-text-muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.competitive-pulse-metrics strong {
  margin: 6px 0 3px;
  overflow: hidden;
  color: var(--cenit-text-main);
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-pulse-metrics article:last-child strong {
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.competitive-pulse-metrics article.rival strong {
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.competitive-pulse-metrics small {
  color: var(--cenit-text-muted);
  font-size: 9px;
  line-height: 1.35;
}

.competitive-news-reading {
  padding: 13px;
  border: 1px solid rgba(242, 201, 76, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 96% 0%, rgba(242, 201, 76, 0.1), transparent 34%),
    rgba(255,255,255,0.03);
}

.competitive-news-reading strong {
  display: block;
  margin-top: 5px;
  color: var(--cenit-text-main);
  font-size: 12px;
  line-height: 1.4;
}

.competitive-news-reading p {
  margin: 7px 0 0 !important;
  color: var(--cenit-text-muted) !important;
  font-size: 9px !important;
  line-height: 1.45 !important;
}

.competitive-annual-leaders {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
}

.competitive-annual-leaders > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.competitive-annual-leaders > header strong {
  color: var(--cenit-text-main);
  font-size: 10px;
}

.competitive-annual-leaders > header span {
  color: var(--cenit-text-muted);
  font-size: 8px;
  text-align: right;
}

.competitive-annual-leaders > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.competitive-annual-leaders article {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(3, 6, 17, 0.28);
}

.competitive-annual-leaders article.own {
  border-color: rgba(53, 230, 163, 0.22);
  background: rgba(53, 230, 163, 0.055);
}

.competitive-annual-leaders article span,
.competitive-annual-leaders article strong,
.competitive-annual-leaders article b,
.competitive-annual-leaders article small {
  display: block;
}

.competitive-annual-leaders article span {
  color: var(--cenit-cyan);
  font-size: 8px;
  font-weight: 900;
}

.competitive-annual-leaders article strong {
  min-height: 27px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--cenit-text-secondary);
  font-size: 9px;
  line-height: 1.35;
}

.competitive-annual-leaders article b {
  margin-top: 5px;
  overflow: hidden;
  color: var(--cenit-text-main);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-annual-leaders article small {
  margin-top: 2px;
  color: var(--cenit-text-muted);
  font-size: 8px;
}

.competitive-rivals {
  display: grid;
  gap: 7px;
}

.competitive-rivals > strong {
  color: var(--cenit-text-secondary);
  font-size: 10px;
}

.competitive-rivals > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.competitive-rivals button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 999px;
  color: var(--cenit-text-secondary);
  background: rgba(139, 92, 246, 0.07);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.competitive-rivals button:hover,
.competitive-rivals button.active {
  border-color: rgba(56, 213, 255, 0.4);
  color: var(--cenit-text-main);
  background: rgba(56, 213, 255, 0.1);
}

.competitive-rivals button b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #dbeafe;
  background: rgba(255,255,255,0.08);
  font-size: 8px;
}

.competitive-rivals small {
  color: var(--cenit-text-muted);
  font-size: 9px;
}

.competitive-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.competitive-outcomes-grid > section {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.competitive-outcomes-grid > section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.competitive-outcomes-grid > section > header strong {
  color: var(--cenit-text-main);
  font-size: 10px;
}

.competitive-outcomes-grid > section > header span {
  color: var(--cenit-text-muted);
  font-size: 8px;
}

.competitive-outcome-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 13px;
  color: var(--cenit-text-secondary);
  background: rgba(255,255,255,0.03);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.competitive-outcome-card:hover {
  border-color: rgba(56, 213, 255, 0.34);
  background: rgba(56, 213, 255, 0.06);
  transform: translateY(-1px);
}

.competitive-outcome-card.won { border-left: 3px solid var(--cenit-green); }
.competitive-outcome-card.lost { border-left: 3px solid var(--cenit-red); }

.competitive-outcome-badge {
  justify-self: start;
  padding: 3px 6px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(53, 230, 163, 0.12);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.competitive-outcome-card.lost .competitive-outcome-badge {
  color: #ffe4e6;
  background: rgba(255, 92, 122, 0.12);
}

.competitive-outcome-card > strong {
  overflow: hidden;
  color: var(--cenit-text-main);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-outcome-card > small,
.competitive-outcome-card > p {
  overflow: hidden;
  margin: 0 !important;
  color: var(--cenit-text-muted) !important;
  font-size: 8px !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-outcome-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.competitive-outcome-card > div b {
  color: var(--cenit-text-secondary);
  font-size: 9px;
}

.competitive-outcome-card > div em {
  color: var(--cenit-text-muted);
  font-size: 8px;
  font-style: normal;
}

.competitive-empty {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 13px;
  color: var(--cenit-text-muted);
  font-size: 9px;
}

.competitive-rival-ranking {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.competitive-rival-ranking > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.competitive-rival-ranking > header strong {
  color: var(--cenit-text-main);
  font-size: 11px;
}

.competitive-rival-ranking > header span {
  color: var(--cenit-text-muted);
  font-size: 8px;
  text-align: right;
}

.competitive-rival-table {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 15px;
  background: rgba(255,255,255,0.025);
}

.competitive-rival-row {
  display: grid;
  grid-template-columns: minmax(115px, 1.55fr) repeat(3, minmax(54px, 0.62fr)) minmax(90px, 1fr);
  align-items: center;
  min-height: 38px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.competitive-rival-row:first-child { border-top: 0; }

.competitive-rival-row > span {
  min-width: 0;
  padding: 8px 9px;
  overflow: hidden;
  color: var(--cenit-text-secondary);
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-rival-row > span:not(:first-child) { text-align: right; }

.competitive-rival-row.heading {
  min-height: 31px;
  background: rgba(255,255,255,0.035);
}

.competitive-rival-row.heading span {
  color: var(--cenit-text-muted);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.competitive-rival-row.strongest {
  background: linear-gradient(90deg, rgba(242, 201, 76, 0.08), rgba(255,255,255,0.015));
}

.competitive-rival-row b {
  display: block;
  overflow: hidden;
  color: var(--cenit-text-main);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitive-rival-row small {
  display: block;
  margin-top: 2px;
  color: var(--cenit-gold);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.competitive-rival-row .positive { color: var(--cenit-green); font-weight: 850; }
.competitive-rival-row .negative { color: var(--cenit-red); font-weight: 850; }

@media (max-width: 760px) {
  .competitive-pulse-head,
  .competitive-outcomes-grid {
    grid-template-columns: 1fr;
  }

  .competitive-pulse-head {
    display: grid;
  }

  .competitive-pulse-head em {
    justify-self: start;
  }

  .competitive-rival-ranking > header {
    display: grid;
  }

  .competitive-annual-leaders > header,
  .competitive-annual-leaders > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .competitive-annual-leaders > header span { text-align: left; }

  .competitive-rival-ranking > header span { text-align: left; }

  .competitive-rival-table { overflow-x: auto; }
  .competitive-rival-row { min-width: 570px; }
}

.insight-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insight-signal-grid button {
  display: grid;
  gap: 2px;
  min-height: 86px;
  padding: 12px;
  text-align: left;
}

.insight-signal-grid b {
  color: var(--cenit-text-main);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.insight-signal-grid span {
  color: var(--cenit-text-main) !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-signal-grid small {
  color: var(--cenit-text-muted);
  font-size: 10px;
}

@media (max-width: 1280px) {
  .insight-primary-actions,
  .insight-signal-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .insight-primary-actions button,
  .insight-recommendation-card button,
  .insight-signal-grid button,
  .insight-angle-controls button {
    transition: none !important;
  }
}

/* Zoom/accessibility hardening: keep command-center signal cards readable */
.today-signals {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
}

.today-signals article {
  min-width: 0;
  min-height: 0;
  overflow: visible !important;
  padding: 18px !important;
}

.today-signals span,
.today-signals strong,
.today-signals small {
  min-width: 0;
  max-width: 100%;
}

.today-signals span,
.today-signals small {
  overflow-wrap: anywhere;
}

.today-signals strong {
  font-size: clamp(28px, 2.35vw, 50px) !important;
  line-height: 1.02;
  overflow-wrap: anywhere;
  word-break: normal;
}

.today-signals article::after {
  content: none;
  display: none;
}

@media (max-width: 1500px) {
  .today-signals strong {
    font-size: clamp(26px, 2vw, 44px) !important;
  }
}

.tenant-admin-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.78));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.tenant-admin-head,
.tenant-admin-grid,
.tenant-admin-columns,
.tenant-admin-actions,
.tenant-user-form,
.tenant-list-row {
  display: grid;
  gap: 12px;
}

.tenant-admin-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 16px;
}

.tenant-admin-head span,
.tenant-admin-panel label span,
.tenant-admin-list em {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tenant-admin-head strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.tenant-admin-head small,
.tenant-help,
.tenant-preview span,
.tenant-preview small,
.tenant-list-row span {
  color: #64748b;
}

.tenant-admin-head em {
  padding: 8px 12px;
  border: 1px solid rgba(56, 213, 255, 0.25);
  border-radius: 999px;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.65);
  font-style: normal;
  font-weight: 800;
}

.tenant-admin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.tenant-admin-columns {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.tenant-admin-columns article {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.tenant-admin-panel input,
.tenant-admin-panel select,
.tenant-admin-panel textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.tenant-admin-panel textarea {
  min-height: 116px;
  margin-top: 10px;
  resize: vertical;
}

.tenant-user-form {
  grid-template-columns: 1.1fr 0.85fr 0.85fr 0.65fr auto;
  align-items: center;
  margin: 12px 0;
}

.tenant-admin-panel button {
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 14px;
  padding: 11px 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
  cursor: pointer;
}

.tenant-admin-panel button.primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.tenant-admin-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.tenant-list-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: #fff;
}

.tenant-list-row strong {
  display: block;
  color: #0f172a;
}

.tenant-list-row button {
  padding: 8px 10px;
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.22);
  background: #fff1f2;
}

.tenant-empty,
.tenant-preview {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.86);
}

.tenant-preview {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.tenant-preview strong {
  color: #0f172a;
}

.setup-module {
  margin-bottom: 28px;
}

.setup-module .tenant-admin-panel {
  margin-top: 0;
  padding: clamp(18px, 2.2vw, 30px);
  background:
    radial-gradient(circle at 94% 3%, rgba(56, 213, 255, 0.13), transparent 24%),
    linear-gradient(145deg, rgba(248, 250, 252, 0.99), rgba(238, 246, 255, 0.92));
}

.setup-tenant-selector {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.setup-tenant-selector label,
.market-profile-grid label,
.market-profile-controls label {
  display: grid;
  gap: 7px;
}

.platform-tenant-directory {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 180, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.platform-tenant-directory > .mini-header {
  align-items: center;
  margin-bottom: 12px;
}

.platform-tenant-directory > .mini-header strong,
.platform-tenant-directory > .mini-header span {
  display: block;
}

.platform-tenant-directory > .mini-header span {
  margin-top: 3px;
  color: #64748b;
}

.platform-tenant-directory > .mini-header em {
  color: #0369a1;
  font-style: normal;
  font-weight: 850;
}

.platform-tenant-list {
  display: grid;
  gap: 10px;
}

.platform-tenant-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #fff;
}

.platform-tenant-card.selected {
  border-color: rgba(14, 165, 233, 0.48);
  box-shadow: 0 10px 30px rgba(14, 116, 144, 0.09);
}

.platform-tenant-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.platform-tenant-card > summary::-webkit-details-marker {
  display: none;
}

.platform-tenant-card > summary strong,
.platform-tenant-card > summary span {
  display: block;
}

.platform-tenant-card > summary span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.platform-tenant-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.platform-tenant-summary-metrics b,
.platform-tenant-summary-metrics em,
.platform-profile-controls span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.platform-tenant-detail {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.platform-tenant-detail > section {
  min-width: 0;
  padding-top: 14px;
}

.platform-user-list {
  display: grid;
  gap: 7px;
}

.platform-user-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #f8fafc;
}

.platform-user-list strong,
.platform-user-list small {
  display: block;
}

.platform-user-list small {
  margin-top: 2px;
  color: #64748b;
}

.platform-user-list em {
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.platform-profile-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.platform-profile-summary dl > div {
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  background: #f8fafc;
}

.platform-profile-summary dt {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.platform-profile-summary dd {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.platform-profile-summary dd span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-weight: 750;
}

.platform-profile-summary dd i {
  color: #94a3b8;
  font-size: 11px;
}

.platform-profile-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.platform-profile-controls span b {
  margin-left: 3px;
}

.platform-tenant-detail > button {
  grid-column: 1 / -1;
  justify-self: end;
}

@media (max-width: 980px) {
  .platform-tenant-card > summary,
  .platform-tenant-detail,
  .platform-profile-summary dl {
    grid-template-columns: 1fr;
  }

  .platform-tenant-summary-metrics {
    justify-content: flex-start;
  }
}

.setup-users-card.read-only .tenant-admin-list {
  opacity: 0.92;
}

#setup-portfolio-card.read-only {
  opacity: 0.72;
}

#setup-portfolio-card :disabled {
  cursor: not-allowed;
}

.market-profile-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.market-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.market-profile-head span,
.market-profile-grid label > span,
.market-profile-controls label > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.market-profile-head strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.market-profile-head small {
  max-width: 420px;
  color: #64748b;
  line-height: 1.5;
  text-align: right;
}

.market-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-profile-grid textarea {
  min-height: 96px;
  margin: 0;
}

.market-profile-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 12px;
}

.profile-learning-note {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 13px 15px;
  border-left: 4px solid #22c1d6;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(236, 254, 255, 0.9), rgba(238, 242, 255, 0.6));
}

.profile-learning-note strong {
  color: #0f172a;
}

.profile-learning-note span,
.setup-save-bar span {
  color: #64748b;
  font-size: 11px;
}

.setup-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}

.setup-save-bar button {
  min-width: 180px;
}

@media (max-width: 1200px) {
  .tenant-admin-grid,
  .tenant-admin-columns,
  .tenant-user-form,
  .market-profile-grid,
  .market-profile-controls {
    grid-template-columns: 1fr;
  }

  .market-profile-controls {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .setup-tenant-selector,
  .market-profile-head,
  .setup-save-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .market-profile-head small {
    text-align: left;
  }

  .setup-save-bar button {
    width: 100%;
  }
}

/* Setup Central · acceso exclusivo de administración de plataforma */
.central-engine-module {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}

.central-engine-module[hidden] {
  display: none;
}

.central-engine-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(24px, 3vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(56, 213, 255, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 8%, rgba(56, 213, 255, 0.16), transparent 28%),
    radial-gradient(circle at 66% 100%, rgba(139, 92, 246, 0.14), transparent 36%),
    linear-gradient(135deg, #07111f, #101a33 72%, #161a38);
  color: #f8fafc;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.16);
}

.central-engine-hero > div:first-child > span,
.central-engine-toolbar label > span,
.central-engine-scope > span,
.central-engine-card header span,
.central-engine-summary article > span {
  color: #22d3ee;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.central-engine-hero h2 {
  max-width: 850px;
  margin: 8px 0 10px;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.central-engine-hero p {
  max-width: 760px;
  margin: 0;
  color: #aab6c8;
  line-height: 1.55;
}

.central-engine-version {
  min-width: 210px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
}

.central-engine-version small,
.central-engine-version strong,
.central-engine-version em {
  display: block;
}

.central-engine-version small,
.central-engine-version em {
  color: #aab6c8;
  font-style: normal;
}

.central-engine-version strong {
  margin: 5px 0;
  color: #38d5ff;
  font-size: 15px;
}

.central-engine-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1.3fr) auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

.company-admin-card {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid #d7e2ef;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f3f8fd);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.company-admin-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.company-admin-card > header span,
.company-admin-card > header strong,
.company-admin-card > header small { display: block; }
.company-admin-card > header span { color: #0ea5e9; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.company-admin-card > header strong { margin-top: 4px; color: #0f172a; font-size: 20px; }
.company-admin-card > header small { margin-top: 4px; color: #64748b; }
.company-admin-card button { min-height: 40px; padding: 0 15px; border: 1px solid #bed1e8; border-radius: 12px; color: #1d4ed8; background: #fff; font-weight: 800; cursor: pointer; }
.company-admin-card button.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #2563eb, #06b6d4); }

.company-admin-form {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.4fr .9fr .7fr auto;
  gap: 10px;
  align-items: end;
}

.company-admin-form label { display: grid; gap: 6px; min-width: 0; }
.company-admin-form label span { color: #64748b; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.company-admin-form input,
.company-admin-form select { width: 100%; min-width: 0; min-height: 42px; padding: 0 11px; border: 1px solid #d5dfeb; border-radius: 12px; color: #172033; background: #fff; }
.company-admin-status { padding: 10px 12px; border-radius: 11px; color: #475569; background: #edf5fc; font-size: 12px; }
.company-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.company-directory button { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.company-directory button.active { border-color: #38bdf8; background: #effaff; }
.company-directory button span,
.company-directory button strong,
.company-directory button small { display: block; min-width: 0; }
.company-directory button strong { overflow: hidden; color: #172033; text-overflow: ellipsis; white-space: nowrap; }
.company-directory button small { margin-top: 3px; overflow: hidden; color: #64748b; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.company-directory button em { flex: 0 0 auto; color: #0369a1; font-size: 11px; font-style: normal; }

@media (max-width: 1180px) {
  .company-admin-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .company-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .company-admin-card > header,
  .company-admin-form { display: grid; grid-template-columns: 1fr; }
  .company-directory { grid-template-columns: 1fr; }
}

.central-engine-toolbar label {
  display: grid;
  gap: 7px;
}

.central-engine-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.central-engine-toolbar-actions button {
  min-height: 44px;
  white-space: nowrap;
}

.central-engine-scope {
  display: grid;
  gap: 6px;
  min-height: 48px;
  padding: 9px 13px;
  border-radius: 13px;
  background: #ecfeff;
}

.central-engine-scope strong {
  color: #164e63;
  font-size: 12px;
}

.central-engine-status {
  padding: 11px 14px;
  border-left: 4px solid #22d3ee;
  border-radius: 0 13px 13px 0;
  background: linear-gradient(90deg, #ecfeff, #eef2ff);
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.central-engine-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.central-engine-summary article {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: #fff;
}

.central-engine-summary strong,
.central-engine-summary small {
  display: block;
}

.central-engine-summary strong {
  margin: 8px 0 4px;
  color: #0f172a;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.035em;
}

.central-engine-summary small {
  color: #64748b;
}

.central-engine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.central-engine-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.central-engine-card-wide {
  grid-column: 1 / -1;
}

.market-directory-card {
  overflow: hidden;
  background: radial-gradient(circle at 96% 0%, rgba(34, 211, 238, 0.08), transparent 26%), #fff;
}

.market-directory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.market-directory-tabs button,
.market-directory-toolbar button {
  min-height: 40px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 0 14px;
  color: #334155;
  background: #f8fafc;
  font-weight: 850;
  cursor: pointer;
}

.market-directory-tabs button.active,
.market-directory-toolbar button {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}

.market-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.market-directory-toolbar label {
  display: grid;
  gap: 6px;
}

.market-directory-toolbar label span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.market-directory-toolbar input {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  font: inherit;
}

.market-directory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.market-directory-summary article {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fafc, #eff6ff);
}

.market-directory-summary span,
.market-directory-summary strong,
.market-directory-summary small {
  display: block;
}

.market-directory-summary span {
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-directory-summary strong {
  margin: 5px 0 2px;
  color: #0f172a;
  font-size: 22px;
}

.market-directory-summary small {
  color: #64748b;
  font-size: 10px;
}

.market-directory-list {
  display: grid;
  gap: 7px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.market-directory-item {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.84);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.market-directory-item.supplier {
  grid-template-columns: minmax(210px, 1.1fr) minmax(180px, 0.85fr) minmax(300px, 1.25fr) minmax(170px, 0.8fr) minmax(200px, 0.9fr) 130px;
}

.market-directory-item.buyer {
  grid-template-columns: minmax(230px, 1.2fr) minmax(210px, 1fr) minmax(220px, 1fr) minmax(210px, 0.95fr) 120px;
}

.market-directory-item:hover {
  border-color: rgba(14, 165, 233, 0.36);
  transform: translateY(-1px);
}

.market-directory-item > div {
  min-width: 0;
}

.market-directory-identity > span,
.market-directory-identity > strong,
.market-directory-identity > small,
.market-directory-unit > strong,
.market-directory-unit > span,
.market-directory-unit > small,
.market-directory-contact > strong,
.market-directory-contact > span,
.market-directory-contact > a,
.market-directory-contact > small,
.market-directory-quality > small {
  display: block;
  overflow-wrap: anywhere;
}

.market-directory-identity > span {
  color: #0891b2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-directory-identity > strong,
.market-directory-unit > strong,
.market-directory-contact > strong,
.market-directory-tags > strong,
.market-directory-relations > strong {
  margin: 3px 0;
  color: #0f172a;
  font-size: 11px;
}

.market-directory-identity > small,
.market-directory-unit > span,
.market-directory-unit > small,
.market-directory-contact > span,
.market-directory-contact > small,
.market-directory-quality > small,
.market-directory-missing {
  color: #64748b;
  font-size: 9px;
}

.market-directory-contact + .market-directory-contact {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.market-directory-contact > a {
  color: #0369a1;
  font-size: 9px;
  text-decoration: none;
}

.market-directory-tags > div,
.market-directory-relations > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.market-directory-tags span,
.market-directory-relations span {
  padding: 4px 6px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 8px;
  font-weight: 800;
}

.market-directory-tags i,
.market-directory-relations i {
  color: #94a3b8;
  font-size: 9px;
}

.market-directory-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.market-directory-metrics div {
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
  background: #eef2ff;
}

.market-directory-metrics b,
.market-directory-metrics span {
  display: block;
  overflow-wrap: anywhere;
}

.market-directory-metrics b {
  color: #1e3a8a;
  font-size: 11px;
}

.market-directory-metrics span {
  margin-top: 2px;
  color: #64748b;
  font-size: 7px;
  text-transform: uppercase;
}

.market-directory-quality {
  justify-self: end;
  text-align: right;
}

.market-directory-quality > span {
  display: inline-block;
  margin-bottom: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-directory-quality.complete > span { color: #166534; background: #dcfce7; }
.market-directory-quality.partial > span { color: #075985; background: #e0f2fe; }

.market-directory-more,
.market-directory-note {
  padding: 10px 12px;
  color: #64748b;
  font-size: 10px;
  text-align: center;
}

.market-directory-note {
  margin-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}


.central-engine-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.central-engine-card header strong,
.central-engine-card header small {
  display: block;
}

.central-engine-card header strong {
  margin-top: 4px;
  color: #0f172a;
  font-size: 20px;
}

.central-engine-card header small {
  color: #64748b;
  text-align: right;
}

.central-weight-list,
.central-rule-list,
.central-safeguard-list {
  display: grid;
  gap: 8px;
}

.central-weight-list article,
.central-rule-list details,
.central-safeguard-list article {
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  background: #f8fafc;
}

.central-weight-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.central-weight-list strong,
.central-weight-list small {
  display: block;
}

.central-weight-list small {
  margin-top: 2px;
  color: #94a3b8;
}

.central-weight-list b {
  color: #1d4ed8;
  font-size: 12px;
  text-align: right;
}

.central-weight-controls {
  display: grid;
  grid-template-columns: repeat(3, 82px);
  gap: 7px;
}

.central-weight-controls label,
.central-weight-points {
  display: grid;
  gap: 4px;
}

.central-weight-controls span,
.central-weight-points span,
.central-alias-editor > span {
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.central-weight-controls input,
.central-weight-points input {
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
}

.central-weight-points {
  width: 90px;
}

.central-rule-list details > summary,
.central-safeguard-list details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.central-rule-list summary span,
.central-safeguard-list summary {
  color: #64748b;
  font-size: 11px;
}

.central-rule-list code,
.central-safeguard-list code {
  display: block;
  max-width: 100%;
  margin-top: 10px;
  padding: 9px;
  overflow-wrap: anywhere;
  border-radius: 9px;
  background: #0f172a;
  color: #bae6fd;
  font-size: 10px;
  white-space: normal;
}

.central-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0;
}

.central-aliases span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-weight: 750;
}

.central-alias-editor {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.central-alias-editor textarea {
  min-height: 82px;
  margin: 0;
  padding: 10px;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 11px;
  background: #fff;
  color: #0f172a;
  line-height: 1.45;
}

.central-expression {
  margin-top: 9px;
}

.central-engine-help {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.central-safeguard-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.central-safeguard-list article > div strong,
.central-safeguard-list article > div span {
  display: block;
}

.central-safeguard-list article > div span {
  margin: 5px 0 10px;
  color: #64748b;
  line-height: 1.45;
}

.central-effective-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.central-effective-profile > div {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.central-effective-profile dt {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.central-effective-profile dd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.central-effective-profile dd span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 750;
}

.central-effective-profile dd i {
  color: #94a3b8;
  font-size: 11px;
}

.central-engine-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #e2e8f0;
}

.central-engine-footer strong {
  color: #38d5ff;
  white-space: nowrap;
}

.central-engine-footer span {
  color: #cbd5e1;
  font-size: 12px;
}

.central-engine-history {
  display: grid;
  gap: 7px;
}

.central-engine-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, auto);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  background: #f8fafc;
}

.central-engine-history article.active {
  border-color: rgba(34, 211, 238, 0.42);
  background: #ecfeff;
}

.central-engine-history strong,
.central-engine-history span {
  display: block;
}

.central-engine-history span,
.central-engine-history small,
.central-engine-history em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.central-engine-history span {
  margin-top: 2px;
}

@media (max-width: 1100px) {
  .central-engine-toolbar,
  .central-engine-summary,
  .central-engine-grid,
  .central-safeguard-list,
  .central-effective-profile {
    grid-template-columns: 1fr;
  }

  .market-directory-summary,
  .market-directory-item.supplier,
  .market-directory-item.buyer {
    grid-template-columns: 1fr;
  }

  .market-directory-quality {
    justify-self: start;
    text-align: left;
  }


  .central-engine-toolbar-actions,
  .central-weight-controls,
  .central-engine-history article {
    display: grid;
    grid-template-columns: 1fr;
  }

  .central-engine-toolbar-actions button,
  .central-weight-points {
    width: 100%;
  }

  .central-engine-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .central-engine-hero,
  .central-engine-card > header,
  .central-engine-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .market-directory-toolbar {
    grid-template-columns: 1fr;
  }

  .central-engine-version {
    min-width: 0;
  }

  .central-engine-card header small {
    text-align: left;
  }
}

/* CENIT login · executive access surface */
.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.login-shell {
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, 0.62fr);
  gap: clamp(44px, 6vw, 104px);
  width: min(1440px, calc(100% - 64px));
  padding: 40px 0;
}

.login-brand {
  display: grid;
  align-content: center;
}

.login-brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(42px, 7vh, 76px);
}

.login-brand-lockup .brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 14px 34px rgba(2, 6, 17, 0.3);
}

.login-brand-lockup > div:last-child {
  display: grid;
  gap: 3px;
}

.login-brand-lockup .login-product {
  color: var(--cenit-text-main);
  font-size: 17px;
  letter-spacing: 0.18em;
}

.login-brand-lockup small {
  margin: 0;
  color: var(--cenit-text-muted) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.login-market-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-bottom: 18px;
  color: var(--cenit-cyan);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.login-market-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cenit-green);
  box-shadow: 0 0 0 5px rgba(53,230,163,0.08);
}

.login-brand h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(46px, 5.4vw, 78px) !important;
  line-height: 0.96 !important;
}

.login-brand > p {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: clamp(17px, 1.45vw, 21px) !important;
}

.login-value-path {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
  color: var(--cenit-text-secondary);
  font-size: 12px;
  font-weight: 760;
}

.login-value-path span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-value-path b {
  color: var(--cenit-cyan);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.login-value-path i {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(56,213,255,0.6), rgba(139,92,246,0.3));
}

.login-signal-cloud {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 900px;
  margin-top: clamp(34px, 6vh, 64px);
}

.login-signal-cloud article {
  min-height: 132px;
  align-content: center;
}

.login-signal-cloud strong {
  font-size: clamp(17px, 1.45vw, 22px) !important;
  letter-spacing: -0.025em;
}

.login-access {
  display: grid;
  align-content: center;
  gap: 18px;
}

.login-card {
  position: relative;
  padding: clamp(28px, 3vw, 40px) !important;
  border-radius: 28px !important;
  box-shadow: 0 40px 110px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(56,213,255,0.55), transparent);
}

.login-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.login-card-heading .brand-mark {
  width: 42px;
  height: 42px;
  margin: 0;
}

.login-card-heading > span {
  padding: 7px 10px;
  border: 1px solid rgba(53,230,163,0.18);
  border-radius: 999px;
  color: var(--cenit-green);
  background: rgba(53,230,163,0.055);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card .eyebrow {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.login-card h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(27px, 2.5vw, 38px);
  line-height: 1.06;
}

.login-card > p:not(.eyebrow) {
  margin: 14px 0 26px;
  font-size: 14px;
  line-height: 1.55;
}

.login-card form,
.login-card label {
  gap: 9px;
}

.login-card label {
  color: var(--cenit-text-secondary) !important;
  font-size: 11px;
  font-weight: 760;
}

.login-card input {
  height: 52px;
  padding: 0 15px;
  border-radius: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-card input::placeholder {
  color: var(--cenit-text-muted);
}

.login-card input:focus {
  border-color: rgba(56,213,255,0.55) !important;
  background: rgba(255,255,255,0.085) !important;
  box-shadow: 0 0 0 4px rgba(56,213,255,0.09);
}

.login-card form > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.login-card form > button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.login-button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.32);
  border-top-color: #fff;
  border-radius: 999px;
  animation: login-spin 700ms linear infinite;
}

.login-security-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--cenit-border-soft);
}

.login-security-note > span {
  color: var(--cenit-green);
  font-size: 9px;
  line-height: 18px;
}

.login-security-note p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.login-security-note strong {
  color: var(--cenit-text-main);
  font-size: 11px;
}

.login-security-note small {
  margin: 0;
  color: var(--cenit-text-muted) !important;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.login-access-footer {
  display: flex;
  justify-content: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  color: var(--cenit-text-muted);
  font-size: 9px;
}

.login-access-footer span:not(:last-child)::after {
  content: "·";
  margin-left: 20px;
  color: rgba(255,255,255,0.2);
}

.login-email-summary,
.login-method-tabs {
  border: 1px solid var(--cenit-border-soft);
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
}

.login-email-summary strong,
.login-method-tabs button.active {
  color: var(--cenit-text-main);
}

.login-method-tabs button.active {
  background: rgba(56,213,255,0.1);
  box-shadow: none;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .login-button-spinner {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 40px));
    gap: 44px;
    padding: 34px 0 48px;
  }

  .login-brand-lockup {
    margin-bottom: 42px;
  }

  .login-brand h1 {
    max-width: 760px;
  }

  .login-access {
    width: min(520px, 100%);
  }
}

@media (max-width: 680px) {
  .login-shell {
    width: min(100% - 28px, 520px);
    gap: 28px;
    padding: 18px 0 32px;
  }

  .login-brand-lockup {
    margin-bottom: 22px;
  }

  .login-market-status {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .login-brand h1 {
    font-size: clamp(36px, 10.5vw, 46px) !important;
    line-height: 0.98 !important;
  }

  .login-brand > p {
    margin-top: 16px;
    font-size: 15px !important;
  }

  .login-value-path {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 18px;
  }

  .login-value-path i {
    width: 18px;
    height: 1px;
    margin: 0;
  }

  .login-signal-cloud {
    display: none;
  }

  .login-card {
    padding: 24px !important;
  }
}

/* CENIT brand lockup · consistent professional treatment */
.sidebar .brand {
  justify-content: center;
  min-height: 76px;
  padding: 2px 4px 22px;
}

.brand-logo-sidebar {
  width: min(190px, 100%);
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(2, 6, 17, 0.28));
}

.login-brand-lockup {
  width: fit-content;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.085);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045), 0 18px 42px rgba(2,6,17,0.18);
}

.brand-logo-login {
  width: clamp(280px, 28vw, 360px);
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(2, 6, 17, 0.24));
}

/* Renovaciones · fecha operativa separada de la evidencia de continuidad */
.renewal-table .row {
  min-width: 1480px;
  grid-template-columns:
    minmax(240px, 1.35fr)
    minmax(205px, 1.05fr)
    minmax(155px, 0.8fr)
    minmax(92px, 0.48fr)
    minmax(125px, 0.62fr)
    minmax(280px, 1.4fr)
    minmax(100px, 0.5fr)
    minmax(300px, 1.35fr);
}

.renewal-table .row[data-renewal-index] {
  min-height: 70px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.renewal-table .row.head {
  min-height: 40px;
}

.renewal-table .row > span:nth-child(8) {
  font-weight: inherit;
  text-align: left;
}

.renewal-days-cell,
.renewal-verification-cell {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  overflow: visible;
  white-space: normal;
}

.renewal-days-cell .remaining-tag {
  justify-self: start;
  min-width: 94px;
  white-space: nowrap;
}

.verification-tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 10px;
  color: #334155;
  background: #f1f5f9;
  font-size: 7.5px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.verification-tag.renewal-success { color: #047857; background: #ecfdf5; }
.verification-tag.renewal-active { color: #4338ca; background: #eef2ff; }
.verification-tag.renewal-warning { color: #1d4ed8; background: #eff6ff; }
.verification-tag.renewal-urgent { color: #b91c1c; background: #fef2f2; }
.verification-tag.renewal-overdue { color: #c2410c; background: #fff7ed; }

.renewal-verification-cell small {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: 7.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.renewal-evidence-code {
  display: block;
  max-width: 100%;
  color: #0f4c81;
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.renewal-table .row[data-renewal-index] .opportunity-row-actions {
  align-items: center;
  align-self: center;
}

/* Movimientos del mercado · adjudicaciones recientes verificables */
.recent-awards-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.recent-awards-controls {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.recent-awards-controls button {
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.recent-awards-controls button.active {
  background: linear-gradient(135deg, #173c7a, #2463d4);
  color: #fff;
  box-shadow: 0 7px 18px rgba(37,99,235,.18);
}

.recent-awards-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.recent-awards-summary article,
.recent-awards-filter {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f5f8fd);
}

.recent-awards-summary span,
.recent-awards-summary strong,
.recent-awards-summary small {
  display: block;
}

.recent-awards-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.recent-awards-summary strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(17px, 2vw, 24px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-awards-filter {
  min-width: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.recent-awards-filter small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-awards-filter:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.recent-awards-filter.active {
  border-color: rgba(37, 99, 235, .55);
  background: linear-gradient(145deg, rgba(219, 234, 254, .92), rgba(236, 254, 255, .92));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09), 0 12px 26px rgba(37, 99, 235, .1);
}

.recent-awards-filter.active span {
  color: #1d4ed8;
}

.recent-awards-filter:focus-visible {
  outline: 3px solid rgba(56, 189, 248, .42);
  outline-offset: 2px;
}

.recent-awards-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  margin-top: 12px;
  padding: 0 7px 8px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(37, 99, 235, .44) rgba(226, 232, 240, .64);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.recent-awards-list::-webkit-scrollbar {
  width: 9px;
}

.recent-awards-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(226, 232, 240, .64);
}

.recent-awards-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(226, 232, 240, .64);
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #0891b2);
}

.recent-award-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.recent-award-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 12px 28px rgba(15,23,42,.09);
}

.recent-award-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recent-award-card > span b {
  color: #2563eb;
  font-size: 10px;
}

.recent-award-card em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
}

.recent-award-card > strong,
.recent-award-card > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-award-card > strong { font-size: 12px; }
.recent-award-card > small { color: var(--muted); font-size: 9px; }
.recent-award-card > b { margin-top: 2px; font-size: 13px; }

@media (max-width: 900px) {
  .recent-awards-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-awards-list {
    grid-template-columns: 1fr;
    max-height: min(62vh, 680px);
  }
}

/* Movimientos del mercado · workspace personalizable por usuario */
.market-layout-controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.9));
}

.market-layout-controls > div:first-child {
  display: grid;
  gap: 3px;
}

.market-layout-controls .eyebrow { margin: 0; }
.market-layout-controls strong { color: #0f172a; font-size: 13px; }
.market-layout-controls small { color: #64748b; font-size: 10px; }

.market-layout-controls > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.market-layout-controls button,
.market-widget-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 10px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.market-layout-controls button:hover,
.market-layout-controls button:focus-visible,
.market-widget-actions button:hover,
.market-widget-actions button:focus-visible {
  border-color: rgba(14, 165, 233, 0.58);
  background: #eff6ff;
  outline: none;
  transform: translateY(-1px);
}

.market-layout-controls button[aria-pressed="true"] {
  border-color: #2563eb;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.18);
}

.market-layout-controls button.secondary { color: #475569; }

.market-widget-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.market-widget-grid > .market-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span var(--market-widget-columns, 4);
  min-width: 0;
  height: var(--market-widget-height, 390px) !important;
  overflow: hidden;
  margin: 0;
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.market-widget-grid > .market-widget > .panel-header,
.market-widget-grid > .market-widget > .market-widget-actions,
.market-widget-grid > .market-widget > .recent-awards-summary {
  flex: 0 0 auto;
  min-width: 0;
}

.market-widget-grid > .market-widget .panel-header > div,
.market-widget-grid > .market-widget .panel-header h2,
.market-widget-grid > .market-widget .panel-context {
  min-width: 0;
}

.market-widget-grid > #recent-awards .recent-awards-list,
.market-widget-grid > #portfolio-mix .mix-layout,
.market-widget-grid > #scoring .score-list,
.market-widget-grid > #compradores .buyer-map,
.market-widget-grid > #competidores #competitor-table {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.market-widget-grid > #portfolio-mix .mix-layout {
  align-content: start;
  padding-right: 4px;
}

/* El SVG histórico siempre se contiene en el espacio disponible de la tarjeta.
   Evita que una tarjeta ancha haga crecer el gráfico fuera de su panel. */
.market-widget-grid > #historicos .pro-chart {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.market-widget-grid > #historicos .chart-legend,
.market-widget-grid > #historicos .chart-kpis {
  flex: 0 0 auto;
  min-width: 0;
}

.market-widget-grid > #historicos .pro-chart svg {
  display: block;
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.market-widget-grid > #historicos .panel-header {
  flex-wrap: wrap;
}

.market-widget-grid > #historicos .chart-controls {
  min-width: 0;
}

.market-widget-grid > #historicos .chart-controls select {
  min-width: 0;
  max-width: 100%;
}

/* Densidad de contenido según el ancho elegido por cada usuario. */
.market-widget-grid > #recent-awards[data-widget-columns="4"] .recent-awards-summary,
.market-widget-grid > #recent-awards[data-widget-columns="6"] .recent-awards-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-widget-grid > #recent-awards[data-widget-columns="4"] .recent-awards-list {
  grid-template-columns: 1fr;
}

.market-widget-grid > #recent-awards[data-widget-columns="6"] .recent-awards-list,
.market-widget-grid > #recent-awards[data-widget-columns="8"] .recent-awards-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-widget-grid > #portfolio-mix[data-widget-columns="4"] .donut-block {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
}

.market-widget-grid > #portfolio-mix[data-widget-columns="4"] .donut {
  width: 112px;
  height: 112px;
}

.market-widget-grid > #portfolio-mix[data-widget-columns="4"] .donut::before {
  width: 72px;
  height: 72px;
}

.market-widget-grid > #portfolio-mix[data-widget-columns="4"] .category-bar {
  grid-template-columns: minmax(82px, 1fr) minmax(56px, .8fr) 34px;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .panel-header,
.market-widget-grid > #historicos[data-widget-columns="6"] .panel-header {
  align-items: stretch;
  flex-direction: column;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-controls,
.market-widget-grid > #historicos[data-widget-columns="6"] .chart-controls {
  justify-content: stretch;
  width: 100%;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-controls select,
.market-widget-grid > #historicos[data-widget-columns="6"] .chart-controls select {
  flex: 1 1 145px;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-kpis {
  gap: 5px;
  margin-inline: 0;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-kpis > div {
  padding: 6px;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-kpis span,
.market-widget-grid > #historicos[data-widget-columns="4"] .chart-kpis small {
  font-size: 7px;
}

.market-widget-grid > #historicos[data-widget-columns="4"] .chart-kpis strong {
  font-size: 9px;
}

/* La tabla competitiva conserva todas sus columnas en tarjetas medianas y
   simplifica únicamente la lectura secundaria cuando el usuario la compacta. */
.market-widget-grid > #competidores #competitor-table .row {
  min-width: 0;
}

.market-widget-grid > #competidores #competitor-table .row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-widget-grid > #competidores[data-widget-columns="4"] #competitor-table .row {
  grid-template-columns: minmax(0, 1.45fr) .72fr .72fr minmax(0, 1fr);
  gap: 5px;
  padding-inline: 8px;
  font-size: 8px;
}

.market-widget-grid > #competidores[data-widget-columns="4"] #competitor-table .row > :nth-child(5) {
  display: none;
}

.market-widget-grid > #competidores[data-widget-columns="6"] #competitor-table .row {
  grid-template-columns: minmax(0, 1.35fr) .72fr .72fr minmax(0, 1fr) .65fr;
  gap: 6px;
  padding-inline: 9px;
  font-size: 8.5px;
}

.market-widget-grid > .market-widget[data-widget-height="compact"] {
  --market-widget-height: 340px;
}

/* En altura compacta, el resumen de adjudicaciones se mantiene en una sola
   franja desplazable. Así no empuja la lista fuera de la tarjeta cuando el
   usuario combina altura compacta con 4 o 6 columnas. */
.market-widget-grid > #recent-awards[data-widget-height="compact"] .recent-awards-summary {
  grid-template-columns: repeat(4, minmax(128px, 1fr)) !important;
  flex: 0 0 auto;
  gap: 7px;
  max-width: 100%;
  margin-top: 8px;
  padding-bottom: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.market-widget-grid > #recent-awards[data-widget-height="compact"] .recent-awards-summary article,
.market-widget-grid > #recent-awards[data-widget-height="compact"] .recent-awards-filter {
  min-width: 0;
  padding: 8px 10px;
}

.market-widget-grid > #recent-awards[data-widget-height="compact"] .recent-awards-summary strong {
  margin-top: 3px;
  font-size: 15px;
}

.market-widget-grid > #recent-awards[data-widget-height="compact"] .recent-awards-summary small {
  margin-top: 3px;
}

.market-widget-grid > .market-widget[data-widget-height="standard"] {
  --market-widget-height: 460px;
}

.market-widget-grid > .market-widget[data-widget-height="expanded"] {
  --market-widget-height: 620px;
}

.market-widget-grid > .market-widget[data-widget-height="compact"] .recent-awards-list,
.market-widget-grid > .market-widget[data-widget-height="compact"] .score-list,
.market-widget-grid > .market-widget[data-widget-height="compact"] .buyer-map,
.market-widget-grid > .market-widget[data-widget-height="compact"] #competitor-table {
  overflow-y: auto;
}

.market-widget-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -4px -4px 10px;
  padding: 7px;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.92);
}

.market-widget-actions strong {
  margin-right: auto;
  color: #334155;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.market-widget-actions button {
  min-width: 34px;
  min-height: 30px;
  padding: 0 8px;
}

.market-widget-actions .market-widget-grip {
  color: #0f766e;
  cursor: grab;
}

.market-widget-grid.is-editing .market-widget-actions { display: flex; }

.market-widget-grid.is-editing > .market-widget {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.06), 0 18px 42px rgba(15, 23, 42, 0.09);
}

.market-widget-grid.is-editing > .market-widget[draggable="true"] { cursor: move; }
.market-widget-grid > .market-widget.is-dragging { opacity: .45; transform: scale(.985); }
.market-widget-grid > .market-widget.is-drag-over {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .16), 0 18px 42px rgba(15, 23, 42, .1);
}

/* Laboratorio de Ventaja Competitiva · evidencia, conclusión y aprendizaje */
.competitive-driver-lab {
  background:
    radial-gradient(circle at 92% 4%, rgba(6, 182, 212, .12), transparent 31%),
    linear-gradient(145deg, #ffffff 0%, #f7fbff 54%, #f4f7ff 100%);
}

.competitive-driver-header {
  align-items: flex-start;
  gap: 16px;
}

.competitive-pilot-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(8, 145, 178, .24);
  border-radius: 999px;
  color: #0e7490;
  background: rgba(236, 254, 255, .9);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.competitive-driver-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.competitive-driver-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  flex: 1;
  min-height: 230px;
  padding: 26px;
  border: 1px dashed rgba(14, 116, 144, .25);
  border-radius: 18px;
  color: #52657a;
  text-align: center;
  background: rgba(255,255,255,.62);
}

.competitive-driver-empty strong { color: #13233b; font-size: 15px; }
.competitive-driver-empty p { max-width: 580px; margin: 0; font-size: 11px; line-height: 1.55; }
.competitive-driver-empty button,
.competitive-feedback-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 10px;
  color: #1d4ed8;
  background: #fff;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.competitive-driver-orbit {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(6, 182, 212, .34);
  border-radius: 50%;
}

.competitive-driver-orbit::before,
.competitive-driver-orbit::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.competitive-driver-orbit::before { inset: 8px; border: 1px solid rgba(99, 102, 241, .42); }
.competitive-driver-orbit::after { inset: 17px; background: #06b6d4; box-shadow: 0 0 16px rgba(6,182,212,.65); }
.competitive-driver-empty.is-loading .competitive-driver-orbit { animation: competitive-orbit 1.8s linear infinite; }

@keyframes competitive-orbit { to { transform: rotate(360deg); } }

.competitive-driver-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(150px, .8fr) minmax(170px, .7fr);
  gap: 10px;
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.competitive-driver-controls label,
.competitive-driver-coverage {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #dce6f0;
  border-radius: 13px;
  background: rgba(255,255,255,.82);
}

.competitive-driver-controls label > span,
.competitive-driver-coverage > span {
  color: #64748b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.competitive-driver-controls select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  color: #14233a;
  background: transparent;
  font-size: 10px;
  font-weight: 780;
  outline: none;
}

.competitive-driver-coverage {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.competitive-driver-coverage strong { color: #0f766e; font-size: 19px; }
.competitive-driver-coverage small { grid-column: 1 / -1; color: #718096; font-size: 8px; }

.competitive-driver-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.competitive-driver-kpis article {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 13px;
  background: rgba(248,250,252,.88);
}
.competitive-driver-kpis article.own { border-color: rgba(16,185,129,.25); background: rgba(236,253,245,.65); }
.competitive-driver-kpis article.rival { border-color: rgba(139,92,246,.22); background: rgba(245,243,255,.72); }
.competitive-driver-kpis span { color: #64748b; font-size: 8px; font-weight: 820; text-transform: uppercase; }
.competitive-driver-kpis strong { overflow: hidden; color: #13233b; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.competitive-driver-kpis small { color: #718096; font-size: 8px; }

.competitive-driver-reading {
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 174, 67, .27);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,251,235,.86), rgba(255,255,255,.8));
}
.competitive-driver-reading span { color: #9a6b0a; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.competitive-driver-reading strong { color: #27344a; font-size: 11px; line-height: 1.4; }
.competitive-driver-reading small { color: #7c6b45; font-size: 8px; line-height: 1.45; }

.competitive-driver-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.competitive-driver-comparison,
.competitive-driver-evidence {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid #dce6f0;
  border-radius: 15px;
  background: rgba(255,255,255,.76);
}

.competitive-driver-comparison > header,
.competitive-driver-evidence > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  margin-bottom: 8px;
}
.competitive-driver-comparison header strong,
.competitive-driver-evidence header strong { color: #15243a; font-size: 11px; }
.competitive-driver-comparison header small,
.competitive-driver-evidence header small { color: #718096; font-size: 8px; }

.competitive-driver-bars,
.competitive-driver-evidence > div {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.competitive-driver-bars article {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(80px, 1fr) minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 2px;
  border-bottom: 1px solid #edf2f7;
}
.competitive-driver-bars article > div:first-child { display: grid; gap: 2px; min-width: 0; }
.competitive-driver-bars article strong { overflow: hidden; color: #334155; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.competitive-driver-bars article small { color: #8491a4; font-size: 7px; }
.competitive-driver-bar { position: relative; height: 19px; overflow: hidden; border-radius: 6px; background: #edf2f7; }
.competitive-driver-bar::before { position: absolute; inset: 0 auto 0 0; width: var(--value); content: ""; border-radius: inherit; }
.competitive-driver-bar.own::before { background: linear-gradient(90deg, #10b981, #35e6a3); }
.competitive-driver-bar.rival::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.competitive-driver-bar span { position: relative; z-index: 1; display: grid; place-items: center; height: 100%; color: #172033; font-size: 7px; font-weight: 850; }
.competitive-driver-key { display: flex; justify-content: flex-end; gap: 12px; padding-top: 6px; color: #64748b; font-size: 8px; }
.competitive-driver-key span::before { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; content: ""; }
.competitive-driver-key .own::before { background: #10b981; }
.competitive-driver-key .rival::before { background: #7c3aed; }

.competitive-evidence-card {
  display: grid;
  gap: 4px;
  padding: 8px 3px;
  border-bottom: 1px solid #e8eef5;
}
.competitive-evidence-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.competitive-evidence-card > div:first-child span { padding: 3px 6px; border-radius: 999px; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.competitive-evidence-card span.own { color: #047857; background: #d1fae5; }
.competitive-evidence-card span.rival { color: #6d28d9; background: #ede9fe; }
.competitive-evidence-card strong { overflow: hidden; color: #1e293b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.competitive-evidence-card small { color: #77869a; font-size: 7.5px; }
.competitive-evidence-card p { display: grid; gap: 2px; margin: 2px 0 0; color: #52657a; font-size: 8px; line-height: 1.4; }
.competitive-evidence-card p b { color: #27364d; }
.competitive-evidence-card em { color: #9a6b0a; font-size: 7px; font-style: normal; }
.competitive-feedback-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.competitive-feedback-actions button { min-height: 25px; padding: 0 8px; font-size: 7px; }
.competitive-feedback-status { margin-top: 3px; padding: 5px 7px; border-radius: 8px; color: #475569; background: #f1f5f9; font-size: 7.5px; font-weight: 760; }
.competitive-feedback-status.confirmed { color: #047857; background: #d1fae5; }
.competitive-feedback-status.rejected { color: #b91c1c; background: #fee2e2; }
.competitive-feedback-status.adjusted { color: #6d28d9; background: #ede9fe; }
.competitive-driver-note { padding: 18px; color: #718096; font-size: 9px; text-align: center; }

.market-widget-grid > #competitive-drivers[data-widget-columns="4"] .competitive-driver-controls,
.market-widget-grid > #competitive-drivers[data-widget-columns="6"] .competitive-driver-controls,
.market-widget-grid > #competitive-drivers[data-widget-columns="4"] .competitive-driver-columns,
.market-widget-grid > #competitive-drivers[data-widget-columns="6"] .competitive-driver-columns {
  grid-template-columns: 1fr;
}
.market-widget-grid > #competitive-drivers[data-widget-columns="4"] .competitive-driver-kpis,
.market-widget-grid > #competitive-drivers[data-widget-columns="6"] .competitive-driver-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-widget-grid > #competitive-drivers[data-widget-columns="4"] .competitive-driver-columns,
.market-widget-grid > #competitive-drivers[data-widget-columns="6"] .competitive-driver-columns { overflow-y: auto; }
.market-widget-grid > #competitive-drivers[data-widget-height="compact"] .competitive-driver-reading { display: none; }

@media (max-width: 1180px) {
  .market-widget-grid > .market-widget[data-widget-columns="4"],
  .market-widget-grid > .market-widget[data-widget-columns="6"],
  .market-widget-grid > .market-widget[data-widget-columns="8"] {
    grid-column: span 6;
  }

  .market-widget-grid > .market-widget[data-widget-columns="12"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .market-layout-controls { align-items: flex-start; flex-direction: column; }
  .market-layout-controls > div:last-child { justify-content: flex-start; }
  .market-widget-grid > .market-widget {
    grid-column: 1 / -1;
    height: auto !important;
    min-height: 360px;
  }
  .market-widget-actions { flex-wrap: wrap; justify-content: flex-start; }
  .market-widget-actions strong { width: 100%; }
  .competitive-driver-header { flex-direction: column; }
  .competitive-driver-controls,
  .competitive-driver-columns { grid-template-columns: 1fr; }
  .competitive-driver-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competitive-driver-columns { overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .market-widget-grid > .market-widget,
  .market-layout-controls button,
  .market-widget-actions button { transition: none; }
  .competitive-driver-empty.is-loading .competitive-driver-orbit { animation: none; }
}

@media print {
  .market-layout-controls,
  .market-widget-actions { display: none !important; }
}

/* CENIT identity system · crisp symbol + native typographic lockup */
.cenit-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cenit-lockup-symbol {
  display: block;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.24));
}

.cenit-lockup-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cenit-lockup-copy strong {
  color: #f8fafc;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: .17em;
  line-height: .95;
}

.cenit-lockup-copy small {
  color: #aab6c8;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
}

.cenit-lockup-copy small i {
  color: #d8b75d;
  font-style: normal;
}

.login-brand-lockup.cenit-lockup-login {
  width: fit-content;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.11);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cenit-lockup-login .cenit-lockup-symbol {
  width: 72px;
  height: 72px;
}

.cenit-lockup-login .cenit-lockup-copy strong {
  font-size: 34px;
  letter-spacing: .2em;
}

.cenit-lockup-login .cenit-lockup-copy small {
  font-size: 11px;
}

.sidebar .brand.cenit-lockup-sidebar {
  display: flex;
  justify-content: flex-start;
  min-height: 82px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.cenit-lockup-sidebar .cenit-lockup-symbol {
  width: 48px;
  height: 48px;
}

.cenit-lockup-sidebar .cenit-lockup-copy {
  gap: 4px;
}

.cenit-lockup-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cenit-lockup-sidebar .cenit-lockup-copy strong {
  font-size: 19px;
  letter-spacing: .14em;
}

.cenit-lockup-sidebar .cenit-lockup-copy small {
  font-size: 7px;
  letter-spacing: .045em;
}

.cenit-lockup-sidebar .brand-edition {
  position: static;
  padding: 3px 5px;
  border: 1px solid rgba(56,213,255,.2);
  border-radius: 6px;
  color: #06121f;
  background: #52daf7;
  font-size: 6px;
  letter-spacing: .06em;
  box-shadow: none;
}

@media (max-width: 680px) {
  .login-brand-lockup.cenit-lockup-login {
    width: fit-content;
    padding: 0 0 14px;
  }
  .cenit-lockup-login .cenit-lockup-symbol { width: 58px; height: 58px; }
  .cenit-lockup-login .cenit-lockup-copy strong { font-size: 27px; }
  .cenit-lockup-login .cenit-lockup-copy small { font-size: 9px; }
}

@media (max-width: 680px) {
  .login-brand-lockup {
    width: 100%;
    padding: 8px 12px;
  }

  .brand-logo-login {
    width: min(310px, 100%);
  }
}

/* Órdenes de Compra · módulo operativo con carga diferida */
.purchase-orders-module {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 64px);
  padding: clamp(18px, 2vw, 28px);
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 0%, rgba(24, 191, 218, .08), transparent 34%),
    #f8fafc;
}

.purchase-orders-heading {
  align-items: flex-start;
}

.purchase-orders-freshness {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #cfe4ee;
  border-radius: 999px;
  color: #315064;
  background: #f5fbfd;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.purchase-orders-filters {
  display: grid;
  grid-template-columns: minmax(320px, 2.2fr) repeat(5, minmax(128px, .8fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}

.purchase-orders-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.purchase-orders-filters label > span {
  color: #62748a;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.purchase-orders-filters input,
.purchase-orders-filters select,
.purchase-orders-filters button,
.purchase-orders-pagination button {
  min-height: 42px;
  border: 1px solid #d5e0eb;
  border-radius: 12px;
  color: #17233a;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.purchase-orders-filters input,
.purchase-orders-filters select {
  width: 100%;
  padding: 0 12px;
}

.purchase-orders-filters input:focus,
.purchase-orders-filters select:focus {
  outline: 3px solid rgba(14, 165, 233, .13);
  border-color: #38bdf8;
}

.purchase-orders-filters button,
.purchase-orders-pagination button,
.purchase-order-detail-button {
  padding: 0 14px;
  font-weight: 780;
  cursor: pointer;
}

.purchase-orders-filters > button {
  color: #fff;
  border-color: #132137;
  background: #132137;
  white-space: nowrap;
}

.purchase-orders-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.purchase-order-summary-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.purchase-order-summary-card:hover {
  border-color: #9fd7e7;
  box-shadow: 0 10px 24px rgba(15, 118, 153, .08);
  transform: translateY(-1px);
}

.purchase-order-summary-card.active {
  border-color: #22b7d3;
  background: linear-gradient(135deg, #f2fbfd, #f7f8ff);
  box-shadow: inset 0 0 0 1px rgba(34, 183, 211, .16), 0 12px 28px rgba(15, 118, 153, .08);
}

.purchase-order-summary-card:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .22);
  outline-offset: 2px;
}

.purchase-orders-summary span {
  color: #62748a;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.purchase-orders-summary strong {
  overflow: hidden;
  color: #101c32;
  font-size: clamp(20px, 1.65vw, 29px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-orders-summary small,
.purchase-orders-notice {
  color: #738197;
  font-size: 11px;
}

.purchase-orders-notice {
  padding: 10px 13px;
  border-left: 3px solid #20b8d4;
  border-radius: 0 10px 10px 0;
  background: #eef9fc;
}

.purchase-orders-table {
  display: block;
  min-height: 480px;
  max-height: calc(100vh - 430px);
  overflow: auto;
  border: 1px solid #d8e3ee;
  border-radius: 16px;
  background: #fff;
  scrollbar-gutter: stable;
}

.purchase-orders-table .row {
  display: grid;
  grid-template-columns:
    minmax(135px, .8fr)
    minmax(170px, 1.05fr)
    minmax(170px, 1fr)
    minmax(220px, 1.55fr)
    minmax(120px, .68fr)
    minmax(190px, 1.1fr)
    minmax(92px, .48fr);
  min-width: 1160px;
  align-items: start;
  border-bottom: 1px solid #e4ebf2;
}

.purchase-orders-table .row.head {
  position: sticky;
  z-index: 3;
  top: 0;
  background: #f3f7fb;
  box-shadow: 0 1px 0 #d8e3ee;
}

.purchase-orders-table .row:not(.head):hover {
  background: #f7fbfd;
}

.purchase-orders-table .row:not(.head) {
  min-height: 76px;
}

.purchase-orders-table .row > span {
  min-width: 0;
  padding: 11px 12px;
}

.purchase-orders-table .row > span strong,
.purchase-orders-table .row > span small {
  display: block;
  overflow-wrap: anywhere;
}

.purchase-orders-table .row > span strong {
  color: #24344d;
  font-size: 12px;
  line-height: 1.3;
}

.purchase-orders-table .row > span small {
  margin-top: 4px;
  color: #718198;
  font-size: 10px;
  line-height: 1.35;
}

.purchase-orders-table .row:not(.head) > span:not(.purchase-order-description):not(.purchase-order-trace) strong,
.purchase-orders-table .row:not(.head) > span:not(.purchase-order-description):not(.purchase-order-trace) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-order-description strong,
.purchase-order-description small {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical;
}

.purchase-order-description strong { -webkit-line-clamp: 2; }
.purchase-order-description small { -webkit-line-clamp: 2; }

.purchase-order-code strong { color: #116f91 !important; }
.purchase-order-amount { text-align: right; }

.purchase-order-status {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  color: #16714f;
  background: #e6f8ef;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-order-trace {
  display: grid;
  gap: 4px;
}

.purchase-order-trace strong {
  color: #314c68 !important;
  font-size: 11px !important;
}

.purchase-order-action {
  display: flex;
  justify-content: flex-end;
}

.purchase-order-detail-button {
  min-height: 34px;
  border: 1px solid #bfe1ec;
  border-radius: 10px;
  color: #116f91;
  background: #f1fbfd;
  font-size: 11px;
}

.purchase-order-detail-button:hover { background: #dff6fb; }

.purchase-orders-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 300px;
  padding: 30px;
  color: #708097;
  text-align: center;
}

.purchase-orders-empty strong { color: #26354b; }

.purchase-orders-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #62748a;
  font-size: 12px;
}

.purchase-orders-pagination > div { display: flex; gap: 8px; }
.purchase-orders-pagination button { color: #155b78; background: #fff; }
.purchase-orders-pagination button:disabled { opacity: .45; cursor: not-allowed; }

.purchase-order-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: #1a2740;
  background: #f8fafc;
  box-shadow: 0 32px 100px rgba(2, 8, 23, .38);
}

.purchase-order-dialog::backdrop { background: rgba(5, 12, 26, .68); backdrop-filter: blur(5px); }

.purchase-order-dialog-header,
.purchase-order-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
}

.purchase-order-dialog-header {
  color: #fff;
  background: linear-gradient(120deg, #07162a, #123452 62%, #27315d);
}

.purchase-order-dialog-header h2 { margin: 3px 0; font-size: 25px; }
.purchase-order-dialog-header span { color: #b5c7d8; font-size: 12px; }
.purchase-order-dialog-header button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.07);
  font-size: 24px;
  cursor: pointer;
}

.purchase-order-dialog-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 220px);
  padding: 20px 24px;
  overflow: auto;
}

.purchase-order-dialog-body > section {
  padding: 16px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: #fff;
}

.purchase-order-dialog-body h3 {
  margin: 0 0 12px;
  color: #15243d;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.purchase-order-detail-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}

.purchase-order-detail-hero div { display: grid; gap: 5px; }
.purchase-order-detail-hero span,
.purchase-order-facts dt { color: #728096; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.purchase-order-detail-hero strong { color: #14213a; font-size: 18px; }
.purchase-order-detail-hero div:last-child { text-align: right; }

.purchase-order-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.purchase-order-facts div { min-width: 0; }
.purchase-order-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.purchase-order-detail-description p { margin: 0; color: #53647a; line-height: 1.6; white-space: pre-wrap; }

.purchase-order-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid #dbe5ef;
  background: #fff;
}

.purchase-order-dialog-actions button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #0f7899;
  border-radius: 11px;
  color: #fff;
  background: #0f7899;
  font-weight: 750;
  cursor: pointer;
}

.purchase-order-dialog-actions button.secondary { color: #315064; border-color: #cfdce8; background: #fff; }

@media (max-width: 1500px) {
  .purchase-orders-filters { grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(130px, 1fr)); }
  .purchase-orders-filters > label:nth-of-type(5),
  .purchase-orders-filters > label:nth-of-type(6) { grid-column: auto; }
}

@media (max-width: 1400px) {
  .purchase-orders-module { min-height: auto; }
  .purchase-orders-table { max-height: 680px; padding: 10px; }
  .purchase-orders-table .row.head { display: none; }
  .purchase-orders-table .row:not(.head) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    min-height: 0;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #dce6ef;
    border-radius: 14px;
    background: #fff;
  }
  .purchase-orders-table .row > span {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f6;
  }
  .purchase-orders-table .row > span::before {
    display: block;
    margin-bottom: 5px;
    color: #7b899b;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 820;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .purchase-order-description,
  .purchase-order-trace { grid-column: 1 / span 2; }
  .purchase-order-action { align-items: center; justify-content: flex-start; }
}

@media (max-width: 900px) {
  .purchase-orders-filters { grid-template-columns: 1fr 1fr; }
  .purchase-orders-search { grid-column: 1 / -1; }
  .purchase-orders-summary { grid-template-columns: 1fr 1fr; }
  .purchase-order-facts { grid-template-columns: 1fr 1fr; }
  .purchase-orders-table .row:not(.head) { grid-template-columns: 1fr 1fr; }
  .purchase-order-description,
  .purchase-order-trace { grid-column: 1 / -1; }
}

@media (max-width: 580px) {
  .purchase-orders-filters,
  .purchase-orders-summary,
  .purchase-order-detail-hero,
  .purchase-order-facts { grid-template-columns: 1fr; }
  .purchase-order-detail-hero div:last-child { text-align: left; }
  .purchase-orders-pagination,
  .purchase-order-dialog-actions { align-items: stretch; flex-direction: column; }
  .purchase-order-dialog-actions button { width: 100%; }
  .purchase-orders-table .row:not(.head) { grid-template-columns: 1fr; }
  .purchase-order-description,
  .purchase-order-trace { grid-column: auto; }
}

/* Cierre del contrato de impresión.
   Estas reglas deben permanecer al final para prevalecer sobre las capas
   visuales del Centro de Comando agregadas después del bloque print base. */
@media print {
  html,
  body,
  .app-shell,
  .main,
  #movimientos,
  #reporteria {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body .topbar,
  body .data-status,
  body .creator-credit,
  body .sidebar,
  body .loading-overlay {
    display: none !important;
  }

  body .app-shell,
  body .main,
  body #movimientos,
  body #reporteria {
    display: block !important;
  }

  body #movimientos {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
/* CRM comercial y soporte por empresa */
.crm-module {
  min-height: calc(100vh - 48px);
  padding: clamp(20px, 3vw, 42px);
  background: #f4f7fb;
  color: #12203a;
}

.crm-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid rgba(73, 211, 255, .18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 86% 20%, rgba(77, 91, 255, .25), transparent 34%),
    linear-gradient(135deg, #071222, #10243d 60%, #18234d);
  box-shadow: 0 24px 70px rgba(9, 22, 44, .18);
  color: #f8fbff;
}

.crm-eyebrow,
.crm-card-eyebrow,
.crm-record-kicker {
  display: block;
  margin-bottom: 8px;
  color: #30d4f5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.crm-hero h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.045em; }
.crm-hero p { max-width: 760px; margin: 12px 0 0; color: #b9c7dc; font-size: 16px; }
.crm-company-badge { flex: 0 0 auto; padding: 12px 18px; border: 1px solid rgba(56, 213, 255, .28); border-radius: 999px; background: rgba(4, 14, 30, .46); color: #dff9ff; font-weight: 750; }

.crm-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #dae3ef;
  border-radius: 18px;
  background: #fff;
}

.crm-toolbar label,
.crm-form-card label,
.crm-ticket-form label,
.crm-ticket-admin-controls label { display: grid; gap: 7px; color: #53627a; font-size: 12px; font-weight: 750; }
.crm-toolbar select,
.crm-toolbar input,
.crm-form-card input,
.crm-form-card select,
.crm-form-card textarea,
.crm-ticket-form input,
.crm-ticket-form select,
.crm-ticket-form textarea,
.crm-ticket-admin-controls input,
.crm-ticket-admin-controls select,
.crm-ticket-reply textarea {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d4deeb;
  border-radius: 12px;
  background: #fff;
  color: #16233a;
  font: inherit;
}

.crm-toolbar button,
.crm-form-card button,
.crm-ticket-form button,
.crm-ticket-admin-controls button,
.crm-ticket-reply button {
  min-height: 43px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #315ae8, #10bddd);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.crm-inline-status { min-height: 20px; margin: 10px 4px 0; color: #52627b; font-size: 13px; }
.crm-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.crm-summary article { padding: 20px; border: 1px solid #dbe4f0; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(27, 44, 73, .06); }
.crm-summary span { display: block; color: #6c7a91; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-summary strong { display: block; margin-top: 9px; color: #14213a; font-size: clamp(25px, 2.5vw, 38px); letter-spacing: -.04em; }
.crm-summary small { color: #7c899d; }

.crm-admin-grid,
.crm-ledger-grid,
.crm-support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.crm-form-card,
.crm-ledger-card,
.crm-ticket-form,
.crm-ticket-list-card { padding: 22px; border: 1px solid #dbe4f0; border-radius: 20px; background: #fff; box-shadow: 0 12px 30px rgba(30, 49, 80, .055); }
.crm-form-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.crm-form-card > header { grid-column: 1 / -1; display: grid; gap: 4px; margin-bottom: 4px; }
.crm-form-card > header span { color: #30aeca; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.crm-form-card > header strong { font-size: 20px; }
.crm-form-card h3,
.crm-ledger-card h3,
.crm-support-surface h3 { margin: 0; color: #17243b; font-size: 21px; }
.crm-form-card > p,
.crm-support-heading p { margin: 6px 0 18px; color: #738097; }
.crm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.crm-form-grid .wide { grid-column: 1 / -1; }
.crm-tax-preview { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; background: #edf8fb; color: #087a96; font-weight: 750; }
.crm-form-card button { grid-column: 1 / -1; }
.crm-ledger-heading,
.crm-support-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.crm-ledger-heading span,
.crm-support-heading span { color: #65748b; font-size: 13px; }
.crm-record-list,
.crm-ticket-list { display: grid; gap: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.crm-record { display: flex; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid #e0e7f0; border-radius: 14px; background: #fbfcfe; }
.crm-record strong,
.crm-record small { display: block; }
.crm-record small { margin-top: 5px; color: #718098; }
.crm-record-value { flex: 0 0 auto; text-align: right; }
.crm-record-value strong { font-size: 18px; }
.crm-empty { display: grid; gap: 5px; min-height: 112px; place-content: center; text-align: center; color: #7a879a; }
.crm-empty strong { color: #334259; }

.crm-support-surface { margin-top: 22px; padding-top: 22px; border-top: 1px solid #d8e1ed; }
.crm-support-grid { align-items: start; }
.crm-ticket-form { position: sticky; top: 18px; }
.crm-ticket-form button { width: 100%; margin-top: 12px; }
.crm-ticket { padding: 17px; border: 1px solid #dbe4ef; border-radius: 16px; background: #fff; }
.crm-ticket header { display: flex; justify-content: space-between; gap: 15px; }
.crm-ticket h4 { margin: 4px 0; color: #18253b; font-size: 17px; }
.crm-ticket p { margin: 5px 0; color: #5d6a80; white-space: pre-wrap; }
.crm-ticket-code { color: #69809d; font-size: 10px; text-transform: uppercase; }
.crm-ticket-badges { display: flex; align-items: flex-start; gap: 6px; }
.crm-ticket-badges span { padding: 5px 9px; border-radius: 999px; background: #edf2f8; color: #4d5e78; font-size: 10px; font-weight: 800; white-space: nowrap; }
.crm-ticket-badges .priority-high,
.crm-ticket-badges .priority-critical { background: #fff0ef; color: #b63838; }
.crm-ticket-meta { margin-top: 9px; color: #7d899c; font-size: 11px; }
.crm-ticket-thread { display: grid; gap: 7px; margin-top: 12px; }
.crm-ticket-message { padding: 10px 12px; border-radius: 11px; background: #eef5fb; }
.crm-ticket-message.internal { background: #fff6dc; }
.crm-ticket-message strong,
.crm-ticket-message small { font-size: 10px; color: #62718a; }
.crm-ticket-message p { margin: 4px 0; color: #26364f; font-size: 13px; }
.crm-ticket-admin-controls { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; align-items: end; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #e3e9f1; }
.crm-ticket-reply { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 8px; margin-top: 10px; }
.crm-ticket-reply label { display: flex; align-items: center; gap: 5px; color: #6c7890; font-size: 11px; white-space: nowrap; }
.crm-ticket-reply label input { width: auto; }

@media (max-width: 1100px) {
  .crm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-admin-grid, .crm-ledger-grid, .crm-support-grid { grid-template-columns: 1fr; }
  .crm-ticket-form { position: static; }
}

@media (max-width: 720px) {
  .crm-module { padding: 14px; }
  .crm-hero { align-items: flex-start; flex-direction: column; }
  .crm-toolbar { grid-template-columns: 1fr; }
  .crm-summary { grid-template-columns: 1fr; }
  .crm-form-grid, .crm-form-card { grid-template-columns: 1fr; }
  .crm-ticket-admin-controls, .crm-ticket-reply { grid-template-columns: 1fr; }
  .crm-record, .crm-ticket header { flex-direction: column; }
  .crm-record-value { text-align: left; }
}

/* Alertas comerciales: cambios verificables y gestión interna por tenant */
body:not([data-platform-admin="true"]) .platform-admin-only {
  display: none !important;
}

.platform-admin-only[hidden] {
  display: none !important;
}

body.alerts-open {
  overflow: hidden;
}

.user-session .alert-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(56, 213, 255, 0.3);
  border-radius: 11px;
  color: #dff8ff;
  background: rgba(8, 23, 42, 0.76);
}

.user-session .alert-bell:hover,
.user-session .alert-bell:focus-visible {
  border-color: rgba(56, 213, 255, 0.7);
  background: rgba(14, 40, 66, 0.9);
  transform: translateY(-1px);
}

.alert-bell-label {
  font-size: 11px;
  font-weight: 750;
}

.alert-bell-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #07111f;
  background: #38d5ff;
  font-size: 10px;
  font-weight: 850;
}

.alerts-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(3px);
}

.alerts-drawer {
  position: fixed;
  z-index: 1200;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(620px, 94vw);
  max-height: 100dvh;
  overflow: hidden;
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  color: #e5edf8;
  background:
    radial-gradient(circle at 92% 4%, rgba(56, 213, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #0a1425, #07101e 62%, #050b16);
  box-shadow: -24px 0 70px rgba(2, 6, 23, 0.5);
}

.alerts-drawer[hidden],
.alerts-backdrop[hidden],
.alert-bell-count[hidden] {
  display: none !important;
}

.alerts-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 26px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.alerts-drawer-header h2 {
  margin: 5px 0 7px;
  color: #f8fafc;
  font-size: clamp(23px, 3vw, 31px);
  letter-spacing: -0.035em;
}

.alerts-drawer-header p:last-child,
.alerts-section-copy {
  margin: 0;
  color: #8fa0b8;
  font-size: 13px;
  line-height: 1.55;
}

.alerts-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #e5edf8;
  background: rgba(255, 255, 255, 0.04);
  font-size: 25px;
}

.alerts-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 26px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #9fb0c7;
  font-size: 12px;
}

.alerts-toolbar button,
.alert-card-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(56, 213, 255, 0.26);
  border-radius: 10px;
  color: #dff8ff;
  background: rgba(19, 55, 79, 0.5);
  font-size: 11px;
  font-weight: 760;
}

.alerts-drawer-body {
  display: grid;
  gap: 26px;
  padding: 22px 26px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.alerts-section {
  display: grid;
  gap: 13px;
}

.alerts-section.internal {
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.alerts-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.alerts-section-heading h3 {
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: 18px;
}

.alerts-section-heading > span {
  min-width: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #b8c6d9;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.alerts-list {
  display: grid;
  gap: 11px;
}

.alert-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.alert-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #38d5ff;
}

.alert-card[data-severity="critical"]::before { background: #ff5c7a; }
.alert-card[data-severity="high"]::before { background: #f2c94c; }
.alert-card.is-read { opacity: 0.68; }

.alert-card-header,
.alert-change-values,
.alert-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.alert-card-header strong {
  display: block;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.35;
}

.alert-card-header small,
.alert-card-meta,
.alert-card p {
  color: #91a2b9;
  font-size: 11px;
  line-height: 1.5;
}

.alert-severity {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(56, 213, 255, 0.13);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert-card[data-severity="critical"] .alert-severity { color: #ffdbe3; background: rgba(255, 92, 122, 0.14); }
.alert-card[data-severity="high"] .alert-severity { color: #fff1b7; background: rgba(242, 201, 76, 0.13); }

.alert-change-values {
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.3);
}

.alert-change-values span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #9fb0c7;
  font-size: 10px;
}

.alert-change-values strong {
  overflow-wrap: anywhere;
  color: #e5edf8;
  font-size: 12px;
}

.alert-impact {
  display: grid;
  gap: 6px;
  margin: 0;
}

.alert-impact span {
  color: #b6c4d7;
  font-size: 11px;
}

.alert-impact strong {
  color: #f3f7fb;
  font-size: 12px;
  line-height: 1.45;
}

.alert-card-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.alert-card-actions button.primary {
  border-color: rgba(56, 213, 255, 0.52);
  background: linear-gradient(135deg, rgba(20, 91, 129, 0.72), rgba(69, 50, 130, 0.62));
}

.alert-empty {
  padding: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  color: #8393aa;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 700px) {
  .alert-bell-label { display: none; }
  .alerts-drawer { width: 100vw; }
  .alerts-drawer-header,
  .alerts-drawer-body { padding-left: 18px; padding-right: 18px; }
  .alerts-toolbar { align-items: flex-start; flex-direction: column; padding-left: 18px; padding-right: 18px; }
  .alert-change-values { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .user-session .alert-bell { transition: none !important; }
}
