:root {
  color-scheme: dark;
  --text: #f4f3ef;
  --muted: #aaaead;
  --line: rgba(255, 255, 255, .16);
  --panel: rgba(19, 22, 22, .92);
  --field: #242828;
  --accent: #d8a558;
  --accent-strong: #edbd73;
  --success: #65b98a;
  --danger: #e89886;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #171a19 url("/assets/media-room.webp") center / cover fixed no-repeat;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(5, 7, 7, .34);
}

button,
input { font: inherit; }

button { color: inherit; }

.shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar,
footer {
  width: calc(100% - 72px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar { min-height: 84px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: rgba(12, 14, 14, .54);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent-strong);
}

.brand-name { font-size: 16px; font-weight: 650; }
.brand-name b { color: var(--muted); font-weight: 500; }

.service-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d3d6d4;
  font-size: 13px;
}

.service-state > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(101, 185, 138, .13);
}

.login-area {
  width: calc(100% - 72px);
  min-height: 620px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  padding: 42px 0 72px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
}

.intro {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.login-form { display: grid; }

.login-form > label,
.password-label label {
  margin-bottom: 8px;
  color: #dfe1df;
  font-size: 13px;
  font-weight: 600;
}

.password-label {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.password-label label { margin-bottom: 0; }

.link-button {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.link-button:hover,
.link-button:focus-visible { color: var(--text); }

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  outline: none;
  background: var(--field);
  color: var(--text);
  caret-color: var(--accent-strong);
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(237, 189, 115, .72);
  box-shadow: 0 0 0 3px rgba(216, 165, 88, .12);
}

.remember {
  margin: 18px 0 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted) !important;
  cursor: pointer;
  font-weight: 400 !important;
}

.remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.submit-button {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: #161715;
  cursor: pointer;
  font-weight: 700;
}

.submit-button:hover { background: var(--accent-strong); }
.submit-button:disabled { cursor: wait; opacity: .72; }
.arrow { font-size: 20px; line-height: 1; }

.message {
  min-height: 21px;
  margin: 13px 0 0;
  color: var(--danger);
  font-size: 13px;
}

footer {
  min-height: 72px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #bec1bf;
  font-size: 12px;
}

.not-found .login-area { justify-content: flex-start; }
.not-found .login-panel p:last-of-type { margin-bottom: 26px; color: var(--muted); }
.home-link { color: var(--accent-strong); font-weight: 650; text-decoration: none; }
.home-link:hover { text-decoration: underline; }

@media (max-width: 700px) {
  body { background-position: 66% center; background-attachment: scroll; }
  body::before { background: rgba(5, 7, 7, .56); }
  .topbar,
  .login-area,
  footer { width: calc(100% - 32px); }
  .topbar { min-height: 72px; }
  .service-state { font-size: 0; }
  .login-area { min-height: 540px; padding: 28px 0 46px; }
  .login-panel { padding: 28px 24px; }
  h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
