/* ═══════════════════════════════════════════════════════════════
   Auth pages — login & signup
   Split layout: left branding panel + right form panel
   Brand color driven by --auth-brand (injected per template from SiteConfig)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --auth-brand: #5e7257;
  --auth-brand-hover: #45533f;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Layout ──────────────────────────────────────────────────── */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Left panel — branding ───────────────────────────────────── */
.auth-left {
  position: relative;
  width: 42%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow: hidden;

  background:
    linear-gradient(160deg, rgba(0,0,0,.50) 0%, rgba(0,0,0,.25) 100%),
    repeating-linear-gradient(0deg,
      transparent, transparent 49px,
      rgba(255,255,255,.06) 49px, rgba(255,255,255,.06) 50px),
    repeating-linear-gradient(90deg,
      transparent, transparent 49px,
      rgba(255,255,255,.06) 49px, rgba(255,255,255,.06) 50px),
    var(--auth-brand);
}

/* Subtle diagonal lines */
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 28px,
    rgba(255,255,255,.025) 28px,
    rgba(255,255,255,.025) 29px
  );
  pointer-events: none;
}

/* Corner accent */
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.auth-brand-logo {
  max-height: 90px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1.75rem;
  filter: brightness(0) invert(1);
}

.auth-brand-logo.no-invert {
  filter: none;
}

.auth-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 .4rem;
  line-height: 1.25;
}

.auth-brand-sub {
  font-size: .82rem;
  opacity: .7;
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto;
}

/* Map pin icon decoration */
.auth-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

/* Tags at the bottom of left panel */
.auth-tags {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.auth-tag {
  font-size: .68rem;
  padding: .25em .7em;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.75);
  letter-spacing: .03em;
}

/* ── Right panel — form ──────────────────────────────────────── */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: #f8f9fb;
  overflow-y: auto;
}

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

.auth-form-box h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #111827;
  margin-bottom: .3rem;
}

.auth-form-box .auth-subtitle {
  font-size: .875rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* ── Form controls ───────────────────────────────────────────── */
.form-control {
  padding: .65rem 1rem;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid #d1d5db;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  background-color: #fff;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
  outline: none;
}

.input-group-text {
  border-radius: 8px 0 0 8px;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-right: none;
  color: #9ca3af;
}
.input-group .form-control {
  border-left: none;
  border-radius: 0 8px 8px 0;
}
.input-group:focus-within .input-group-text {
  border-color: var(--auth-brand);
  color: var(--auth-brand);
  background-color: #f3f4f6;
}

/* ── Button ──────────────────────────────────────────────────── */
.btn-custom {
  background-color: var(--auth-brand);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  width: 100%;
  border: none;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  letter-spacing: .01em;
}
.btn-custom:hover {
  background-color: var(--auth-brand-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.btn-custom:active {
  background-color: var(--auth-brand-hover);
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline-secondary {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background-color: #fff;
  color: #6b7280;
  padding: .5rem 1rem;
  font-size: .85rem;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-outline-secondary:hover {
  background-color: var(--auth-brand);
  border-color: var(--auth-brand);
  color: #fff;
}

/* ── Links ───────────────────────────────────────────────────── */
.auth-links {
  font-size: .875rem;
  margin-top: 1rem;
  text-align: center;
  color: #6b7280;
}
.auth-links a {
  text-decoration: none;
  color: var(--auth-brand);
  font-weight: 600;
}
.auth-links a:hover { text-decoration: underline; }

/* ── "Esqueci a senha" link ──────────────────────────────────── */
a[href*="recover"] {
  color: var(--auth-brand) !important;
}

/* ── Misc ────────────────────────────────────────────────────── */
.required::after { content: " *"; color: #ef4444; }
.invalid-tooltip-custom { display: none; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #d1d5db;
  font-size: .78rem;
  margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-left { display: none; }
  .auth-right { background: #fff; }
  .auth-form-box { max-width: 100%; }
  .auth-wrapper { flex-direction: column; }
}
