:root {
  color-scheme: light;
  --ink: #283236;
  --muted: rgba(40, 50, 54, 0.48);
  --line: rgba(255, 255, 255, 0.48);
  --glass: rgba(247, 252, 250, 0.18);
  --glass-strong: rgba(255, 255, 255, 0.42);
  --gold: #d8ad61;
  --gold-deep: #b98a3e;
  --gold-soft: #f0d38a;
  --shadow: 0 24px 62px rgba(12, 27, 32, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: #d7e4e5;
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.access-page {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(22px, 4vw, 56px);
  overflow: hidden;
  isolation: isolate;
}

.access-page::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 22, 27, 0.74) 0%, rgba(5, 22, 27, 0.2) 42%, rgba(5, 22, 27, 0.03) 100%),
    linear-gradient(180deg, rgba(230, 243, 244, 0.16) 0%, rgba(230, 243, 244, 0) 48%, rgba(5, 20, 24, 0.32) 100%),
    url("./downloads/bravada-mirrorlake-background.jpg") center / cover no-repeat;
  content: "";
  transform: scale(1.015);
  z-index: 0;
}

.access-page::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 17%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(4, 17, 20, 0.16));
  content: "";
  pointer-events: none;
  z-index: 1;
}

.login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(100%, 306px);
  min-height: 516px;
  align-content: start;
  padding: 60px 28px 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px) saturate(1.02);
  -webkit-backdrop-filter: blur(2px) saturate(1.02);
  overflow: hidden;
}

.login-panel::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.16), transparent 48%),
    radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.08), transparent 35%);
  content: "";
  pointer-events: none;
}

.login-panel > * {
  position: relative;
}

.panel-header {
  display: grid;
  justify-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.panel-header h1 {
  margin: 0;
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.72);
}

.title-ornament {
  position: relative;
  width: 64px;
  height: 10px;
}

.title-ornament::before,
.title-ornament::after {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 139, 70, 0.72));
  content: "";
}

.title-ornament::before {
  left: 0;
}

.title-ornament::after {
  right: 0;
  transform: rotate(180deg);
}

.title-ornament {
  background:
    linear-gradient(45deg, transparent 41%, rgba(184, 139, 70, 0.85) 42% 58%, transparent 59%) center / 10px 10px no-repeat;
}

.route-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 44px;
  margin-bottom: 22px;
  border: 1px solid rgba(186, 177, 157, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 9px 22px rgba(36, 55, 58, 0.08);
  overflow: hidden;
}

.route-tab {
  min-width: 0;
  border: 0;
  color: rgba(32, 41, 44, 0.72);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  transition:
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.route-tab + .route-tab {
  border-left: 1px solid rgba(137, 121, 101, 0.22);
}

.route-tab.is-active {
  color: #273136;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.9), rgba(244, 233, 207, 0.64));
  box-shadow:
    inset 0 0 0 1px rgba(218, 173, 97, 0.46),
    0 9px 18px rgba(197, 148, 70, 0.12);
}

.route-tab:focus-visible,
.password-field:focus-within,
.submit-button:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid rgba(216, 173, 97, 0.24);
  outline-offset: 3px;
}

.login-form {
  display: grid;
}

.password-field {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  align-items: center;
  height: 54px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(202, 212, 210, 0.5);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 25px rgba(28, 50, 55, 0.08);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.password-field[hidden] {
  display: none;
}

.password-field:focus-within {
  border-color: rgba(204, 157, 83, 0.66);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 4px rgba(216, 173, 97, 0.15),
    0 13px 28px rgba(28, 50, 55, 0.08);
}

.password-field.has-error {
  border-color: rgba(172, 70, 60, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 4px rgba(172, 70, 60, 0.1),
    0 13px 28px rgba(28, 50, 55, 0.08);
}

.field-icon,
.password-toggle {
  display: grid;
  place-items: center;
  color: rgba(70, 80, 84, 0.42);
}

.field-icon svg,
.password-toggle svg,
.security-note svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

input {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0;
  color: #273136;
  background: transparent;
  outline: 0;
}

input::placeholder {
  color: rgba(69, 80, 84, 0.35);
}

.password-toggle {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.password-toggle:hover {
  color: rgba(70, 80, 84, 0.7);
  background: rgba(255, 255, 255, 0.48);
}

.submit-button {
  height: 50px;
  margin-top: 11px;
  border: 0;
  border-radius: 7px;
  color: rgba(40, 38, 31, 0.86);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 16px 30px rgba(155, 109, 47, 0.18);
  font-size: 15px;
  font-weight: 600;
  transition:
    filter 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.submit-button:hover {
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 18px 34px rgba(155, 109, 47, 0.22);
}

.submit-button:active {
  transform: translateY(1px);
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 22px;
  margin: 33px 0 0;
  color: rgba(54, 63, 66, 0.44);
  font-size: 13px;
}

.form-message {
  min-height: 20px;
  margin: 9px 0 0;
  color: rgba(54, 63, 66, 0.62);
  font-size: 13px;
  text-align: center;
}

.form-message[data-tone="error"] {
  color: rgba(154, 54, 46, 0.86);
}

.site-footer {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: rgba(235, 241, 239, 0.68);
  font-size: 12px;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

.site-footer a:hover {
  color: #fff7dd;
}

@media (max-width: 720px) {
  .access-page {
    align-items: center;
    padding: 24px 18px 54px;
  }

  .access-page::before {
    background:
      linear-gradient(180deg, rgba(5, 22, 27, 0.34) 0%, rgba(5, 22, 27, 0.06) 42%, rgba(5, 20, 24, 0.45) 100%),
      url("./downloads/bravada-mirrorlake-background.jpg") center / cover no-repeat;
  }

  .login-panel {
    width: min(100%, 342px);
    min-height: 540px;
    padding: 52px 26px 36px;
  }

  .panel-header {
    margin-bottom: 36px;
  }

  .panel-header h1 {
    font-size: 26px;
  }

  .route-switch {
    height: 44px;
    margin-bottom: 22px;
  }

  .password-field,
  .submit-button {
    height: 54px;
  }

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

  .security-note {
    margin-top: 32px;
  }
}

@media (max-height: 720px) and (min-width: 721px) {
  .login-panel {
    min-height: 520px;
    padding-top: 48px;
  }

  .panel-header {
    margin-bottom: 34px;
  }

  .route-switch {
    margin-bottom: 22px;
  }

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

  .security-note {
    margin-top: 28px;
  }
}
