/* ==========================================================================
   Academy Archives — complete stylesheet
   ==========================================================================

   Replaces Tailwind v4 + globals.css with a single static file, so the server
   needs no Node and no build step.

   Two parts:
     PART 1  the original src/app/globals.css, carried over unchanged apart
             from dropping `@import "tailwindcss"` and the `@theme inline`
             block (whose only job was telling Tailwind which custom
             properties to generate utilities from — PART 2 does that by hand).
     PART 2  the utility classes the components actually use. Extracted from
             the source rather than guessed: 466 literal class tokens, none of
             them dynamically constructed, so this set is complete.

   Sizing follows Tailwind's scale: 1 unit = 0.25rem = 4px.
   ========================================================================== */


/* ==========================================================================
   PART 1 — base, theme and component classes (from globals.css)
   ========================================================================== */

:root {
  --background: #05070b;
  --background-secondary: #090d14;

  --surface: rgba(13, 18, 27, 0.88);
  --surface-solid: #0d121b;
  --surface-hover: #131a25;
  --surface-muted: rgba(255, 255, 255, 0.04);

  --foreground: #f3eee2;
  --foreground-secondary: #c1b9aa;
  --foreground-muted: #777985;

  --border: rgba(199, 157, 47, 0.17);
  --border-strong: rgba(221, 180, 62, 0.38);

  --accent: #d8b23e;
  --accent-strong: #f0d276;
  --accent-soft: rgba(216, 178, 62, 0.11);

  --moonlight: #79a9d5;
  --moonlight-soft: rgba(74, 133, 184, 0.12);

  --success: #6d9e7e;
  --warning: #c9933e;
  --danger: #c7676f;

  --sidebar-width: 264px;
  --header-height: 76px;

  --shadow-small:
    0 10px 35px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.025);

  --shadow-large:
    0 32px 100px rgba(0, 0, 0, 0.58);

  --gold-glow:
    0 0 28px rgba(216, 178, 62, 0.14);

  --blue-glow:
    0 0 70px rgba(87, 147, 199, 0.12);

  /* next/font loaded Geist from Google. The CSP here is script/style/font
     'self', and the server has no build step to fetch it, so this resolves to
     a system stack. To use Geist exactly, drop the woff2 files into
     /assets/fonts/ and add the @font-face rules at the bottom of this file. */
  --font-geist-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --font-geist-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--foreground);
  font-family: var(--font-geist-sans);
  font-size: 14px;
  line-height: 1.5;

  background:
    radial-gradient(circle at 73% -12%, rgba(107, 165, 215, 0.23), transparent 34rem),
    radial-gradient(circle at 22% 28%, rgba(25, 63, 92, 0.18), transparent 38rem),
    radial-gradient(circle at 14% 105%, rgba(196, 150, 43, 0.055), transparent 30rem),
    linear-gradient(180deg, #07111b 0%, #070b11 32%, #05070b 100%);

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(circle at 82% 3%, rgba(204, 228, 248, 0.09), transparent 14rem),
    linear-gradient(180deg, rgba(64, 117, 159, 0.07), transparent 26%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 44vh;
  z-index: -1;
  pointer-events: none;

  background:
    linear-gradient(to top, rgba(3, 5, 8, 0.94), rgba(5, 8, 12, 0.54), transparent);

  filter: blur(16px);
}

h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

button, a { -webkit-tap-highlight-color: transparent; }

button, a, input, textarea, select {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 260ms ease,
    transform 260ms ease,
    opacity 180ms ease;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }

::selection { background: var(--accent); color: #08090b; }

[hidden] { display: none !important; }

.app-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.032;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.75'/%3E%3C/svg%3E");
}

.academy-fog {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -8%;
  height: 48%;

  background:
    radial-gradient(ellipse at 45% 54%,
      rgba(123, 154, 169, 0.18),
      rgba(66, 84, 94, 0.08) 34%,
      rgba(22, 30, 36, 0.03) 58%,
      transparent 76%);

  filter: blur(30px);
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- shared stone surfaces ---------- */

.surface-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);

  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.024), transparent 36%),
    linear-gradient(180deg, rgba(20, 27, 38, 0.94), rgba(10, 14, 21, 0.97));

  box-shadow: var(--shadow-small), inset 0 1px rgba(255, 255, 255, 0.025);
}

.surface-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 62, 0.018), transparent);
}

.surface-panel:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-large), var(--gold-glow);
}

.castle-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(216, 178, 62, 0.22);

  background: linear-gradient(155deg, rgba(25, 31, 41, 0.97), rgba(7, 10, 15, 0.98));

  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(241, 211, 124, 0.035);
}

/* ---------- cinematic dashboard hero ---------- */

.academy-hero {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  overflow: hidden;

  border: 1px solid rgba(216, 178, 62, 0.22);
  border-radius: 22px;

  background:
    radial-gradient(circle at 81% 12%, rgba(196, 223, 243, 0.17), transparent 9rem),
    radial-gradient(circle at 76% 24%, rgba(82, 142, 184, 0.14), transparent 22rem),
    linear-gradient(128deg, #09131d 0%, #0b121b 45%, #06090e 100%);

  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.03);
}

.academy-hero::before {
  content: "";
  position: absolute;
  right: 7%;
  top: 8%;
  width: 118px;
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 999px;

  background:
    radial-gradient(circle at 34% 30%,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(220, 235, 244, 0.9) 26%,
      rgba(166, 199, 219, 0.82) 55%,
      rgba(101, 144, 169, 0.62) 78%,
      rgba(78, 112, 132, 0.35) 100%);

  box-shadow:
    0 0 35px rgba(198, 226, 242, 0.28),
    0 0 90px rgba(102, 157, 191, 0.16),
    0 0 150px rgba(91, 135, 164, 0.08);

  filter: blur(0.3px);
  opacity: 0.78;
}

.academy-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: -1;

  background:
    radial-gradient(ellipse at 45% 110%, rgba(111, 145, 160, 0.18), transparent 48%),
    linear-gradient(to top, rgba(3, 5, 8, 0.98), rgba(4, 8, 12, 0.65), transparent);
}

.academy-skyline {
  position: absolute;
  right: 4%;
  bottom: 0;
  width: 49%;
  height: 68%;
  z-index: -1;
  opacity: 0.78;
}

.academy-skyline::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 88%;

  background: linear-gradient(180deg, rgba(8, 13, 19, 0.92), rgba(3, 6, 9, 0.98));

  clip-path: polygon(
    0 100%, 0 72%, 8% 72%, 11% 35%, 14% 72%, 23% 72%, 28% 20%, 33% 72%,
    42% 72%, 48% 4%, 54% 72%, 62% 72%, 66% 44%, 70% 72%, 78% 72%, 82% 27%,
    87% 72%, 100% 72%, 100% 100%
  );

  filter: drop-shadow(0 -10px 30px rgba(70, 116, 148, 0.08));
}

.academy-windows {
  position: absolute;
  right: 10%;
  bottom: 31%;
  width: 29%;
  height: 8px;
  z-index: 2;

  background:
    repeating-linear-gradient(90deg,
      rgba(243, 192, 75, 0.95) 0 3px,
      transparent 3px 12px);

  filter:
    drop-shadow(0 0 4px rgba(243, 192, 75, 0.72))
    drop-shadow(0 0 10px rgba(224, 155, 42, 0.28));

  opacity: 0.68;
}

/* ---------- gold ---------- */

.gold-text {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(216, 178, 62, 0.13);
}

.gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 62, 0.45), transparent);
}

.focus-ring { outline: none; }

.focus-ring:focus-visible {
  box-shadow:
    0 0 0 2px var(--background),
    0 0 0 4px var(--accent),
    0 0 22px rgba(216, 178, 62, 0.22);
}

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #05070b; }

::-webkit-scrollbar-thumb {
  border: 2px solid #05070b;
  border-radius: 999px;
  background: rgba(216, 178, 62, 0.25);
}

::-webkit-scrollbar-thumb:hover { background: rgba(216, 178, 62, 0.45); }

/* ---------- magical cursor ---------- */

@media (pointer: fine) {
  body, a, button, [role="button"], [role="link"] {
    cursor:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='rotate(-40 16 16)'%3E%3Cpath d='M15 4 L17 4 L17 24 L15 24 Z' fill='%23d8b23e'/%3E%3Cpath d='M14 23 L18 23 L18 29 L14 29 Z' rx='1' fill='%23765b25'/%3E%3Ccircle cx='16' cy='3' r='2' fill='%23f5df91'/%3E%3C/g%3E%3C/svg%3E") 4 4,
      pointer;
  }

  input, textarea { cursor: text; }
}

/* ---------- wand spark ---------- */

.wand-spark { width: 1px; height: 1px; position: absolute; pointer-events: none; z-index: 9999; }

.wand-spark-core {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff6c9;

  box-shadow:
    0 0 8px #fff6c9,
    0 0 18px rgba(240, 210, 118, 0.95),
    0 0 34px rgba(216, 178, 62, 0.65);

  animation: wand-core-burst 420ms ease-out forwards;
}

.wand-spark-ray {
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 2px;
  transform-origin: left center;

  background: linear-gradient(90deg, rgba(255, 245, 195, 1), rgba(216, 178, 62, 0.65), transparent);

  animation: wand-ray-burst 420ms ease-out forwards;
}

@keyframes wand-core-burst {
  0%   { transform: scale(0.3); opacity: 0; }
  35%  { transform: scale(1.7); opacity: 1; }
  100% { transform: scale(0);   opacity: 0; }
}

@keyframes wand-ray-burst {
  0%   { width: 0;    opacity: 0; }
  35%  { width: 30px; opacity: 1; }
  100% { width: 45px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- master search input ---------- */

.master-search-input {
  position: relative;
  z-index: 10;
  display: block;
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;

  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;

  color: #f6f2e8 !important;
  caret-color: #d8b23e !important;

  font-size: 14px;
  line-height: 1.25rem;
  opacity: 1 !important;

  -webkit-text-fill-color: #f6f2e8 !important;
  appearance: none;
  -webkit-appearance: none;
}

.master-search-input::placeholder {
  color: #777985 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #777985 !important;
}

.master-search-input:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.master-search-input::-webkit-search-cancel-button { display: none; }

/* ---------- polish ---------- */

.page-enter { animation: page-enter 260ms ease-out both; }

@keyframes page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.surface-panel, .castle-panel {
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    background-color 260ms ease;
}

.surface-panel:hover { transform: translateY(-2px); }

/*
 * Defensive defaults for form controls.
 *
 * globals.css set only `color`, which meant a control whose background came
 * from a utility class rendered as near-white text on the browser's default
 * white box if that class ever failed to apply. Pairing the two here means the
 * pairing can never come apart. Utility classes are (0,1,0) and win over these
 * element selectors, so bg-transparent on the login inputs still overrides.
 */
input, textarea, select {
  color: var(--foreground);
  background-color: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 9px;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  width: auto;
  border-radius: 0;
}

input[type="color"] {
  padding: 2px;
  cursor: pointer;
}

/* The date picker indicator is black-on-dark by default in Chromium. */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.65);
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) opacity(1);
}

/* Chromium paints autofilled inputs with an opaque near-white background that
   ignores background-color; only an inset shadow overrides it. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--foreground);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-solid) inset;
  caret-color: var(--foreground);
}

input::placeholder, textarea::placeholder { color: var(--foreground-muted); }

input:focus, textarea:focus, select:focus {
  border-color: rgba(216, 178, 62, 0.42);
  box-shadow:
    0 0 0 1px rgba(216, 178, 62, 0.12),
    0 0 22px rgba(216, 178, 62, 0.07);
}

button:active, a:active { transform: scale(0.985); }

.modal-backdrop {
  background:
    radial-gradient(circle at 50% 35%, rgba(80, 117, 151, 0.08), transparent 28rem),
    rgba(1, 3, 6, 0.76);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-enter { animation: modal-enter 220ms ease-out both; }

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.magic-hover { position: relative; overflow: hidden; }

.magic-hover::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -50%;
  width: 35%;
  height: 220%;
  pointer-events: none;

  background: linear-gradient(90deg, transparent, rgba(241, 211, 124, 0.07), transparent);

  transform: rotate(22deg);
  transition: left 500ms ease;
}

.magic-hover:hover::after { left: 125%; }


/* ==========================================================================
   PART 2 — utilities
   ========================================================================== */

/* ---------- display / layout ---------- */

.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.place-items-center { place-items: center; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- position ---------- */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.inset-x-0 { left: 0; right: 0; }
.inset-y-0 { top: 0; bottom: 0; }

.top-0 { top: 0; }
.top-6 { top: 1.5rem; }
.top-11 { top: 2.75rem; }
.top-12 { top: 3rem; }
.top-1\/2 { top: 50%; }

.left-0 { left: 0; }
.left-3 { left: 0.75rem; }
.right-0 { right: 0; }
.right-1 { right: 0.25rem; }
.right-3 { right: 0.75rem; }
.right-12 { right: 3rem; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }
.z-\[110\] { z-index: 110; }
.z-\[9999\] { z-index: 9999; }

/* ---------- sizing ---------- */

.h-full { height: 100%; }
.h-fit { height: fit-content; }
.h-px { height: 1px; }
.h-1\.5 { height: 0.375rem; }
.h-6 { height: 1.5rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-\[var\(--header-height\)\] { height: var(--header-height); }

.w-full { width: 100%; }
.w-px { width: 1px; }
.w-44 { width: 11rem; }
.w-48 { width: 12rem; }
.w-56 { width: 14rem; }
.w-72 { width: 18rem; }
.w-\[2px\] { width: 2px; }
.w-\[72px\] { width: 72px; }
.w-\[var\(--sidebar-width\)\] { width: var(--sidebar-width); }

.min-w-0 { min-width: 0; }
.min-h-5 { min-height: 1.25rem; }
.min-h-80 { min-height: 20rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[178px\] { min-height: 178px; }
.min-h-\[320px\] { min-height: 320px; }

.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-52 { max-width: 13rem; }
.max-w-\[610px\] { max-width: 610px; }

.max-h-56 { max-height: 14rem; }
.max-h-\[480px\] { max-height: 480px; }

.size-3  { width: 0.75rem;  height: 0.75rem; }
.size-4  { width: 1rem;     height: 1rem; }
.size-5  { width: 1.25rem;  height: 1.25rem; }
.size-6  { width: 1.5rem;   height: 1.5rem; }
.size-7  { width: 1.75rem;  height: 1.75rem; }
.size-8  { width: 2rem;     height: 2rem; }
.size-9  { width: 2.25rem;  height: 2.25rem; }
.size-10 { width: 2.5rem;   height: 2.5rem; }
.size-11 { width: 2.75rem;  height: 2.75rem; }
.size-12 { width: 3rem;     height: 3rem; }
.size-14 { width: 3.5rem;   height: 3.5rem; }
.size-16 { width: 4rem;     height: 4rem; }
.size-40 { width: 10rem;    height: 10rem; }

/* ---------- spacing: padding ---------- */

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-7 { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-5 { padding-top: 1.25rem; }
.pt-\[12vh\] { padding-top: 12vh; }
.pl-10 { padding-left: 2.5rem; }
.pl-\[22px\] { padding-left: 22px; }
.pr-11 { padding-right: 2.75rem; }

/* ---------- spacing: margin ---------- */

.mx-auto { margin-left: auto; margin-right: auto; }
.ml-1 { margin-left: 0.25rem; }
.ml-auto { margin-left: auto; }
.mt-auto { margin-top: auto; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mt-9 { margin-top: 2.25rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-8 { margin-bottom: 2rem; }

.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-7 { margin-top: 1.75rem; margin-bottom: 1.75rem; }

/* ---------- gap ---------- */

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-x-3 { column-gap: 0.75rem; }
.gap-x-10 { column-gap: 2.5rem; }
.gap-y-1 { row-gap: 0.25rem; }
.gap-y-4 { row-gap: 1rem; }
.gap-y-5 { row-gap: 1.25rem; }

/* space-y-* : vertical rhythm between siblings */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-7 > * + * { margin-top: 1.75rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-9 > * + * { margin-top: 2.25rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }
.divide-border > * + * { border-color: var(--border); }

/* ---------- typography ---------- */

.text-\[9px\]  { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-\[38px\] { font-size: 38px; }
.text-\[42px\] { font-size: 42px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: var(--font-geist-mono); }

.text-left { text-align: left; }
.text-center { text-align: center; }

.uppercase { text-transform: uppercase; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.leading-none { line-height: 1; }
.leading-5 { line-height: 1.25rem; }
.leading-6 { line-height: 1.5rem; }
.leading-7 { line-height: 1.75rem; }
.leading-\[1\.03\] { line-height: 1.03; }

.tracking-\[-0\.055em\] { letter-spacing: -0.055em; }
.tracking-\[-0\.05em\]  { letter-spacing: -0.05em; }
.tracking-\[-0\.045em\] { letter-spacing: -0.045em; }
.tracking-\[-0\.04em\]  { letter-spacing: -0.04em; }
.tracking-\[-0\.035em\] { letter-spacing: -0.035em; }
.tracking-\[-0\.03em\]  { letter-spacing: -0.03em; }
.tracking-\[-0\.025em\] { letter-spacing: -0.025em; }
.tracking-\[0\.12em\] { letter-spacing: 0.12em; }
.tracking-\[0\.14em\] { letter-spacing: 0.14em; }
.tracking-\[0\.15em\] { letter-spacing: 0.15em; }
.tracking-\[0\.16em\] { letter-spacing: 0.16em; }
.tracking-\[0\.18em\] { letter-spacing: 0.18em; }
.tracking-\[0\.2em\]  { letter-spacing: 0.2em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }
.tracking-\[0\.24em\] { letter-spacing: 0.24em; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }
.tracking-\[0\.28em\] { letter-spacing: 0.28em; }
.tracking-\[0\.3em\]  { letter-spacing: 0.3em; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- colours: text ---------- */

.text-foreground { color: var(--foreground); }
.text-foreground-secondary { color: var(--foreground-secondary); }
.text-foreground-muted { color: var(--foreground-muted); }
.text-accent { color: var(--accent); }
.text-accent\/70 { color: rgba(216, 178, 62, 0.7); }
.text-accent\/75 { color: rgba(216, 178, 62, 0.75); }
.text-accent\/80 { color: rgba(216, 178, 62, 0.8); }
.text-background { color: var(--background); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-white { color: #ffffff; }
.text-red-400 { color: #f87171; }
.text-red-600 { color: #dc2626; }
.text-\[\#090a0c\] { color: #090a0c; }
.text-\[\#0a0a0a\] { color: #0a0a0a; }
.text-\[\#aaa79f\] { color: #aaa79f; }
.text-\[\#e8e1d3\] { color: #e8e1d3; }
.text-\[\#f2ecdf\] { color: #f2ecdf; }
.text-\[\#f3ede0\] { color: #f3ede0; }
.text-\[\#f4eee2\] { color: #f4eee2; }
.text-\[\#f5efe1\] { color: #f5efe1; }
.text-\[\#f6f2e8\] { color: #f6f2e8; }

/* ---------- colours: background ---------- */

.bg-background { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.bg-surface-solid { background-color: var(--surface-solid); }
.bg-accent { background-color: var(--accent); }
.bg-accent-soft { background-color: var(--accent-soft); }
.bg-foreground { background-color: var(--foreground); }
.bg-border { background-color: var(--border); }
.bg-danger { background-color: var(--danger); }
.bg-transparent { background-color: transparent; }

.bg-accent\/8  { background-color: rgba(216, 178, 62, 0.08); }
.bg-accent\/10 { background-color: rgba(216, 178, 62, 0.10); }
.bg-accent\/15 { background-color: rgba(216, 178, 62, 0.15); }
.bg-accent\/20 { background-color: rgba(216, 178, 62, 0.20); }

.bg-danger\/10 { background-color: rgba(199, 103, 111, 0.10); }
.bg-success\/10 { background-color: rgba(109, 158, 126, 0.10); }
.bg-foreground\/35 { background-color: rgba(243, 238, 226, 0.35); }

.bg-black\/10 { background-color: rgba(0, 0, 0, 0.10); }
.bg-black\/15 { background-color: rgba(0, 0, 0, 0.15); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.20); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.40); }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.60); }
.bg-black\/70 { background-color: rgba(0, 0, 0, 0.70); }
.bg-white\/3 { background-color: rgba(255, 255, 255, 0.03); }

.bg-red-100 { background-color: #fee2e2; }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.10); }

.bg-\[\#05080d\] { background-color: #05080d; }
.bg-\[\#05080d\]\/88 { background-color: rgba(5, 8, 13, 0.88); }
.bg-\[\#070a10\]\/95 { background-color: rgba(7, 10, 16, 0.95); }
.bg-\[\#090d13\] { background-color: #090d13; }
.bg-\[\#0b0f16\] { background-color: #0b0f16; }
.bg-\[\#0b1017\] { background-color: #0b1017; }
.bg-\[\#10141c\] { background-color: #10141c; }
.bg-\[\#6d5dfc\] { background-color: #6d5dfc; }
.bg-\[\#d4af37\] { background-color: #d4af37; }

.bg-\[linear-gradient\(145deg\,rgba\(24\,30\,40\,0\.96\)\,rgba\(7\,10\,15\,0\.98\)\)\] {
  background-image: linear-gradient(145deg, rgba(24, 30, 40, 0.96), rgba(7, 10, 15, 0.98));
}

.bg-\[radial-gradient\(circle_at_50\%_15\%\,rgba\(212\,175\,55\,0\.08\)\,transparent_38\%\)\] {
  background-image: radial-gradient(circle at 50% 15%, rgba(212, 175, 55, 0.08), transparent 38%);
}

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-from, transparent), var(--tw-via, transparent), var(--tw-to, transparent)); }
.from-transparent { --tw-from: transparent; }
.from-border { --tw-from: var(--border); }
.via-border { --tw-via: var(--border); }
.to-transparent { --tw-to: transparent; }

/* ---------- borders ---------- */

.border   { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-0 { border-width: 0; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--border); }
.border-r { border-right-width: 1px; border-right-style: solid; border-right-color: var(--border); }

.border-border { border-color: var(--border); }
.border-border-strong { border-color: var(--border-strong); }
.border-transparent { border-color: transparent; }
.border-accent { border-color: var(--accent); }
.border-danger { border-color: var(--danger); }

.border-accent\/10 { border-color: rgba(216, 178, 62, 0.10); }
.border-accent\/15 { border-color: rgba(216, 178, 62, 0.15); }
.border-accent\/20 { border-color: rgba(216, 178, 62, 0.20); }
.border-accent\/25 { border-color: rgba(216, 178, 62, 0.25); }
.border-accent\/30 { border-color: rgba(216, 178, 62, 0.30); }
.border-accent\/35 { border-color: rgba(216, 178, 62, 0.35); }
.border-accent\/40 { border-color: rgba(216, 178, 62, 0.40); }
.border-danger\/20 { border-color: rgba(199, 103, 111, 0.20); }
.border-danger\/25 { border-color: rgba(199, 103, 111, 0.25); }
.border-danger\/40 { border-color: rgba(199, 103, 111, 0.40); }
.border-success\/25 { border-color: rgba(109, 158, 126, 0.25); }
.border-red-500\/20 { border-color: rgba(239, 68, 68, 0.20); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.10); }

.rounded-\[6px\]  { border-radius: 6px; }
.rounded-\[7px\]  { border-radius: 7px; }
.rounded-\[8px\]  { border-radius: 8px; }
.rounded-\[9px\]  { border-radius: 9px; }
.rounded-\[10px\] { border-radius: 10px; }
.rounded-\[12px\] { border-radius: 12px; }
.rounded-\[14px\] { border-radius: 14px; }
.rounded-\[15px\] { border-radius: 15px; }
.rounded-\[16px\] { border-radius: 16px; }
.rounded-\[18px\] { border-radius: 18px; }
.rounded-\[20px\] { border-radius: 20px; }
.rounded-\[24px\] { border-radius: 24px; }
.rounded-lg  { border-radius: 0.5rem; }
.rounded-xl  { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ---------- effects ---------- */

.shadow-sm  { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.35); }
.shadow-md  { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4); }
.shadow-lg  { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.45), 0 4px 6px -4px rgba(0, 0, 0, 0.45); }
.shadow-xl  { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6); }

.shadow-\[var\(--gold-glow\)\] { box-shadow: var(--gold-glow); }
.shadow-\[var\(--shadow-small\)\] { box-shadow: var(--shadow-small); }
.shadow-\[var\(--shadow-large\)\] { box-shadow: var(--shadow-large); }
.shadow-\[0_0_12px_rgba\(212\,175\,55\,0\.7\)\] { box-shadow: 0 0 12px rgba(212, 175, 55, 0.7); }
.shadow-\[0_0_20px_rgba\(216\,178\,62\,0\.05\)\] { box-shadow: 0 0 20px rgba(216, 178, 62, 0.05); }
.shadow-\[0_0_25px_rgba\(216\,178\,62\,0\.15\)\] { box-shadow: 0 0 25px rgba(216, 178, 62, 0.15); }
.shadow-\[0_20px_60px_rgba\(0\,0\,0\,0\.34\)\] { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34); }
.shadow-\[0_20px_60px_rgba\(0\,0\,0\,0\.65\)\] { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65); }
.shadow-\[0_30px_120px_rgba\(0\,0\,0\,0\.75\)\] { box-shadow: 0 30px 120px rgba(0, 0, 0, 0.75); }

.ring-2 { box-shadow: 0 0 0 2px var(--tw-ring-color, transparent); }
.ring-4 { box-shadow: 0 0 0 4px var(--tw-ring-color, transparent); }
.ring-accent\/40 { --tw-ring-color: rgba(216, 178, 62, 0.4); }
.ring-surface-muted { --tw-ring-color: var(--surface-muted); }

.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.opacity-\[0\.08\] { opacity: 0.08; }

.blur-xl  { filter: blur(24px); }
.blur-3xl { filter: blur(64px); }

.backdrop-blur     { backdrop-filter: blur(8px);  -webkit-backdrop-filter: blur(8px); }
.backdrop-blur-sm  { backdrop-filter: blur(4px);  -webkit-backdrop-filter: blur(4px); }
.backdrop-blur-md  { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-xl  { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.backdrop-blur-2xl { backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); }

.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-y-auto { overflow-y: auto; }

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.cursor-grab { cursor: grab; }
.outline-none { outline: none; }

/* ---------- transforms / transitions ---------- */

.transition-all { transition-property: all; transition-duration: 200ms; transition-timing-function: ease; }
.transition-colors {
  transition-property: color, background-color, border-color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: ease;
}
.transition-transform { transition-property: transform; transition-duration: 200ms; transition-timing-function: ease; }
.transition { transition-property: color, background-color, border-color, box-shadow, transform, opacity; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

.-translate-y-1\/2 { transform: translateY(-50%); }

.caret-\[\#d8b23e\] { caret-color: #d8b23e; }

.placeholder\:text-foreground-muted::placeholder { color: var(--foreground-muted); }
.placeholder\:text-\[\#777985\]::placeholder { color: #777985; }

/* ---------- state variants ---------- */

.hover\:bg-accent-soft:hover { background-color: var(--accent-soft); }
.hover\:bg-accent-strong:hover { background-color: var(--accent-strong); }
.hover\:bg-accent\/5:hover { background-color: rgba(216, 178, 62, 0.05); }
.hover\:bg-accent\/14:hover { background-color: rgba(216, 178, 62, 0.14); }
.hover\:bg-danger\/10:hover { background-color: rgba(199, 103, 111, 0.10); }
.hover\:bg-surface-hover:hover { background-color: var(--surface-hover); }
.hover\:bg-surface-muted:hover { background-color: var(--surface-muted); }
.hover\:bg-white\/5:hover { background-color: rgba(255, 255, 255, 0.05); }
.hover\:bg-red-50:hover { background-color: #fef2f2; }

.hover\:text-accent:hover { color: var(--accent); }
.hover\:text-danger:hover { color: var(--danger); }
.hover\:text-foreground:hover { color: var(--foreground); }

.hover\:border-accent\/20:hover { border-color: rgba(216, 178, 62, 0.20); }
.hover\:border-accent\/25:hover { border-color: rgba(216, 178, 62, 0.25); }
.hover\:border-accent\/30:hover { border-color: rgba(216, 178, 62, 0.30); }
.hover\:border-accent\/35:hover { border-color: rgba(216, 178, 62, 0.35); }
.hover\:border-danger\/25:hover { border-color: rgba(199, 103, 111, 0.25); }
.hover\:border-border:hover { border-color: var(--border); }
.hover\:border-border-strong:hover { border-color: var(--border-strong); }

.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4); }
.hover\:shadow-\[var\(--shadow-large\)\]:hover { box-shadow: var(--shadow-large); }
.hover\:shadow-\[0_28px_80px_rgba\(0\,0\,0\,0\.5\)\,0_0_28px_rgba\(216\,178\,62\,0\.10\)\]:hover {
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5), 0 0 28px rgba(216, 178, 62, 0.10);
}

.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:brightness-95:hover { filter: brightness(0.95); }
.hover\:underline:hover { text-decoration: underline; }

.focus\:border-accent\/40:focus { border-color: rgba(216, 178, 62, 0.40); }
.focus-within\:border-accent\/40:focus-within { border-color: rgba(216, 178, 62, 0.40); }

.active\:scale-\[0\.99\]:active { transform: scale(0.99); }
.active\:translate-y-0:active { transform: translateY(0); }
.active\:cursor-grabbing:active { cursor: grabbing; }

.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.disabled\:pointer-events-none:disabled { pointer-events: none; }
.disabled\:opacity-45:disabled { opacity: 0.45; }
.disabled\:opacity-50:disabled { opacity: 0.5; }

.group:hover .group-hover\:text-accent { color: var(--accent); }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }
.group:hover .group-hover\:-translate-y-1 { transform: translateY(-0.25rem); }
.group:hover .group-hover\:opacity-\[0\.16\] { opacity: 0.16; }

/* ---------- responsive ---------- */

@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
  .sm\:inline { display: inline; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:items-end { align-items: flex-end; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
  .sm\:px-11 { padding-left: 2.75rem; padding-right: 2.75rem; }
  .sm\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-\[15px\] { font-size: 15px; }
  .sm\:text-\[56px\] { font-size: 56px; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-end { align-items: flex-end; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .lg\:pl-\[var\(--sidebar-width\)\] { padding-left: var(--sidebar-width); }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- drag and drop (replaces dnd-kit) ---------- */

.is-dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.drop-target {
  border-color: var(--border-strong) !important;
  box-shadow: var(--gold-glow);
}
