/* ── SNL REAL ESTATE — LOGIN PAGE ────────────────────── */

body.auth-body {
  background: var(--black);
  min-height: 100vh;
  overflow: hidden;
}

/* ── SPLIT LAYOUT ───────────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT: Brand panel ──────────────────────────────── */
.auth-panel-brand {
  background: var(--black);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  overflow: hidden;
}

/* Subtle grey ambient glow */
.auth-panel-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 35%, rgba(122,122,122,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 85% 75%, rgba(122,122,122,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Right-edge separator line */
.auth-panel-brand::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 0;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
  pointer-events: none;
}

.auth-brand-top,
.auth-brand-mid,
.auth-brand-footer {
  position: relative;
  z-index: 1;
}

.auth-logo {
  margin-bottom: 0.3rem;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
}

.brand-logo-auth {
  height: 116px;
  filter: brightness(0) invert(1) drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.auth-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.auth-brand-divider {
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.28);
  margin-bottom: 1.75rem;
}

.auth-brand-copy {
  font-size: 0.88rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.45);
  max-width: 300px;
  margin-bottom: 1rem;
}

.auth-brand-line {
  margin-bottom: 2.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.66);
  font-weight: 500;
}

.auth-brand-stats {
  display: flex;
  gap: 2rem;
}

.auth-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.auth-stat-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
}

.auth-stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* Large watermark text */
.auth-brand-watermark {
  position: absolute;
  bottom: -1.5rem;
  left: -0.5rem;
  font-family: var(--serif);
  font-size: clamp(8rem, 14vw, 13rem);
  font-weight: 300;
  color: rgba(255,255,255,0.025);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.auth-back {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--white); }

.auth-brand-footer {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.auth-back-cta {
  color: rgba(255,255,255,0.7);
}

/* ── RIGHT: Form panel ──────────────────────────────── */
.auth-panel-form {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 4.5rem;
  position: relative;
}

.auth-form-inner {
  width: 100%;
  max-width: 380px;
}

.auth-form-tag {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.auth-title {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--black);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.auth-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ── PORTAL TOGGLE ──────────────────────────────────── */
.portal-toggle {
  display: flex;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.portal-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.portal-tab + .portal-tab {
  border-left: 1px solid var(--border);
}

.portal-tab:hover:not(.active) {
  color: var(--dark);
  background: var(--cream);
}

.portal-tab[data-portal="client"].active {
  background: var(--black);
  color: var(--white);
}

.portal-tab[data-portal="admin"].active {
  background: var(--black);
  color: var(--white);
}

/* Admin note below form */
.auth-admin-note {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.auth-admin-icon {
  color: var(--black);
  font-size: 0.8rem;
}

/* Admin portal button variant */
.btn-auth {
  width: 100%;
  justify-content: center;
  padding: 1rem 2rem;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  background: var(--black);
  color: var(--white);
  transition: background 0.25s ease;
}

.btn-auth:hover {
  background: #2A2A2A;
}

.btn-auth-admin {
  background: var(--black);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.14);
}

.btn-auth-admin:hover {
  background: #2A2A2A;
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}

/* Admin portal panel tint */
.auth-panel-form[data-portal="admin"] {
  background: #fafafa;
}

/* ── FIELDS ─────────────────────────────────────────── */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.55rem;
}

.field input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--black);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: #C8C4BF;
}

.field input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(8,8,8,0.05);
}

/* ── ERROR ──────────────────────────────────────────── */
.auth-error {
  background: rgba(176,48,32,0.04);
  border: 1px solid rgba(176,48,32,0.22);
  border-left: 3px solid var(--hot);
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
  color: var(--hot);
  margin-bottom: 1.5rem;
  display: none;
}
.auth-error.show { display: block; }

/* ── SUBMIT BUTTON ──────────────────────────────────── */

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-split {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  body.auth-body {
    overflow: auto;
  }

  .auth-panel-brand {
    padding: 2rem 1.75rem 2rem;
    min-height: 0;
    gap: 1.5rem;
  }

  .auth-brand-mid { display: none; }
  .auth-brand-watermark { display: none; }
  .auth-panel-brand::after { display: none; }

  .auth-panel-form {
    padding: 2.5rem 1.75rem 3rem;
  }
}

/* ── ALREADY SIGNED IN BANNER ─────────────────────────── */
.auth-session-banner {
  background: rgba(32,112,80,0.07);
  border: 1px solid rgba(32,112,80,0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-session-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-session-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(32,112,80,0.12);
  border: 1px solid rgba(32,112,80,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--success);
  flex-shrink: 0;
}

.auth-session-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--dark);
}

.auth-session-role {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.auth-session-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── CLIENT PORTAL "NOT ME" TOPBAR ELEMENT ─────────────── */
.topbar-signed-in-as {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-signed-in-as strong {
  color: var(--dark);
  font-weight: 500;
}

.topbar-not-me {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--hot);
  text-decoration: underline;
  padding: 0;
  font-family: var(--sans);
}

.topbar-not-me:hover {
  opacity: 0.75;
}
