/* ==========================================================================
   VPNGOLD status page — own static styling.
   Design philosophy (docs/memory/copy-competitor-design-philosophy.md):
   neutral text, status-colored dots, brand GOLD accent ONLY on operational
   uptime bars. Dark, premium, single accent.
   ========================================================================== */

:root {
  --bg:        #070709;
  --panel:     #111116;
  --panel-2:   #1b1b22;
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .14);

  --text:      #ededf2;
  --name:      #f4f2f6;
  --pct:       #d7d7de;
  --muted:     #a0a0ad;
  --faint:     #6f6f7c;

  --gold:      #e7c252;
  --gold-soft: #ecc24a;
  --gold-grad: linear-gradient(135deg, #f6dd87 0%, #e7c252 45%, #c89b2a 100%);

  /* status colors */
  --ok:        #2fbe7e;   /* operational (green) */
  --degraded:  #e7b549;   /* amber */
  --partial:   #f08a3c;   /* orange */
  --major:     #e5484d;   /* red */
  --maint:     #4aa3e0;   /* blue */
  --nodata:    #23232b;   /* dark grey bar */

  --radius:    12px;
  --radius-sm: 8px;
  --maxw:      1180px;
  --shadow:    0 14px 44px rgba(0, 0, 0, .34);
  --bars-w:    620px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 480px at 18% -120px, rgba(231, 194, 82, .13), transparent 70%),
    linear-gradient(180deg, #0a0a0e 0%, #070709 45%, #040405 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.vg-st-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- header ---------------------------------------------------- */
.vg-st-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 14, .72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.vg-st-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}
.vg-st-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
}
.vg-st-brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 0 14px rgba(231, 194, 82, .6);
}

/* language pill switcher */
.vg-st-lang {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.vg-st-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .02em;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.vg-st-lang-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
  opacity: .9;
}
.vg-st-lang-btn.is-active .vg-st-lang-flag { opacity: 1; }
.vg-st-lang-btn:hover { color: var(--text); }
.vg-st-lang-btn.is-active {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

/* ---------- main ------------------------------------------------------ */
.vg-st-main {
  padding-top: 26px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- hero / status card ---------------------------------------- */
.vg-st-hero {
  display: flex;
  flex-direction: column;
  padding: 24px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.vg-st-hero-main { display: flex; align-items: center; gap: 22px; }
/* Fizz-style pulsing status dot (replaces the old check icon) */
.vg-st-hero-dot {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok);
}
.vg-st-hero-dot::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: currentColor;
  opacity: .22;
  animation: vg-ring 2s ease-out infinite;
}
.vg-st-hero-dot--operational { color: var(--ok);    background: var(--ok);    box-shadow: 0 0 0 8px rgba(47, 190, 126, .12), 0 0 24px rgba(47, 190, 126, .42); }
.vg-st-hero-dot--major       { color: var(--major); background: var(--major); box-shadow: 0 0 0 8px rgba(229, 72, 77, .12), 0 0 24px rgba(229, 72, 77, .42); }
.vg-st-hero-dot--maintenance { color: var(--maint); background: var(--maint); box-shadow: 0 0 0 8px rgba(74, 163, 224, .12), 0 0 24px rgba(74, 163, 224, .40); }
.vg-st-hero-dot--degraded    { color: var(--degraded); background: var(--degraded); box-shadow: 0 0 0 8px rgba(231, 181, 73, .12), 0 0 24px rgba(231, 181, 73, .38); }
.vg-st-hero-title {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}
.vg-st-hero-sub-text { margin: 4px 0 0; color: var(--muted); font-size: .98rem; }

/* advisory sub-items (active incidents / maintenances) under the headline */
.vg-st-hero-subs {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vg-st-hero-sub { display: flex; gap: 14px; }
.vg-st-hero-sub .vg-st-dot { margin-top: 6px; }
.vg-st-hero-sub-body { flex: 1 1 auto; min-width: 0; }
.vg-st-hero-sub-name { font-size: 1.02rem; font-weight: 800; color: var(--text); }
.vg-st-hero-sub-desc { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.vg-st-aff-list {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 9px;
  font-size: .84rem;
  color: var(--muted);
}
.vg-st-aff-label { color: var(--name); font-weight: 700; margin-right: 2px; }
.vg-st-aff { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.vg-st-aff-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}

/* ---------- active-incident banners ----------------------------------- */
.vg-st-banner {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.vg-st-banner .vg-st-dot { margin-top: 7px; }
.vg-st-banner-title {
  margin: 0;
  font-size: clamp(19px, 2.8vw, 25px);
  font-weight: 800;
  color: var(--text);
}
.vg-st-banner-desc { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.vg-st-banner-meta {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  font-size: .84rem;
  color: var(--muted);
}
.vg-st-banner-meta b { color: var(--text); font-weight: 700; }

/* shared status dots (banners, events) */
.vg-st-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ok);
}
.vg-st-dot--operational { color: var(--ok);       background: var(--ok);       box-shadow: 0 0 8px rgba(47, 190, 126, .6); }
.vg-st-dot--degraded    { color: var(--degraded); background: var(--degraded); box-shadow: 0 0 8px rgba(231, 181, 73, .55); }
.vg-st-dot--partial     { color: var(--partial);  background: var(--partial);  box-shadow: 0 0 8px rgba(240, 138, 60, .55); }
.vg-st-dot--major       { color: var(--major);    background: var(--major);    box-shadow: 0 0 8px rgba(229, 72, 77, .6); }
.vg-st-dot--maintenance { color: var(--maint);    background: var(--maint);    box-shadow: 0 0 9px rgba(74, 163, 224, .6); }
.vg-st-dot--nodata      { color: var(--faint);    background: var(--faint);    box-shadow: none; }

/* soft pulsing ring on the status dots (servers list) — matches the reference */
@keyframes vg-ring {
  0%   { transform: scale(.5);  opacity: .3; }
  70%  { transform: scale(1);   opacity: 0; }
  100% { transform: scale(1);   opacity: 0; }
}

/* ---------- servers panel --------------------------------------------- */
.vg-st-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.vg-st-panel-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.vg-st-panel-head-left { display: inline-flex; align-items: center; gap: 9px; }
.vg-st-chevron { width: 19px; height: 19px; color: var(--muted); transition: transform .18s ease; }
.vg-st-panel-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.vg-st-agg {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pct);
  font-variant-numeric: tabular-nums;
}
.vg-st-panel.is-collapsed .vg-st-chevron { transform: rotate(-90deg); }
.vg-st-panel.is-collapsed .vg-st-panel-head { border-bottom: 0; }
.vg-st-panel.is-collapsed .vg-st-panel-body { display: none; }

.vg-st-list { list-style: none; margin: 0; padding: 0; }
.vg-st-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .14s ease;
}
.vg-st-list li:last-child .vg-st-row { border-bottom: 0; }
.vg-st-row:hover { background: rgba(255, 255, 255, .025); }
/* Fizz keeps rows clean (no arrow at rest); we hint clickability only on hover */
.vg-st-row:hover .vg-st-row-go { opacity: .8; transform: translateX(0); }
.vg-st-row-dot {
  position: relative;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.vg-st-row-dot::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .2;
  animation: vg-ring 2.1s ease-out infinite;
}
.vg-st-row-dot.vg-st-dot--nodata::before { display: none; }
.vg-st-row-go {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-3px);
  transition: color .14s ease, transform .14s ease, opacity .14s ease;
}
.vg-st-flag {
  flex: 0 0 auto;
  width: 28px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.vg-st-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-st-pct {
  flex: 0 0 auto;
  margin-right: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pct);
  font-variant-numeric: tabular-nums;
}

/* uptime bars — the ONLY brand-gold element */
.vg-st-bars {
  flex: 0 0 var(--bars-w);
  display: flex;
  align-items: stretch;
  gap: 1px;
  height: 30px;
}
.vg-st-bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 1.5px;
  background: var(--nodata);
  transition: transform .08s ease, filter .08s ease;
}
.vg-st-bar--operational { background: var(--gold); }
.vg-st-bar--degraded    { background: var(--degraded); }
.vg-st-bar--partial     { background: var(--partial); }
.vg-st-bar--major       { background: var(--major); }
.vg-st-bar--maintenance { background: var(--maint); }
.vg-st-bar--nodata      { background: var(--nodata); }
.vg-st-bar:hover { transform: scaleY(1.1); filter: brightness(1.18); }

/* status legend (panel footer) */
.vg-st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 13px 28px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}
.vg-st-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.vg-st-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.vg-st-legend-dot--operational { background: var(--ok); }
.vg-st-legend-dot--degraded    { background: var(--degraded); }
.vg-st-legend-dot--major       { background: var(--major); }
.vg-st-legend-dot--maintenance { background: var(--maint); }

/* ---------- events feed ----------------------------------------------- */
.vg-st-events { display: flex; flex-direction: column; gap: 6px; }
.vg-st-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.vg-st-events-title { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.vg-st-history-btn {
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  transition: color .15s ease, border-color .15s ease;
}
.vg-st-history-btn:hover { color: var(--text); border-color: var(--line-2); }
.vg-st-events-none {
  margin: 0;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .92rem;
}
.vg-st-day-group { margin-top: 10px; }
.vg-st-day {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 8px;
}
.vg-st-event-list { list-style: none; margin: 0; padding: 0; }
.vg-st-event {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.vg-st-event .vg-st-dot { width: 9px; height: 9px; margin-top: 6px; }
.vg-st-event-time {
  flex: 0 0 auto;
  width: 88px;
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.vg-st-event-text { flex: 1 1 auto; min-width: 0; color: var(--muted); }
.vg-st-event-name { color: var(--name); font-weight: 700; }

/* ---------- footer ---------------------------------------------------- */
.vg-st-footer { border-top: 1px solid var(--line); margin-top: 8px; }
.vg-st-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 20px;
  flex-wrap: wrap;
}
.vg-st-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.vg-st-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 600;
  transition: color .15s ease;
}
.vg-st-footer-links a:hover { color: var(--gold); }
.vg-st-footer-powered { color: var(--faint); font-size: .82rem; }

/* ---------- hover tooltip (floating) ---------------------------------- */
.vg-st-tip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  min-width: 180px;
  max-width: 300px;
  padding: 10px 12px;
  background: #15151b;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .1s ease, transform .1s ease;
}
.vg-st-tip[data-show="1"] { opacity: 1; transform: translateY(0); }
.vg-st-tip-date { font-size: .82rem; font-weight: 700; color: var(--name); margin-bottom: 4px; }
/* colored status heading (green / blue / red …), like the reference */
.vg-st-tip-title { font-size: .84rem; font-weight: 700; }
.vg-st-tip-title--operational { color: var(--ok); }
.vg-st-tip-title--degraded    { color: var(--degraded); }
.vg-st-tip-title--partial     { color: var(--partial); }
.vg-st-tip-title--major       { color: var(--major); }
.vg-st-tip-title--maintenance { color: var(--maint); }
.vg-st-tip-title--nodata      { color: var(--faint); }
/* duration breakdown + per-day chronology */
.vg-st-tip-chron:not(:empty) { margin-top: 7px; }
.vg-st-tip-dur {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: .8rem;
  color: var(--muted);
  padding: 1px 0;
}
.vg-st-tip-dur span:last-child { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.vg-st-tip-dur--operational { color: var(--ok); }
.vg-st-tip-dur--major { color: var(--major); }
.vg-st-tip-dur--partial { color: var(--partial); }
.vg-st-tip-dur--degraded { color: var(--degraded); }
.vg-st-tip-dur--maintenance { color: var(--maint); }
.vg-st-tip-chron-h {
  margin: 9px 0 5px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--name);
}
.vg-st-tip-evt { display: flex; align-items: baseline; gap: 8px; font-size: .78rem; padding: 2px 0; }
.vg-st-tip-evt-time { flex: 0 0 auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.vg-st-tip-evt-body { flex: 1 1 auto; color: var(--muted); }
.vg-st-tip-evt-body b { color: var(--name); font-weight: 700; }

/* ---------- per-server detail + history pages ------------------------- */
.vg-st-detail, .vg-st-history { display: flex; flex-direction: column; gap: 18px; }
.vg-st-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: color .15s ease;
}
.vg-st-back:hover { color: var(--text); }
.vg-st-back svg { width: 18px; height: 18px; }

.vg-st-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.vg-st-detail-title { display: inline-flex; align-items: center; gap: 14px; }
.vg-st-flag--lg { width: 34px; height: 24px; border-radius: 4px; }
.vg-st-detail-name { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--text); }
.vg-st-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}

.vg-st-detail-chart { padding: 22px 26px; }
.vg-st-detail-uptime { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.vg-st-detail-uptime-label { color: var(--muted); font-size: .9rem; font-weight: 600; }
.vg-st-detail-uptime-val { font-size: 1.6rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.vg-st-bars--detail { flex: 1 1 auto; width: 100%; height: 52px; }
.vg-st-bars-axis { display: flex; justify-content: space-between; margin-top: 9px; font-size: .74rem; color: var(--faint); }
.vg-st-detail-events { margin-top: 2px; }

.vg-st-month-group { margin-top: 6px; }
.vg-st-month {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0 12px;
}
.vg-st-hcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.vg-st-hcard-head { display: flex; align-items: center; gap: 10px; }
.vg-st-hcard-head .vg-st-dot { width: 10px; height: 10px; }
.vg-st-hcard-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--text); }
.vg-st-hcard .vg-st-banner-meta { margin-top: 9px; }
.vg-st-hcard-updates { margin-top: 6px; }

/* ---------- responsive ------------------------------------------------ */
@media (max-width: 640px) {
  :root { --bars-w: 100%; }
  .vg-st-row { flex-wrap: wrap; row-gap: 8px; }
  .vg-st-name { flex: 1 1 auto; }
  .vg-st-pct { order: 2; }
  .vg-st-bars { order: 3; flex: 1 1 100%; height: 28px; }
}
@media (max-width: 460px) {
  body { font-size: 14px; }
  .vg-st-wrap { padding-inline: 14px; }
  .vg-st-hero, .vg-st-banner { padding: 16px 18px; }
  .vg-st-row { padding: 11px 14px; }
  .vg-st-panel-head, .vg-st-legend { padding-inline: 14px; }
  .vg-st-event-time { width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .vg-st-bar, .vg-st-chevron { transition: none; }
  .vg-st-hero-dot::before, .vg-st-row-dot::before { animation: none; }
}
