@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --auth-bg: #050505;
  --auth-card: rgba(10, 14, 18, 0.96);
  --auth-line: rgba(120, 140, 160, 0.22);
  --auth-line-strong: rgba(150, 170, 190, 0.32);
  --auth-text: #f7fbff;
  --auth-muted: #9fafc0;
  --auth-input: #0b0f13;
  --auth-accent: #12b8ff;
  --auth-accent-2: #0b84ff;
  --auth-accent-glow: rgba(18, 184, 255, 0.22);
  --auth-danger: #fecdd3;
  --auth-danger-bg: rgba(159, 18, 57, 0.16);
  --auth-danger-line: rgba(251, 113, 133, 0.28);
  --auth-success: #dcfce7;
  --auth-success-bg: rgba(15, 118, 110, 0.16);
  --auth-success-line: rgba(52, 211, 153, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: Rubik, system-ui, Arial, sans-serif;
  background: radial-gradient(circle at top, #111821, var(--auth-bg) 60%);
  color: var(--auth-text);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
}

body.theme-register {
  --auth-accent: #0fb86b;
  --auth-accent-2: #0b914f;
  --auth-accent-glow: rgba(15, 184, 107, 0.22);
  background: radial-gradient(circle at top, #101a14, var(--auth-bg) 60%);
}

.authShell {
  width: min(100%, 430px);
}

.authCard {
  display: grid;
  gap: 18px;
  padding: 28px 24px;
  background: var(--auth-card);
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.authHeader {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.authLogo {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--auth-line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.authLogo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.authLogoMark {
  background: #111827;
  color: #fff;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0;
}

.authTitle {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.authSubtitle {
  margin: 0;
  max-width: 280px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.5;
}

.authStatus {
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.authStatus.error {
  color: var(--auth-danger);
  background: var(--auth-danger-bg);
  border-color: var(--auth-danger-line);
}

.authStatus.success {
  color: var(--auth-success);
  background: var(--auth-success-bg);
  border-color: var(--auth-success-line);
}

.authForm {
  display: grid;
  gap: 12px;
}

.fieldGroup {
  display: grid;
  gap: 6px;
}

.fieldLabel {
  font-size: 12px;
  font-weight: 500;
  color: #dbe6f1;
}

.field,
textarea.field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: var(--auth-input);
  color: var(--auth-text);
  padding: 0 14px;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea.field {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.field:focus,
textarea.field:focus {
  outline: none;
  border-color: var(--auth-line-strong);
  box-shadow: 0 0 0 4px var(--auth-accent-glow);
  background: #0d1217;
}

.authActions {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.authButton,
.authLink {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.authButton {
  color: #fff;
  background: linear-gradient(180deg, var(--auth-accent), var(--auth-accent-2));
  box-shadow: 0 14px 34px var(--auth-accent-glow);
}

.authLink {
  color: var(--auth-text);
  background: #11171d;
  border-color: rgba(120, 140, 160, 0.24);
}

@media (min-width: 520px) {
  .authActions {
    grid-template-columns: 1fr 1fr;
  }
}
