/*
 * GoodInvestGroup Algo Lab OS — Shared Base Stylesheet
 * Provides: design tokens, focus styles, nav bar, and utility classes.
 * All page-specific styles live in their own <style> block; this file
 * supplies only what is safe to share globally.
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:         #07111d;
  --panel:      rgba(11, 22, 37, 0.82);
  --panel-soft: rgba(17, 29, 46, 0.94);
  --text:       #eef3fb;
  --muted:      #8ea1bb;
  --accent:     #2bc46d;
  --accent-lt:  #82f0b2;
  --danger:     #ef6b6b;
  --warm:       #d7ab3d;
  --border:     rgba(146, 165, 192, 0.18);
  --glow:       rgba(43, 196, 109, 0.35);
}

/* ─── Canonical Background ───────────────────────────────────────────────── */
/* Pages that use System A inherit this; override in your own <style> block
   only if you need something different. */
body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--text);
  margin: 0;
}

/* ─── Accessibility: Focus Ring ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Suppress the default outline on mouse clicks (keyboard-only ring) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Navigation Bar ─────────────────────────────────────────────────────── */
.gig-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 16px;
  margin-bottom: 18px;
  background: rgba(7, 16, 28, 0.84);
  border: 1px solid rgba(146, 165, 192, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  flex-wrap: wrap;
  row-gap: 6px;
}

.gig-nav-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.gig-nav-brand {
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-right: 6px;
}

.gig-nav-brand:hover {
  color: var(--accent-lt);
}

.gig-nav-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(146, 165, 192, 0.18);
  flex-shrink: 0;
  margin: 0 4px;
  align-self: center;
}

.gig-nav a:not(.gig-nav-brand) {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.gig-nav a:not(.gig-nav-brand):hover {
  color: var(--text);
  background: rgba(146, 165, 192, 0.08);
}

.gig-nav a.nav-active {
  color: var(--text);
  background: rgba(146, 165, 192, 0.06);
}

.gig-nav a.nav-cta {
  color: var(--accent-lt);
  background: rgba(43, 196, 109, 0.13);
  border: 1px solid rgba(43, 196, 109, 0.32);
  font-weight: 600;
}

.gig-nav a.nav-cta:hover {
  background: rgba(43, 196, 109, 0.22);
  color: #b6fbd5;
}

/* Push sign-out and CTA links to the right */
.gig-nav-spacer {
  flex: 1 1 0;
}

/* Button that looks like a nav link (for form-based sign-out) */
.gig-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.gig-nav-btn:hover {
  color: var(--text);
  background: rgba(146, 165, 192, 0.08);
}

/* ─── Shared Button ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(43, 196, 109, 0.38);
  background: rgba(43, 196, 109, 0.15);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: rgba(43, 196, 109, 0.24);
  border-color: rgba(43, 196, 109, 0.55);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
}

.btn.ghost:hover {
  background: rgba(146, 165, 192, 0.07);
}

.btn.danger {
  border-color: rgba(239, 107, 107, 0.38);
  background: rgba(239, 107, 107, 0.1);
  color: #ffd8d8;
}

/* ─── Utility Spacing ────────────────────────────────────────────────────── */
.mt-1 { margin-top:  8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.m-0  { margin: 0; }

/* ─── Utility Typography ─────────────────────────────────────────────────── */
.text-sm   { font-size: 0.88rem; }
.text-base { font-size: 1rem;    }
.text-muted { color: var(--muted); }
.h2-card   { font-size: 1.1rem;  margin: 0 0 8px; font-family: "Outfit", "Segoe UI", sans-serif; font-weight: 700; }

/* ─── Shared Colour Semantics ────────────────────────────────────────────── */
.pos  { color: var(--accent); }
.neg  { color: var(--danger); }

/* ─── Responsive Nav ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .gig-nav {
    padding: 8px 12px;
    border-radius: 14px;
    gap: 2px;
  }
  .gig-nav a:not(.gig-nav-brand) {
    padding: 4px 8px;
    font-size: 12px;
  }
  .gig-nav-brand {
    font-size: 0.74rem;
  }
}
