/**
 * Platform Eco Theme — lenguaje visual unificado (ops-wall)
 * Aplica a todo Platform vía body.platform-eco
 */

body.platform-eco {
  --eco-bg: #020b16;
  --eco-bg2: #04101d;
  --eco-panel: #061727;
  --eco-panel2: #071d30;
  --eco-line: #164365;
  --eco-cyan: #22b7ff;
  --eco-green: #4dff7b;
  --eco-amber: #ffad25;
  --eco-red: #ff465d;
  --eco-text: #eef8ff;
  --eco-muted: #91a9bc;
  --eco-orange: #f28f45;

  --bg: var(--eco-bg);
  --bg2: var(--eco-bg2);
  --panel: var(--eco-panel);
  --text: var(--eco-text);
  --muted: var(--eco-muted);
  --line: var(--eco-line);
  --primary: #1496e7;
  --primary-dark: #7dd3fc;
  --primary-soft: rgba(34, 183, 255, .12);
  --accent: var(--eco-amber);
  --danger: var(--eco-red);
  --ok: #1faa5a;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, .22);

  background:
    radial-gradient(circle at 50% -18%, #0b3150 0, transparent 38%),
    linear-gradient(180deg, #020914, #04101d) !important;
  color: var(--eco-text);
}

body.platform-eco a { color: #7dd3fc; }
body.platform-eco a:hover { color: var(--eco-cyan); }

body.platform-eco .platform-nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* —— Topbar —— */
body.platform-eco .topbar {
  background: rgba(4, 16, 29, .92) !important;
  border-bottom: 1px solid #12324d !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
  backdrop-filter: blur(10px);
}
body.platform-eco .topbar-title strong { color: #eef8ff !important; }
body.platform-eco .topbar-title span { color: var(--eco-muted) !important; }
body.platform-eco .user-pill {
  background: #061727 !important;
  border: 1px solid var(--eco-line) !important;
  box-shadow: none !important;
  color: var(--eco-text);
}
body.platform-eco .user-pill small {
  background: rgba(34, 183, 255, .14) !important;
  color: var(--eco-cyan) !important;
}
body.platform-eco .platform-context-company {
  background: rgba(6, 23, 39, .9) !important;
  border-color: var(--eco-line) !important;
  box-shadow: none !important;
}
body.platform-eco .platform-context-company span { color: #d7ebf8 !important; }
body.platform-eco .header-user-initials,
body.platform-eco .platform-context-company-initials {
  background: linear-gradient(135deg, #1294d2, #0b5f8a) !important;
}

/* —— Buttons —— */
body.platform-eco .btn,
body.platform-eco .nav-btn,
body.platform-eco button.btn,
body.platform-eco a.btn {
  background: linear-gradient(180deg, #1496e7, #0d6fae) !important;
  color: #fff !important;
  border: 1px solid rgba(34, 183, 255, .35) !important;
  box-shadow: 0 8px 18px rgba(13, 111, 174, .28) !important;
  border-radius: 8px !important;
}
body.platform-eco .btn:hover,
body.platform-eco .nav-btn:hover { filter: brightness(1.08); }
body.platform-eco .btn.secondary,
body.platform-eco .nav-back,
body.platform-eco .platform-wrap .btn.secondary,
body.platform-eco .platform-subnav .btn.secondary {
  background: transparent !important;
  color: #dff5ff !important;
  border: 1px solid #1777b6 !important;
  box-shadow: none !important;
}
body.platform-eco .btn.secondary:hover,
body.platform-eco .platform-subnav .btn.secondary:hover {
  background: rgba(34, 183, 255, .1) !important;
  border-color: var(--eco-cyan) !important;
}
body.platform-eco .platform-subnav a.active,
body.platform-eco .platform-subnav a.btn.secondary.active {
  background: rgba(34, 183, 255, .18) !important;
  border-color: var(--eco-cyan) !important;
  color: #fff !important;
  box-shadow: inset 0 -2px 0 var(--eco-cyan) !important;
}
body.platform-eco .btn.danger,
body.platform-eco .nav-logout {
  background: linear-gradient(180deg, #c23b4d, #9a2434) !important;
  border-color: rgba(255, 70, 93, .45) !important;
}
body.platform-eco .btn.ok {
  background: linear-gradient(180deg, #1faa5a, #157a40) !important;
  border-color: rgba(77, 255, 123, .35) !important;
}
body.platform-eco .nav-menu,
body.platform-eco .nav-profile {
  background: transparent !important;
  border: 1px solid #1777b6 !important;
  color: #dff5ff !important;
  box-shadow: none !important;
}

/* —— Subnav —— */
body.platform-eco .platform-subnav {
  max-width: 1280px !important;
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border: 1px solid var(--eco-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25) !important;
}

/* —— Layout chrome —— */
body.platform-eco .container {
  max-width: 1280px;
}
body.platform-eco .platform-wrap {
  max-width: 1280px !important;
  gap: 14px !important;
}
body.platform-eco .platform-hero {
  background: linear-gradient(160deg, rgba(8, 40, 64, .95), rgba(4, 17, 30, .98)) !important;
  border: 1px solid var(--eco-line) !important;
  border-radius: 12px !important;
  color: var(--eco-text) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28) !important;
}
body.platform-eco .platform-hero h1,
body.platform-eco .platform-hero h2,
body.platform-eco .platform-card h2,
body.platform-eco .platform-card h3 {
  color: #eef8ff !important;
}
body.platform-eco .platform-hero p,
body.platform-eco .small-muted,
body.platform-eco .platform-card p {
  color: var(--eco-muted) !important;
}
body.platform-eco .platform-card,
body.platform-eco .card,
body.platform-eco .panel {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border: 1px solid var(--eco-line) !important;
  border-top: 3px solid #1784ca !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22) !important;
  color: var(--eco-text) !important;
}
body.platform-eco .platform-code {
  background: rgba(34, 183, 255, .1) !important;
  color: #9ad8ff !important;
  border-color: rgba(34, 183, 255, .28) !important;
}
body.platform-eco .platform-badge,
body.platform-eco .pill-ok,
body.platform-eco .pill-off {
  border-radius: 5px !important;
}
body.platform-eco .platform-badge {
  background: rgba(34, 183, 255, .12) !important;
  color: #cfefff !important;
  border: 1px solid rgba(34, 183, 255, .35) !important;
}
body.platform-eco .platform-badge.ok,
body.platform-eco .pill-ok {
  background: rgba(77, 255, 123, .12) !important;
  color: var(--eco-green) !important;
  border: 1px solid rgba(77, 255, 123, .4) !important;
}
body.platform-eco .platform-badge.warn,
body.platform-eco .platform-badge.secondary {
  background: rgba(255, 173, 37, .1) !important;
  color: var(--eco-amber) !important;
  border: 1px solid rgba(255, 173, 37, .4) !important;
}
body.platform-eco .pill-off {
  background: rgba(255, 70, 93, .1) !important;
  color: var(--eco-red) !important;
  border: 1px solid rgba(255, 70, 93, .35) !important;
}

/* —— Usuarios conectados (cards blancas legacy vs tema eco) —— */
body.platform-eco .platform-session-company {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border: 1px solid var(--eco-line) !important;
  border-top: 3px solid #1784ca !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22) !important;
  color: var(--eco-text) !important;
}
body.platform-eco .platform-session-company h2 {
  color: #eef8ff !important;
}
body.platform-eco .platform-session-company .small-muted,
body.platform-eco .platform-session-company td .small-muted {
  color: #b7c9d8 !important;
}
body.platform-eco .platform-session-company .platform-table strong {
  color: #eef8ff !important;
}
body.platform-eco .erp-list-pagination {
  background: rgba(6, 24, 40, .92) !important;
  border: 1px solid var(--eco-line) !important;
  color: #cfe6f7 !important;
}
body.platform-eco .erp-list-pagination a {
  background: rgba(8, 36, 58, .95) !important;
  border-color: rgba(34, 183, 255, .28) !important;
  color: #9ad8ff !important;
}
body.platform-eco .erp-list-pagination a:hover {
  background: rgba(34, 183, 255, .12) !important;
}
body.platform-eco .erp-list-pagination a.active {
  background: #1784ca !important;
  border-color: #1784ca !important;
  color: #fff !important;
}
body.platform-eco .erp-list-pagination-summary,
body.platform-eco .erp-list-pagination-summary strong {
  color: #b7c9d8 !important;
}
body.platform-eco .toolbar,
body.platform-eco form.toolbar {
  color: #cfe6f7 !important;
}
body.platform-eco .toolbar label,
body.platform-eco form.toolbar label {
  color: #cfe6f7 !important;
}
body.platform-eco .toolbar select,
body.platform-eco form.toolbar select {
  background: #081828 !important;
  color: #e7f4ff !important;
  border: 1px solid rgba(34, 183, 255, .28) !important;
}

/* —— Tables —— */
body.platform-eco .platform-table,
body.platform-eco table.platform-table,
body.platform-eco .table-wrap table {
  background: transparent !important;
  box-shadow: none !important;
  color: #d7ebf8;
}
body.platform-eco .platform-table th,
body.platform-eco .table-wrap th {
  background: #061727 !important;
  color: #9ad8ff !important; /* más contraste que cyan medio */
  border-bottom: 1px solid #12344f !important;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
}
body.platform-eco .platform-table td,
body.platform-eco .table-wrap td {
  border-bottom: 1px solid #12344f !important;
  color: #d7ebf8 !important;
}
body.platform-eco .platform-table tr:hover td {
  background: rgba(34, 183, 255, .05);
}

/* —— Forms —— */
body.platform-eco .platform-form,
body.platform-eco .form-grid {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border: 1px solid var(--eco-line) !important;
  border-top: 3px solid #1784ca !important;
  color: var(--eco-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22) !important;
}
body.platform-eco .platform-form label,
body.platform-eco label {
  color: #cfe6f7 !important; /* legible sobre paneles oscuros */
}
body.platform-eco .platform-form .small-muted,
body.platform-eco .platform-form small {
  color: #b7c9d8 !important;
}
body.platform-eco .platform-form input,
body.platform-eco .platform-form select,
body.platform-eco .platform-form textarea,
body.platform-eco input[type="text"],
body.platform-eco input[type="email"],
body.platform-eco input[type="password"],
body.platform-eco input[type="number"],
body.platform-eco input[type="date"],
body.platform-eco input[type="datetime-local"],
body.platform-eco input[type="search"],
body.platform-eco input[type="file"],
body.platform-eco select,
body.platform-eco textarea {
  background: #041422 !important;
  border: 1px solid #164365 !important;
  color: #eef8ff !important;
  border-radius: 8px !important;
}
/* Cajas de foto residuales (antes fondo claro) → panel eco */
body.platform-eco .platform-photo-box {
  background: rgba(4, 20, 34, .78) !important;
  border: 1px dashed rgba(34, 183, 255, .38) !important;
  color: #eef8ff !important;
}
body.platform-eco .platform-photo-box label {
  color: #eef8ff !important;
  font-weight: 800;
}
body.platform-eco .platform-photo-box .small-muted,
body.platform-eco .platform-photo-box small {
  color: #c5d4e0 !important;
}
body.platform-eco .platform-photo-placeholder {
  background: linear-gradient(135deg, rgba(18, 148, 210, .28), rgba(242, 143, 69, .22)) !important;
  border-color: rgba(34, 183, 255, .38) !important;
  color: #eef8ff !important;
}
body.platform-eco .platform-photo-preview {
  border-color: rgba(34, 183, 255, .38) !important;
  background: #041422 !important;
}
body.platform-eco .platform-form input:focus,
body.platform-eco .platform-form select:focus,
body.platform-eco .platform-form textarea:focus,
body.platform-eco input:focus,
body.platform-eco select:focus,
body.platform-eco textarea:focus {
  outline: none !important;
  border-color: var(--eco-cyan) !important;
  box-shadow: 0 0 0 2px rgba(34, 183, 255, .18) !important;
}

/* —— Notices —— */
body.platform-eco .notice,
body.platform-eco .success {
  background: rgba(34, 183, 255, .1) !important;
  color: #b8e6ff !important;
  border: 1px solid rgba(34, 183, 255, .35) !important;
}
body.platform-eco .notice.ok,
body.platform-eco .success {
  background: rgba(77, 255, 123, .08) !important;
  color: #b8ffd0 !important;
  border-color: rgba(77, 255, 123, .35) !important;
}
body.platform-eco .error {
  background: rgba(255, 70, 93, .1) !important;
  color: #ffb3bd !important;
  border: 1px solid rgba(255, 70, 93, .4) !important;
}

/* —— Footer —— */
body.platform-eco .site-footer {
  background: transparent !important;
  border-top: 1px solid #12324d !important;
  color: var(--eco-muted) !important;
}

/* —— Com360 / misc light panels inside platform —— */
body.platform-eco .com360-hero {
  background: linear-gradient(160deg, rgba(8, 40, 64, .95), rgba(4, 17, 30, .98)) !important;
  border-color: var(--eco-line) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28) !important;
}
body.platform-eco .com360-title { color: #eef8ff !important; }
body.platform-eco .com360-subtitle,
body.platform-eco .com360-eyebrow { color: var(--eco-cyan) !important; }
body.platform-eco .com360-nav a {
  background: transparent !important;
  border-color: #1777b6 !important;
  color: #dff5ff !important;
}
body.platform-eco .crm-kpi,
body.platform-eco .work-kpi,
body.platform-eco .act-kpi,
body.platform-eco .fc-kpi,
body.platform-eco .obj-kpi {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border-color: var(--eco-line) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22) !important;
}
body.platform-eco .crm-kpi strong,
body.platform-eco .work-kpi strong,
body.platform-eco .act-kpi strong,
body.platform-eco .fc-kpi strong,
body.platform-eco .obj-kpi strong {
  color: #eef8ff !important;
}

/* ========== HOME HUB ========== */
.ph-shell {
  display: grid;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
}
.ph-head {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 6px 2px 12px;
  border-bottom: 1px solid #12324d;
}
.ph-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ph-logo {
  width: 44px;
  height: 44px;
  border: 3px solid var(--eco-cyan, #22b7ff);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #eef8ff;
  box-shadow: 0 0 22px rgba(34, 183, 255, .3);
}
.ph-brand strong { display: block; font-size: 1.2rem; color: #eef8ff; }
.ph-brand small { display: block; color: var(--eco-muted, #91a9bc); font-size: .72rem; }
.ph-title h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #eef8ff;
}
.ph-title p {
  margin: 4px 0 0;
  color: var(--eco-muted, #91a9bc);
  font-size: .82rem;
}
.ph-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  text-transform: uppercase;
  color: #dff5ff;
}
.ph-live i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--eco-green, #4dff7b);
  box-shadow: 0 0 12px var(--eco-green, #4dff7b);
  animation: ph-pulse 1.7s infinite;
}
.ph-live small {
  display: block;
  color: var(--eco-muted, #91a9bc);
  text-transform: none;
}
@keyframes ph-pulse {
  50% { opacity: .45; transform: scale(.75); }
}

.ph-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.ph-kpi {
  border: 1px solid var(--eco-line, #164365);
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96));
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  display: grid;
  gap: 6px;
  place-items: center;
}
.ph-kpi small {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--eco-muted, #91a9bc);
}
.ph-ring {
  --pct: 0;
  --ring: var(--eco-cyan, #22b7ff);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), #0a2940 0);
  box-shadow: 0 0 18px color-mix(in srgb, var(--ring) 25%, transparent);
}
.ph-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #061727;
}
.ph-ring strong {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: #eef8ff;
}
.ph-kpi em {
  font-style: normal;
  font-size: .7rem;
  color: var(--eco-muted, #91a9bc);
}

.ph-section {
  display: grid;
  gap: 10px;
}
.ph-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 2px 2px 0;
  border-bottom: 1px solid rgba(18, 66, 96, .55);
}
.ph-section-head h2 {
  margin: 0;
  font-size: .92rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9ad8ff !important;
}
.ph-section-head p {
  margin: 0;
  font-size: .78rem;
  color: var(--eco-muted, #91a9bc) !important;
}
.ph-strip strong.ok { color: var(--eco-green, #4dff7b) !important; }
.ph-strip strong.warn { color: var(--eco-amber, #ffad25) !important; }

.ph-gates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ph-gate {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 168px;
  padding: 16px;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid var(--eco-line, #164365);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .02), 0 12px 32px rgba(0, 0, 0, .2);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
}
.ph-gate:hover,
.ph-gate:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(34, 183, 255, .62);
  box-shadow: 0 0 0 1px rgba(34, 183, 255, .16), 0 18px 38px rgba(0, 110, 180, .18);
  outline: none;
}
.ph-gate-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(34, 183, 255, .12);
  border: 1px solid rgba(34, 183, 255, .35);
  color: var(--eco-cyan, #22b7ff);
}
.ph-gate-icon .platform-nav-icon,
.ph-gate-icon svg {
  width: 22px;
  height: 22px;
}
.ph-gate h2 {
  margin: 0;
  font-size: .95rem;
  color: #eef8ff !important;
}
.ph-gate p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--eco-muted, #91a9bc) !important;
}
.ph-gate-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 900;
  color: var(--eco-cyan, #22b7ff);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ph-gate.tone-green .ph-gate-icon {
  background: rgba(77, 255, 123, .1);
  border-color: rgba(77, 255, 123, .35);
  color: var(--eco-green, #4dff7b);
}
.ph-gate.tone-amber .ph-gate-icon {
  background: rgba(255, 173, 37, .1);
  border-color: rgba(255, 173, 37, .35);
  color: var(--eco-amber, #ffad25);
}
.ph-gate.tone-green .ph-gate-cta { color: var(--eco-green, #4dff7b); }
.ph-gate.tone-amber .ph-gate-cta { color: var(--eco-amber, #ffad25); }

.ph-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ph-strip span {
  border: 1px solid var(--eco-line, #164365);
  border-radius: 8px;
  background: #071c2d;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  min-width: 0;
}
.ph-strip small {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--eco-muted, #91a9bc);
  font-weight: 800;
}
.ph-strip strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  color: #9ad8ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ph-health strong.ok { color: var(--eco-green, #4dff7b) !important; }
.ph-health strong.warn { color: var(--eco-amber, #ffad25) !important; }

.ph-integrations-quick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--eco-line, #164365);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96));
  padding: 10px 12px;
}
.ph-integrations-quick-head {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding-right: 12px;
  border-right: 1px solid #12344f;
}
.ph-integrations-quick-head div { display: grid; gap: 2px; }
.ph-integrations-quick-head small {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--eco-muted, #91a9bc);
  font-weight: 800;
}
.ph-integrations-quick-head strong {
  font-size: .86rem;
  color: #eef8ff;
}
.ph-integrations-quick-head a {
  font-size: .68rem;
  font-weight: 800;
  color: var(--eco-cyan, #22b7ff) !important;
  text-decoration: none !important;
}
.ph-integrations-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ph-integration-quick {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(150px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #12344f;
  border-radius: 8px;
  background: #071c2d;
  color: inherit !important;
  text-decoration: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ph-integration-quick:hover,
.ph-integration-quick:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(34, 183, 255, .55);
  box-shadow: 0 8px 20px rgba(0, 80, 140, .16);
  outline: none;
}
.ph-integration-company {
  color: #eef8ff;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ph-integration-date {
  min-width: 0;
  color: #9ad8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ph-integration-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #24465e;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--eco-muted, #91a9bc);
  background: rgba(145, 169, 188, .08);
}
.ph-integration-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}
.ph-integration-status.ok {
  color: var(--eco-green, #4dff7b);
  border-color: rgba(77, 255, 123, .3);
  background: rgba(77, 255, 123, .08);
}
.ph-integration-status.warning {
  color: var(--eco-amber, #ffad25);
  border-color: rgba(255, 173, 37, .32);
  background: rgba(255, 173, 37, .08);
}
.ph-integration-status.error {
  color: #ff6b78;
  border-color: rgba(255, 107, 120, .34);
  background: rgba(255, 107, 120, .08);
}
.ph-integration-status.running {
  color: var(--eco-cyan, #22b7ff);
  border-color: rgba(34, 183, 255, .34);
  background: rgba(34, 183, 255, .08);
}

.ph-companies {
  border: 1px solid var(--eco-line, #164365);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96));
  padding: 14px;
}
.ph-companies-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #12344f;
}
.ph-companies-head h2 {
  margin: 0 0 4px;
  font-size: .85rem;
  color: #4ec8ff !important;
  text-transform: uppercase;
}
.ph-companies-head p {
  margin: 0;
  font-size: .76rem;
  color: var(--eco-muted, #91a9bc) !important;
}
.ph-company-list {
  display: grid;
  gap: 8px;
}
.ph-company {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(280px, 2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #12344f;
  border-radius: 8px;
  background: #071c2d;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ph-company:hover,
.ph-company:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(34, 183, 255, .55);
  box-shadow: 0 12px 28px rgba(0, 80, 140, .18);
  outline: none;
}
.ph-company-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ph-company-head img {
  width: 42px;
  max-height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
}
.ph-company-head > span.ph-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1294d2, #0b5f8a);
  color: #fff;
  font-weight: 900;
}
.ph-company-head strong {
  display: block;
  color: #eef8ff;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-company-head small {
  display: block;
  color: var(--eco-muted, #91a9bc);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-company-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.ph-company-stats span {
  border: 1px solid #12344f;
  border-radius: 6px;
  background: #061727;
  padding: 6px 7px;
  display: grid;
  gap: 1px;
}
.ph-company-stats small {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--eco-muted, #91a9bc);
  font-weight: 800;
}
.ph-company-stats b {
  font-size: .92rem;
  color: #eef8ff;
}
.ph-company-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .ph-head { grid-template-columns: 1fr; }
  .ph-kpis { grid-template-columns: repeat(3, 1fr); }
  .ph-gates { grid-template-columns: repeat(2, 1fr); }
  .ph-strip { grid-template-columns: repeat(2, 1fr); }
  .ph-integrations-quick { grid-template-columns: 1fr; }
  .ph-integrations-quick-head {
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid #12344f;
  }
}
@media (max-width: 720px) {
  .ph-kpis,
  .ph-gates,
  .ph-strip { grid-template-columns: 1fr; }
  .ph-integrations-quick-grid { grid-template-columns: 1fr; }
  .ph-integration-quick { grid-template-columns: 1fr auto; }
  .ph-integration-date { grid-column: 1 / -1; grid-row: 2; }
  .ph-integration-status { grid-column: 2; grid-row: 1; }
  .ph-company {
    grid-template-columns: 1fr;
  }
  .ph-company-stats { grid-template-columns: repeat(3, 1fr); }
  .ph-company-actions { justify-content: flex-start; }
}

/* ========== Contraste: Gestión empresas (paneles claros residuales) ========== */
body.platform-eco .platform-admin-company,
body.platform-eco .platform-company-preview-branding {
  background: linear-gradient(180deg, rgba(6, 24, 40, .98), rgba(4, 17, 30, .98)) !important;
  border-color: var(--eco-line) !important;
  color: var(--eco-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25) !important;
}
body.platform-eco .platform-admin-company > p,
body.platform-eco .platform-admin-title h3,
body.platform-eco .platform-company-logo-title h3 {
  color: #eef8ff !important;
}
body.platform-eco .platform-company-list-row {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border-color: var(--eco-line) !important;
  color: var(--eco-text) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
}
body.platform-eco .platform-company-list-row:hover,
body.platform-eco .platform-company-list-row:focus {
  background: linear-gradient(180deg, rgba(8, 32, 52, .98), rgba(5, 20, 34, .98)) !important;
  border-color: rgba(34, 183, 255, .45) !important;
}
body.platform-eco .platform-company-list-brand strong,
body.platform-eco .platform-company-list-metric b,
body.platform-eco .platform-company-list-open {
  color: #eef8ff !important;
}
body.platform-eco .platform-company-list-brand em,
body.platform-eco .platform-company-list-status em,
body.platform-eco .platform-company-list-metric small {
  color: var(--eco-muted) !important;
}
body.platform-eco .platform-company-list-metric,
body.platform-eco .platform-company-control-link {
  background: #071c2d !important;
  border-color: #12344f !important;
  color: #dff5ff !important;
}
body.platform-eco .platform-company-control-link:hover {
  background: rgba(34, 183, 255, .16) !important;
  color: #fff !important;
}

body.platform-eco .platform-admin-kpis span,
body.platform-eco .platform-company-style-grid span,
body.platform-eco .platform-company-link-row,
body.platform-eco .platform-company-plan-grid span,
body.platform-eco .platform-company-plan-total span,
body.platform-eco .platform-company-module-list,
body.platform-eco .platform-company-frepat-actions span {
  background: #071c2d !important;
  border-color: #12344f !important;
  color: var(--eco-text) !important;
}
body.platform-eco .platform-admin-kpis small,
body.platform-eco .platform-company-style-grid small,
body.platform-eco .platform-company-link-row small,
body.platform-eco .platform-company-plan-grid small,
body.platform-eco .platform-company-plan-total small,
body.platform-eco .platform-company-frepat-actions small,
body.platform-eco .platform-admin-kpis em {
  color: var(--eco-muted) !important;
}
body.platform-eco .platform-admin-kpis strong,
body.platform-eco .platform-company-plan-grid b,
body.platform-eco .platform-company-plan-total b,
body.platform-eco .platform-company-frepat-actions b,
body.platform-eco .platform-company-style-grid b {
  color: #eef8ff !important;
}
body.platform-eco .platform-admin-kpis .platform-db-estimate {
  background: rgba(34, 183, 255, .08) !important;
  border-color: rgba(34, 183, 255, .28) !important;
}

body.platform-eco .platform-company-links > strong,
body.platform-eco .platform-company-plan > strong,
body.platform-eco .platform-company-module-list > strong,
body.platform-eco .platform-company-frepat > strong {
  color: #4ec8ff !important;
}

/* Paneles naranja/beige → paneles eco oscuros */
body.platform-eco .platform-company-integrations {
  background: rgba(34, 183, 255, .06) !important;
  border: 1px solid rgba(34, 183, 255, .28) !important;
  color: var(--eco-text) !important;
}
body.platform-eco .platform-company-integrations > strong {
  color: #7dd3fc !important;
}
body.platform-eco .platform-company-integrations .small-muted,
body.platform-eco .platform-company-integrations p,
body.platform-eco .platform-company-frepat .small-muted,
body.platform-eco .platform-company-frepat p,
body.platform-eco .platform-saas-note,
body.platform-eco .platform-company-plan .small-muted,
body.platform-eco .small-muted {
  color: #b7c9d8 !important; /* más legible que --eco-muted sobre paneles */
}

body.platform-eco .platform-company-frepat {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border-color: var(--eco-line) !important;
  border-left-color: var(--eco-cyan) !important;
  color: var(--eco-text) !important;
}

body.platform-eco .platform-company-link-row em,
body.platform-eco .platform-company-module-list em {
  background: #061727 !important;
  border-color: #164365 !important;
  color: #d7ebf8 !important;
}
body.platform-eco .platform-company-link-row em.is-on,
body.platform-eco .platform-company-module-list em.is-on {
  background: rgba(77, 255, 123, .12) !important;
  color: #8dffb0 !important;
  border-color: rgba(77, 255, 123, .4) !important;
}
body.platform-eco .platform-company-link-row em.is-off,
body.platform-eco .platform-company-module-list em.is-off {
  background: rgba(255, 173, 37, .12) !important;
  color: #ffd089 !important;
  border-color: rgba(255, 173, 37, .4) !important;
}
body.platform-eco .platform-company-link-row em.is-empty,
body.platform-eco .platform-company-module-list em.is-empty {
  background: rgba(145, 169, 188, .12) !important;
  color: #c5d4e0 !important;
  border-color: rgba(145, 169, 188, .35) !important;
}
body.platform-eco .platform-company-module-list em.is-extra {
  background: rgba(34, 183, 255, .12) !important;
  color: #9ad8ff !important;
  border-color: rgba(34, 183, 255, .4) !important;
}

/* Botones secondary: contraste sobre paneles (nunca blanco sobre beige) */
body.platform-eco .platform-company-integrations .btn.secondary,
body.platform-eco .platform-company-integration-actions .btn.secondary,
body.platform-eco .platform-admin-actions .btn.secondary,
body.platform-eco .platform-company-frepat-actions .btn.secondary {
  background: rgba(4, 20, 34, .92) !important;
  color: #e8f6ff !important;
  border: 1px solid #22b7ff !important;
  box-shadow: none !important;
}
body.platform-eco .platform-company-integrations .btn.secondary:hover,
body.platform-eco .platform-company-integration-actions .btn.secondary:hover,
body.platform-eco .platform-admin-actions .btn.secondary:hover {
  background: rgba(34, 183, 255, .16) !important;
  color: #fff !important;
}

/* Catch-all: cualquier tarjeta/panel con fondo claro residual en páginas Platform */
body.platform-eco .platform-card [class*="platform-company-"],
body.platform-eco .platform-admin-company [style*="background"] {
  color: inherit;
}

/* ========== Contraste: Mapa de accesos (árbol claro bajo eco) ========== */
body.platform-eco .access-map-toolbar label { color: #9ad8ff !important; }
body.platform-eco .access-map-toolbar select {
  background: rgba(4, 20, 34, .92) !important;
  color: #e8f6ff !important;
  border-color: #1777b6 !important;
}
body.platform-eco .access-note,
body.platform-eco .access-assist p,
body.platform-eco .access-hidden-note,
body.platform-eco .access-empty {
  color: var(--eco-muted) !important;
  background: rgba(8, 32, 52, .55) !important;
  border-color: rgba(34, 183, 255, .22) !important;
}
body.platform-eco .access-assist {
  background: rgba(8, 32, 52, .72) !important;
  border-color: rgba(34, 183, 255, .28) !important;
}
body.platform-eco .access-assist strong { color: #eef8ff !important; }
body.platform-eco .access-chip:not(.ok):not(.warn):not(.off):not(.special):not(.danger):not(.view) {
  background: rgba(8, 32, 52, .9) !important;
  color: #d7ebf8 !important;
  border-color: rgba(34, 183, 255, .28) !important;
}
body.platform-eco .access-module-tree,
body.platform-eco .access-group-card,
body.platform-eco .access-option,
body.platform-eco .access-helper-branch {
  background: linear-gradient(180deg, rgba(6, 24, 40, .98), rgba(4, 17, 30, .98)) !important;
  border-color: rgba(34, 183, 255, .22) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22) !important;
  color: var(--eco-text) !important;
}
body.platform-eco .access-node-head {
  background: linear-gradient(90deg, rgba(18, 148, 210, .16), rgba(234, 154, 90, .12)) !important;
  border-bottom-color: rgba(34, 183, 255, .18) !important;
}
body.platform-eco .access-node-title h3,
body.platform-eco .access-module-tree h3 {
  color: #eef8ff !important;
}
body.platform-eco .access-node-title p,
body.platform-eco .access-option small {
  color: var(--eco-muted) !important;
}
body.platform-eco .access-group-name,
body.platform-eco .access-helper-title {
  color: #9ad8ff !important;
}
body.platform-eco .access-option b {
  color: #eef8ff !important;
}
body.platform-eco .access-group-card.is-user-on,
body.platform-eco .access-option.is-user-on {
  background: rgba(22, 136, 63, .12) !important;
  border-color: rgba(77, 255, 123, .35) !important;
}

/* ========== Contraste: Control de conectores (tarjetas blancas residuales) ========== */
body.platform-eco .connector-card {
  background: linear-gradient(180deg, rgba(6, 24, 40, .98), rgba(4, 17, 30, .98)) !important;
  border-color: var(--eco-line) !important;
  color: var(--eco-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25) !important;
}
body.platform-eco .connector-card.paused {
  background: linear-gradient(180deg, rgba(40, 28, 10, .98), rgba(4, 17, 30, .98)) !important;
  border-top-color: var(--eco-amber) !important;
}
body.platform-eco .connector-card.error {
  border-top-color: var(--eco-red) !important;
}
body.platform-eco .connector-head h2 {
  color: #eef8ff !important;
}
body.platform-eco .connector-head .small-muted,
body.platform-eco .connector-actions .small-muted {
  color: var(--eco-muted) !important;
}
body.platform-eco .connector-meta span {
  background: rgba(8, 32, 52, .92) !important;
  border: 1px solid rgba(34, 183, 255, .18);
}
body.platform-eco .connector-meta small {
  color: var(--eco-muted) !important;
}
body.platform-eco .connector-meta strong {
  color: #eef8ff !important;
}
body.platform-eco .connector-actions {
  border-top-color: rgba(34, 183, 255, .18) !important;
}
body.platform-eco .connector-actions label {
  color: #d7ebf8 !important;
}
body.platform-eco .connector-actions input,
body.platform-eco .connector-actions input[type="datetime-local"],
body.platform-eco .connector-actions input[type="text"] {
  background: rgba(4, 20, 34, .92) !important;
  color: #e8f6ff !important;
  border: 1px solid #1777b6 !important;
}
body.platform-eco .connector-actions input::placeholder {
  color: #7aa3bd !important;
}
body.platform-eco .connector-table-wrap table,
body.platform-eco .connector-table-wrap th,
body.platform-eco .connector-table-wrap td {
  color: var(--eco-text) !important;
}


/* ========== Contraste: Ficha persona (evitar card-in-card + fieldsets claros) ========== */
body.platform-eco #ficha-persona.platform-card .platform-form.platform-person-edit-form,
body.platform-eco #ficha-persona .platform-person-edit-form {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 8px !important;
}
body.platform-eco #ficha-persona .platform-person-detail-grid fieldset {
  background: rgba(8, 32, 52, .72) !important;
  border: 1px solid rgba(34, 183, 255, .22) !important;
  color: #d7ebf8 !important;
  box-shadow: none !important;
}
body.platform-eco #ficha-persona .platform-person-detail-grid legend {
  color: #4ec8ff !important;
  background: transparent !important;
}
body.platform-eco #ficha-persona .platform-person-detail-grid label,
body.platform-eco #ficha-persona .platform-person-detail-grid .small-muted,
body.platform-eco #ficha-persona .platform-person-detail-grid small {
  color: #9ad8ff !important;
}
body.platform-eco #ficha-persona .person-org-calculated-list article,
body.platform-eco #ficha-persona .platform-mini-stats span {
  background: rgba(4, 20, 34, .72) !important;
  border-color: rgba(34, 183, 255, .22) !important;
  color: #d7ebf8 !important;
}
body.platform-eco #ficha-persona .person-org-calculated-list strong,
body.platform-eco #ficha-persona .person-org-calculated-list span {
  color: #eef8ff !important;
}
body.platform-eco #ficha-persona .platform-hero-row h2 {
  color: #eef8ff !important;
}
body.platform-eco .platform-people-row-actions .btn.danger,
body.platform-eco .platform-ficha-actions .btn.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  border: 0 !important;
}

/* ========== Contraste: login Platform (tarjeta clara) ========== */
body.platform-eco .platform-login-box {
  background: #ffffff !important;
  border: 1px solid rgba(11, 98, 163, .22) !important;
  color: #0f172a !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28) !important;
}
body.platform-eco .platform-login-box h1 {
  color: #0b4d7d !important;
  margin: 0 0 8px !important;
}
body.platform-eco .platform-login-box > p {
  color: #334155 !important;
  margin: 0 0 16px !important;
}
body.platform-eco .platform-login-box label {
  color: #0b4d7d !important;
  font-weight: 800 !important;
}
body.platform-eco .platform-login-box input,
body.platform-eco .platform-login-box input[type="text"],
body.platform-eco .platform-login-box input[type="email"],
body.platform-eco .platform-login-box input[type="password"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
body.platform-eco .platform-login-box input::placeholder {
  color: #64748b !important;
}
body.platform-eco .platform-login-box input:focus {
  border-color: #0b62a3 !important;
  box-shadow: 0 0 0 2px rgba(11, 98, 163, .18) !important;
}
body.platform-eco .platform-login-box .error {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}


/* ========== Contraste: IA / módulos / organigrama / admin empresas ========== */
body.platform-eco .ai-kpi,
body.platform-eco .ai-env-card,
body.platform-eco .ai-control-page .platform-card {
  color: var(--eco-text) !important;
}
body.platform-eco .ai-kpi span,
body.platform-eco .ai-kpi small,
body.platform-eco .ai-bar-row small,
body.platform-eco .btn.link {
  color: #b7c9d8 !important;
}
body.platform-eco .ai-kpi strong,
body.platform-eco .ai-bar-row strong {
  color: #eef8ff !important;
}
body.platform-eco .ai-progress,
body.platform-eco .ai-mini-progress,
body.platform-eco .ai-bar-row > div {
  background: #0a2940 !important;
}
body.platform-eco .ai-company-table tr.is-selected {
  background: rgba(34, 183, 255, .08) !important;
}
body.platform-eco .platform-badge.danger {
  background: rgba(255, 70, 93, .12) !important;
  color: var(--eco-red) !important;
  border: 1px solid rgba(255, 70, 93, .4) !important;
}

body.platform-eco .module-package-card {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border: 1px solid var(--eco-line) !important;
  border-top-color: rgba(242, 143, 69, .72) !important;
  color: var(--eco-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22) !important;
}
body.platform-eco .module-package-card.active-main {
  border-color: rgba(77, 255, 123, .35) !important;
  border-top-color: var(--eco-green) !important;
}
body.platform-eco .module-package-head {
  background: linear-gradient(135deg, rgba(8, 40, 64, .95), rgba(4, 17, 30, .9)) !important;
  border-bottom-color: var(--eco-line) !important;
}
body.platform-eco .module-package-titlebox p,
body.platform-eco .module-package-card .small-muted {
  color: #b7c9d8 !important;
}
body.platform-eco .module-package-card h2,
body.platform-eco .module-package-card h3,
body.platform-eco .module-package-card strong {
  color: #eef8ff !important;
}

body.platform-eco .org-person-card,
body.platform-eco .org-department-card,
body.platform-eco .org-role-card,
body.platform-eco .org-root-card,
body.platform-eco .org-root-role-card,
body.platform-eco .org-dept-node,
body.platform-eco .org-role-person,
body.platform-eco .org-unassigned-zone {
  background: linear-gradient(180deg, rgba(6, 24, 40, .96), rgba(4, 17, 30, .96)) !important;
  border-color: var(--eco-line) !important;
  color: var(--eco-text) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2) !important;
}
body.platform-eco .org-department-card.is-main,
body.platform-eco .org-root-card,
body.platform-eco .org-role-person.is-lead {
  background: linear-gradient(145deg, rgba(40, 28, 12, .95), rgba(4, 17, 30, .96)) !important;
  border-color: rgba(255, 173, 37, .4) !important;
}
body.platform-eco .org-person-card strong,
body.platform-eco .org-role-person strong,
body.platform-eco .org-department-head h3,
body.platform-eco .org-root-card h3,
body.platform-eco .org-dept-node h3,
body.platform-eco .org-role-open strong,
body.platform-eco .org-root-role-card header strong,
body.platform-eco .org-role-card header strong,
body.platform-eco .org-unassigned-zone h3 {
  color: #eef8ff !important;
}
body.platform-eco .org-person-card small,
body.platform-eco .org-role-person small,
body.platform-eco .org-department-head small,
body.platform-eco .org-root-card p,
body.platform-eco .org-dept-node small,
body.platform-eco .org-role-open small,
body.platform-eco .org-empty-person,
body.platform-eco .org-responsable-form label span {
  color: #b7c9d8 !important;
}
body.platform-eco .org-person-buttons a {
  background: rgba(34, 183, 255, .12) !important;
  color: #9ad8ff !important;
  border-color: rgba(34, 183, 255, .28) !important;
}
body.platform-eco .org-responsable-form {
  background: rgba(8, 32, 52, .85) !important;
  border-color: rgba(34, 183, 255, .22) !important;
}
body.platform-eco .org-responsable-form select {
  background: #081828 !important;
  color: #e7f4ff !important;
  border-color: rgba(34, 183, 255, .28) !important;
}
body.platform-eco .org-children:before,
body.platform-eco .org-node > .org-children > .org-node:before,
body.platform-eco .org-department-card:after,
body.platform-eco .org-children-column:before,
body.platform-eco .org-row-connector span {
  background: rgba(34, 183, 255, .28) !important;
}

body.platform-eco .platform-db-usage-summary span,
body.platform-eco .platform-integration-chip,
body.platform-eco .platform-toggle-line,
body.platform-eco .platform-hour-scale-table-wrap,
body.platform-eco .platform-company-frepat,
body.platform-eco .platform-company-frepat-actions span,
body.platform-eco .custom-pdf-slot,
body.platform-eco .deployment-kpis article {
  background: rgba(6, 24, 40, .92) !important;
  border-color: var(--eco-line) !important;
  color: var(--eco-text) !important;
}
body.platform-eco .platform-integration-chip,
body.platform-eco .platform-company-link-row em,
body.platform-eco .platform-company-module-list em {
  background: rgba(8, 36, 58, .95) !important;
  color: #cfe6f7 !important;
  border-color: rgba(34, 183, 255, .22) !important;
}
body.platform-eco .custom-pdf-selector label,
body.platform-eco .custom-pdf-slot h2,
body.platform-eco .deployment-kpis strong {
  color: #9ad8ff !important;
}
body.platform-eco .custom-pdf-selector select {
  background: #081828 !important;
  color: #e7f4ff !important;
  border: 1px solid rgba(34, 183, 255, .28) !important;
}
body.platform-eco .deployment-kpis small,
body.platform-eco .deployment-kpis span,
body.platform-eco .deployment-list-row small {
  color: #b7c9d8 !important;
}
body.platform-eco .deployment-list-row {
  border-color: var(--eco-line) !important;
  background: rgba(6, 24, 40, .7) !important;
}

/*
 * Light-surface island: editor visual de navegación.
 * Los paneles .pnav-* son blancos a propósito; el tema eco pinta texto/botones
 * para fondo oscuro. Estas reglas reponen la paleta clara de Platform
 * (#102033 / #0b3d66) solo dentro de esos paneles. No altera topbar/subnav/hero.
 */
body.platform-eco .pnav-col,
body.platform-eco .pnav-foot,
body.platform-eco .pnav-preview,
body.platform-eco .pnav-card {
  --text: #102033;
  --muted: #3d5366;
  color: #102033;
  color-scheme: light;
}
body.platform-eco .pnav-hd h3,
body.platform-eco .pnav-card h4 {
  color: #0b3d66;
}
body.platform-eco .pnav-col a:not(.btn),
body.platform-eco .pnav-foot a:not(.btn),
body.platform-eco .pnav-hist a:not(.btn) {
  color: #0b62a3;
}
body.platform-eco .pnav-col a:not(.btn):hover,
body.platform-eco .pnav-foot a:not(.btn):hover {
  color: #08324f;
}
body.platform-eco .pnav-col label,
body.platform-eco .pnav-foot label,
body.platform-eco .pnav-ins label,
body.platform-eco .pnav-dlg label,
body.platform-eco .pnav-lock {
  color: #102033 !important;
}
body.platform-eco .pnav-help,
body.platform-eco .pnav-code,
body.platform-eco .pnav-handle {
  color: #3d5366;
}
body.platform-eco .pnav-pending {
  color: #7a3d0f;
}
body.platform-eco .pnav-col input[type="text"],
body.platform-eco .pnav-col input[type="search"],
body.platform-eco .pnav-col input[type="number"],
body.platform-eco .pnav-col input[type="email"],
body.platform-eco .pnav-col select,
body.platform-eco .pnav-col textarea,
body.platform-eco .pnav-search,
body.platform-eco .pnav-dlg input,
body.platform-eco .pnav-dlg select {
  background: #fff !important;
  color: #102033 !important;
  border: 1px solid #8bb4d4 !important;
  box-shadow: none !important;
}
body.platform-eco .pnav-col input:focus,
body.platform-eco .pnav-col select:focus,
body.platform-eco .pnav-col textarea:focus,
body.platform-eco .pnav-search:focus {
  border-color: #0b62a3 !important;
  box-shadow: 0 0 0 2px rgba(11, 98, 163, .25) !important;
}
/* app.css: body :is(.btn) { -webkit-text-fill-color:#fff }. Un solo override scoped. */
body.platform-eco .pnav-ui .btn.secondary,
body.platform-eco .pnav-ui .btn.secondary * {
  background: #fff !important;
  color: #0b3d66 !important;
  -webkit-text-fill-color: #0b3d66 !important;
  border: 1px solid #6a93b3 !important;
  box-shadow: none !important;
}
body.platform-eco .pnav-ui .btn.secondary:hover,
body.platform-eco .pnav-ui .btn.secondary:hover *,
body.platform-eco .pnav-ui .btn.secondary:focus,
body.platform-eco .pnav-ui .btn.secondary:focus *,
body.platform-eco .pnav-ui .btn.secondary:active,
body.platform-eco .pnav-ui .btn.secondary:active * {
  background: #eef7fd !important;
  color: #052f5f !important;
  -webkit-text-fill-color: #052f5f !important;
  border-color: #0b62a3 !important;
}
body.platform-eco .pnav-ui .btn:not(.secondary),
body.platform-eco .pnav-ui .btn:not(.secondary) * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body.platform-eco .pnav-ui .btn:disabled,
body.platform-eco .pnav-ui .btn:disabled *,
body.platform-eco .pnav-ui .btn.secondary:disabled,
body.platform-eco .pnav-ui .btn.secondary:disabled * {
  background: #e8eef4 !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #c5d4e0 !important;
  box-shadow: none !important;
  opacity: .75;
  filter: none;
}
body.platform-eco .pnav-badge {
  background: #d7e6f2;
  color: #0b3d66;
  border: 1px solid #8bb4d4;
}
body.platform-eco .pnav-badge.off {
  background: #fde8e8;
  color: #9b1c1c;
}
body.platform-eco .pnav-tgt {
  background: #dcecdc;
  color: #14532d;
  border: 1px solid #8fbf8f;
}
body.platform-eco .pnav-tgt.fail {
  background: #fde8e8;
  color: #9b1c1c;
  border-color: #e8a0a0;
}

.empresa-logo-dropzone {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 2px dashed rgba(11, 98, 163, .35);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  cursor: pointer;
  margin: 12px 0 18px;
  position: relative;
}
.empresa-logo-dropzone.is-over {
  border-color: #1294d2;
  background: rgba(18, 148, 210, .08);
}
.empresa-logo-dropzone.is-fallback {
  border-style: solid;
  opacity: .92;
}
.empresa-logo-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.empresa-logo-preview-wrap {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(34, 183, 255, .28);
  background-color: #0a2233;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.1) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.empresa-logo-preview {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: transparent;
}
.empresa-logo-placeholder {
  color: #eef8ff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.empresa-logo-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.empresa-logo-copy strong { color: #eef8ff; font-size: 14px; }
.empresa-logo-copy span { color: #91a9bc; font-size: 12px; }
.empresa-logo-fallback-note { color: #7dd3fc !important; font-weight: 700; }
.empresa-logos-editor { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
.empresa-logos-editor-title { margin: 8px 0 0; color: #eef8ff; }
.empresa-logos-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.empresa-logo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--eco-line, #164365);
  border-radius: 14px;
  background: var(--eco-panel2, #071d30);
  color: var(--eco-text, #eef8ff);
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.empresa-logo-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.empresa-logo-card-head strong {
  color: var(--eco-text, #eef8ff);
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
}
.empresa-logo-card-hint {
  color: var(--eco-muted, #91a9bc);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}
.empresa-logo-card .empresa-logo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 132px;
  gap: 8px;
  grid-template-columns: none;
  background: rgba(2, 11, 22, .45);
  border: 2px dashed rgba(34, 183, 255, .42);
}
.empresa-logo-card .empresa-logo-dropzone.is-over,
.empresa-logo-card .empresa-logo-dropzone:hover {
  border-color: var(--eco-cyan, #22b7ff);
  background: rgba(34, 183, 255, .12);
}
.empresa-logo-card .empresa-logo-dropzone:focus,
.empresa-logo-card .empresa-logo-dropzone:focus-visible {
  outline: 2px solid var(--eco-cyan, #22b7ff);
  outline-offset: 2px;
}
.empresa-logo-drop-label {
  color: #dceef8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  max-width: 16rem;
}
.empresa-logo-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Controles sobre superficie eco (panel oscuro/intermedio). Anula
   app.css -webkit-text-fill-color y secondary transparente. */
body.platform-eco .platform-surface-controls .btn,
body.platform-eco .platform-surface-controls button.btn,
body.platform-eco .platform-surface-controls a.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  text-align: center;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background-image: linear-gradient(180deg, #1496e7, #0d6fae) !important;
  background-color: #0d6fae !important;
  border: 1px solid rgba(125, 211, 252, .45) !important;
}
body.platform-eco .platform-surface-controls .btn.secondary,
body.platform-eco .platform-surface-controls button.btn.secondary,
body.platform-eco .platform-surface-controls a.btn.secondary {
  background-image: none !important;
  background-color: #0f5f8f !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: none !important;
}
body.platform-eco .platform-surface-controls .btn.secondary:hover,
body.platform-eco .platform-surface-controls .btn.secondary:focus,
body.platform-eco .platform-surface-controls .btn.secondary:focus-visible,
body.platform-eco .platform-surface-controls button.btn.secondary:hover,
body.platform-eco .platform-surface-controls button.btn.secondary:focus {
  background-color: #1780b8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #b9ecff !important;
  outline: 2px solid rgba(125, 211, 252, .55);
  outline-offset: 2px;
}
body.platform-eco .platform-surface-controls .btn:not(.secondary):hover,
body.platform-eco .platform-surface-controls .btn:not(.secondary):focus,
body.platform-eco .platform-surface-controls .btn:not(.secondary):focus-visible {
  filter: brightness(1.1);
  outline: 2px solid rgba(125, 211, 252, .55);
  outline-offset: 2px;
}
body.platform-eco .platform-surface-controls .btn:disabled,
body.platform-eco .platform-surface-controls .btn.secondary:disabled,
body.platform-eco .platform-surface-controls .btn:disabled *,
body.platform-eco .platform-surface-controls .btn.secondary:disabled * {
  background: #132536 !important;
  color: #7b93a6 !important;
  -webkit-text-fill-color: #7b93a6 !important;
  border-color: #2a4b66 !important;
  opacity: .7;
  filter: none;
}

.platform-form-span { grid-column: 1 / -1; }
.platform-form-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-end;
}
.platform-form-flags label {
  flex: 0 1 220px;
  max-width: 260px;
}
@media (max-width: 900px) {
  .empresa-logos-row { grid-template-columns: 1fr; }
}
.platform-install-check { list-style: none; padding: 0; }
.platform-install-check li { margin: 6px 0; }
.platform-dns-list { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
