:root {
  color-scheme: dark;
  --bg: #101419;
  --panel: rgba(19, 26, 33, 0.94);
  --line: rgba(218, 234, 232, 0.16);
  --line-strong: rgba(94, 234, 212, 0.34);
  --text: #f2f7f5;
  --soft: #c8d5d2;
  --muted: #87979a;
  --cyan: #5eead4;
  --bad: #ff6b6b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(135deg, #101419, #151b21 48%, #0e1217);
  background-size: 42px 42px, 42px 42px, auto;
}

button,
input {
  font: inherit;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.1);
  font-weight: 800;
}

.brand-row strong,
.brand-row small {
  display: block;
  line-height: 1.05;
}

.brand-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.mode-tabs button,
.submit-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

.mode-tabs button.is-active {
  border-color: var(--line-strong);
  color: var(--cyan);
  background: rgba(94, 234, 212, 0.1);
}

form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

input:focus {
  border-color: var(--line-strong);
}

.submit-button {
  margin-top: 4px;
  border-color: rgba(94, 234, 212, 0.38);
  color: var(--text);
  background: rgba(94, 234, 212, 0.12);
  font-weight: 800;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-message.is-error {
  color: var(--bad);
}

.is-hidden {
  display: none;
}
