/* ============================================================================
   Aruba Monitor — Executive Intelligence Control Tower
   Design tokens, overrides, and bespoke chart styling for dark enterprise UI.
   ============================================================================ */

:root {
  --grid-line: rgba(255, 255, 255, 0.06);
  --grid-line-strong: rgba(255, 255, 255, 0.12);
  --scan-glow: rgba(34, 211, 238, 0.18);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.005em;
  background: radial-gradient(
      1400px 700px at 80% -10%,
      rgba(14, 165, 233, 0.10),
      transparent 60%
    ),
    radial-gradient(900px 600px at -5% 110%, rgba(99, 102, 241, 0.08), transparent 60%),
    #07090e;
}

/* Decorative scanline background overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
}

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0f17;
}
::-webkit-scrollbar-thumb {
  background: #1a2232;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2c3850;
}

/* ---------------- Card base ---------------- */
.card {
  background: linear-gradient(180deg, rgba(19, 26, 40, 0.85), rgba(11, 15, 23, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 40px -24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.card-hover:hover {
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18),
    0 16px 40px -16px rgba(6, 182, 212, 0.25);
  transition: all 0.18s ease;
}

/* ---------------- Chip / badge base ---------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------------- Mono KPI treatment ---------------- */
.kpi-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------------- Recharts theming ---------------- */
.recharts-cartesian-axis-tick-value,
.recharts-polar-angle-axis-tick-value,
.recharts-polar-radius-axis-tick-value {
  fill: #64748b !important;
  font-size: 11px;
  font-family: 'Inter', system-ui, sans-serif;
}

.recharts-cartesian-grid-horizontal line,
.recharts-cartesian-grid-vertical line,
.recharts-polar-grid-angle line,
.recharts-polar-grid-concentric-polygon,
.recharts-polar-grid-concentric-circle {
  stroke: rgba(255, 255, 255, 0.05) !important;
}

.recharts-default-tooltip {
  background-color: rgba(15, 20, 32, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8) !important;
  font-size: 12px !important;
  color: #e2e8f0 !important;
  padding: 10px 12px !important;
}

.recharts-tooltip-label {
  color: #94a3b8 !important;
  font-weight: 500 !important;
  margin-bottom: 4px !important;
  text-transform: uppercase;
  font-size: 10px !important;
  letter-spacing: 0.05em;
}

.recharts-legend-item-text {
  color: #94a3b8 !important;
  font-size: 11px !important;
}

.recharts-text {
  fill: #64748b !important;
}

/* ---------------- Sidebar active indicator ---------------- */
.nav-active {
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0.10),
    rgba(34, 211, 238, 0.02)
  );
  border-left: 2px solid #22d3ee;
  color: #e2e8f0;
}

/* ---------------- Heatmap cells ---------------- */
.heat-cell {
  border-radius: 4px;
  transition: transform 0.12s ease;
}
.heat-cell:hover {
  transform: scale(1.08);
  outline: 1px solid rgba(34, 211, 238, 0.4);
}

/* ---------------- Pulse dot (live) ---------------- */
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  background: #22d3ee;
  border-radius: 50%;
}
.pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #22d3ee;
  opacity: 0.4;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ---------------- Skeleton shimmer ---------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* ---------------- Focus ring ---------------- */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- Utility ---------------- */
.text-balance { text-wrap: balance; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------------- Sentiment bar segments ---------------- */
.seg-pos { background: linear-gradient(90deg, #10b981, #34d399); }
.seg-neu { background: linear-gradient(90deg, #475569, #64748b); }
.seg-neg { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ---------------- Severity dots ---------------- */
.dot-bassa  { background: #64748b; }
.dot-media  { background: #f59e0b; }
.dot-alta   { background: #f87171; }
.dot-critica{ background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,0.6); }
