:root {
  color-scheme: light;
  --background: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --text: #17202a;
  --text-soft: #667085;
  --border: #dfe5eb;
  --accent: #1769aa;
  --accent-hover: #12598f;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;
  --focus: rgba(23, 105, 170, 0.22);
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.09);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #0f1419;
  --surface: #171d23;
  --surface-soft: #1d252d;
  --text: #f1f5f9;
  --text-soft: #aab6c2;
  --border: #2c3742;
  --accent: #58a6df;
  --accent-hover: #78b8e5;
  --danger: #ffb4ab;
  --danger-soft: #351a1a;
  --danger-border: #69302d;
  --focus: rgba(88, 166, 223, 0.28);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --background: #0f1419;
    --surface: #171d23;
    --surface-soft: #1d252d;
    --text: #f1f5f9;
    --text-soft: #aab6c2;
    --border: #2c3742;
    --accent: #58a6df;
    --accent-hover: #78b8e5;
    --danger: #ffb4ab;
    --danger-soft: #351a1a;
    --danger-border: #69302d;
    --focus: rgba(88, 166, 223, 0.28);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% 0,
      var(--surface-soft) 0,
      transparent 38rem
    ),
    var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

.account-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.account-shell {
  width: 100%;
  max-width: 460px;
}

.account-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.account-brand img {
  display: block;
  width: min(280px, 78vw);
  height: auto;
}

.account-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-title {
  margin: 0 0 10px;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.account-intro {
  margin: 0 0 26px;
  color: var(--text-soft);
  line-height: 1.55;
}

.account-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.account-button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 11px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.account-button:hover {
  background: var(--accent-hover);
}

.account-error {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid var(--danger-border);
  border-radius: 11px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.45;
}

.account-theme {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.account-theme select {
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.8rem;
}

@media (min-width: 600px) {
  .account-page {
    padding: 48px 24px;
  }

  .account-card {
    padding: 38px;
  }
}
