/* === Account link in main nav === */
.nav-menu .account-link {
  font-style: italic;
  opacity: 0.92;
}
.nav-menu .account-link:hover { opacity: 1; }

/* === Preview banner (anonymous user on /oils, /constituents) === */
.preview-banner {
  background: #1f1812;
  color: #f5f0e6;
  padding: 0;
}
.preview-banner .preview-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.preview-banner .preview-text {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  opacity: 0.92;
}
.preview-banner .preview-text .lang-en {
  display: inline-block;
  font-style: italic;
  opacity: 0.66;
  margin-left: 4px;
}
.preview-banner .preview-cta {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  padding: 7px 18px;
  border: 1px solid #f5f0e6;
  flex-shrink: 0;
  transition: transform 0.22s ease-out, background 0.18s;
}
.preview-banner .preview-cta:hover {
  transform: scale(1.04);
  background: rgba(245, 240, 230, 0.1);
}
@media (max-width: 540px) {
  .preview-banner .preview-inner { padding: 10px 18px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .preview-banner .preview-text { font-size: 12px; }
}

/* === Auth divider: "hoặc · or" between Google and form === */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 20px;
  gap: 14px;
  color: #1f1812;
  opacity: 0.55;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8d0c4;
}
.auth-divider span {
  font-family: 'EB Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* === CTA banner on home page === */
.home-cta {
  background: rgba(31, 24, 18, 0.04);
  border-top: 1px solid #1f1812;
  border-bottom: 1px solid #1f1812;
  padding: 36px 32px;
  margin: 0 auto;
  max-width: 1100px;
  text-align: center;
}
.home-cta h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: 0.005em;
  line-height: 1.2;
}
.home-cta h2 .en {
  display: block;
  font-style: italic;
  font-size: 0.6em;
  opacity: 0.75;
  margin-top: 4px;
  font-weight: 400;
}
.home-cta p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 22px;
  opacity: 0.88;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.home-cta p .lang-en {
  display: block;
  font-style: italic;
  opacity: 0.74;
  font-size: 14px;
  margin-top: 6px;
}
.home-cta .cta-buttons {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-cta .btn-primary,
.home-cta .btn-secondary {
  display: inline-block;
  padding: 12px 26px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.22s ease-out, background 0.18s;
  font-family: inherit;
}
.home-cta .btn-primary {
  background: #1f1812;
  color: #f5f0e6;
  border: 1px solid #1f1812;
}
.home-cta .btn-primary:hover { transform: scale(1.04); background: #3a2c20; }
.home-cta .btn-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid #1f1812;
}
.home-cta .btn-secondary:hover { transform: scale(1.04); background: rgba(31, 24, 18, 0.06); }

/* Hide CTA on home for logged-in users */
body.is-logged-in .home-cta { display: none; }

@media (max-width: 540px) {
  .home-cta { padding: 28px 22px; }
  .home-cta .cta-buttons { flex-direction: column; gap: 10px; width: 100%; }
  .home-cta .btn-primary, .home-cta .btn-secondary { width: 100%; box-sizing: border-box; }
}

/* === Auth pages (login, signup, profile) ===
   Quiet luxury, minimal, single-column centered. */

.auth-page {
  background: #f5f0e6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-page main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 80px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 12px;
}
.auth-card .en-mark {
  font-style: italic;
  font-size: 16px;
  opacity: 0.78;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 36px;
}

.auth-card .lede {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.88;
  margin: 0 0 32px;
}
.auth-card .lede .lang-en {
  display: block;
  font-style: italic;
  opacity: 0.78;
  font-size: 14px;
  margin-top: 4px;
}

/* === Google button === */
.auth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid #1f1812;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.22s ease-out, background 0.18s;
  color: inherit;
  border-radius: 2px;
}
.auth-google:hover { transform: scale(1.02); background: rgba(31, 24, 18, 0.06); }
.auth-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* === OR divider === */
.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}
.auth-or::before, .auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1f1812;
  opacity: 0.18;
}

/* === Form === */
.auth-form .field {
  margin: 0 0 16px;
}
.auth-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1f1812;
  color: inherit;
  outline: none;
  letter-spacing: 0.005em;
  box-sizing: border-box;
}
.auth-form input:focus {
  border-bottom-width: 2px;
  padding-bottom: 9px;
}

.auth-form button.primary {
  width: 100%;
  padding: 14px 18px;
  margin-top: 12px;
  background: #1f1812;
  color: #f5f0e6;
  border: none;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.22s ease-out, background 0.18s;
}
.auth-form button.primary:hover { transform: scale(1.02); background: #3a2c20; }
.auth-form button.primary:disabled { opacity: 0.5; cursor: wait; }

/* === Error + status === */
.auth-message {
  margin: 14px 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  border-left: 2px solid #1f1812;
  background: rgba(31, 24, 18, 0.05);
  display: none;
}
.auth-message.show { display: block; }
.auth-message.error { border-color: #993322; background: rgba(153, 51, 34, 0.07); color: #4a1810; }
.auth-message.success { border-color: #2d5230; background: rgba(45, 82, 48, 0.07); color: #1a2c1c; }

/* === Footer links === */
.auth-foot {
  margin-top: 28px;
  font-size: 13px;
  text-align: center;
  opacity: 0.85;
  line-height: 1.7;
}
.auth-foot a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.18s;
}
.auth-foot a:hover { opacity: 0.7; }
.auth-foot .sep { opacity: 0.5; margin: 0 8px; }

/* === Top nav (minimal for auth pages) === */
.auth-page nav.minimal {
  padding: 40px 24px 28px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(31, 24, 18, 0.08);
}
.auth-page nav.minimal .nav-logo {
  display: inline-flex;
  align-items: center;
  transition: transform 0.22s ease-out;
}
.auth-page nav.minimal .nav-logo:hover { transform: scale(1.04); }
.auth-page nav.minimal .nav-logo img {
  height: 144px;
  width: auto;
}
@media (max-width: 540px) {
  .auth-page nav.minimal { padding: 28px 18px 20px; }
  .auth-page nav.minimal .nav-logo img { height: 104px; }
}

/* === Profile page === */
.profile-summary {
  margin: 0 0 32px;
  padding: 22px 0;
  border-top: 1px solid #1f1812;
  border-bottom: 1px solid #e5dcce;
}
.profile-summary .row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 10px 0;
}
.profile-summary .label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  padding-top: 2px;
}
.profile-summary .value {
  font-size: 16px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.profile-actions button {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid #1f1812;
  background: transparent;
  cursor: pointer;
  transition: transform 0.22s ease-out, background 0.18s;
  color: inherit;
}
.profile-actions button:hover { transform: scale(1.02); }
.profile-actions button.danger {
  border-color: #993322;
  color: #993322;
}
.profile-actions button.danger:hover { background: rgba(153, 51, 34, 0.08); }

@media (max-width: 540px) {
  .auth-page main { padding: 32px 18px 60px; }
  .profile-summary .row { grid-template-columns: 1fr; gap: 4px; }
  .profile-summary .label { padding-top: 0; }
}
