:root {
  --ink-0: #f6f3ec;
  --ink-1: #d4d8e3;
  --ink-2: #9ca8bf;
  --base-0: #08131f;
  --base-1: #12283e;
  --base-2: #0f4454;
  --brand-gold: #f5b867;
  --brand-coral: #ff8f78;
  --line: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Urbanist", sans-serif;
  color: var(--ink-0);
  background:
    radial-gradient(900px 650px at 8% 6%, rgba(245, 184, 103, 0.2), transparent 48%),
    radial-gradient(850px 650px at 95% -4%, rgba(255, 143, 120, 0.18), transparent 42%),
    linear-gradient(145deg, var(--base-0), var(--base-1) 55%, var(--base-2));
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
}

.blob {
  position: fixed;
  border-radius: 999px;
  filter: blur(66px);
  opacity: 0.34;
  pointer-events: none;
  z-index: -2;
}

.blob-left {
  width: 320px;
  height: 320px;
  left: -90px;
  top: 100px;
  background: var(--brand-gold);
}

.blob-right {
  width: 280px;
  height: 280px;
  right: -70px;
  bottom: 140px;
  background: var(--brand-coral);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

.login-shell {
  width: min(1080px, 95vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(11, 21, 34, 0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 50px rgba(2, 8, 14, 0.45);
}

.brand-panel,
.form-panel {
  padding: 34px;
}

.brand-panel {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14rem;
  font-size: 0.76rem;
  color: #9ce7d4;
  font-weight: 700;
}

.brand-lockup {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-0);
}

.brand-lockup:focus-visible {
  outline: 2px solid rgba(156, 231, 212, 0.8);
  outline-offset: 2px;
  border-radius: 10px;
}

.logo-glyph {
  width: 38px;
  height: 38px;
  display: inline-block;
  filter: drop-shadow(0 8px 14px rgba(245, 184, 103, 0.22));
}

.logo-glyph img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  letter-spacing: 0.04rem;
}

.brand-copy small {
  color: var(--ink-2);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.11rem;
}

h1,
h2 {
  font-family: "Cinzel", serif;
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
}

.brand-panel p {
  color: var(--ink-1);
  line-height: 1.55;
}

.brand-panel ul {
  margin: 14px 0 20px;
  padding-left: 18px;
  color: var(--ink-1);
}

.brand-panel li {
  margin-bottom: 7px;
}

.back-link {
  color: var(--ink-0);
  text-underline-offset: 4px;
}

.form-panel h2 {
  margin-bottom: 8px;
}

.subhead {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--ink-2);
}

form {
  display: grid;
  gap: 10px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-size: 0.9rem;
  color: var(--ink-1);
}

input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  color: var(--ink-0);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(245, 184, 103, 0.5);
  border-color: rgba(245, 184, 103, 0.8);
}

input.invalid {
  border-color: rgba(255, 143, 120, 0.88);
  outline: 2px solid rgba(255, 143, 120, 0.3);
}

.field-error {
  margin: 0;
  min-height: 1rem;
  color: #ffb2a6;
  font-size: 0.8rem;
}

.password-row,
.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.copy-row input[readonly] {
  font-size: 12px;
  word-break: break-all;
  cursor: text;
  opacity: 0.8;
}

.toggle-password {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-0);
  font: inherit;
  font-weight: 600;
  padding: 11px 12px;
  cursor: pointer;
}

.toggle-advanced {
  margin-top: 4px;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #f6d5a6;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.advanced {
  display: grid;
  gap: 8px;
}

.hidden {
  display: none;
}

.actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-solid,
.btn-ghost {
  border-radius: 12px;
  padding: 11px 16px;
  text-decoration: none;
  font-weight: 700;
  font-family: inherit;
}

.btn-solid {
  border: 0;
  color: #20180f;
  cursor: pointer;
  background: linear-gradient(100deg, var(--brand-gold), #ffd08f);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink-0);
  background: rgba(255, 255, 255, 0.05);
}

.status {
  min-height: 1.5rem;
  margin-top: 12px;
  font-weight: 600;
  color: #f6d5a6;
}

.forgot-link {
  margin: 10px 0 0;
  text-align: right;
  font-size: 13px;
}
.forgot-link a {
  color: rgba(245,184,103,0.75);
  text-decoration: none;
}
.forgot-link a:hover { text-decoration: underline; }

.status.error {
  color: #ffb2a6;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-panel,
  .form-panel {
    padding: 24px;
  }
}
