/* ==========================================================================
   WOLFE Retail Engine — design system v2
   Green-glass aesthetic: dark forest BG, soft mint accents, frosted cards,
   pill-shaped floating navbar, serif WOLFE wordmark + clean sans body.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Coal/abyss base — matches the consulting landing page reference exactly */
  --abyss:        #02100b;
  --coal:         #051912;
  --ink:          #0d2218;
  --ink-up:       #142b1f;

  --bg:           var(--coal);
  --bg-2:         var(--ink);
  --bg-3:         var(--ink-up);

  /* Card fills are gradient layers, not flat — see .wolfe-card */
  --glass:        rgba(20, 40, 30, 0.20);
  --glass-strong: rgba(20, 40, 30, 0.32);
  --glass-soft:   rgba(168, 230, 192, 0.04);

  /* Borders & strokes (mint-tinted, subtle) */
  --border:        rgba(168, 230, 192, 0.12);
  --border-strong: rgba(168, 230, 192, 0.22);
  --border-bright: rgba(168, 230, 192, 0.40);
  --rule:          rgba(168, 230, 192, 0.08);
  --rule-up:       rgba(168, 230, 192, 0.16);

  /* Text — cream, not pure white (softer / more premium) */
  --text:        #ede8df;
  --text-soft:   #9aa39a;
  --text-muted:  #9aa39a;
  --text-dim:    #6a7368;

  /* Mint accent (matches reference) */
  --accent:        #a8e6c0;
  --accent-bright: #c0f0d0;
  --accent-deep:   #4a7a5a;
  --accent-soft:   rgba(168, 230, 192, 0.10);
  --accent-glow:   rgba(168, 230, 192, 0.30);

  /* Semantic */
  --danger:        #f5a5a5;
  --danger-soft:   rgba(245, 165, 165, 0.14);
  --warning:       #f5d088;
  --warning-soft:  rgba(245, 208, 136, 0.14);
  --terracotta:    #b56849;

  /* Text/icons that sit ON a mint surface (primary buttons, active nav). */
  --text-on-accent: #051912;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow:    0 8px 32px rgba(0,0,0,0.40);
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 32px rgba(168,230,192,0.18);
  /* Reusable polished-card elevation (inset top highlight + soft drop) */
  --card-shadow:       inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 32px rgba(0,0,0,0.18);
  --card-shadow-hover: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 44px rgba(0,0,0,0.26);
  --card-fill:         linear-gradient(180deg, rgba(168,230,192,0.05) 0%, rgba(20,40,30,0.20) 100%);

  --font-sans:    "Inter", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif:   "Inter", sans-serif;  /* legacy alias — no serif wordmark anymore */
  --font-mono:    "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

html, body { height: 100%; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Crisp graphics everywhere: SVG/raster scale smoothly, vector edges stay sharp,
   and the GPU promotes the page to a hi-DPI layer so shadows/blur render at full
   device resolution instead of stepping (the "box pixels / banding" look). */
img, svg { image-rendering: auto; }
.wolfe-logo, .wolfe-logo img, svg { shape-rendering: geometricPrecision; }

body {
  font-family: var(--font-sans);
  background: var(--coal);
  color: var(--text);
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.005em;
  font-feature-settings: 'ss01', 'cv11', 'tnum', 'ss03';
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* --------------------------------------------------------------------------
   DYNAMIC GREEN-GLOW BACKGROUND
   Two slow-drifting radial gradients on a near-black base. No image, all CSS.
   -------------------------------------------------------------------------- */
/* Layered fixed radial-gradient atmosphere — mirrors the landing-page reference.
   Top-weighted mint glow on the coal base. No animation: calm + premium. */
/* ONE flat, consistent green. No gradients, no glow layers, no noise — those
   created the uneven "different green" + banding + low-res look. Solid fill,
   fixed so it never shifts on scroll. Accent green stays on bubbles/nav. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: var(--coal);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   WOLFE BRAND — SVG logo, white-on-transparent
   The source SVG is solid black (fill="#000000"). We invert it to render
   bright on the dark BG and apply a soft green glow as the brand accent.
   -------------------------------------------------------------------------- */
.wolfe-wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
/*
   Logo is now served as `wolfe-logo-light.svg` (fill="#f0f5f1" baked into the
   asset itself) — no more invert() hack. That eliminates the "white box"
   halo, the GPU cost of the filter chain, and lets the drop-shadow render
   cleanly without compositing through inversion.
*/
.wolfe-logo {
  display: inline-block;
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 16px rgba(168, 230, 161, 0.22));
  opacity: 0.97;
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}
.wolfe-logo:hover {
  opacity: 1;
  filter: drop-shadow(0 0 26px rgba(168, 230, 161, 0.45));
  transform: scale(1.03);
}
.wolfe-logo--sm { height: 40px; }
.wolfe-logo--lg { height: 110px; }
.wolfe-logo--xl { height: 200px; }

/* Legacy class kept for backwards compatibility (JPG fallback) */
.wolfe-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
}
.wolfe-logo-img--lg { height: 96px; }
.wolfe-logo-img--xl { height: 180px; }

/* --------------------------------------------------------------------------
   PILL-SHAPED FLOATING NAVBAR
   -------------------------------------------------------------------------- */
.wolfe-nav {
  position: sticky;
  top: 20px;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}
.wolfe-nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 14px 10px 22px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  /* Soft, wide, low-opacity shadow = smooth falloff with no banding step. */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  max-width: 100%;
  width: max-content;
}
.wolfe-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--text);
}
/* nav-logo dot removed — the only live/pulsing dot lives in the hero bubble */
@keyframes wolfe-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}
.wolfe-nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
/* Mobile-only nav ticker — hidden on desktop (the hero bubble shows there). */
.nav-ticker { display: none; }
@keyframes nav-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.wolfe-nav-links a {
  color: var(--text-soft);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;            /* never let a link wrap to two lines */
}
.wolfe-nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}
.wolfe-nav-links a.active {
  color: var(--bg);
  background: var(--accent);
}
.wolfe-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}
.wolfe-nav-user-email {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   MAIN LAYOUT
   -------------------------------------------------------------------------- */
.wolfe-main {
  max-width: 1280px;
  margin: 48px auto;
  padding: 0 24px;
}
.wolfe-main--narrow { max-width: 720px; }
.wolfe-main--wide   { max-width: 1440px; }

.wolfe-section { margin-bottom: 64px; }

/* --------------------------------------------------------------------------
   LANDING PAGE LAYOUT  (rewritten clean v26)
   One normal scrolling document. No 100vh, no scroll-snap, no centering voids.
   Every section is content-sized with the SAME generous vertical rhythm, so the
   page reads top to bottom with even, roomy spacing on desktop and mobile.
   -------------------------------------------------------------------------- */

/* The scroll container is just a normal block; the body scrolls. */
.snap-scroll {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;   /* in-page anchors clear the fixed nav */
}
@media (prefers-reduced-motion: reduce) {
  .snap-scroll { scroll-behavior: auto; }
}

/* Base section: a centered column with even space above and below.
   ~96px between every section = consistent, breathable rhythm. */
.snap-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 96px 32px;
  box-sizing: border-box;
}
.snap-section > .snap-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* HERO: first section, sits under the fixed nav. Extra top padding clears the
   floating navbar so the logo never crowds it; generous bottom space. */
.snap-section--hero {
  padding-top: 150px;
  padding-bottom: 96px;
}

/* WHAT IT DOES holds 5 cards side by side — let it use the full width. */
#what > .snap-inner { max-width: 1340px; }

/* Section intro: label, heading, lede stacked with clear, even spacing. */
.snap-section .wolfe-section-label { margin-bottom: 18px; }
.snap-section .snap-inner > .wolfe-h2 { margin-bottom: 18px; }
.snap-section .snap-inner > .wolfe-lede {
  margin-left: auto; margin-right: auto; margin-bottom: 52px;
}

/* Landing footer — its own calm block under the final CTA. */
.landing-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 64px 20px 88px;
  line-height: 1.7;
}

/* hero stack: logo -> bubble -> headline -> lede -> button */
.hero-stack { display: flex; flex-direction: column; align-items: center; }

/* The "For licensed cannabis operators" bubble. */
.wolfe-tag.wolfe-tag--hero {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  padding: 9px 20px;
}
.wolfe-tag.wolfe-tag--hero::before { width: 8px; height: 8px; }

/* PILLARS — five capability columns, each a titled card with a feature list. */
.snap-pillars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  text-align: left;
  margin-top: 8px;
}
.pillar-card {
  background: var(--card-fill);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
.pillar-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.pillar-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.pillar-title {
  font-family: var(--font-display); font-weight: 700; font-style: normal;
  font-size: 1.25rem; color: #ffffff; margin-bottom: 24px; letter-spacing: -0.01em;
}
.pillar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.pillar-list li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.6; color: var(--text-soft); }
.pillar-list li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}
.pillar-list li strong { color: var(--text); font-weight: 600; font-style: italic; display: block; margin-bottom: 4px; font-size: 14px; }

/* PROBLEM — three stakes cards. */
.snap-stakes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; margin-top: 8px; }
.stake-card { background: var(--card-fill); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 30px; box-shadow: var(--card-shadow); }
.stake-stat { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; color: var(--accent); letter-spacing: -0.02em; margin-bottom: 14px; }
.stake-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 12px; font-weight: 600; }
.stake-card p { font-size: 14px; line-height: 1.6; color: var(--text-soft); margin: 0; }

/* HOW IT WORKS — six step cards, 3 columns x 2 rows. */
.snap-grid-steps { grid-template-columns: repeat(3, 1fr) !important; gap: 18px !important; text-align: left; margin-top: 8px; }
.snap-grid-steps .wolfe-card { padding: 22px; }
.snap-grid-steps .wolfe-card .wolfe-muted { font-size: 13px; line-height: 1.55; }
.snap-grid-steps .wolfe-h3 { color: var(--accent); }

/* Legacy feature grid (kept harmless if referenced). */
.snap-grid-features { grid-template-columns: repeat(4, 1fr) !important; gap: 18px !important; text-align: left; }
.snap-grid-features .wolfe-card { padding: 20px; }
.snap-grid-features .wolfe-card .wolfe-muted { font-size: 13px; line-height: 1.5; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

/* Laptops / tablets: pillars drop to a readable grid, stakes/steps to 2-up. */
@media (max-width: 1100px) {
  .snap-pillars { grid-template-columns: repeat(3, 1fr); }
  .snap-grid-steps { grid-template-columns: repeat(2, 1fr) !important; }
  .snap-grid-features { grid-template-columns: repeat(2, 1fr) !important; }
  .snap-stakes { grid-template-columns: 1fr; }
  .snap-section { padding: 80px 24px; }
  .snap-section--hero { padding-top: 140px; padding-bottom: 80px; }
}

/* Phones: tighter but still roomy and even. Nav is fixed, so the hero needs
   real top clearance. Multi-column grids stack to one column. */
@media (max-width: 680px) {
  /* HERO: even, breathing rhythm. Big top pad clears the fixed nav so the logo
     has air; the stack below it spaces evenly down to the button; tighter bottom
     pad so there's no dead space under the button before WHAT IT DOES. */
  .snap-section { padding: 56px 18px; }
  .snap-section--hero { padding-top: 132px; padding-bottom: 48px; }
  .snap-section .snap-inner { width: 100%; }

  /* Even spacing between every hero element. */
  .hero-stack .wolfe-logo--xl { height: 104px; margin-bottom: 28px !important; }
  .hero-stack .wolfe-tag--hero { display: inline-flex; margin-bottom: 28px; }
  .snap-section--hero .wolfe-h1 { margin-bottom: 24px; }
  .snap-section--hero .wolfe-lede { margin-bottom: 36px !important; }
  .snap-section--hero .wolfe-btn-row { margin-bottom: 0; }

  .snap-section .snap-inner > .wolfe-lede { margin-bottom: 36px; }
  .snap-section .wolfe-h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .snap-section .wolfe-h2 { font-size: 1.55rem; line-height: 1.2; margin-bottom: 14px; }
  .snap-section .wolfe-lede { font-size: 0.95rem; line-height: 1.5; }
  .snap-section .wolfe-section-label { margin-bottom: 12px; }

  /* WHAT IT DOES pillars: side-by-side swipe row (NOT stacked). One card fills
     most of the screen, the next peeks so it's clearly swipeable. */
  .snap-pillars {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 10px;
    margin-left: -18px; margin-right: -18px;   /* full-bleed edges */
    padding-left: 18px; padding-right: 18px;
  }
  .snap-pillars::-webkit-scrollbar { display: none; }
  .snap-pillars .pillar-card {
    flex: 0 0 82%;
    max-width: 82%;
    scroll-snap-align: center;
  }

  /* How-it-works steps stack one per row (they read better stacked). */
  .snap-grid-steps,
  .snap-grid-features { display: grid !important; grid-template-columns: 1fr !important; gap: 16px !important; }
  .snap-stakes { grid-template-columns: 1fr; gap: 16px; }

  .stake-card { padding: 22px 20px; }
  .stake-card .stake-stat { font-size: 1.7rem; margin-bottom: 10px; }
  .stake-card h3 { font-size: 1rem; margin-bottom: 8px; }
  .stake-card p { font-size: 13px; line-height: 1.5; }

  .landing-footer { padding: 48px 20px 72px; }

  /* Nav on phones: hide section links + ticker, keep logo + the two buttons
     evenly spaced so nothing crowds the logo. */
  .nav-ticker { display: none !important; }
  .wolfe-nav .wolfe-brand { flex: 0 0 auto; }
}


/* Respect reduced-motion: drop smooth scrolling for those who ask. */
@media (prefers-reduced-motion: reduce) {
  .snap-scroll { scroll-behavior: auto;}
}
.wolfe-section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.wolfe-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 18px;
}
.wolfe-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 12px;
}
.wolfe-h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.005em;
}
.wolfe-lede {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 56ch;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   BADGES / TAGS — small pill labels above headings
   -------------------------------------------------------------------------- */
.wolfe-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  /* Solid translucent fill (no backdrop-filter): on a flat background the blur
     filter has nothing to sample and renders a hard-edged box around the pill.
     A plain semi-opaque fill reads identically without that artifact. */
  background: rgba(20, 40, 30, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.wolfe-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  /* Wide, low-opacity glow = smooth falloff, no visible banding rings. */
  box-shadow: 0 0 16px 2px rgba(168, 230, 192, 0.45);
  animation: wolfe-pulse 2.4s ease-in-out infinite;
}
.wolfe-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.wolfe-badge--warn   { background: var(--warning-soft); color: var(--warning); }
.wolfe-badge--danger { background: var(--danger-soft);  color: var(--danger);  }
.wolfe-badge--neutral{ background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   BUTTONS — pill-shaped, frosted
   -------------------------------------------------------------------------- */
.wolfe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  background: var(--glass-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border-strong);
  white-space: nowrap;
}
.wolfe-btn:hover {
  background: var(--glass);
  border-color: var(--border-bright);
  text-decoration: none;
  transform: translateY(-1px);
}
.wolfe-btn:active { transform: translateY(0); }
.wolfe-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.wolfe-btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(168,230,161,0.25);
}
.wolfe-btn--primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 0 32px rgba(168,230,161,0.4);
  color: var(--text-on-accent);
}
.wolfe-btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(245, 165, 165, 0.30);
}
.wolfe-btn--ghost {
  background: transparent;
  border-color: var(--border);
}
.wolfe-btn--lg { padding: 14px 32px; font-size: 15px; }
.wolfe-btn--sm { padding: 8px 16px;  font-size: 13px; }

.wolfe-btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   GLASS CARDS — frosted blur with thin border
   -------------------------------------------------------------------------- */
.wolfe-card {
  background: var(--card-fill);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
.wolfe-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.wolfe-card--solid {
  background: var(--bg-3);
  backdrop-filter: none;
}
.wolfe-card--padded { padding: 40px; }
.wolfe-card--compact { padding: 20px; }
.wolfe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.wolfe-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.wolfe-card-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Card grid */
.wolfe-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.wolfe-grid--2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.wolfe-grid--kpi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* --------------------------------------------------------------------------
   KPI tiles
   -------------------------------------------------------------------------- */
.wolfe-kpi {
  background: var(--card-fill);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
.wolfe-kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.wolfe-kpi-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.wolfe-kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.wolfe-kpi-delta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.wolfe-kpi-delta--up   { color: var(--accent); }
.wolfe-kpi-delta--down { color: var(--danger); }

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.wolfe-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.wolfe-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}
.wolfe-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.wolfe-input,
.wolfe-select,
.wolfe-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--glass-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.wolfe-input:focus,
.wolfe-select:focus,
.wolfe-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 28, 22, 0.7);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.wolfe-input::placeholder { color: var(--text-dim); }
.wolfe-textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.wolfe-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .wolfe-form-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   TABLES
   -------------------------------------------------------------------------- */
.wolfe-table-wrap {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.wolfe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.wolfe-table thead th {
  background: rgba(168, 230, 161, 0.04);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 14px 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.wolfe-table tbody td {
  padding: 16px 20px;
  border-top: 1px solid rgba(168, 230, 168, 0.04);
  color: var(--text-soft);
}
.wolfe-table tbody tr:hover { background: rgba(168, 230, 161, 0.04); }
.wolfe-table .wolfe-money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }

/* --------------------------------------------------------------------------
   CENTERED AUTH SHELL — login / signup
   -------------------------------------------------------------------------- */
.wolfe-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;             /* scroll if the card is taller than the screen */
}
/* When the card is taller than the viewport, stop centering — top-align so the
   bottom (submit button + footer) is never clipped, scroll to reach it. */
@media (max-height: 760px) {
  .wolfe-auth-shell { align-items: flex-start; padding-top: 28px; padding-bottom: 28px; }
}
.wolfe-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-fill);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--card-shadow), 0 0 80px rgba(168,230,192,0.05);
}
.wolfe-auth-card--wide { max-width: 560px; }
.wolfe-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.wolfe-auth-brand .wolfe-wordmark {
  font-size: 22px;
  letter-spacing: 0.4em;
}
.wolfe-auth-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.wolfe-auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.wolfe-auth-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   ALERTS / TOASTS
   -------------------------------------------------------------------------- */
.wolfe-alert {
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.wolfe-alert--success { border-color: rgba(168, 230, 161, 0.35); background: var(--accent-soft); color: var(--accent); }
.wolfe-alert--danger  { border-color: rgba(245, 165, 165, 0.35); background: var(--danger-soft);  color: var(--danger);  }
.wolfe-alert--warn    { border-color: rgba(245, 208, 136, 0.35); background: var(--warning-soft); color: var(--warning); }

#wolfe-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  padding: 14px 20px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 360px;
}
#wolfe-toast.show { opacity: 1; transform: translateY(0); }
#wolfe-toast.error { border-color: rgba(245, 165, 165, 0.4); }

/* --------------------------------------------------------------------------
   MISC
   -------------------------------------------------------------------------- */
.wolfe-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}
.wolfe-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}
.wolfe-row {
  display: flex;
  align-items: center;
  gap: var(--gap, 12px);
  flex-wrap: wrap;
}
.wolfe-row--between { justify-content: space-between; }
.wolfe-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wolfe-muted { color: var(--text-muted); }
.wolfe-dim   { color: var(--text-dim); }

/* Loading spinner */
.wolfe-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(168, 230, 161, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: wolfe-spin 0.7s linear infinite;
}
@keyframes wolfe-spin { to { transform: rotate(360deg); } }

/* Empty state */
.wolfe-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.wolfe-empty-title {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .wolfe-main { margin: 24px auto; padding: 0 16px; }
  .wolfe-nav { top: 12px; padding: 0 12px; }
  .wolfe-nav-inner { padding: 7px 8px 7px 14px; gap: 10px; width: 100%; justify-content: space-between; }
  /* The section links (What/Why/How) don't fit a phone pill alongside the two
     buttons — and you scroll to those sections anyway. Hide them on mobile;
     keep logo + Sign in + Open account, never wrapping. */
  .wolfe-nav-links { display: none; }
  .wolfe-nav-user { gap: 8px; }
  .wolfe-nav-user-email { display: none; }
  .wolfe-nav-user .wolfe-btn--sm { padding: 7px 13px; font-size: 13px; white-space: nowrap; }
  .wolfe-card { padding: 20px; }
  .wolfe-auth-card { padding: 32px 24px; }
}
/* Very narrow phones: shrink the buttons a touch more so both always fit. */
@media (max-width: 380px) {
  .wolfe-nav-user .wolfe-btn--sm { padding: 6px 11px; font-size: 12px; }
  .wolfe-nav-inner { padding-left: 12px; }
}

/* ==========================================================================
   OPERATOR CONSOLE — "control room" skin
   A deliberately denser, graphite variant of the brand. Fixed left sidebar,
   data-table-first, monospace IDs/timestamps. It must NOT read like a
   dispensary dashboard — that's the whole point. Scoped under .ops so it
   never leaks into the customer surface.
   ========================================================================== */
.ops {
  --ops-bg:        #07090c;
  --ops-panel:     #0d1116;
  --ops-panel-2:   #11161d;
  --ops-line:      rgba(180, 200, 210, 0.10);
  --ops-line-soft: rgba(180, 200, 210, 0.06);
  --ops-text:      #e6edf3;
  --ops-muted:     #8b98a5;
  --ops-dim:       #5b6672;
  /* Brand mint still signals "this is WOLFE" but used sparingly as an accent */
  --ops-accent:    #a8e6a1;
  background: var(--ops-bg);
  color: var(--ops-text);
  min-height: 100vh;
}
/* Kill the drifting green glow on the operator surface — control rooms are flat */
.ops::before, .ops::after { display: none !important; }
body:has(.ops)::before, body:has(.ops)::after { opacity: 0.25; }

.ops-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.ops-side {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--ops-panel);
  border-right: 1px solid var(--ops-line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  overflow-y: auto;
}
.ops-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--ops-line-soft);
  margin-bottom: 14px;
}
.ops-brand img { height: 34px; width: auto; filter: drop-shadow(0 0 10px rgba(168,230,161,0.25)); }
.ops-brand-text {
  display: flex; flex-direction: column; line-height: 1.1;
}
.ops-brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 14px; letter-spacing: 0.14em;
  color: var(--ops-text); text-transform: uppercase;
}
.ops-brand-sub {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; color: var(--ops-accent);
  text-transform: uppercase; margin-top: 2px;
}
.ops-nav-group { margin-top: 14px; }
.ops-nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ops-dim);
  padding: 0 10px; margin-bottom: 6px;
}
.ops-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ops-muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}
.ops-nav-item:hover { background: var(--ops-panel-2); color: var(--ops-text); text-decoration: none; }
.ops-nav-item.active { background: rgba(168,230,161,0.12); color: var(--ops-accent); }
.ops-nav-item .ops-ico { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.ops-nav-spacer { flex: 1; }
.ops-side-footer {
  border-top: 1px solid var(--ops-line-soft);
  padding-top: 12px; margin-top: 12px;
  font-size: 12px; color: var(--ops-muted);
}

/* ---- Main panel ---- */
.ops-main { min-width: 0; display: flex; flex-direction: column; }
.ops-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 28px;
  border-bottom: 1px solid var(--ops-line);
  background: rgba(13, 17, 22, 0.7);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.ops-topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.ops-topbar-right { display: flex; align-items: center; gap: 14px; }
.ops-env {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; padding: 4px 10px; border-radius: 6px;
  background: rgba(245, 208, 136, 0.12); color: var(--warning);
  border: 1px solid rgba(245, 208, 136, 0.25);
}
.ops-env--prod { background: rgba(168,230,161,0.12); color: var(--ops-accent); border-color: rgba(168,230,161,0.3); }
.ops-health-dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ops-muted); font-family: var(--font-mono);
}
.ops-health-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ops-accent); box-shadow: 0 0 10px var(--accent-glow);
  animation: wolfe-pulse 2.4s ease-in-out infinite;
}
.ops-body { padding: 28px; max-width: 1500px; }

/* ---- Section/page headers in ops ---- */
.ops-page-head { margin-bottom: 24px; }
.ops-page-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.ops-page-sub { color: var(--ops-muted); font-size: 14px; margin-top: 4px; }

/* ---- Ops cards / panels ---- */
.ops-panel {
  background: var(--ops-panel);
  border: 1px solid var(--ops-line);
  border-radius: 12px;
  overflow: hidden;
}
.ops-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--ops-line-soft);
}
.ops-panel-title { font-weight: 600; font-size: 15px; }
.ops-panel-body { padding: 4px 0; }

/* ---- Stat strip ---- */
.ops-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-bottom: 24px; }
.ops-stat {
  background: var(--ops-panel); border: 1px solid var(--ops-line);
  border-radius: 10px; padding: 16px 18px;
}
.ops-stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ops-dim); }
.ops-stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; line-height: 1; }
.ops-stat-value.accent { color: var(--ops-accent); }
.ops-stat-value.danger { color: var(--danger); }
.ops-stat-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ops-muted); margin-top: 8px; }

/* ---- Dense data table ---- */
.ops-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ops-table thead th {
  text-align: left; padding: 11px 20px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ops-dim);
  border-bottom: 1px solid var(--ops-line);
}
.ops-table tbody td { padding: 13px 20px; border-top: 1px solid var(--ops-line-soft); color: var(--ops-text); vertical-align: middle; }
.ops-table tbody tr { transition: background 0.12s ease; cursor: default; }
.ops-table tbody tr:hover { background: var(--ops-panel-2); }
.ops-table tbody tr.clickable { cursor: pointer; }
.ops-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--ops-muted); }
.ops-strong { font-weight: 600; color: var(--ops-text); }

/* ---- Status chip (shared: ops + integrations) ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  font-family: var(--font-sans);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip--ok    { background: rgba(168,230,161,0.13); color: var(--accent); }
.chip--off   { background: rgba(180,200,210,0.10); color: var(--ops-muted); }
.chip--off::before { box-shadow: none; opacity: 0.6; }
.chip--err   { background: var(--danger-soft); color: var(--danger); }
.chip--warn  { background: var(--warning-soft); color: var(--warning); }
.chip--sync  { background: rgba(130, 190, 240, 0.13); color: #8ec5f0; }
.chip--sync::before { animation: wolfe-pulse 1.2s ease-in-out infinite; }

/* ==========================================================================
   INTEGRATIONS — connection card grid (used on customer + ops tenant detail)
   ========================================================================== */
.int-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.int-card {
  background: var(--card-fill); backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
.int-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.int-card--err { border-color: rgba(245,165,165,0.3); }
.int-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.int-logo {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text);
}
.int-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); }
.int-kind { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.int-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.int-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

/* ==========================================================================
   IMPERSONATION BANNER — "viewing as customer"
   Sticky, high-contrast amber, non-dismissible, one-click exit.
   ========================================================================== */
.impersonate-bar {
  position: sticky; top: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #6b4d08, #8a6410, #6b4d08);
  color: #fff7e0; font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.01em; border-bottom: 1px solid rgba(245,208,136,0.4);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.impersonate-bar .ib-icon { font-size: 15px; }
.impersonate-bar strong { color: #fff; }
.impersonate-bar .ib-mode {
  font-family: var(--font-mono); font-size: 11px; padding: 2px 8px;
  border-radius: 5px; background: rgba(0,0,0,0.25); letter-spacing: 0.08em;
}
.impersonate-bar .ib-exit {
  background: #fff7e0; color: #5a3d00; border: none; cursor: pointer;
  padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.impersonate-bar .ib-exit:hover { background: #fff; transform: translateY(-1px); }

/* ==========================================================================
   SETTINGS — left sub-rail layout
   ========================================================================== */
.set-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.set-rail { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; }
.set-rail-group { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding: 14px 12px 6px; }
.set-rail a {
  padding: 8px 12px; border-radius: 9px; color: var(--text-soft);
  font-size: 14px; font-weight: 500; text-decoration: none; transition: all 0.14s ease;
}
.set-rail a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.set-rail a.active { background: var(--accent-soft); color: var(--accent); }
.set-panel { scroll-margin-top: 92px; }
.set-panel + .set-panel { margin-top: 28px; }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; gap: 18px; }
  .set-rail { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ---- Danger zone ---- */
.danger-zone { border-color: rgba(245,165,165,0.3) !important; }
.danger-zone .wolfe-card-title { color: var(--danger); }

/* ==========================================================================
   MODAL (fixes the earlier .btn classes → use wolfe-btn)
   ========================================================================== */
.wolfe-modal-backdrop {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(3, 6, 5, 0.7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.wolfe-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.wolfe-modal {
  width: 100%; max-width: 480px;
  background: var(--glass-strong); backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.wolfe-modal-backdrop.open .wolfe-modal { transform: translateY(0) scale(1); }
.wolfe-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 0; }
.wolfe-modal-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.wolfe-modal-close { background: none; border: none; color: var(--text-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.wolfe-modal-close:hover { color: var(--text); }
.wolfe-modal-body { padding: 16px 24px; color: var(--text-soft); font-size: 14px; }
.wolfe-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.wolfe-modal-footer .btn { /* alias old class names to wolfe-btn look */
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; border-radius: var(--radius-pill);
  cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--glass-strong); color: var(--text);
}
.wolfe-modal-footer .btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.wolfe-modal-footer .btn-ghost { background: transparent; border-color: var(--border); }

/* ==========================================================================
   LEGACY COMPATIBILITY SHIM
   Older pages (inventory/vendors/markdown/reports) were authored against an
   earlier class vocabulary (.wolfe-page, .btn, .badge, bare <table>, .num…)
   that no longer exists — which is why their content ran flush-left and
   unstyled. Map those names onto the current design system so every customer
   page is consistent without rewriting each page's working JS.
   ========================================================================== */
.wolfe-page {
  max-width: 1280px;
  margin: 48px auto;
  padding: 0 24px;
}
.wolfe-page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.wolfe-page-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05;
  letter-spacing: -0.025em; color: var(--text); margin-bottom: 8px;
}
.wolfe-page-subtitle { font-size: 1.02rem; color: var(--text-soft); max-width: 60ch; }

/* Bare buttons used on legacy pages */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  cursor: pointer; background: var(--glass-strong); color: var(--text);
  backdrop-filter: blur(12px); transition: all 0.18s ease; text-decoration: none;
}
.btn:hover { border-color: var(--border-bright); transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-secondary { background: var(--glass); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(245,165,165,0.3); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* Bare <select>/<input> on legacy pages inherit the wolfe input look */
.wolfe-page select, .wolfe-page input[type=text], .wolfe-page input[type=number],
.wolfe-page input[type=date], .wolfe-page input[type=search], .wolfe-page input[type=email],
.wolfe-page input[type=tel], .wolfe-page input:not([type]) {
  padding: 10px 14px; font-family: var(--font-sans); font-size: 14px;
  background: var(--glass-soft); border: 1px solid var(--border-strong);
  border-radius: var(--radius); color: var(--text); backdrop-filter: blur(8px);
}
.wolfe-page select:focus, .wolfe-page input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; border-radius: var(--radius-pill);
}
.badge.success { background: var(--accent-soft); color: var(--accent); }
.badge.info    { background: rgba(130,190,240,0.14); color: #8ec5f0; }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger  { background: var(--danger-soft); color: var(--danger); }

/* Legacy bare tables inside a table-wrap get the wolfe-table treatment */
.wolfe-table-wrap > table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wolfe-table-wrap > table thead th {
  background: rgba(168,230,161,0.04); color: var(--text-muted); font-weight: 600;
  text-align: left; padding: 14px 20px; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.wolfe-table-wrap > table tbody td { padding: 16px 20px; border-top: 1px solid rgba(168,230,168,0.04); color: var(--text-soft); }
.wolfe-table-wrap > table tbody tr:hover { background: rgba(168,230,161,0.04); }
.wolfe-table-wrap th.num, .wolfe-table-wrap td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono, .text-sm.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-sm { font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 14px; }

/* Grid utilities used by legacy customer pages (reports, dashboard, etc.).
   Without these the cards never formed columns — they stacked full-width and
   looked oversized. Auto-fit so each card is a sensible size and they sit side
   by side, wrapping cleanly on narrow screens. */
.grid-2,
.grid-3 {
  display: grid;
  gap: 18px;
  align-items: start;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Spacing helpers used by legacy pages. */
.mb-4 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 14px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }

/* Form row + group used by legacy pages (reports period picker, etc.). Without
   these the inputs ran full-width and the date fields looked oversized. Lay
   fields out in a row, label stacked above a sensibly-sized input. */
.form-row { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
}
/* Cap inputs so date pickers don't stretch the whole card. */
.form-group input,
.form-group select { width: 200px; max-width: 100%; }
@media (max-width: 540px) {
  .form-row { flex-direction: column; gap: 12px; }
  .form-group input, .form-group select { width: 100%; }
}
.wolfe-loading-state { text-align: center; padding: 40px; color: var(--text-muted); }
.wolfe-loader {
  display: inline-block; width: 16px; height: 16px; vertical-align: middle;
  border: 2px solid rgba(168,230,161,0.25); border-top-color: var(--accent);
  border-radius: 50%; animation: wolfe-spin 0.7s linear infinite;
}

@media (max-width: 768px) {
  .wolfe-page { margin: 24px auto; padding: 0 16px; }
}

@media (max-width: 880px) {
  .ops-shell { grid-template-columns: 1fr; }
  .ops-side {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
    flex-direction: row; overflow-x: auto; padding: 8px; z-index: 50;
    border-right: none; border-top: 1px solid var(--ops-line);
  }
  .ops-brand, .ops-nav-group-label, .ops-side-footer, .ops-nav-spacer { display: none; }
  .ops-nav-group { margin: 0; display: flex; }
  .ops-nav-item { white-space: nowrap; }
}
