/* EasyLeasey auth page normalization
   Purpose: one focused, auth-only layer for /login, /signup, /tenant, and tenant portal guest login.
   This file is intentionally scoped to guest/auth screens so dashboard/app/mobile UI remains untouched. */

body.is-guest {
  --el-auth-bg: #f3f7ff;
  --el-auth-card: rgba(255,255,255,.96);
  --el-auth-text: #0f172a;
  --el-auth-muted: #64748b;
  --el-auth-border: rgba(148,163,184,.24);
  --el-auth-shadow: 0 28px 80px rgba(15,23,42,.16);
}

body.is-guest .app-shell {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 30%),
              linear-gradient(135deg, #eef4ff 0%, #f8fafc 48%, #ffffff 100%);
}

body.is-guest .app-main {
  padding-top: 0;
}

body.is-guest .el-login-clean-shell {
  width: 100%;
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 4vw, 48px) 18px 34px;
  box-sizing: border-box;
}

body.is-guest .el-login-clean-card,
body.is-guest .app-main > .card[style*="max-width:520px"] {
  width: min(520px, 100%);
  background: var(--el-auth-card);
  border: 1px solid var(--el-auth-border);
  border-radius: 28px;
  box-shadow: var(--el-auth-shadow);
  color: var(--el-auth-text);
}

body.is-guest .el-login-clean-card {
  padding: clamp(24px, 4vw, 34px);
}

body.is-guest .el-login-clean-card--signup {
  width: min(620px, 100%);
}

body.is-guest .el-login-clean-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

body.is-guest .el-login-clean-logo img {
  max-width: 220px;
  width: auto;
  height: auto;
  max-height: 70px;
  object-fit: contain;
}

body.is-guest .el-login-clean-head {
  text-align: center;
  margin-bottom: 20px;
}

body.is-guest .el-login-clean-head h1 {
  margin: 6px 0 8px;
  color: var(--el-auth-text);
  line-height: 1.08;
}

body.is-guest .el-login-clean-head p,
body.is-guest .el-login-clean-links,
body.is-guest .p {
  color: var(--el-auth-muted);
}

body.is-guest .el-login-clean-form .input,
body.is-guest .form-stack .input,
body.is-guest input[type="email"],
body.is-guest input[type="password"],
body.is-guest input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

body.is-guest .auth-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

body.is-guest .auth-action-row--split {
  justify-content: space-between;
}

body.is-guest .auth-action-row--end {
  justify-content: flex-end;
}

body.is-guest .auth-submit {
  min-width: 132px;
}

body.is-guest .el-login-clean-links,
body.is-guest .tenant-login-outside-card {
  text-align: center;
}

body.is-guest .tenant-login-outside-card {
  margin-top: 16px;
}

body.is-guest .cf-turnstile,
body.is-guest .turnstile,
body.is-guest .login-turnstile {
  display: flex;
  justify-content: center;
  margin: 14px 0;
  max-width: 100%;
  overflow: hidden;
}

/* Tenant portal fallback guest login still uses older page-head/card markup. Normalize it without touching authenticated tenant portal pages. */
body.is-guest .page-head {
  margin: 0;
  padding: 24px 18px 6px;
}

body.is-guest .page-head-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

body.is-guest .app-main > .card[style*="max-width:520px"] {
  margin-top: 18px !important;
  padding: clamp(22px, 4vw, 30px);
}

@media (max-width: 820px) {
  body.is-guest .app-main {
    padding-bottom: 0 !important;
  }

  body.is-guest .el-login-clean-shell {
    min-height: calc(100vh - 76px);
    align-items: flex-start;
    padding: 18px 14px 26px;
  }

  body.is-guest .el-login-clean-card,
  body.is-guest .app-main > .card[style*="max-width:520px"] {
    border-radius: 24px;
  }

  body.is-guest .auth-action-row,
  body.is-guest .auth-action-row--split,
  body.is-guest .auth-action-row--end {
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
  }

  body.is-guest .auth-remember {
    justify-content: center;
  }

  body.is-guest .auth-submit,
  body.is-guest .auth-action-row .btn {
    width: 100%;
  }
}
