/* ─────────────────────────────────────────────────────────────────────────
 * VisionIQ Playback — shared theme
 * Design language adapted from the Ball Counter suite: teal + orange + gold,
 * white cards with teal-gradient headers (orange inset bar), pill tabs/filters,
 * KPI cards, animated dot-grid background with a soft mouse-follow glow.
 * ───────────────────────────────────────────────────────────────────────── */

:root {
  --bg: rgb(0, 72, 87);
  --bg-deep: rgb(4, 61, 72);
  --bg-soft: #0e5d6c;
  --surface: #ffffff;
  --surface2: #f4f8f9;
  --surface3: #eef5f6;
  --border: #d4e1e5;
  --accent: rgb(242, 106, 65);
  --accent-hover: rgb(255, 138, 100);
  --accent-soft: rgba(242, 106, 65, 0.12);
  --gold: #eec281;
  --gold-deep: #b8860b;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --text: #10262d;
  --muted: #5f7278;
  --teal-050: #e7f0f2;
  --small-color: rgb(0, 113, 134);
  --large-color: rgb(242, 106, 65);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(1, 56, 68, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(1, 56, 68, 0.18);
  --ease: 0.16s ease;
  --glow-x: 50%;
  --glow-y: 220px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(180deg, rgb(0, 72, 87) 0%, rgb(0, 72, 85) 32%, rgb(4, 61, 72) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* ── Product header ────────────────────────────────────────────────────── */
.product-header {
  background-color: rgb(0, 72, 87);
  color: #fff;
  position: relative;
  min-height: 150px;
  padding: 20px 28px 22px;
  overflow: hidden;
}
.product-header .branding {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 3;
  padding-right: 300px;
}
.product-header .product-logo { height: 120px; flex-shrink: 0; }
.product-header .branding-text {
  display: flex;
  flex-direction: column;
  margin-left: 28px;
  max-width: 900px;
}
.product-header .title {
  font-size: 2.7em;
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.product-header .subtitle {
  display: block;
  font-size: 1.15em;
  line-height: 1.34;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
}
.product-visualization {
  position: absolute;
  right: 30px;
  top: 18px;
  height: 150px;
  transform: scale(1.7) rotate(0deg);
  transform-origin: top right;
  z-index: 2;
  opacity: 0.95;
}

/* ── Suite nav (tab bar) ───────────────────────────────────────────────── */
.suite-nav {
  background: #0b4f5e;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  position: relative;
  z-index: 5;
  flex-wrap: wrap;
  gap: 10px;
}
.suite-links, .suite-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.suite-link {
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 6px;
  transition: background-color var(--ease);
}
.suite-link.active { background: var(--accent); color: #fff; }
.suite-link:hover:not(.active) { background: rgba(255, 255, 255, 0.12); }

/* ── Content shell + dot-grid + glow ───────────────────────────────────── */
.content-shell {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 252, 0.96));
  min-height: calc(100vh - 220px);
  overflow: hidden;
}
.dot-grid-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}
.content-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(440px circle at var(--glow-x) var(--glow-y),
      rgba(242, 106, 65, 0.14),
      rgba(0, 72, 87, 0.09) 36%,
      rgba(4, 61, 72, 0.06) 54%,
      transparent 70%);
  pointer-events: none;
  opacity: 1;
  transition: background 0.18s ease-out;
  z-index: 0;
}
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid #c7d3d7;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #dce5e8;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, rgba(0, 72, 87, 0.88), rgba(0, 72, 87, 1));
  box-shadow: inset 3px 0 0 var(--accent);
}
.card-header .nav-spacer { flex: 1; }
.card-body { padding: 18px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  padding: 9px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  transition: background-color var(--ease), border-color var(--ease), transform var(--ease), opacity var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: rgba(0, 72, 87, 0.08); border-color: rgba(0, 72, 87, 0.12); color: var(--bg); }
.btn-outline:hover { background: rgba(0, 72, 87, 0.14); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
/* Buttons that sit on a dark header/nav */
.card-header .btn-outline, .suite-nav .btn-outline {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.card-header .btn-outline:hover, .suite-nav .btn-outline:hover { background: rgba(255, 255, 255, 0.24); }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge-info { background: rgba(255, 255, 255, 0.16); color: #fff; }
.badge-teal { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ── KPI cards ─────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.kpi-card {
  position: relative;
  background: var(--surface);
  border: 1px solid #c7d3d7;
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.kpi-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--bg), var(--bg-soft));
  opacity: 0.6;
}
.kpi-card.kpi-primary::before { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); opacity: 1; }
.kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.kpi-value-text { font-size: 20px; line-height: 1.15; padding-top: 6px; }
.kpi-primary .kpi-value { color: var(--accent); }
.kpi-sub { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ── Pills (tabs / filters) ────────────────────────────────────────────── */
.pill {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
  font-family: inherit;
}
.pill:hover:not(.active) { border-color: rgba(242, 106, 65, 0.55); color: var(--accent); transform: translateY(-1px); }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Toast ─────────────────────────────────────────────────────────────── */
.soft-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 72, 87, 0.14);
  background: rgba(255, 255, 255, 0.97);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  z-index: 200;
}
.soft-toast.is-visible { transform: translateY(0); opacity: 1; }
.soft-toast-title { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.soft-toast-copy { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* ── Responsive header ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-header .branding { flex-direction: column; align-items: flex-start; padding-right: 120px; }
  .product-header .product-logo { height: 88px; }
  .product-header .branding-text { margin-left: 0; margin-top: 12px; }
  .product-header .title { font-size: 1.9em; }
  .product-visualization { height: 92px; transform: none; right: 16px; top: 16px; }
}
