/*
  Global styles for Nexus Navigator.
  Tailwind is no longer pulled from a CDN; bespoke utilities below replace the
  handful of classes we previously relied on.
*/

html { scroll-behavior: smooth; }

html, body { height: 100%; margin: 0; padding: 0; }

:root{
  --neon-color: #00d1ff;
  --neon-dark:  #009acb;

  /* Fluid layout controls */
  --gutter: clamp(0.5rem, 3vw, 1.25rem);           /* side padding */
  --section-pad-block: clamp(1.25rem, 5vw, 4rem);  /* vertical padding */
}

* { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: #0f172a;
  color: #f1f5f9;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden; /* avoid scroll from glows/full-bleed sections */
}

/* Lightweight utility helpers (replacing old Tailwind classes) */
.resume-fatal-error { color: #dc2626; font-weight: 600; }
.resume-empty-message { color: #fbbf24; font-weight: 600; }

.weather-error { color: #f87171; font-weight: 600; margin-bottom: 1rem; }
.weather-loading, .weather-empty { font-style: italic; color: #94a3b8; }
.weather-empty { font-weight: 500; }
.weather-retry {
  display: inline-flex; align-items: center; gap: .35rem;
  background-color: #1f2937; color: #f8fafc;
  padding: .55rem 1.1rem; border-radius: .5rem; border: 1px solid rgba(148,163,184,.35);
  font-weight: 600; cursor: pointer; transition: background-color .2s ease, border-color .2s ease;
}
.weather-retry:hover { background-color: #334155; border-color: rgba(148,163,184,.6); }
.weather-meta { margin-top: .75rem; font-size: .75rem; color: #94a3b8; }

.error-title { font-size: 2rem; font-weight: 800; color: #f87171; margin-bottom: .25rem; }
.error-subtitle { font-size: 1.25rem; font-weight: 600; color: #fca5a5; margin-bottom: 1rem; }
.error-section-title { font-size: 1.125rem; font-weight: 700; color: #f1f5f9; margin-top: 1.5rem; margin-bottom: .5rem; }
.error-body { color: #cbd5f5; line-height: 1.6; max-width: 60ch; }
.error-body strong { color: #fef3c7; }
.error-body--spaced { margin-top: 1rem; }

/* Subtle floating shapes behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 84, 84, 0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 105, 180, 0.10), transparent 40%),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.06), transparent 50%),
    radial-gradient(circle at 60% 30%, rgba(255, 128, 0, 0.10), transparent 40%);
  background-size: 200% 200%;
  filter: blur(60px);
  animation: pandaMove 60s linear infinite;
}

/* Global highlight helper */
.highlight { color: #1D4ED8; font-weight: 600; }

/* One global gradient text (site-wide). Page-specific variants are scoped below. */
.gradient-text {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Decorative blurred orb (optional layer) */
.hero-decor {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.5) 0%, rgba(93,93,255,0.1) 70%);
  filter: blur(120px); top: -100px; right: -100px; z-index: -2;
}

/* Feature/link base “neon glow” cards */
.feature-card,
.link-card {
  position: relative; overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,.5), 0 0 10px var(--neon-color), 0 0 20px var(--neon-color);
  transition: box-shadow .3s ease;
}
.feature-card:hover,
.link-card:hover {
  box-shadow: 0 0 12px rgba(0,0,0,.5), 0 0 20px var(--neon-color), 0 0 40px var(--neon-color);
}
.feature-card::before,
.link-card::before {
  content: '';
  position: absolute; top: -3px; left: -3px;
  width: calc(100% + 6px); height: calc(100% + 6px);
  border-radius: inherit;
  background: linear-gradient(270deg, #4f46e5, #9333ea, #ec4899, var(--neon-color), #4f46e5);
  background-size: 400% 400%;
  filter: blur(15px);
  opacity: 0; transition: opacity .4s ease; z-index: -1;
}
.feature-card:hover::before,
.link-card:hover::before { opacity: 1; animation: gradientMove 4s linear infinite; }

/* Simple fade-in utility */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Links */
a { color: #60a5fa; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; width: 100%; z-index: 50;
  background-color: transparent; border-bottom: none; box-shadow: none;
  padding-block: clamp(0.5rem, 1.5vw, 0.9rem);
}
.site-header .container {
  max-width: none; width: 100%; margin: 0;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative;
}
.brand {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 700; color: var(--neon-color);
  text-shadow: 0 0 8px var(--neon-color), 0 0 16px var(--neon-color);
}

.nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(0.25rem, 2vw, 0.75rem); }
.nav-link {
  margin: 0 clamp(0.25rem, 1.2vw, 0.75rem);
  padding: clamp(0.45rem, 1.2vw, 0.65rem) clamp(0.7rem, 2vw, 1rem);
  border-radius: 9999px; color: #cbd5e1;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; position: relative;
}
.nav-link:hover { background-color: rgba(79,70,229,.25); color: #fff; box-shadow: 0 0 8px var(--neon-color); }
.nav-link.active { background-color: var(--neon-color); color: #0f172a; box-shadow: 0 0 8px var(--neon-color), 0 0 16px var(--neon-color); }

/* Layout containers */
.main-content {
  max-width: none; width: 100%; margin: 0;
  padding-block: var(--section-pad-block);
  padding-inline: var(--gutter);
}
.site-footer { background-color: transparent; color: #94a3b8; text-align: center; padding: 1rem 0; }

/* Hero section (full-bleed) */
.hero-section {
  position: relative; text-align: center; overflow: hidden;
  background-image: url('/images/websiteimage.png'); /* absolute path fix */
  background-repeat: no-repeat; background-position: center; background-size: cover;

  /* Full-bleed background to the viewport edges */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding-block: var(--section-pad-block);
  padding-inline: var(--gutter);
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, #4f46e5, #9333ea, #ec4899);
  opacity: .75; z-index: -1; pointer-events: none;
}

/* Fluid hero typography */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; margin-bottom: clamp(0.5rem, 1.2vw, 1rem); color: #fff;
  line-height: 1.08;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.2vw + 0.75rem, 1.25rem);
  line-height: 1.55; color: #f3f4f6;
  margin-bottom: clamp(1rem, 2vw, 2rem);
  max-width: none; margin-left: 0; margin-right: 0; opacity: .92;
}

.btn-primary {
  display: inline-block; background-color: #fff; color: #1e293b;
  padding: .75rem 1.5rem; border-radius: .375rem; font-weight: 600; margin: .25rem; transition: background-color .15s ease-in-out;
}
.btn-primary:hover { background-color: #e5e7eb; }
.btn-secondary {
  display: inline-block; border: 2px solid #fff; color: #fff;
  padding: .75rem 1.5rem; border-radius: .375rem; font-weight: 600; margin: .25rem; transition: all .15s ease-in-out;
}
.btn-secondary:hover { background-color: #fff; color: #1e293b; }

/* Neon text + buttons */
.neon-text { color: var(--neon-color); text-shadow: 0 0 5px var(--neon-color), 0 0 10px var(--neon-color), 0 0 20px var(--neon-color), 0 0 40px var(--neon-color); }
.btn-neon {
  position: relative; overflow: hidden; background-color: var(--neon-dark); color:#0f172a;
  padding: clamp(0.6rem, 1.2vw, 0.9rem) clamp(1rem, 2.2vw, 1.5rem);
  border-radius: clamp(0.5rem, 1vw, 0.75rem); font-weight:600; margin:.25rem;
  box-shadow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color), 0 0 30px var(--neon-color);
  transition: box-shadow .2s ease;
}
.btn-neon:hover { background-color: var(--neon-color); box-shadow: 0 0 20px var(--neon-color), 0 0 40px var(--neon-color), 0 0 60px var(--neon-color); }
.btn-neon::after {
  content:''; position:absolute; top:-3px; left:-3px; width:calc(100% + 6px); height:calc(100% + 6px);
  border-radius:inherit; background:linear-gradient(270deg, #4f46e5, #9333ea, #ec4899, var(--neon-color), #4f46e5);
  background-size:400% 400%; filter:blur(12px); opacity:0; transition:opacity .4s ease; z-index:-1;
}
.btn-neon:hover::after { opacity:1; animation: gradientMove 4s linear infinite; }

/* Features section (full-bleed) */
.features-section {
  background-color: #1e293b;

  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding-block: var(--section-pad-block);
  padding-inline: var(--gutter);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 30vw, 420px), 1fr));
  gap: clamp(0.75rem, 2.2vw, 1.5rem);
  width: 100%;
  margin: 0;
}
.feature-card {
  background-color: #0f172a; padding: clamp(0.9rem, 2.3vw, 1.5rem);
  border-radius: clamp(0.5rem, 1.2vw, 1rem);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  text-align: left;
}
.feature-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; color: #f1f5f9; }
.feature-card p  { color: #94a3b8; }

/* Links page (full-bleed + scoped overrides) */
.links-section {
  padding-block: var(--section-pad-block);
  padding-inline: var(--gutter);

  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}
.links-section .gradient-text {
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 28vw, 420px), 1fr));
  gap: clamp(0.9rem, 2.2vw, 1.5rem);
  width: 100%;
  margin: 0;
}
.links-section .link-card {
  background-color: #0f172a; padding: clamp(1rem, 2.2vw, 1.5rem);
  border-radius: clamp(0.5rem, 1.2vw, 1rem);
  box-shadow: 0 2px 8px rgba(0,0,0,.5); display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(255,255,255,.09);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.links-section .link-card:hover {
  transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,.18); border-color: rgba(255,255,255,.18);
}
.links-section .link-card h2 { font-size: 1.1rem; font-weight: 700; margin: .6rem 0 .25rem; }
.links-section .link-card p  { flex: 1; color: #94a3b8; margin: 0 0 .9rem; opacity: .85; line-height: 1.35; }
.links-section .link-card a  {
  align-self: flex-start; display: inline-block; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.18); padding: .45rem .7rem; border-radius: .75rem;
  transition: background .18s, border-color .18s, transform .18s;
}
.links-section .link-card a:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); transform: translateY(-1px); }

.icon-wrap {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 20% 20%, rgba(124,58,237,.25), rgba(6,182,212,.15) 60%, transparent 100%);
}
.icon-wrap i { font-size: 1.6rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.icon-anim { will-change: transform; }
.links-section .link-card:hover .icon-wrap { animation: floaty 2.2s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }

/* Counter page */
.counter-container {
  max-width: none; width: 100%;
  margin: 0; padding: clamp(1rem, 3vw, 2rem);
  background-color: #0f172a; border-radius: .5rem; box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.counter-container h1 { color: #f1f5f9; font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1rem; }
.counter-container p  { color: #94a3b8; margin-bottom: 1.5rem; }
.counter-container button {
  background-color: var(--neon-color); color: #0f172a; padding: .75rem 1.5rem; border-radius: .375rem;
  font-weight: 600; border: none; cursor: pointer;
  transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.counter-container button:hover { background-color: #39c8ff; box-shadow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color); }

/* Weather page */
.weather-container {
  max-width: none; width: 100%;
  margin: 0; padding: clamp(1rem, 3vw, 2rem);
  background-color: #0f172a; border-radius: .5rem; box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.weather-container table { width: 100%; border-collapse: collapse; }
.weather-container th, .weather-container td {
  padding: .75rem; border-bottom: 1px solid #1e293b; color: #f1f5f9; text-align: left;
}
.weather-container th { background-color: #1e293b; font-weight: 600; }
.weather-container tbody tr:nth-child(even) { background-color: #111827; }
.weather-container tbody tr:hover { background-color: rgba(30,41,59,.65); }

/* Typography */
h1, h2, h3 { font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; letter-spacing: 1px; }

/* Intro overlay / pop */
.intro-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,.95); display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 1; animation: slideIn .8s ease-out; transition: opacity .6s ease-out, transform .6s ease-out;
}
.intro-overlay.intro-hidden { opacity: 0; pointer-events: none; transform: translateY(-30px); }
.intro-overlay.intro-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.intro-content {
  text-align: center; color: var(--neon-color); font-size: 2rem; font-weight: 700;
  text-shadow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color), 0 0 40px var(--neon-color);
  letter-spacing: 2px; padding: 0 1rem;
}
.intro-pop {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.6);
  background: var(--neon-color); color: #0f172a; padding: 1rem 2rem; border-radius: 9999px;
  font-size: clamp(1rem, 2.8vw, 1.5rem); font-weight: 700; z-index: 1000; pointer-events: none;
  box-shadow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color), 0 0 40px var(--neon-color);
  white-space: normal; text-wrap: balance;
  animation: popInOut 4s ease-in-out forwards;
  max-width: min(92vw, 1100px); margin-inline: auto;
}

/* Background/halo animations */
@keyframes gradientMove { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes gradientFlow { 0%{background-position:0% 0%} 50%{background-position:100% 100%} 100%{background-position:0% 0%} }
@keyframes pandaMove    { 0%{background-position:0% 0%} 100%{background-position:200% 200%} }
@keyframes codeRain     { 0%{transform:translateY(-100%)} 100%{transform:translateY(200%)} }
@keyframes popInOut {
  0%{opacity:0; transform:translate(-50%, -50%) scale(.6)}
  10%{opacity:1; transform:translate(-50%, -50%) scale(1)}
  80%{opacity:1; transform:translate(-50%, -50%) scale(1)}
  90%{opacity:.8; transform:translate(-50%, -50%) scale(1.4)}
  100%{opacity:0; transform:translate(-50%, -50%) scale(2)}
}
@keyframes slideIn { from { transform: translateY(100%);} to { transform: translateY(0);} }

/* Screen-reader only */
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Lordicon helper */
.icon-anim { will-change: transform; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.icon-anim:hover { animation: pinch .22s ease-out; }
@keyframes pinch { 0%{transform:scale(1)} 45%{transform:scale(.9)} 100%{transform:scale(1)} }

/* =========================
   Résumé page (SCOPED)
   Wrap your resume markup in: <div class="resume"> ... </div>
   ========================= */
.resume .gradient-text{
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.resume .container { max-width: 980px; margin: 0 auto; padding: 0 1rem; }
.resume .section-title {
  font-size: 1.125rem; font-weight: 700; margin: 0 0 .75rem; color: #e5e7eb;
  text-shadow: 0 0 6px rgba(34,211,238,.25), 0 0 10px rgba(167,139,250,.25);
}
.resume .card{
  background: rgba(15,23,42,.65); border: 1px solid rgba(148,163,184,.22);
  border-radius: 1rem; padding: 1.1rem 1.25rem; margin: 1rem 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.35), 0 6px 18px rgba(34,211,238,.12);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.resume .card:hover{
  border-color: rgba(34,211,238,.45);
  box-shadow: 0 14px 36px rgba(0,0,0,.42), 0 10px 28px rgba(167,139,250,.18);
  transform: translateY(-2px);
}
.resume .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
@media (max-width: 720px){ .resume .grid-2 { grid-template-columns: 1fr; } }
.resume .pill-list { display:flex; flex-wrap:wrap; gap:.5rem; margin:0; padding:0; list-style:none; }
.resume .pill-list li{
  padding:.38rem .7rem; border-radius:9999px; background: rgba(148,163,184,.14);
  border: 1px solid rgba(148,163,184,.22); color:#e5e7eb; box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  font-size:.93rem;
}
.resume .bullets { margin:.35rem 0 .35rem 1.2rem; }
.resume .bullets li { margin:.3rem 0; }
.resume .exp { margin: 0 0 1rem; }
.resume .exp-h { display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:.25rem; }
.resume .muted { color:#94a3b8; }
.resume .btn {
  display:inline-block; font-weight:600; border-radius:.75rem; padding:.6rem 1rem;
  background-image: linear-gradient(90deg, #22d3ee, #a78bfa);
  color:#0f172a; border: none;
  box-shadow: 0 6px 18px rgba(167,139,250,.25), 0 3px 10px rgba(34,211,238,.18);
  transition: transform .15s ease, filter .2s ease;
}
.resume .btn:hover { filter: saturate(115%); transform: translateY(-1px); }

/* ===== Tiny-screen niceties ===== */
@media (max-width: 420px){
  .hero-subtitle { text-wrap: balance; }
}

/* =========================
   Security Dashboard (SCOPED)
   ========================= */
.security-dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

.security-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.header-left h1 {
  font-size: 28px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 8px;
}

.header-left p {
  color: #94a3b8;
  margin: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.time-selector {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.3);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 14px;
  cursor: pointer;
}

.time-selector:focus {
  outline: none;
  border-color: #667eea;
}

.auto-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  padding: 8px 12px;
  background: rgba(100,116,139,.1);
  border-radius: 6px;
}

.auto-refresh-indicator.active {
  color: #22c55e;
  background: rgba(34,197,94,.1);
}

.auto-refresh-indicator .bi {
  font-size: 14px;
}

/* Security Stats Grid */
.security-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.security-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.05);
  transition: transform .2s, box-shadow .2s;
}

.security-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,.3);
}

.security-stat-card.firewall { border-left: 4px solid #f59e0b; }
.security-stat-card.k8s-errors { border-left: 4px solid #ef4444; }
.security-stat-card.security-events { border-left: 4px solid #8b5cf6; }
.security-stat-card.total-events { border-left: 4px solid #06b6d4; }

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 24px;
}

.security-stat-card.firewall .stat-icon { background: rgba(245,158,11,.15); color: #f59e0b; }
.security-stat-card.k8s-errors .stat-icon { background: rgba(239,68,68,.15); color: #ef4444; }
.security-stat-card.security-events .stat-icon { background: rgba(139,92,246,.15); color: #8b5cf6; }
.security-stat-card.total-events .stat-icon { background: rgba(6,182,212,.15); color: #06b6d4; }

.stat-content .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.stat-content .stat-label {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 4px;
}

.stat-content .stat-sublabel {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Security Content Grid */
.security-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .security-content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .security-content-grid {
    grid-template-columns: 1fr;
  }
}

.security-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.05);
}

.security-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-card h3 .bi {
  color: #667eea;
}

/* Simple Chart */
.chart-container {
  height: 180px;
  position: relative;
}

.simple-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  gap: 3px;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  position: relative;
  cursor: pointer;
  transition: opacity .2s;
}

.chart-bar:hover {
  opacity: .8;
}

.bar-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
}

.chart-bar:hover .bar-tooltip {
  display: block;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

/* Blocked Sources List */
.blocked-sources-list,
.namespace-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blocked-source-item,
.namespace-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-info,
.namespace-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.source-ip,
.namespace-name {
  color: #e2e8f0;
  font-family: 'Consolas', monospace;
}

.source-count,
.namespace-count {
  color: #94a3b8;
}

.source-bar,
.namespace-bar {
  height: 6px;
  background: rgba(100,116,139,.2);
  border-radius: 3px;
  overflow: hidden;
}

.source-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  border-radius: 3px;
  transition: width .3s ease;
}

.namespace-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9);
  border-radius: 3px;
  transition: width .3s ease;
}

/* Events Table */
.events-card {
  grid-column: 1 / -1;
}

.events-table-container {
  overflow-x: auto;
}

.events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.events-table th,
.events-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148,163,184,.1);
}

.events-table th {
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .5px;
}

.events-table td {
  color: #e2e8f0;
}

.events-table tbody tr:hover {
  background: rgba(100,116,139,.1);
}

.event-time {
  font-family: 'Consolas', monospace;
  color: #94a3b8;
}

.event-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.event-type.firewall {
  background: rgba(245,158,11,.15);
  color: #f59e0b;
}

.event-type.kubernetes {
  background: rgba(6,182,212,.15);
  color: #06b6d4;
}

.severity-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.error {
  background: rgba(239,68,68,.15);
  color: #ef4444;
}

.severity-badge.warning {
  background: rgba(245,158,11,.15);
  color: #f59e0b;
}

.severity-badge.info {
  background: rgba(100,116,139,.15);
  color: #94a3b8;
}

.event-source {
  font-family: 'Consolas', monospace;
  font-size: 12px;
}

.event-message {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-details {
  color: #64748b;
  font-size: 12px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dashboard Footer */
.dashboard-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,.1);
  font-size: 12px;
  color: #64748b;
}

/* No Data State */
.no-data {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: #64748b;
  font-style: italic;
}

/* Alert */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
}

/* Spin animation for refresh button */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Security Dashboard polish (Wave 7 #59) ---------- */

/* Sparkline canvas inside stat cards */
.security-stat-card .stat-spark {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  display: block;
}

/* Severity timeline (big chart) */
.security-card.chart-card { padding: 1rem 1.25rem; }
.chart-tall { position: relative; width: 100%; height: 240px; }

/* Events header + filters row */
.events-header {
  display: flex; flex-direction: column; gap: .75rem;
  margin-bottom: 1rem;
}
.events-header h3 { margin: 0; }
.events-filters {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}

/* Pill filter (severity) */
.pill-group { display: inline-flex; gap: 4px; }
.pill {
  background: rgba(148,163,184,.08);
  color: #cbd5e1;
  border: 1px solid rgba(148,163,184,.18);
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  text-transform: capitalize;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pill:hover { background: rgba(148,163,184,.16); }
.pill.active { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.5); color: #93c5fd; }
.pill.sev-error.active   { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.5); color: #fca5a5; }
.pill.sev-warning.active { background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.5); color: #fcd34d; }
.pill.sev-info.active    { background: rgba(100,116,139,.22); border-color: rgba(148,163,184,.4); color: #cbd5e1; }

/* Namespace chip (removable filter) */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(168,85,247,.18);
  border: 1px solid rgba(168,85,247,.45);
  color: #d8b4fe;
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .78rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.chip-x {
  background: transparent; border: 0; color: inherit;
  cursor: pointer; padding: 0 .25rem; font-size: 1rem; line-height: 1;
}
.chip-x:hover { color: #fff; }

/* Search input */
.search-input {
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(148,163,184,.25);
  color: #e2e8f0;
  border-radius: 8px;
  padding: .35rem .8rem;
  font-size: .85rem;
  width: 240px;
  margin-left: auto;
}
.search-input:focus { outline: none; border-color: rgba(59,130,246,.6); }

/* Threat intel badge on Top Blocked Sources */
.ti-badge {
  display: inline-block;
  background: rgba(239,68,68,.18);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.45);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .7rem;
  font-weight: 600;
  margin-left: .35rem;
  vertical-align: middle;
}

/* Drill-down links on namespace names */
.namespace-name { color: #93c5fd; text-decoration: none; cursor: pointer; }
.namespace-name:hover { text-decoration: underline; }
.event-source a { color: #93c5fd; text-decoration: none; }
.event-source a:hover { text-decoration: underline; }

/* Severity row border on event rows */
.events-table tr.severity-error    > td:first-child { border-left: 3px solid #ef4444; }
.events-table tr.severity-warning  > td:first-child { border-left: 3px solid #f59e0b; }
.events-table tr.severity-info     > td:first-child { border-left: 3px solid rgba(148,163,184,.5); }

/* ---------- SVG charts (replaces Chart.js to eliminate flicker) ---------- */
.security-stat-card .stat-spark {
  width: 100%;
  height: 36px;
  display: block;
  margin-top: 8px;
}
.svg-chart-wrap {
  width: 100%;
  height: 240px;
  margin-top: .5rem;
}
.timeline-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.timeline-svg rect { shape-rendering: crispEdges; }
.timeline-svg rect:hover { filter: brightness(1.15); }
.chart-legend {
  display: flex; gap: 1.25rem; padding: .5rem 0 .25rem .5rem;
  font-size: .8rem; color: #cbd5e1;
}
.chart-legend .dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 6px; vertical-align: middle;
}
.chart-legend .lg-error .dot { background: #ef4444; }
.chart-legend .lg-warn  .dot { background: #f59e0b; }
.chart-legend .lg-info  .dot { background: rgba(100,116,139,0.55); }
