:root {
  --auth-bg: #f7efe5;
  --auth-surface: rgba(255, 251, 247, 0.96);
  --auth-surface-strong: #ffffff;
  --auth-primary: #6a3720;
  --auth-primary-dark: #472114;
  --auth-accent: #c8a56a;
  --auth-accent-soft: rgba(200, 165, 106, 0.14);
  --auth-border: rgba(106, 55, 32, 0.12);
  --auth-text: #2c1a12;
  --auth-text-soft: #7b6154;
  --auth-danger: #9c3e39;
  --auth-shadow: 0 24px 60px rgba(71, 33, 20, 0.14);
  --auth-radius: 24px;
}

* {
  box-sizing: border-box;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Jost", sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top right, rgba(200, 165, 106, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(106, 55, 32, 0.1), transparent 24%),
    linear-gradient(180deg, #fbf4eb 0%, #f2e7d8 100%);
}

body.auth-body.has-site-chrome {
  display: block;
}

.login-page-main,
.profile-page-main {
  padding-top: 58px;
}

.auth-shell {
  width: min(100% - 24px, 440px);
  margin: 0 auto;
  padding: 16px 0 30px;
}

.auth-shell-wide {
  width: min(100% - 24px, 620px);
}

body.auth-body.has-site-chrome .auth-shell-wide {
  width: min(100% - 24px, 980px);
  padding-top: 0;
  padding-bottom: 40px;
}

body.auth-body.has-site-chrome .auth-shell {
  width: min(100% - 24px, 860px);
  padding-top: 0;
  padding-bottom: 40px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-logo,
.auth-toplink {
  color: var(--auth-primary-dark);
  text-decoration: none;
}

.auth-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-logo span {
  color: var(--auth-accent);
}

.auth-toplink {
  font-size: 0.92rem;
  font-weight: 500;
}

.auth-layout {
  display: block;
}

.auth-card {
  background: var(--auth-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
  max-width: 100%;
}

.auth-banner {
  min-height: 180px;
  padding: 22px 20px 20px;
  background: linear-gradient(145deg, var(--auth-primary-dark), var(--auth-primary) 62%, #8f5b38);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-kicker {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-banner h1 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 9vw, 3.1rem);
  line-height: 0.96;
  color: #f1d08f;
  text-shadow: 0 2px 18px rgba(36, 18, 10, 0.28);
}

.auth-banner p {
  margin: 0;
  color: rgba(255, 246, 230, 0.9);
  line-height: 1.6;
  font-size: 0.98rem;
}

.auth-panel {
  padding: 20px;
}

.auth-message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.94rem;
  line-height: 1.5;
  background: rgba(156, 62, 57, 0.09);
  border: 1px solid rgba(156, 62, 57, 0.14);
  color: var(--auth-danger);
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #efe2d2;
  margin-bottom: 18px;
}

.auth-switch-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: transparent;
  color: var(--auth-text-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-switch-btn.active {
  background: var(--auth-surface-strong);
  color: var(--auth-primary-dark);
  box-shadow: 0 10px 24px rgba(71, 33, 20, 0.08);
}

.auth-view {
  display: none;
}

.auth-view.active {
  display: block;
}

.auth-section-head {
  margin-bottom: 16px;
}

.auth-section-head h2 {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--auth-primary-dark);
}

.auth-section-head p {
  margin: 0;
  color: var(--auth-text-soft);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field-compact {
  gap: 6px;
}

.auth-field label {
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-primary);
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  padding: 14px 15px;
  background: var(--auth-surface-strong);
  color: var(--auth-text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  border-color: rgba(200, 165, 106, 0.96);
  box-shadow: 0 0 0 4px rgba(200, 165, 106, 0.14);
}

.auth-submit {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--auth-primary-dark), var(--auth-primary));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-submit:hover {
  background: linear-gradient(135deg, var(--auth-primary), #7e4829);
}

.auth-inline {
  margin-top: 16px;
  color: var(--auth-text-soft);
  font-size: 0.94rem;
  line-height: 1.6;
  text-align: center;
}

.auth-inline button,
.auth-inline a {
  border: 0;
  background: none;
  color: var(--auth-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.auth-note {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--auth-accent-soft);
  color: var(--auth-primary-dark);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-two-col {
  display: grid;
  gap: 14px;
}

.auth-reset-form {
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(106, 55, 32, 0.08);
}

@media (min-width: 640px) {
  .auth-shell {
    width: min(100% - 32px, 620px);
    padding-top: 20px;
  }

  .auth-shell-wide {
    width: min(100% - 40px, 760px);
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .login-page-main,
  .profile-page-main {
    padding-top: 48px;
  }

  body.auth-body.has-site-chrome .auth-shell-wide {
    width: min(100% - 20px, 760px);
    padding-top: 0;
  }

  body.auth-body.has-site-chrome .auth-shell {
    width: min(100% - 18px, 760px);
    padding-top: 0;
  }
}
