/* RCC Dashboard styles (loaded by rcc.html) */
.dash-wrap {
  position: relative;
  padding: 56px 24px 0;
}
/* Halo difuminado que funde el hero con el dashboard (en vez de una línea dura) */
.dash-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  width: min(1180px, 94%);
  height: 320px;
  background: radial-gradient(58% 120% at 50% 0%,
    rgba(59,158,255,0.30) 0%,
    rgba(108,123,255,0.14) 42%,
    rgba(108,123,255,0) 74%);
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}
.dash-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px; margin: 0 auto;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #04071a; text-align: left;
  box-shadow: 0 60px 140px -30px rgba(59,158,255,0.45), 0 0 0 1px rgba(255,255,255,0.04);
}
.titlebar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; background: #1b1f33;
  border-bottom: 1px solid transparent;
  border-image: var(--fade-edge) 1;
}
.traffic { display: flex; gap: 7px; }
.traffic span { width: 12px; height: 12px; border-radius: 50%; }
.traffic .r { background: #ff5f57; } .traffic .y { background: #febc2e; } .traffic .g { background: #28c840; }
.chrome-tools { display: flex; gap: 8px; color: #6b7593; font-size: 11px; }
.chrome-tools .ct-ico { width: 16px; text-align: center; }
.chrome-tools.right { margin-left: auto; }
.url-pill { flex: 1; text-align: center; font-size: 11px; color: #9aa3bd; background: #2a2f47; padding: 4px 14px; border-radius: 6px; max-width: 360px; margin: 0 auto; }

.dash {
  display: grid; grid-template-columns: 220px 1fr;
  background: #04071a; font-family: 'Inter', sans-serif; font-size: 11px; color: #c9d3ee;
}

.side {
  background: #060a1f;
  border-right: 1px solid transparent;
  border-image: var(--fade-v) 1;
  padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.side .brand .brand-lockup { width: 100%; max-width: 152px; height: auto; display: block; }
.side .brand svg { width: 28px; height: 24px; }
.side .brand .b1 { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; color: #fff; line-height: 1; }
.side .brand .b2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11px; color: var(--accent-blue); margin-top: 2px; line-height: 1; }
.side .brand .b3 { font-size: 8px; color: #6b7593; margin-top: 2px; letter-spacing: 0.04em; }
.side .nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; border-radius: 6px;
  color: #8893b3; font-size: 11px;
  border: 1px solid transparent;
}
.side .nav-item .ic { width: 12px; height: 12px; display: inline-block; background: currentColor; opacity: 0.6; mask: radial-gradient(circle, transparent 40%, currentColor 41%); -webkit-mask: radial-gradient(circle, transparent 40%, currentColor 41%); }
.side .nav-item.active {
  background: linear-gradient(90deg, rgba(40,200,160,0.18) 0%, rgba(40,200,160,0.04) 100%);
  color: #2adfc0; border-color: rgba(40,200,160,0.30);
}
.side .nav-item .caret { margin-left: auto; color: #2adfc0; }
.side .nav-item .badge { margin-left: auto; font-size: 8px; padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(255,255,255,0.08); color: #8893b3; }
.side .nav-item .badge.ai { color: #b06bff; border-color: rgba(176,107,255,0.4); }
.side .nav-item .badge.live { color: #28c840; border-color: rgba(40,200,64,0.4); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid transparent; border-image: var(--fade-edge) 1; }
.side .foot-brand { display: flex; align-items: center; gap: 10px; padding: 6px; }
.side .foot-brand svg { width: 24px; height: 22px; }
.side .upload {
  margin-top: 12px; background: rgba(40,200,160,0.08); border: 1px solid rgba(40,200,160,0.3);
  color: #2adfc0; padding: 7px 10px; border-radius: 6px; font-size: 10px; text-align: center;
}

.main { padding: 16px 20px; min-width: 0; }
.topbar { display: grid; grid-template-columns: 1fr 320px 1fr; align-items: center; gap: 14px; margin-bottom: 10px; }
.topbar .dt { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.18em; color: #fff; text-transform: uppercase; }
.topbar .search { background: #0c1230; border: 1px solid rgba(255,255,255,0.06); padding: 6px 12px; border-radius: 6px; font-size: 10px; color: #6b7593; }
.topbar .meta { text-align: right; display: flex; gap: 14px; justify-content: flex-end; align-items: center; font-size: 10px; color: #8893b3; }
.topbar .v { color: #2adfc0; }
.topbar .sun { color: #ffb547; font-size: 14px; }

.ticker {
  display: flex; gap: 0; margin: 8px 0 4px; background: rgba(0,0,0,0.35);
  border-top: 1px solid transparent; border-bottom: 1px solid transparent;
  border-image: var(--fade-edge) 1;
  overflow: hidden; font-family: 'JetBrains Mono', monospace; font-size: 10px;
}
.ticker .pill-lead {
  background: #ff3b3b; color: #fff; padding: 5px 12px; font-weight: 700; letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 6px;
}
.ticker .pill-lead .dot { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: tk 1.4s infinite; }
@keyframes tk { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.ticker .item { padding: 5px 14px; border-right: 1px solid rgba(255,255,255,0.03); color: #c9d3ee; white-space: nowrap; }
.ticker .item .src { color: #8893b3; }
.ticker .item .lbl { color: #ff8c4d; font-weight: 700; }
.ticker .item .lbl.kev { color: #ff3b3b; padding: 0 4px; border: 1px solid #ff3b3b; border-radius: 2px; font-size: 8px; margin-left: 4px; }
.ticker .item .cvss { color: #ffb547; }
.ticker .item.amber { background: rgba(255,140,77,0.04); }
.ticker .item.violet { background: rgba(176,107,255,0.06); }
.ticker .item.violet .lbl { color: #b06bff; }

.legend { display: flex; align-items: center; padding: 8px 4px 14px; border-bottom: 1px solid transparent; border-image: var(--fade-edge) 1; font-size: 10px; color: #8893b3; }
.legend .grp { display: flex; gap: 14px; }
.legend .grp.right { margin-left: auto; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.sec-head { margin: 18px 0 12px; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.22em; color: #2adfc0; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.sec-head::before { content: "+"; opacity: 0.7; }

.integ-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: #060a1f; border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 14px; }
.card .ch { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card .ch .dia { color: var(--accent-blue); }
.card .ch .name { font-weight: 600; color: var(--accent-blue); font-size: 12px; }
.card .live-pill { font-size: 8px; color: #28c840; border: 1px solid rgba(40,200,64,0.4); padding: 1px 6px; border-radius: 3px; letter-spacing: 0.08em; }
.card.red { border-color: rgba(255,107,107,0.35); box-shadow: 0 0 28px -10px rgba(255,107,107,0.4); }
.card.red .ch .dia { color: #ff8c4d; }
.card.red .ch .name { color: #ff8c4d; }
.card.red .live-pill { color: #ff8c4d; border-color: rgba(255,140,77,0.4); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.04); padding: 10px 12px; border-radius: 6px; }
.kpi .lab { font-size: 9px; color: #8893b3; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.kpi .lab .dot { width: 5px; height: 5px; border-radius: 50%; background: #2adfc0; }
.kpi .val { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; color: #fff; font-weight: 700; margin: 4px 0; line-height: 1; }
.kpi .val.val-red { color: #ff5f5f; }
.kpi .val.val-amber { color: #ffb547; }
.kpi .sub { font-size: 9px; color: #8893b3; }
.kpi .sub .r { color: #ff5f5f; } .kpi .sub .a { color: #ffb547; }

.assets-title { font-size: 9px; color: #6b7593; letter-spacing: 0.14em; text-transform: uppercase; margin: 16px 0 8px; }
.asset { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: rgba(0,0,0,0.25); border-radius: 4px; margin-bottom: 5px; font-size: 10px; position: relative; overflow: hidden; }
.asset::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.asset.red::before { background: #ff3b3b; box-shadow: 0 0 12px #ff3b3b; }
.asset.amber::before { background: #ffb547; box-shadow: 0 0 12px #ffb547; }
.asset.violet::before { background: #b06bff; box-shadow: 0 0 12px #b06bff; }
.asset .num { color: #6b7593; font-family: 'JetBrains Mono', monospace; }
.asset .nm { color: #fff; font-family: 'JetBrains Mono', monospace; }
.asset .met { color: #8893b3; font-size: 9px; }
.asset .met .crit { color: #ff5f5f; } .asset .met .alt { color: #ffb547; }
.asset .met .off { color: #b06bff; } .asset .met .on { color: #2adfc0; }

.sca-head { display: flex; align-items: center; gap: 6px; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; color: #ff8c4d; letter-spacing: 0.12em; margin-bottom: 10px; }
.sca-body { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.gauge { position: relative; width: 200px; height: 130px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .gnum { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-family: 'Barlow Condensed', sans-serif; font-size: 36px; color: #ffb547; font-weight: 700; line-height: 1; }
.gauge .gnum .max { font-size: 12px; color: #6b7593; margin-left: 4px; }
.gauge .gtag { position: absolute; left: 50%; transform: translateX(-50%); bottom: -4px; background: rgba(255,181,71,0.18); color: #ffb547; font-size: 8px; padding: 2px 8px; border-radius: 3px; border: 1px solid rgba(255,181,71,0.4); letter-spacing: 0.1em; }
.gauge-meta { text-align: center; margin-top: 10px; font-size: 9px; color: #8893b3; }
.gauge-meta .x { color: #ff5f5f; font-weight: 700; }

.hard-crit { background: rgba(255,77,77,0.04); border: 1px solid rgba(255,77,77,0.18); border-radius: 6px; padding: 10px 12px; }
.hard-crit h4 { margin: 0 0 6px; color: #ff5f5f; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; letter-spacing: 0.10em; }
.hard-crit p { margin: 0; color: #c9d3ee; font-size: 10px; line-height: 1.55; }

.wazuh-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgba(255,77,77,0.22) 18%, rgba(255,77,77,0.22) 82%, transparent) 1; }
.wk { padding: 6px 10px; background: rgba(0,0,0,0.25); border-radius: 4px; }
.wk .lab { font-size: 9px; color: #8893b3; display: flex; align-items: center; gap: 4px; }
.wk .val { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: #fff; font-weight: 700; line-height: 1; margin: 4px 0 4px; }
.wk .val.red { color: #ff5f5f; } .wk .val.amber { color: #ffb547; }
.wk .sub { font-size: 9px; color: #6b7593; }

.sync { margin-top: 12px; font-size: 9px; color: #6b7593; display: flex; align-items: center; gap: 6px; }

.charts-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.chart-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.18em; color: #8893b3; text-transform: uppercase; margin-bottom: 10px; }
.area-chart { height: 220px; position: relative; }
.area-chart svg { width: 100%; height: 100%; overflow: visible; }
.area-chart .legend-mini { position: absolute; top: 6px; right: 8px; display: flex; gap: 12px; font-size: 9px; color: #8893b3; }
.area-chart .legend-mini .sw { width: 10px; height: 4px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: middle; }

.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: 10px; }
.hbar .nm { color: #c9d3ee; font-family: 'JetBrains Mono', monospace; }
.hbar .track { height: 16px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: linear-gradient(90deg, #ff4d4d, #ff8c4d); border-radius: 3px; }
.hbar .v { color: #fff; font-family: 'JetBrains Mono', monospace; text-align: right; }


/* ============================================================
   Responsive — RCC Dashboard
   ============================================================ */
@media (max-width: 1024px) {
  .dash-wrap { padding: 40px 16px 0; }
  .dash-wrap::before { top: -40px; height: 220px; filter: blur(36px); }
  .dash { grid-template-columns: 1fr; }
  .side {
    border-right: none;
    border-bottom: 1px solid transparent;
    border-image: var(--fade-edge) 1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px;
    gap: 6px;
  }
  .side .brand { padding: 4px 8px; flex: 0 0 100%; }
  .side .nav-item { padding: 6px 10px; font-size: 10px; }
  .side-foot { display: none; }
  .topbar { grid-template-columns: 1fr; gap: 8px; }
  .topbar .meta { justify-content: flex-start; flex-wrap: wrap; }
  .ticker { flex-wrap: wrap; }
  .ticker .item { white-space: normal; }
  .integ-row { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .sca-body { grid-template-columns: 1fr; }
  .gauge { width: 100%; max-width: 220px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .dash-shell { border-radius: 10px; }
  .dash-wrap { padding: 30px 14px 0; }
  .dash-wrap::before { top: -30px; height: 170px; }
  .url-pill { display: none; }
  .main { padding: 12px 14px; }
  .topbar .dt { font-size: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .wazuh-kpis { grid-template-columns: 1fr 1fr; }
  .hbar { grid-template-columns: 80px 1fr 32px; font-size: 9px; }
}

@media (max-width: 480px) {
  .chrome-tools { display: none; }
  .ticker { font-size: 9px; }
  .ticker .pill-lead { padding: 4px 8px; }
  .legend { flex-wrap: wrap; gap: 8px; }
}
