/* ═══════════════════════════════════════════
   UNIFIED AUTH — STYLES
   ═══════════════════════════════════════════ */

/* ─── Login Overlay ─── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg, #faf7f2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

[data-theme="dark"] .auth-overlay {
  background: var(--bg, #1a1612);
}

.auth-card {
  background: var(--bg-card, #fff);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  max-width: 400px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.auth-card__icon {
  font-size: 3rem;
  margin-bottom: .25rem;
}

.auth-card__title {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text, #3b2f2f);
}

.auth-card__sub {
  font-size: .9rem;
  color: var(--text-muted, #9a8a7d);
  margin-bottom: .5rem;
}

.auth-input {
  padding: .7rem .9rem;
  border: 1.5px solid var(--border, #e8ddd2);
  border-radius: 12px;
  background: var(--bg, #faf7f2);
  color: var(--text, #3b2f2f);
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: .9rem;
  width: 100%;
  transition: border-color .25s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent, #c9a96e);
}

.auth-btn {
  padding: .75rem 1.5rem;
  background: var(--accent, #c9a96e);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .25s;
  width: 100%;
}

.auth-btn:hover { opacity: .85; }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }

.auth-error {
  color: #e74c3c;
  font-size: .82rem;
  margin-top: .25rem;
}

.auth-back {
  font-size: .82rem;
  color: var(--text-muted, #9a8a7d);
  text-decoration: none;
  margin-top: .5rem;
  transition: color .2s;
}
.auth-back:hover { color: var(--accent, #c9a96e); }

/* ─── User Bar (public pages, bottom-left) ─── */
.auth-bar {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 100;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e8ddd2);
  border-radius: 999px;
  padding: .35rem .75rem .35rem .35rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  font-family: var(--font-sans, "Outfit", sans-serif);
  transition: background .25s, border-color .25s;
}

.auth-bar__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent, #c9a96e);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-bar__name {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text, #3b2f2f);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-bar__logout {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s;
  padding: 0;
  line-height: 1;
}
.auth-bar__logout:hover { opacity: 1; }

/* ═══════════════════════════════════════════
   HOME AUTH (index.html — inline section)
   ═══════════════════════════════════════════ */

.auth-home {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--clr-card, #fff);
  border: 1px solid var(--clr-border, #e8ddd2);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ─ Login form ─ */
.auth-home--login { text-align: center; }

.auth-home__title {
  font-family: var(--ff-serif, "Cormorant Garamond", serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-heading, #3b2f2f);
  margin: 0 0 .25rem;
}

.auth-home__sub {
  font-size: .82rem;
  color: var(--clr-text-soft, #9a8a7d);
  margin: 0 0 1rem;
}

.auth-home__oauth {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .75rem;
}

.auth-home__oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border: 1.5px solid var(--clr-border, #e8ddd2);
  border-radius: 10px;
  background: var(--clr-card, #fff);
  color: var(--clr-heading, #3b2f2f);
  font-family: var(--ff-sans, "Outfit", sans-serif);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  width: 100%;
}

.auth-home__oauth-btn:hover {
  background: var(--clr-bg, #faf7f2);
  border-color: var(--clr-accent, #c9a96e);
}

.auth-home__oauth-icon {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4285f4;
}

.auth-home__oauth-btn:last-child .auth-home__oauth-icon { color: inherit; }

.auth-home__divider {
  font-size: .75rem;
  color: var(--clr-text-soft, #9a8a7d);
  margin: 0 0 .75rem;
}

.auth-home__switch {
  background: none;
  border: none;
  font-size: .8rem;
  color: var(--clr-accent, #c9a96e);
  cursor: pointer;
  padding: .35rem 0;
  font-family: var(--ff-sans, "Outfit", sans-serif);
  text-decoration: underline;
  transition: opacity .2s;
}

.auth-home__switch:hover { opacity: .85; }

.auth-home__form {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.auth-home__form--signup .auth-home__switch,
.auth-home__form--login .auth-home__switch {
  margin-top: .25rem;
}

.auth-home__row {
  display: flex;
  gap: .45rem;
}
.auth-home__row > * {
  flex: 1;
  min-width: 0;
}

.auth-home__input {
  padding: .6rem .85rem;
  border: 1.5px solid var(--clr-border, #e8ddd2);
  border-radius: 10px;
  background: var(--clr-bg, #faf7f2);
  color: var(--clr-text, #3b2f2f);
  font-family: var(--ff-sans, "Outfit", sans-serif);
  font-size: .88rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .25s;
}

.auth-home__input:focus {
  outline: none;
  border-color: var(--clr-accent, #c9a96e);
}

.auth-home__btn {
  padding: .65rem 1.25rem;
  background: var(--clr-accent, #c9a96e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--ff-sans, "Outfit", sans-serif);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .25s;
  width: 100%;
}

.auth-home__btn:hover { opacity: .85; }
.auth-home__btn:disabled { opacity: .5; cursor: not-allowed; }

.auth-home__error {
  color: #e74c3c;
  font-size: .8rem;
  margin-top: .4rem;
}

/* ─ Profile card ─ */
.auth-home--profile {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.auth-home__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-accent, #c9a96e);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-home__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.auth-home__name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--clr-heading, #3b2f2f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-home__email {
  font-size: .78rem;
  color: var(--clr-text-soft, #9a8a7d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-home__logout {
  background: none;
  border: 1px solid var(--clr-border, #e8ddd2);
  border-radius: 8px;
  padding: .4rem .75rem;
  font-size: .78rem;
  font-family: var(--ff-sans, "Outfit", sans-serif);
  color: var(--clr-text-soft, #9a8a7d);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.auth-home__logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

@media print {
  .auth-bar,
  .auth-home { display: none !important; }
}
