:root {
  --bg: #060a10;
  --panel: rgba(10, 15, 23, .82);
  --panel-solid: #0c121c;
  --line: rgba(214, 184, 123, .2);
  --line-strong: rgba(214, 184, 123, .44);
  --text: #ece7db;
  --muted: #9e9b91;
  --gold: #e1b66b;
  --gold-bright: #f3d08b;
  --danger: #e08b7e;
  --ok: #84c59a;
  --serif: Georgia, "Times New Roman", "Palatino Linotype", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: rgba(225, 182, 107, .28); }

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #050810;
}
.auth-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.03);
}
.auth-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(6, 10, 16, .18), rgba(6, 10, 16, .72) 76%),
    linear-gradient(0deg, var(--bg) 0%, rgba(6, 10, 16, .32) 45%, rgba(6, 10, 16, .58) 100%),
    linear-gradient(90deg, rgba(6, 10, 16, .52), transparent 30%, transparent 70%, rgba(6, 10, 16, .52));
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px clamp(18px, 4vw, 48px);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 19px;
}
.auth-brand em { color: var(--gold); font-style: normal; }
.brand-emblem {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.back-link {
  color: #c9c4b7;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}
.back-link:hover { color: var(--gold); border-bottom-color: var(--line-strong); }
.back-link span { display: inline-block; margin-left: 5px; }

.auth-main {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding: 22px 18px 42px;
}
.auth-card {
  width: min(460px, 100%);
  padding: 30px 34px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(17, 25, 36, .92), rgba(8, 12, 19, .94));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .025) inset,
    0 0 70px rgba(225, 182, 107, .05);
  backdrop-filter: blur(10px);
  text-align: center;
}
.auth-emblem {
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 30px rgba(225, 182, 107, .12);
}
.auth-emblem img { width: 100%; height: 100%; object-fit: cover; }
.auth-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.035em;
}
.auth-card h1 span { color: var(--gold); font-style: italic; }
.auth-tagline {
  margin: 12px 0 22px;
  color: #bdb8ab;
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(4, 8, 13, .45);
}
.auth-tab {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #9e9b91;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-tab.is-active {
  color: #171006;
  background: linear-gradient(135deg, #d9a95d, #f0cc83 52%, #b9853e);
  box-shadow: 0 4px 18px rgba(225, 182, 107, .16);
}
.auth-tab:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

.field { display: block; margin: 0 0 14px; text-align: left; }
.field > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: #b9b4a7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(3, 7, 12, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 2px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(225, 182, 107, .08);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #0b111a inset;
}
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 46px; }
.eye {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #8c897f;
  font-size: 15px;
  line-height: 1;
}
.eye:hover { color: var(--gold); }

.form-error {
  min-height: 18px;
  margin: 2px 0 12px;
  color: var(--danger);
  font-size: 12px;
  text-align: left;
}
.form-error.is-ok { color: var(--ok); }
.auth-submit {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: linear-gradient(135deg, #d9a95d, #f0cc83 52%, #b9853e);
  color: #171006;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(225, 182, 107, .16);
  transition: filter .2s ease, transform .2s ease;
}
.auth-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.auth-submit:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.auth-hint { margin: 18px 0 0; color: #87847b; font-size: 12px; }
.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: inherit;
  border-bottom: 1px solid var(--line-strong);
}
.auth-alt { margin-top: 14px; color: #b9b4a7; font-size: 12px; }
.text-link { color: var(--gold); margin-left: 4px; border-bottom: 1px solid var(--line-strong); }
.auth-footnote {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #6f6d66;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 4vw, 48px) 22px;
  color: #6f6d66;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-footer a:hover { color: var(--gold); }

@media (max-width: 520px) {
  .auth-header { padding: 16px 16px; }
  .auth-brand { font-size: 16px; }
  .brand-emblem { width: 30px; height: 30px; }
  .back-link { font-size: 10px; }
  .auth-main { padding: 8px 12px 26px; }
  .auth-card { padding: 24px 20px 22px; }
  .auth-card h1 { font-size: 38px; }
  .auth-emblem { width: 72px; height: 72px; }
  .auth-tagline { font-size: 14px; }
  .auth-footer { padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
