/* Custom Authelia theme, injected by nginx (see proxy-confs/authelia.subdomain.conf).
   Base theme in configuration.yml should be "dark". */
:root {
  --bg-0: #0b0d17;
  --bg-1: #121528;
  --card: rgba(24, 28, 52, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8eaf6;
  --muted: #9aa0c3;
  --accent: #8b7cff;
  --accent-2: #38d9c0;
}

html, body, #root {
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

body {
  background:
    radial-gradient(900px 600px at 12% 8%, rgba(139, 124, 255, 0.22), transparent 60%),
    radial-gradient(800px 600px at 90% 95%, rgba(56, 217, 192, 0.16), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-0)) fixed !important;
}

/* login card */
.MuiPaper-root {
  background: var(--card) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 124, 255, 0.05) !important;
  color: var(--text) !important;
}

/* thin accent bar on top of the card */
.MuiPaper-root::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1px -1px 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.MuiTypography-root { color: var(--text); }
.MuiTypography-root.MuiTypography-h5,
.MuiTypography-root.MuiTypography-h6 { font-weight: 600; letter-spacing: 0.01em; }
.MuiTypography-colorTextSecondary,
.MuiFormHelperText-root { color: var(--muted) !important; }

/* inputs */
.MuiOutlinedInput-root {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px !important;
  transition: background 0.2s, box-shadow 0.2s;
}
.MuiOutlinedInput-root:hover { background: rgba(255, 255, 255, 0.07); }
.MuiOutlinedInput-notchedOutline { border-color: var(--line) !important; }
.MuiOutlinedInput-root.Mui-focused { box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.28); }
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline { border-color: var(--accent) !important; }
.MuiInputLabel-root { color: var(--muted) !important; }
.MuiInputLabel-root.Mui-focused { color: var(--accent) !important; }
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #1a1e3a inset !important;
  -webkit-text-fill-color: var(--text) !important;
}

/* buttons */
.MuiButton-root { border-radius: 12px !important; text-transform: none !important; font-weight: 600 !important; }
.MuiButton-contained {
  background: linear-gradient(135deg, var(--accent), #5b8cff) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(139, 124, 255, 0.35) !important;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.MuiButton-contained:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 28px rgba(139, 124, 255, 0.45) !important; }
.MuiButton-text, .MuiLink-root { color: var(--accent-2) !important; }

/* checkbox, switches, links */
.MuiCheckbox-root.Mui-checked, .MuiSwitch-switchBase.Mui-checked { color: var(--accent) !important; }
a { color: var(--accent-2); }

/* alerts / status icons */
.MuiAlert-root { border-radius: 12px !important; }
.MuiLinearProgress-bar, .MuiCircularProgress-circle { color: var(--accent-2) !important; }

/* logo */
img[alt="Logo"], img[src*="logo"] { filter: drop-shadow(0 4px 14px rgba(139, 124, 255, 0.5)); }

/* footer */
a[href*="authelia.com"] { color: var(--muted) !important; opacity: 0.7; }
