:root {
  --bg: #eef2fb;
  --surface: #fff;
  --ink: #1b2233;
  --muted: #5d6679;
  --line: #d9e0f0;
  --primary: #2563eb;
  --primary-ink: #1d4fd0;
  --danger: #b4350a;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #111111;
  --surface: #1c1b1a;
  --ink: #f3eee3;
  --muted: #a8a399;
  --line: #3d3a36;
  --primary: #d9541e;
  --primary-ink: #e8693a;
  --danger: #f08a6a;
  color-scheme: dark;
}
:root[data-theme='dark'] button.primary {
  color: #111111;
}
:root[data-theme='dark'] input:focus-visible,
:root[data-theme='dark'] select:focus-visible,
:root[data-theme='dark'] button:focus-visible,
:root[data-theme='dark'] a:focus-visible {
  outline-color: #d9541e;
}
:root[data-theme='dark'] button:hover {
  border-color: #6b665e;
}
:root[data-theme='dark'] .card {
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.4);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h1,
h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 18px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
input,
select,
button {
  font: inherit;
}
input[type='text'],
input[type='password'],
select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9db8f5;
  outline-offset: 1px;
}
button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
button:hover {
  border-color: #b9c6e6;
}
button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
button.primary:hover {
  background: var(--primary-ink);
}
button.danger {
  color: var(--danger);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
.error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}
.error:empty {
  display: none;
}

/* sign in */
.centre {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}
.card {
  width: min(100%, 380px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(20 30 70 / 0.05), 0 8px 24px rgb(20 30 70 / 0.06);
}
@media (max-width: 420px) {
  .card {
    padding: 22px 18px;
  }
}

.brand {
  display: block;
  width: 200px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 8px;
}
.brand-on-dark {
  display: none;
}
:root[data-theme='dark'] .brand-on-light {
  display: none;
}
:root[data-theme='dark'] .brand-on-dark {
  display: block;
}

.sfx {
  position: relative;
  display: block;
}
.sfx input {
  padding-right: 96px;
}
.sfx span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
