/* Glass components (PRD section 8). Depends on tokens.css. */
html, body { min-height: 100%; }

body {
  font-family: var(--gw-font);
  color: var(--gw-text);
  background-color: var(--gw-bg-solid);
  background-image: var(--gw-bg);
  background-attachment: fixed;
}

code, kbd, .gw-mono { font-family: var(--gw-font-mono); }

.text-muted, .gw-muted { color: var(--gw-text-muted) !important; }

/* Particles sit behind everything and never take clicks. */
#gw-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.gw-content { position: relative; z-index: 1; }

/* Glass card. Solid fallback where backdrop-filter is unsupported. */
.gw-glass {
  background: var(--gw-glass-solid);
  border: 1px solid var(--gw-glass-border);
  border-radius: var(--gw-radius-card);
  box-shadow: var(--gw-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gw-glass {
    background: var(--gw-glass);
    -webkit-backdrop-filter: blur(var(--gw-blur)) saturate(160%);
    backdrop-filter: blur(var(--gw-blur)) saturate(160%);
  }
}
.gw-glass-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--gw-shadow-hover);
}

/* Top bar */
.gw-topbar {
  border-radius: 0 0 var(--gw-radius-card) var(--gw-radius-card);
}
.gw-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--gw-brand), var(--gw-brand-2));
}

/* Icon in a tinted circle (KPI tiles, feature rows). */
.gw-icon-circle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--gw-brand);
  background: color-mix(in srgb, var(--gw-brand) 14%, transparent);
  font-size: 1.25rem;
}

/* Buttons and pills */
.btn-gw {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--gw-brand);
  --bs-btn-border-color: var(--gw-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: color-mix(in srgb, var(--gw-brand) 85%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--gw-brand) 85%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--gw-brand) 75%, #000);
  border-radius: var(--gw-radius-pill);
}
.gw-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--gw-radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}
.gw-pill-ok   { color: var(--gw-ok);   background: color-mix(in srgb, var(--gw-ok) 15%, transparent); }
.gw-pill-warn { color: var(--gw-warn); background: color-mix(in srgb, var(--gw-warn) 18%, transparent); }
.gw-pill-bad  { color: var(--gw-bad);  background: color-mix(in srgb, var(--gw-bad) 15%, transparent); }

/* Larger pill switches in the brand colour. */
.form-switch .form-check-input {
  width: 3em;
  height: 1.6em;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: var(--gw-brand);
  border-color: var(--gw-brand);
}
.form-control, .form-select { border-radius: var(--gw-radius-input); }

/* Sidebar navigation */
.gw-nav-link {
  color: var(--gw-text);
  border-radius: var(--gw-radius-input);
  white-space: nowrap;
}
.gw-nav-link span { overflow: hidden; text-overflow: ellipsis; }
.gw-nav-link:hover { background: color-mix(in srgb, var(--gw-brand) 10%, transparent); color: var(--gw-text); }
.nav-pills .gw-nav-link.active { background: var(--gw-brand); color: #fff; }
@media (min-width: 992px) {
  .offcanvas-lg.gw-glass { position: sticky; top: 1rem; }
}
.table { --bs-table-bg: transparent; }

/* Visible focus rings for keyboard users. */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gw-brand) 60%, transparent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .gw-glass, .gw-glass-hover:hover { transition: none; transform: none; }
}

/* Animations switched off (user menu, Stage 9): no particles, lifts, pulses or shimmer. */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}
[data-motion="off"] .gw-glass-hover:hover, [data-motion="off"] .rp-card:hover { transform: none; }
[data-motion="off"] #gw-particles { display: none; }

/* Getting-started steps on the dashboard (Stage 9). */
.gw-step { background: color-mix(in srgb, var(--gw-text-muted) 7%, transparent); }
.gw-step:hover { background: color-mix(in srgb, var(--gw-brand) 10%, transparent); }
.gw-step.next { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gw-brand) 55%, transparent); }
.gw-step.done .fw-semibold { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--gw-text-muted) 60%, transparent); }

/* Skip link and support-session bar (Stage 9). */
.gw-skip { position: absolute; left: 1rem; top: .5rem; z-index: 1080; padding: .5rem 1rem; border-radius: var(--gw-radius-pill);
  background: var(--gw-brand); color: #fff; }
.gw-support-bar { border-radius: var(--gw-radius-input); background: #FDE68A; color: #3B2F04;
  border: 1px solid #F59E0B; }
#gw-main:focus { outline: none; }

/* Stage 10: a headline number in a small stat block (pilot check, backups) */
.gw-stat-num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
