/* ============================================================
   MOSHAL — MILITARY / BUSINESS-INTELLIGENCE THEME OVERLAY
   Loaded after the app stylesheet. Re-themes the app via the
   shadcn/Tailwind HSL variable tokens + typography/layout rules.
   ============================================================ */

/* ---- 1. Color tokens: olive-black + khaki + amber/tan ---- */

/* Light (default when no .dark class) — sand/tan palette */
:root {
  --background: 55 30% 90%;
  --surface: 55 25% 93%;
  --card: 55 28% 95%;
  --foreground: 90 30% 11%;
  --muted: 55 22% 84%;
  --muted-foreground: 75 14% 36%;
  --border: 70 15% 68%;
  --ring: 45 70% 45%;
  --primary: 90 30% 14%;
  --primary-foreground: 55 30% 95%;
  --accent: 45 70% 42%;
  --accent-foreground: 55 30% 96%;
  --shadow-color: 45 40% 25%;
}

/* Dark — olive-black field uniform */
html.dark {
  --background: 85 15% 5%;
  --surface: 85 13% 7%;
  --card: 85 12% 8.5%;
  --foreground: 55 25% 93%;
  --muted: 85 10% 13%;
  --muted-foreground: 55 10% 58%;
  --border: 75 10% 20%;
  --ring: 45 85% 60%;
  --primary: 55 30% 92%;
  --primary-foreground: 85 25% 8%;
  --accent: 45 80% 60%;
  --accent-foreground: 85 30% 8%;
  --shadow-color: 0 0% 0%;
}

html { background: hsl(var(--background)); }
html.dark { background: #0b0e07; }

/* ---- 2. Typography: tactical mono caps for headings/actions ---- */

h1, h2, h3, h4, h5 {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

button, [role="tab"], [role="button"] {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Data reads as tabular figures (score tables, counters) */
td, th, [class*="tabular"], [class*="score"], [class*="Score"] {
  font-variant-numeric: tabular-nums;
}

/* ---- 3. Sharp, flat, "field equipment" geometry ---- */

/* Square off every rounded element (2px, not none — keeps it usable) */
[class*="rounded-"] { border-radius: 2px !important; }

/* Kill soft shadows -> flat matte panels */
[class*="shadow-"] { box-shadow: none !important; }

/* ---- 4. HUD texture: faint tactical grid over everything ---- */

html.dark body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483646;
  background-image:
    linear-gradient(rgba(200, 169, 95, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 169, 95, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ---- 5. Fine details ---- */

::selection { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

* { scrollbar-width: thin; scrollbar-color: rgba(200,169,95,.45) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(200,169,95,.4); border-radius: 2px; }
*::-webkit-scrollbar-track { background: transparent; }
