/* ==========================================================================
   Claude-n-Codex · Token dashboard v5 — skin layer
   Replica of the dashboard-v8 visual skin (verified dark + light, Nov 2026)
   Load AFTER the Tailwind build, BEFORE custom.css.
   Theme switching: <html class="dashboard-v8-skin dark"> or without "dark" (light)
   ========================================================================== */

/* ---------- 1. Base tokens (shadcn / HSL triplets) ---------- */
:root {
  --background: 0 0% 98%;
  --foreground: 220 14% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 14% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 14% 10%;
  --primary: 222 42% 18%;
  --primary-foreground: 0 0% 98%;
  --secondary: 168 28% 92%;
  --secondary-foreground: 175 40% 18%;
  --muted: 220 14% 94%;
  --muted-foreground: 220 9% 40%;
  --accent: 205 70% 93%;
  --accent-foreground: 207 70% 25%;
  --destructive: 0 72% 45%;
  --destructive-foreground: 0 0% 98%;
  --border: 220 13% 88%;
  --input: 220 13% 86%;
  --ring: 205 90% 52%;
  --radius: 0.5rem;
}

.dark {
  --background: 222 20% 8%;
  --foreground: 210 16% 92%;
  --card: 222 18% 11%;
  --card-foreground: 210 16% 92%;
  --popover: 222 20% 10%;
  --popover-foreground: 210 16% 92%;
  --primary: 210 16% 92%;
  --primary-foreground: 222 30% 12%;
  --secondary: 200 20% 18%;
  --secondary-foreground: 190 30% 82%;
  --muted: 220 14% 16%;
  --muted-foreground: 218 12% 60%;
  --accent: 201 40% 18%;
  --accent-foreground: 200 90% 85%;
  --destructive: 0 62% 52%;
  --destructive-foreground: 0 0% 98%;
  --border: 220 14% 20%;
  --input: 220 14% 22%;
  --ring: 200 95% 65%;
}

/* ---------- 2. v7 root: light-blue brand skin, 14px radii, Inter/mono/display ---------- */
.v7-root {
  --background: 220 33% 96%;
  --foreground: 223 31% 11%;
  --card: 0 0% 100%;
  --card-foreground: 223 31% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 223 31% 11%;
  --primary: 205 90% 52%;            /* light blue #1594F3 */
  --primary-foreground: 0 0% 100%;
  --secondary: 220 37% 97%;
  --secondary-foreground: 216 15% 32%;
  --muted: 220 37% 97%;
  --muted-foreground: 219 13% 50%;
  --accent: 205 70% 93%;            /* soft sky tint */
  --accent-foreground: 207 70% 25%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;
  --border: 219 32% 91%;
  --input: 219 32% 86%;
  --ring: 205 90% 52%;
  --chart-1: 205 90% 52%;
  --chart-2: 200 80% 45%;
  --chart-3: 212 70% 62%;
  --chart-4: 190 75% 48%;
  --chart-5: 218 60% 40%;
  --radius: 14px;
  font-family: var(--font-inter), ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --v7-font-mono: var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
  --v7-font-display: var(--font-space-grotesk), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
}

.dark .v7-root {
  --background: 223 26% 5%;         /* #090B10 */
  --foreground: 220 36% 95%;
  --card: 224 23% 9%;               /* #12141C */
  --card-foreground: 220 36% 95%;
  --popover: 220 24% 12%;
  --popover-foreground: 220 36% 95%;
  --primary: 200 95% 65%;           /* light blue #54C1FB */
  --primary-foreground: 210 40% 8%;
  --secondary: 220 24% 12%;
  --secondary-foreground: 220 21% 74%;
  --muted: 220 24% 12%;             /* #171C26 */
  --muted-foreground: 220 21% 74%;  /* #AFB8CB */
  --accent: 201 40% 17%;           /* subtle sky tint over #171C26 */
  --accent-foreground: 200 90% 85%;
  --destructive: 0 91% 71%;         /* #F87272 */
  --destructive-foreground: 210 40% 8%;
  --border: 222 22% 18%;            /* #242A38 */
  --input: 220 24% 25%;
  --ring: 200 95% 65%;
  --chart-1: 200 95% 65%;
  --chart-2: 205 90% 52%;
  --chart-3: 193 85% 70%;
  --chart-4: 212 80% 60%;
  --chart-5: 198 70% 45%;
}

* { border-color: hsl(var(--border)); }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* ---------- 3. Blue "connect" scope (brand primary inside cards) ---------- */
.v8-connect-scope {
  --primary: 205 90% 52%;
  --primary-foreground: 0 0% 100%;
  --ring: 205 90% 52%;
}

.dark .v8-connect-scope {
  --primary: 200 95% 65%;
  --primary-foreground: 210 40% 8%;
  --ring: 200 95% 65%;
}

/* ---------- 4. Connect banner ---------- */
.v8-connect-card {
  background-image: linear-gradient(135deg,
    hsl(var(--primary) / .07) 0,
    hsl(var(--primary) / .02) 55%,
    hsl(var(--primary) / .06) 100%);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / .2),
              0 1px 2px hsl(var(--foreground) / .04);
}

.dark .v8-connect-card {
  background-image: linear-gradient(135deg,
    hsl(var(--primary) / .13) 0,
    hsl(var(--primary) / .03) 55%,
    hsl(var(--primary) / .1) 100%);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / .26);
}

/* ---------- 5. Bonus card (+10% top-up) with sheen loop ---------- */
.v8-bonus-card {
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg,
    hsl(var(--primary) / .14) 0,
    hsl(var(--primary) / .05) 46%,
    hsl(var(--primary) / .11) 100%);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / .22),
              0 1px 2px hsl(var(--foreground) / .04);
}

.v8-bonus-card::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -40%;
  width: 26%;
  pointer-events: none;
  background-image: linear-gradient(100deg,
    transparent,
    hsla(0, 0%, 100%, .28) 42%,
    hsla(0, 0%, 100%, .62) 50%,
    hsla(0, 0%, 100%, .28) 58%,
    transparent);
  transform: skewX(-16deg);
  animation: v8-bonus-sheen 6s ease-in-out infinite;
}

.dark .v8-bonus-card {
  background-image: linear-gradient(135deg,
    hsl(var(--primary) / .2) 0,
    #161923 48%,
    hsl(var(--primary) / .14) 100%);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / .28);
}

.dark .v8-bonus-card::after {
  background-image: linear-gradient(100deg,
    transparent,
    hsla(200, 95%, 75%, .08) 42%,
    hsla(200, 95%, 75%, .2) 50%,
    hsla(200, 95%, 75%, .08) 58%,
    transparent);
}

@keyframes v8-bonus-sheen {
  0%      { transform: skewX(-16deg) translateX(0); }
  55%, 100% { transform: skewX(-16deg) translateX(560%); }
}

/* ---------- 6. Floating "Need help?" launcher ---------- */
.support-help-launcher {
  animation: support-help-welcome 4s ease-in-out infinite;
}
.support-help-launcher:hover { animation-play-state: paused; }

@keyframes support-help-welcome {
  0%, 100% { transform: scale(1);     box-shadow: 0 5px 18px rgba(0, 0, 0, .14); }
  50%      { transform: scale(1.025); box-shadow: 0 5px 18px rgba(0, 0, 0, .14), 0 0 0 5px rgba(0, 0, 0, .06); }
}

/* ---------- 7. Image/docs scope (used on /images and /docs pages) ---------- */
.v7-root {
  --img-paper: 220 20% 98%;
  --img-card: 0 0% 100%;
  --img-sunk: 220 24% 96%;
  --img-rule: 220 16% 90%;
  --img-ink: 222 30% 12%;
  --img-ink-soft: 220 12% 42%;
  --img-accent: 205 90% 40%;
  --img-accent-text: 205 92% 32%;
  --img-code-bg: 222 28% 11%;
}
.dark .v7-root {
  --img-paper: 224 24% 7%;
  --img-card: 223 20% 11%;
  --img-sunk: 224 22% 9%;
  --img-rule: 221 18% 20%;
  --img-ink: 220 30% 94%;
  --img-ink-soft: 219 14% 66%;
  --img-accent: 200 95% 65%;
  --img-accent-text: 200 95% 65%;
  --img-code-bg: 224 26% 8%;
}

/* ---------- 8. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .v8-bonus-card::after { animation: none; opacity: 0; }
  .support-help-launcher { animation: none; }
  .support-help-launcher:hover { animation: none; }
}

/* ---------- 9. Sky utilities (sky-600/700/400/300, sky-400/20) ---------- */

/* sky chip + latency tints used after the amber -> light-blue rebrand;
   the original tw.css build never emitted `.text-sky-*` / `.bg-sky-400/20`. */
.text-sky-600 { color: rgb(2 132 199); }
.text-sky-700 { color: rgb(3 105 161); }
.bg-sky-400\/20 { background-color: rgb(56 189 248 / 0.2); }
.dark .text-sky-400 { color: rgb(56 189 248); }
.dark .text-sky-300 { color: rgb(125 211 252); }
