:root {
  --bg: #0f1115;
  --card: #141823;
  --muted: #b9c3df;
  --text: #e8eefc;
  --accent: #6ea8ff;
  --border: rgba(255,255,255,.08);
  --accent-red: #b32026;
}

/* === RESET / BASE === */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

/* === AUTH LAYOUT === */
body.auth {
  display: grid;
  place-items: center;
  background:
    url('../images/login_bg.png') center center / cover no-repeat;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  overflow: hidden;
  position: relative;
}

/* === OPTIONAL OVERLAYS === */
.vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(110,168,255,.10), transparent 60%),
    radial-gradient(1200px 900px at 90% 10%, rgba(179,32,38,.12), transparent 70%),
    radial-gradient(1200px 900px at 10% 120%, rgba(0,0,0,.8), rgba(0,0,0,.30));
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .05;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.8'/></svg>");
}

/* === CARD === */
.card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
box-shadow:
  0 0 60px 15px rgba(0,0,0,0.9),
  0 12px 40px rgba(0,0,0,0.8),
  inset 0 1px 0 rgba(255,255,255,.03);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  filter: blur(.6px);
  opacity: .7;
}

.banner-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.banner-wrap img {
  height: 56px;
  filter: drop-shadow(0 6px 18px rgba(110,168,255,.25));
}

/* === FORM === */
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}
input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus {
  border-color: rgba(110,168,255,.35);
  box-shadow: 0 0 0 3px rgba(110,168,255,.18);
  background: rgba(255,255,255,.06);
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(179,32,38,.95), rgba(100,9,13,.95));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 12px 26px rgba(179,32,38,.35), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .08s ease, filter .2s ease;
}
button:hover { filter: brightness(1.05) saturate(1.05); }
button:active { transform: translateY(1px); }

/* === LINKS & TEXT === */
.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* === ALERTS === */
.ok, .err {
  padding: 10px;
  border-radius: 10px;
  margin: 8px 0;
}
.ok {
  background: rgba(55,211,153,.12);
  border: 1px solid rgba(55,211,153,.35);
}
.err {
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.35);
}
