@font-face {
  font-family: Inter;
  src: url('assets/Inter-Medium.ttf') format('truetype');
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('assets/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --text: #f3f1f2;
  --muted: #a9a2a5;
  --accent: #f05a4b;
  --line: #ffffff17;
}

* { box-sizing: border-box; }

::selection {
  background: #48464b;
  color: #fff;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse 420px 265px at 50% 0, #48171d55, transparent 100%), #101010;
  color: var(--text);
  font: 15px/1.5 Inter, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-nav {
  position: sticky;
  top: 16px;
  z-index: 1;
  width: min(1024px, calc(100% - 32px));
  min-height: 52px;
  margin: 16px auto 0;
  padding: 3px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: #141414e6;
}

@supports (backdrop-filter: blur(8px)) {
  .site-nav {
    background: #14141499;
    backdrop-filter: blur(8px);
  }
}

.brand, .site-nav nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  transition: color .2s;
}

.brand { gap: 5px; font-size: 20px; font-weight: 700; letter-spacing: -.7px; }
.site-nav nav a { color: #b9b7b7; font-size: 16px; font-weight: 600; }
.site-nav a:hover, .help a:hover { color: var(--accent); }

main {
  display: grid;
  place-items: center;
  padding: 48px 16px;
}

.auth {
  width: min(100%, 350px);
}

h1 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.2;
}

.intro { margin: 0 0 34px; color: var(--muted); font-size: 13px; }

label {
  display: block;
  margin-bottom: 5px;
  color: #cbc8c9;
  font-size: 13px;
  font-weight: 500;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #ffffff24;
  border-radius: 8px;
  background: #1d1b1c;
  color: var(--text);
  font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  border-color: #827d81;
  outline: 1px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px #ffffff0b;
}

@media (forced-colors: active) {
  input:focus { outline-color: Highlight; }
}
.username-field {
  position: relative;
  margin-bottom: 17px;
}

#username { display: block; }

.typing-preview {
  position: absolute;
  inset: 1px 14px;
  display: flex;
  align-items: center;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  font-size: 16px;
  white-space: pre;
}

#typing-text { flex: none; }
.typing-letter { display: inline-block; }

#username.is-typing {
  color: transparent;
  caret-color: var(--text);
}

#username.is-typing + .typing-preview { visibility: visible; }
.password-field { position: relative; }
.password-field input { padding-right: 51px; }
.password-field input::-ms-reveal { display: none; }

#toggle-password {
  position: absolute;
  inset: 2px 3px 2px auto;
  width: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

#toggle-password:hover { color: var(--text); }
#toggle-password:focus-visible { outline-offset: 0; }
#toggle-password svg { transform-origin: center; }
.eye-closed, #password[type='text'] + button .eye-open { display: none; }
#password[type='text'] + button .eye-closed { display: inline; }
.error { margin: 10px 0 0; color: #ff9f98; font-size: 13px; }
.error:empty { margin: 0; }

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f3f1ec;
  color: #141313;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s;
}

.submit-arrow { font-size: 15px; line-height: 1; }
.submit:disabled .submit-arrow { display: none; }
.submit:hover:not(:disabled) { background: #fff; }
.submit:disabled { cursor: wait; opacity: .75; }

.help {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid #ffffff10;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.help a { color: var(--text); font-weight: 600; transition: color .2s; }
footer { padding: 0 16px 24px; color: var(--muted); text-align: center; font-size: 12px; }

@media (min-width: 701px) and (min-height: 650px) {
  main { padding-bottom: 88px; }
}

@media (max-width: 520px) {
  .site-nav { padding-inline: 14px; }
  .site-nav nav a { font-size: 14px; }
  h1 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100% - 40px);width:max-content;background:#28201d;border:1px solid #a46b5040;padding:12px 20px;border-radius:10px;color:#eee0d6;font-size:12px;z-index:30}.toast:empty{display:none}
