:root {
  --cream: var(--cream-base);
  --paper: var(--surface-container-lowest);
  --ink: var(--cacao-deep);
  --muted: var(--on-surface-variant);
  --line: rgba(66, 50, 46, 0.16);
  --cocoa: var(--cacao-deep);
  --wine: var(--primary);
  --gold: var(--caramel-gold);
  --green: var(--success);
  --danger: var(--error);
  --shadow: var(--heritage-shadow-soft);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.auth-hero {
  min-height: 330px;
  color: #fff8ed;
  padding: 24px clamp(18px, 4vw, 48px) 44px;
  background:
    linear-gradient(90deg, rgba(31, 14, 9, 0.94), rgba(31, 14, 9, 0.52)),
    url("https://images.unsplash.com/photo-1541167760496-1628856ab772?auto=format&fit=crop&w=1800&q=85");
  background-position: center;
  background-size: cover;
}

.topnav,
.brand,
.session-actions,
.quick-actions {
  display: flex;
  align-items: center;
}

.topnav {
  justify-content: space-between;
  gap: 18px;
}

.brand,
.session-actions,
.quick-actions {
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--cocoa);
  font-size: 26px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #e9dac4;
}

.hero-copy {
  max-width: 760px;
  margin-top: 76px;
}

.hero-copy span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 12px 0 0;
  font-size: 64px;
  line-height: 0.98;
}

.hero-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  color: #efdfcb;
  font-size: 19px;
  line-height: 1.45;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 28px;
}

.auth-card,
.panel,
.notice,
.session-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.auth-card,
.panel,
.session-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.support-column {
  display: grid;
  gap: 16px;
}

.notice {
  border-left: 4px solid var(--green);
  padding: 13px 14px;
}

.notice.error {
  border-left-color: var(--danger);
}

h2,
p {
  margin: 0;
}

p,
label,
li {
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 9px 10px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #efe5d7;
  padding: 5px;
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tab.active {
  background: var(--paper);
  color: var(--wine);
  box-shadow: 0 8px 18px rgba(41, 25, 16, 0.08);
}

.primary-button,
.ghost-button,
.ghost-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  padding: 0 14px;
}

.primary-button {
  background: var(--primary);
  color: #fffaf2;
}

.ghost-button,
.ghost-link {
  border-color: var(--line);
  background: var(--secondary-container);
  color: var(--ink);
}

summary {
  cursor: pointer;
  color: var(--wine);
  font-weight: 800;
}

details form {
  margin-top: 14px;
}

ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .topnav,
  .quick-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h1 {
    font-size: 40px;
  }
}
