/* ==========================================================================
   hoe.com — Auth pages (login / register / recover)
   Standalone stylesheet. Reuses the design tokens defined in styles.css
   (--tb-* custom properties) so light/dark themes work automatically.
   No inline CSS anywhere; styles.css is never modified.
   ========================================================================== */

.auth { padding: 44px 0 72px; }

.auth__inner {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  max-width: 1040px;
  margin: 0 auto;
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  overflow: hidden;
  box-shadow: var(--tb-shadow);
}

/* -- Media side -- */
.auth__media {
  position: relative;
  min-height: 100%;
  background: radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, .28), transparent 50%),
              linear-gradient(150deg, #84b86a, #34571f);
}
.auth__media-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.auth__media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 30, 14, .12) 0%, rgba(20, 30, 14, .72) 100%);
}
.auth__media-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: .6rem;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  color: #fff;
}
.auth__media-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .38rem .8rem; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.auth__media-content h2 {
  color: #fff;
  font-family: var(--tb-font-serif);
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.1rem);
  line-height: 1.12;
  margin: 0;
}
.auth__media-content p {
  color: rgba(255, 255, 255, .88);
  font-size: .92rem;
  margin: 0;
  max-width: 34ch;
}

/* -- Form side -- */
.auth__panel { padding: clamp(1.6rem, 3vw, 2.8rem); }
.auth__head { margin-bottom: 1.2rem; }
.auth__head h1 {
  font-family: var(--tb-font-serif);
  font-size: clamp(1.7rem, 1rem + 2vw, 2.3rem);
  margin: 0;
}
.auth__sub { color: var(--tb-ink-soft); margin: .35rem 0 0; font-size: .94rem; }

/* -- Social login -- */
.auth__social { display: grid; gap: .6rem; margin: 0 0 1.2rem; }
.auth__social-btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%;
  padding: .72rem 1rem;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: var(--tb-surface-2);
  color: var(--tb-ink);
  font-family: var(--tb-font-sans);
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  transition: background var(--tb-ease), border-color var(--tb-ease), transform var(--tb-ease);
}
.auth__social-btn:hover { background: var(--tb-bg-alt); transform: translateY(-1px); }
.auth__social-btn svg { flex: none; width: 18px; height: 18px; }
.auth__social-btn--facebook {
  background: #1877f2; border-color: #1877f2; color: #fff;
}
.auth__social-btn--facebook:hover { background: #166fe0; }

/* -- Divider -- */
.auth__divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--tb-ink-muted); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  margin: 1.1rem 0;
}
.auth__divider::before, .auth__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--tb-border);
}

/* -- Form -- */
.auth__form { display: flex; flex-direction: column; gap: 1rem; }
.auth__field { display: flex; flex-direction: column; gap: .35rem; }
.auth__field label {
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--tb-ink-soft);
}
.auth__req { color: var(--tb-clay); }
.auth__input-wrap { position: relative; }
.auth__input {
  width: 100%;
  border: 1px solid var(--tb-border);
  background: var(--tb-surface-2);
  color: var(--tb-ink);
  border-radius: var(--tb-radius-sm);
  padding: .72rem .9rem;
  font-size: .95rem;
  font-family: var(--tb-font-sans);
  outline: none;
  transition: border-color var(--tb-ease), box-shadow var(--tb-ease);
}
.auth__input::placeholder { color: var(--tb-ink-muted); }
.auth__input:focus {
  border-color: var(--tb-leaf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tb-leaf) 18%, transparent);
}
.auth__input.is-invalid { border-color: #d9534f; }
.auth__input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(217, 83, 79, .18); }

/* password show/hide */
.auth__field--pass .auth__input { padding-right: 2.8rem; }
.auth__toggle-pass {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--tb-ink-muted);
  cursor: pointer; padding: .35rem; display: grid; place-items: center;
  border-radius: 8px;
}
.auth__toggle-pass:hover { color: var(--tb-ink); background: var(--tb-bg-alt); }

/* inline field error */
.auth__error {
  font-size: .78rem; color: #d9534f; min-height: 1em;
  display: none;
}
.auth__error.show { display: block; }

/* -- Row: remember + forgot / helper text -- */
.auth__row {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  font-size: .85rem;
}
.auth__check { display: flex; align-items: center; gap: .45rem; color: var(--tb-ink-soft); cursor: pointer; }
.auth__check input { accent-color: var(--tb-forest); }
.auth__link { color: var(--tb-clay); font-weight: 600; white-space: nowrap; }
.auth__link:hover { text-decoration: underline; }
.auth__hint { color: var(--tb-ink-muted); font-size: .85rem; margin: -.2rem 0 .2rem; }

/* submit reuses .tb-btn .tb-btn--accent .tb-btn--block from styles.css */
.auth__submit { margin-top: .2rem; }

/* -- Foot switch link -- */
.auth__switch { margin-top: 1.3rem; text-align: center; font-size: .92rem; color: var(--tb-ink-soft); }
.auth__switch a { color: var(--tb-forest); font-weight: 700; }
.auth__switch a:hover { text-decoration: underline; }

/* -- Form-level message -- */
.auth__msg {
  margin-top: 1rem; padding: .75rem .95rem;
  border-radius: var(--tb-radius-sm); font-size: .88rem; font-weight: 500;
  display: none;
}
.auth__msg.show { display: block; }
.auth__msg--ok {
  background: color-mix(in srgb, var(--tb-leaf) 16%, transparent);
  color: var(--tb-forest);
  border: 1px solid color-mix(in srgb, var(--tb-leaf) 42%, transparent);
}
.auth__msg--err {
  background: rgba(217, 83, 79, .12);
  color: #b23b36;
  border: 1px solid rgba(217, 83, 79, .32);
}

/* -- View toggling (login <-> recover) -- */
[data-auth-view] { display: none; }
[data-auth-view].is-active { display: block; }

/* -- Responsive -- */
@media (max-width: 860px) {
  .auth { padding: 24px 0 48px; }
  .auth__inner { grid-template-columns: 1fr; max-width: 480px; }
  .auth__media { min-height: 168px; }
  .auth__media-content { justify-content: flex-end; }
  .auth__media-content p { display: none; }
}
@media (max-width: 420px) {
  .auth__panel { padding: 1.3rem 1.1rem 1.6rem; }
  .auth__row { flex-wrap: wrap; }
}
