body.saas-locked #sidebar,
body.saas-locked #main-content,
body.saas-locked #menu-toggle,
body.saas-locked #sidebar-overlay,
body.saas-locked .saas-account-bar { visibility: hidden; }
body.saas-subscription-required #sidebar,
body.saas-subscription-required #main-content,
body.saas-subscription-required #menu-toggle,
body.saas-subscription-required #sidebar-overlay,
body.saas-subscription-required .saas-account-bar { visibility: hidden; }

.saas-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(49,130,206,.22), transparent 34%),
    radial-gradient(circle at 85% 85%, rgba(99,179,237,.12), transparent 32%),
    #080b12;
}
.saas-auth-gate[hidden] { display: none; }
.saas-billing-gate { z-index: 19900; }
.saas-auth-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid rgba(99,179,237,.25);
  border-radius: 22px;
  background: rgba(15,19,29,.92);
  box-shadow: 0 24px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(18px);
}
.saas-auth-brand { font-size: 1.35rem; font-weight: 800; color: #f7fafc; }
.saas-auth-brand span { color: #63b3ed; }
.saas-auth-copy { margin: 10px 0 22px; color: rgba(226,232,240,.62); font-size: .86rem; line-height: 1.7; }
.saas-auth-field { display: grid; gap: 6px; margin-bottom: 14px; }
.saas-auth-field label { color: rgba(226,232,240,.64); font-size: .75rem; }
.saas-auth-field input {
  min-height: 46px;
  padding: 0 13px;
  color: #edf2f7;
  border: 1px solid rgba(99,179,237,.2);
  border-radius: 10px;
  background: #090d15;
  font-size: 16px;
}
.saas-auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.saas-auth-actions button { min-height: 44px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.saas-auth-primary { border: 0; color: white; background: linear-gradient(135deg,#2b6cb0,#4299e1); }
.saas-auth-secondary { color: #90cdf4; border: 1px solid rgba(99,179,237,.35); background: transparent; }
#saas-auth-status { min-height: 22px; margin-top: 14px; color: #f6ad55; font-size: .78rem; line-height: 1.5; }
#saas-auth-status[data-kind="error"] { color: #fc8181; }
#saas-auth-status[data-kind="success"] { color: #68d391; }
.saas-account-bar {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 36px);
  padding: 7px 9px;
  border: 1px solid rgba(99,179,237,.2);
  border-radius: 12px;
  background: rgba(11,15,23,.9);
  box-shadow: 0 10px 35px rgba(0,0,0,.36);
  backdrop-filter: blur(14px);
}
.saas-account-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd5e0; font-size: .72rem; }
.saas-account-bar button { padding: 6px 9px; border-radius: 7px; border: 1px solid rgba(99,179,237,.25); color: #90cdf4; background: transparent; font-size: .7rem; cursor: pointer; }
@media (max-width: 600px) {
  .saas-auth-card { padding: 24px 18px; border-radius: 18px; }
  .saas-auth-actions { grid-template-columns: 1fr; }
  .saas-account-bar { right: 8px; bottom: 8px; max-width: calc(100vw - 16px); }
  .saas-account-email { max-width: 120px; }
}
