/*
 * AuctionGraph identity portal — brand layer.
 *
 * Authelia ships an embedded theme; this file is injected by the edge (see
 * tenant-config.mjs) as a same-origin stylesheet, so it survives Authelia
 * upgrades that rehash the embedded bundle. It only re-tunes the theme tokens
 * and surface treatment; it never changes the form contract or the auth flow.
 */

:root,
[data-theme="dark"],
[data-theme="oled"],
[data-theme="grey"] {
  --background: oklch(17.5% 0.028 275);
  --foreground: oklch(97% 0.008 260);

  --card: oklch(24% 0.032 275 / 0.82);
  --card-foreground: oklch(97% 0.008 260);
  --popover: oklch(24% 0.032 275);
  --popover-foreground: oklch(97% 0.008 260);

  --primary: oklch(63% 0.19 287);
  --primary-foreground: oklch(99% 0.004 280);

  --secondary: oklch(72% 0.14 205);
  --secondary-foreground: oklch(18% 0.02 275);

  --muted: oklch(29% 0.03 275);
  --muted-foreground: oklch(80% 0.02 265);

  --accent: oklch(32% 0.04 278);
  --accent-foreground: oklch(97% 0.008 260);

  --destructive: oklch(64% 0.21 25);
  --destructive-foreground: oklch(99% 0 0);
  --success: oklch(72% 0.15 155);
  --info: oklch(70% 0.14 230);

  --border: oklch(100% 0 0 / 0.1);
  --input: oklch(100% 0 0 / 0.12);
  --ring: oklch(63% 0.19 287);

  --radius: 0.9rem;
  --custom-icon: oklch(97% 0.008 260);
  --custom-loading-bar: oklch(72% 0.17 287);
  --divider: oklch(100% 0 0 / 0.1);
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 12% -12%, oklch(45% 0.2 287 / 0.5), transparent 62%),
    radial-gradient(900px 520px at 112% 6%, oklch(48% 0.15 212 / 0.42), transparent 58%),
    radial-gradient(700px 700px at 50% 118%, oklch(38% 0.14 300 / 0.35), transparent 60%),
    var(--background) !important;
  background-attachment: fixed;
  letter-spacing: 0.005em;
}

/* The login surface: a frosted, softly-lit panel. */
.bg-card,
[class~="bg-card"] {
  background: var(--card) !important;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.35);
  box-shadow:
    0 1px 0 0 oklch(100% 0 0 / 0.06) inset,
    0 30px 70px -28px oklch(0% 0 0 / 0.85),
    0 8px 26px -16px oklch(0% 0 0 / 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* Brand mark sizing and a subtle lift. */
img[src*="logo" i],
img[alt*="logo" i],
img[src*="authelia" i] {
  max-height: 5.25rem;
  width: auto;
  filter: drop-shadow(0 12px 26px oklch(30% 0.15 287 / 0.55));
}

/* Controls: crisp focus ring and a confident primary action. */
button.bg-primary,
[class~="bg-primary"]:is(button, a) {
  background: linear-gradient(135deg, oklch(63% 0.19 287), oklch(58% 0.17 265)) !important;
  box-shadow: 0 12px 28px -12px oklch(45% 0.2 287 / 0.7);
}

input,
textarea,
select {
  border-radius: calc(var(--radius) * 0.8) !important;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

::selection {
  background: oklch(63% 0.19 287 / 0.35);
}

/* Hide the upstream brand footer; its link target is the stable selector. */
a[href^="https://www.authelia.com"],
a[href^="https://authelia.com"] {
  display: none !important;
}
