:root {
  color-scheme: light;
  font-family: Tahoma, Arial, sans-serif;
  color: #282c28;
  background: #f6f5f2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 26%, #e7eadd, #f6f5f2 58%);
}

.login {
  width: min(100%, 430px);
  padding: clamp(28px, 6vw, 46px);
  background: #fcfcfa;
  border: 1px solid #e1e3d8;
  border-radius: 12px;
  box-shadow: 0 24px 85px #242c2310;
}

.brand {
  text-align: center;
  font: 28px Georgia, serif;
  letter-spacing: .14em;
}
.brand span {
  display: block;
  margin-top: 10px;
  font: 9px Arial, sans-serif;
  letter-spacing: .32em;
  color: #586052;
}
.signature {
  width: 45px;
  height: 6px;
  margin: 29px auto 31px;
  transform: rotate(-8deg);
  border-radius: 1px;
  background: #a13237;
}
h1 { font-size: 24px; margin: 0 0 10px; }
.intro { margin: 0 0 26px; color: #656b61; font-size: 13px; }
form { display: grid; gap: 10px; }
label { font-size: 13px; }
input, button {
  width: 100%;
  min-height: 46px;
  border-radius: 6px;
  font: inherit;
  padding: 11px 12px;
}
input { border: 1px solid #d3d8cd; margin-bottom: 9px; background: #fff; }
button {
  background: #28382e;
  color: #fff;
  border: 1px solid #28382e;
  cursor: pointer;
}
button:hover { background: #364c3d; }
input:focus-visible, button:focus-visible { outline: 2px solid #647a60; outline-offset: 3px; }
.motto { text-align: center; color: #656b61; font-size: 12px; margin: 29px 0 0; }
.error {
  padding: 12px;
  border: 1px solid #ebd2d2;
  background: #f8edeb;
  border-radius: 6px;
  color: #8d3037;
  font-size: 13px;
  line-height: 1.65;
}

:root[data-theme="dark"] { color-scheme: dark; color: #f4f4f5; background: #09090b; }
:root[data-theme="dark"] :is(body) { background: radial-gradient(ellipse at 50% 26%, #252126, #09090b 60%); }
:root[data-theme="dark"] :is(.login) { background: #121215; border-color: #2d2d34; box-shadow: 0 24px 85px #0008; }
:root[data-theme="dark"] :is(.brand span, .intro, .motto) { color: #b0afb7; }
:root[data-theme="dark"] :is(input) { background: #09090b; color: #f4f4f5; border-color: #3c3c45; }
:root[data-theme="dark"] :is(button) { background: #f2f2f4; color: #141418; border-color: #f2f2f4; }
:root[data-theme="dark"] :is(button:hover) { background: #dedee3; }
:root[data-theme="dark"] :is(input:focus-visible, button:focus-visible) { outline-color: #de7880; }
:root[data-theme="dark"] :is(.error) { background: #371b22; color: #ffbbc1; border-color: #63303b; }

.theme-to-light, .theme-to-dark { display: none; }
:root[data-theme="dark"] .theme-to-light,
:root[data-theme="light"] .theme-to-dark { display: inline-flex; }
.login button.theme-toggle { display: flex; justify-content: center; width: auto; margin: 20px auto 0; border-color: currentColor; background: transparent; color: inherit; font-size: 12px; min-height: 36px; padding: 6px 12px; }
.login button.theme-toggle:hover { opacity: .8; }
.login .motto { margin-top: 18px; }
