:root {
  color-scheme: dark;
  --paper: #111315;
  --panel: #171a1d;
  --surface: #1e2226;
  --ink: #e9e6df;
  --muted: #9ba1a5;
  --line: #30363a;
  --accent: #ff785f;
  --on-accent: #1b110f;
}

html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4f1ea;
  --panel: #fbfaf6;
  --surface: #ffffff;
  --ink: #171714;
  --muted: #6f6a60;
  --line: #d9d3c7;
  --accent: #c94029;
  --on-accent: #ffffff;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 120, 95, .13), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.login-card {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(23, 26, 29, .95);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.language-toggle {
  position: absolute; top: 18px; right: 18px; min-height: 36px; width: auto; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent);
  font-size: 11px; font-weight: 800;
}

html[data-theme="light"] .login-card {
  background: rgba(251, 250, 246, .95);
  box-shadow: 0 24px 70px rgba(45, 39, 29, .12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 3px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

form { margin-top: 30px; }
label { display: block; margin: 0 0 7px 2px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
form > input { width: 100%; margin-bottom: 16px; font-size: 16px; letter-spacing: normal; }

.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }

input,
button {
  min-height: 50px;
  border-radius: 13px;
  font: inherit;
}

input {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0 15px;
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  letter-spacing: .14em;
  outline: none;
}

input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 120, 95, .16); }

button {
  border: 0;
  padding: 0 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 750;
  cursor: pointer;
}

button:disabled { cursor: wait; opacity: .65; }

.login-error { margin-top: 12px; color: #ff8b7a; font-size: 13px; line-height: 1.4; }
.login-error[hidden] { display: none; }

@media (max-width: 480px) {
  .login-shell { padding: 16px; }
  .login-card { padding: 28px 22px; border-radius: 19px; }
  .brand-mark { margin-bottom: 24px; }
  .password-row { grid-template-columns: 1fr; }
  button { width: 100%; }
}
