/*
 * GCC MRTG interface-detail pages
 * Mirrors the palette and navigation styling of the working
 * Main Campus Access HEADER.html (Apache autoindex).
 * Scoped to MRTG detail pages; does not alter HEADER.html or index.html.
 */
:root {
  --bg-1: #050816;
  --bg-2: #0b1124;
  --panel: rgba(10, 18, 36, 0.84);
  --panel-2: rgba(12, 20, 38, 0.92);
  --line: rgba(92, 225, 230, 0.18);
  --line-strong: rgba(92, 225, 230, 0.42);
  --text: #e8f3ff;
  --muted: #9aaccc;
  --cyan: #5ce1e6;
  --red: #ff4d5a;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-1) !important; /* override MRTG's legacy bgcolor */
  color: var(--text) !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
body {
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  padding-bottom: 30px;
  text-align: center;
  line-height: 1.5;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  opacity: .70;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(92,225,230,.10) 8% 8.22%, transparent 8.22% 24%, rgba(92,225,230,.06) 24% 24.18%, transparent 24.18% 41%, rgba(92,225,230,.08) 41% 41.22%, transparent 41.22% 68%, rgba(255,77,90,.05) 68% 68.16%, transparent 68.16% 100%),
    linear-gradient(0deg, transparent 0 14%, rgba(92,225,230,.07) 14% 14.18%, transparent 14.18% 31%, rgba(92,225,230,.06) 31% 31.16%, transparent 31.16% 57%, rgba(92,225,230,.08) 57% 57.18%, transparent 57.18% 79%, rgba(255,77,90,.05) 79% 79.16%, transparent 79.16% 100%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  animation: network-drift 24s ease-in-out infinite;
}
body::after {
  opacity: .42;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle, rgba(92,225,230,.95) 0 2px, transparent 3px) 0 18% / 320px 140px repeat,
    radial-gradient(circle, rgba(92,225,230,.85) 0 2px, transparent 3px) 0 56% / 420px 170px repeat,
    radial-gradient(circle, rgba(255,77,90,.75) 0 2px, transparent 3px) 0 78% / 520px 220px repeat;
  animation: traffic-flow 12s linear infinite;
}
@keyframes network-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -12px, 0) scale(1.015); }
}
@keyframes traffic-flow {
  from { background-position: 0 18%, 0 56%, 0 78%; }
  to { background-position: 320px 18%, 420px 56%, 520px 78%; }
}

/* Header follows the already-working Main Campus HEADER.html. */
#main-wrap {
  position: relative;
  z-index: 2;
  padding: 0 18px;
  text-align: left;
}
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 74px;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(8, 16, 30, .985), rgba(8, 16, 30, .94));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.32);
  backdrop-filter: blur(12px);
}
.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit !important;
  text-decoration: none;
}
.header-logo {
  display: block;
  flex-shrink: 0;
  width: 110px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.08));
  transition: transform .22s ease, filter .22s ease, opacity .22s ease;
}
.header-brand:hover .header-logo {
  transform: scale(1.03);
  filter: drop-shadow(0 0 14px rgba(92,225,230,.14));
  opacity: .95;
}
.header-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.header-kicker { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.header-title { font-size: 1.24rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); text-shadow: 0 0 12px rgba(92,225,230,.16); }
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8,16,30,.78);
  color: var(--muted);
  font-size: .88rem;
  white-space: nowrap;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(92,225,230,.12), 0 0 14px rgba(92,225,230,.75); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% {transform: scale(1); opacity: 1;} 50% {transform: scale(1.18);opacity: .82;} }
.header-spacer { height: 120px; }
.index-intro {
  max-width: 1500px;
  margin: 0 auto 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)), var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.index-intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(92,225,230,.07), transparent 38%, rgba(255,77,90,.05)); }
.intro-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: 28px 28px; }
.index-label, .index-subtitle, .mrtg-breadcrumb { position: relative; z-index: 1; }
.index-label { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.index-subtitle { color: var(--muted); line-height: 1.55; }
.mrtg-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mrtg-breadcrumb a {
  display: inline-block;
  color: var(--text) !important;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  padding: 7px 12px;
  border: 1px solid rgba(92,225,230,.2);
  border-radius: 9px;
  background: rgba(8,16,30,.76);
  transition: border-color .2s, background .2s, color .2s;
}
.mrtg-breadcrumb a:hover { border-color: var(--line-strong); background: rgba(92,225,230,.10); color: var(--cyan) !important; }

/* MRTG's own per-target <h1> and #sysdetails are retained unchanged. */
body > h1 {
  position: relative;
  max-width: 1160px;
  box-sizing: border-box;
  margin: 4px auto 14px;
  padding: 22px 24px;
  text-align: left;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(92,225,230,.07), transparent 42%, rgba(255,77,90,.04)), var(--panel-2);
  box-shadow: var(--shadow);
}
#sysdetails {
  max-width: 1160px;
  box-sizing: border-box;
  margin: 0 auto 26px;
  padding: 16px 22px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
#sysdetails table { width: 100%; border-collapse: collapse; color: var(--text); }
#sysdetails td { border-bottom: 1px solid rgba(255,255,255,.06); padding: 8px 12px; overflow-wrap: anywhere; }
#sysdetails tr:last-child td { border-bottom: none; }
#sysdetails td:first-child { width: 160px; font-size: .83rem; letter-spacing: .04em; color: var(--muted); font-weight: 600; }

/* MRTG's 4 original graphs, statistics and traffic legends stay intact. */
body > h2, body > h3 {
  max-width: 1160px;
  box-sizing: border-box;
  margin: 27px auto 14px;
  padding: 16px 20px;
  text-align: left;
  font-size: 1.16rem;
  font-weight: 650;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  color: var(--text);
}
body img[src*="-day."],
body img[src*="-week."],
body img[src*="-month."],
body img[src*="-year."] {
  max-width: min(100%, 1120px);
  width: auto;
  height: auto;
  box-sizing: border-box;
  display: block;
  margin: 12px auto;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background-color: white; /* graph plots retain original contrast */
  box-shadow: var(--shadow);
}
/* Data tables may be direct children or nested under MRTG's default markup. */
body table { border-collapse: collapse; color: var(--text); }
body table:not(#sysdetails table) {
  max-width: min(1160px, calc(100vw - 36px));
  margin: 12px auto 25px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
body table:not(#sysdetails table) th,
body table:not(#sysdetails table) td {
  padding: 7px 13px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
body table:not(#sysdetails table) th { color: var(--cyan); font-size: .83rem; letter-spacing: .03em; }
body a { color: var(--cyan); }
body a:hover { color: var(--text); }
body > p { max-width: 1160px; margin: 12px auto; color: var(--muted); }
body > hr { max-width: 1160px; border: 0; border-top: 1px solid var(--line); margin: 24px auto; }

@media (max-width: 900px) {
  #main-wrap { padding: 0 14px; }
  .header-bar { padding: 10px 14px; }
  .header-logo { width: 90px; }
  .header-title { font-size: 1rem; }
  .header-kicker { font-size: .62rem; letter-spacing: .14em; }
  .header-status { display: none; }
  .header-spacer { height: 96px; }
  .index-intro { padding: 18px; }
  body > h1, body > h2, body > h3, #sysdetails { margin-left: 14px; margin-right: 14px; }
}
@media (max-width: 560px) {
  .header-brand { gap: 10px; }
  .header-logo { width: 78px; }
  #sysdetails { padding: 10px; }
  #sysdetails td { padding: 6px; }
  #sysdetails td:first-child { width: 96px; }
  body > h1 { padding: 16px; }
  body > h2, body > h3 { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .status-dot { animation: none !important; }
}

