/**
 * Hub de rol oscuro — alineado con BIM Manager, PU Analyst y Architect.
 */
:root {
  --rum-bg: #050522;
  --rum-bg-deep: #000115;
  --rum-card: #0B111B;
  --rum-card-border: #C68B59;
  --rum-text: #ffffff;
  --rum-muted: #BDC3D0;
  --rum-label: #C68B59;
  --rum-cyan: #00BFFF;
  --rum-peach: #E8B68D;
  --rum-accent: #E8B68D;
  --rum-blue: #2a6db0;
  --btn-bg: #0B111B;
  --btn-bg-hover: #121a28;
  --modal-backdrop: rgba(2, 6, 23, 0.75);
  --modal-surface: rgba(255, 255, 255, 0.97);
  --modal-text: #111827;
  --modal-muted: #4b5563;
}

body.rum-dash-dark {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--rum-text);
  background: #02030A;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

body.rum-dash-dark h1,
body.rum-dash-dark h2,
body.rum-dash-dark h3,
body.rum-dash-dark h4 {
  font-family: "Baloo 2", system-ui, sans-serif;
  margin: 0;
}

body.rum-dash-dark .world {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

body.rum-dash-dark .bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #02030A 0%, #0B1120 52%, #0f172a 100%);
}

body.rum-dash-dark #starsCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

body.rum-dash-dark .layer {
  position: absolute;
  inset: -15vh 0;
}

body.rum-dash-dark .satDot {
  position: absolute;
  left: -12vw;
  top: var(--y, 10vh);
  width: 3px;
  height: 3px;
  border-radius: 999px;
  opacity: 0.95;
  transform: translate3d(0, 0, 0) scale(var(--s, 1));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35), 0 0 14px rgba(0, 191, 255, 0.12);
  animation: rumRoleHubSatFly var(--t, 26s) linear infinite;
  animation-delay: var(--d, 0s);
  will-change: transform, opacity;
}

body.rum-dash-dark .satDot::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 12px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28));
  opacity: 0.55;
}

@keyframes rumRoleHubSatFly {
  0% { transform: translate3d(-12vw, 0, 0) scale(var(--s, 1)); opacity: 0; }
  8% { opacity: 0.95; }
  92% { opacity: 0.95; }
  100% { transform: translate3d(124vw, 0, 0) scale(var(--s, 1)); opacity: 0; }
}

body.rum-dash-dark .pm-wrap {
  flex: 1 0 auto;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  width: 100%;
  position: relative;
  z-index: 1;
}

body.rum-dash-dark .hero {
  margin: 26px 0;
  background: var(--btn-bg);
  border: 1px solid var(--rum-card-border);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 14px 32px rgba(2, 8, 20, 0.55);
  display: grid;
  gap: 14px;
}

body.rum-dash-dark .hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.02;
  color: #ffffff;
}

body.rum-dash-dark .hero > p {
  color: var(--rum-muted);
  max-width: 900px;
  font-size: 1.04rem;
  line-height: 1.6;
  margin: 0;
}

body.rum-dash-dark .hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(246, 168, 104, 0.15);
  color: #ffd2ab;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(246, 168, 104, 0.45);
}

body.rum-dash-dark .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.rum-dash-dark .stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(42, 109, 176, 0.22);
  border: 1px solid rgba(79, 163, 255, 0.35);
}

body.rum-dash-dark .hero-primary {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px dashed rgba(198, 139, 89, 0.45);
  display: grid;
  gap: 10px;
}

body.rum-dash-dark .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(135deg, #f6a868 0%, #ffcf9f 100%);
  box-shadow: 0 14px 30px rgba(246, 168, 104, 0.35);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.rum-dash-dark .hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(246, 168, 104, 0.45);
}

body.rum-dash-dark .hero-note {
  margin: 0;
  color: var(--rum-muted);
  font-size: 0.92rem;
  max-width: 720px;
}

body.rum-dash-dark .section-title {
  margin: 28px 0 6px;
  font-size: 1.55rem;
  color: #ffffff;
  font-weight: 800;
}

body.rum-dash-dark .section-note {
  margin: 0 0 14px;
  color: var(--rum-muted);
  font-size: 0.94rem;
  max-width: 760px;
}

body.rum-dash-dark .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

body.rum-dash-dark .tool-card {
  display: block;
  text-decoration: none;
  color: var(--rum-peach);
  background: var(--btn-bg);
  border: 1px solid var(--rum-card-border);
  border-radius: 26px;
  padding: 24px;
  min-height: 160px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 14px 32px rgba(2, 8, 20, 0.55);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

button.tool-card {
  width: 100%;
  text-align: left;
  font: inherit;
}

body.rum-dash-dark .tool-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(140px 140px at var(--x, 50%) var(--y, 50%), rgba(0, 191, 255, 0.22), rgba(198, 139, 89, 0.12), transparent 70%);
  opacity: 0;
  transition: 0.18s ease;
  pointer-events: none;
}

body.rum-dash-dark .tool-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(0, 191, 255, 0.55), rgba(232, 182, 141, 0.65), transparent);
  opacity: 0;
  transform: scaleX(0.74);
  transition: 0.16s ease;
}

body.rum-dash-dark .tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 191, 255, 0.35);
  border-color: rgba(0, 191, 255, 0.65);
  background: var(--btn-bg-hover);
  color: var(--rum-peach);
}

body.rum-dash-dark .tool-card:hover::before,
body.rum-dash-dark .tool-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

body.rum-dash-dark .tool-code {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rum-label);
  margin-bottom: 10px;
  font-weight: 700;
}

body.rum-dash-dark .tool-card h3 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--rum-text);
  font-weight: 800;
}

body.rum-dash-dark .tool-card p {
  margin: 0;
  color: var(--rum-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.rum-dash-dark .tool-card:hover h3 { color: #ffffff; }
body.rum-dash-dark .tool-card:hover p { color: #d1d5db; }
body.rum-dash-dark .tool-card:hover .tool-code { color: var(--rum-peach); }

body.rum-dash-dark .gate-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--modal-backdrop);
  padding: 20px;
  z-index: 120;
  backdrop-filter: blur(8px);
}

body.rum-dash-dark .gate-modal.is-open { display: flex; }

body.rum-dash-dark .gate-modal-card {
  width: min(520px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--modal-surface);
  color: var(--modal-text);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

body.rum-dash-dark .gate-modal-card--wide {
  width: min(760px, 100%);
}

body.rum-dash-dark .gate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

body.rum-dash-dark .gate-modal-card h3 {
  font-size: 1.7rem;
  line-height: 1.05;
  margin-bottom: 6px;
  color: #1f2937;
}

body.rum-dash-dark .gate-modal-card p {
  margin: 0;
  color: var(--modal-muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

body.rum-dash-dark .gate-modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--modal-muted);
  padding: 4px;
}

body.rum-dash-dark .gate-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: "Baloo 2", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.rum-dash-dark .gate-btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, #f6a868 0%, #ffcf9f 100%);
  box-shadow: 0 14px 30px rgba(246, 168, 104, 0.3);
}

body.rum-dash-dark .gate-btn-secondary {
  color: #1f2937;
  background: #edf2f7;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

body.rum-dash-dark .gate-btn-danger {
  color: #fff;
  background: #c46a4a;
}

body.rum-dash-dark .gate-btn:hover { transform: translateY(-2px); }

body.rum-dash-dark .invite-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

body.rum-dash-dark .invite-item {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  display: grid;
  gap: 6px;
}

body.rum-dash-dark .invite-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

body.rum-dash-dark .invite-date {
  font-size: 0.75rem;
  color: #1f2937;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
}

body.rum-dash-dark .invite-item h4 {
  font-size: 1rem;
  margin: 0;
  color: #1f2937;
}

body.rum-dash-dark .invite-meta {
  color: #4b5563;
  font-size: 0.9rem;
  margin: 0;
}

body.rum-dash-dark .invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

body.rum-dash-dark .invite-empty {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  body.rum-dash-dark .pm-wrap {
    padding: 24px 16px 48px;
  }

  body.rum-dash-dark .hero {
    padding: 22px 18px;
  }
}
