:root {
  --bg0: #070a11;
  --bg1: #0c1018;
  --bg2: #121826;
  --card: rgba(18,24,36,0.82);
  --stroke: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.94);
  --text2: rgba(224,231,246,0.78);
  --muted: rgba(170,181,208,0.62);
  --r20: 20px;
  --shadow: 0 20px 44px rgba(0,0,0,0.34);
  --blur: blur(10px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 18% -8%, rgba(108,92,255,0.14), transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(76,201,240,0.09), transparent 52%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
}

body.auth-page {
  overflow: auto;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 320px at 12% 12%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(760px 380px at 88% 0%, rgba(108,92,255,0.10), transparent 62%);
  opacity: 0.22;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  border-radius: var(--r20);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.auth-logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: radial-gradient(140% 120% at 20% 10%, rgba(108,92,255,0.9), rgba(76,201,240,0.55));
  box-shadow: 0 10px 22px rgba(108,92,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
}

.auth-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.1;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
  margin: 8px 0 14px;
  color: var(--text);
}

.auth-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.flash {
  padding: 10px 12px;
  border-radius: 14px;
  margin: 0 0 12px;
  font-size: 13px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--text2);
}

.flash.error {
  border-color: rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.12);
  color: rgba(255,255,255,0.92);
}

.flash.success {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
  color: rgba(255,255,255,0.92);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  transition: 0.18s ease;
}

.auth-input::placeholder {
  color: rgba(255,255,255,0.42);
}

.auth-input:focus {
  border-color: rgba(108,92,255,0.55);
  box-shadow: 0 0 0 4px rgba(108,92,255,0.12);
  background: rgba(255,255,255,0.05);
}

.auth-btn {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(108,92,255,0.55);
  background: rgba(108,92,255,0.22);
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(108,92,255,0.16);
  background: rgba(108,92,255,0.28);
}

.auth-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-footer {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text2);
  text-align: center;
}

.auth-footer a {
  color: rgba(108,92,255,0.95);
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}
