/* CastSight AI Revision 13.1 — startup and deployment layout hotfix */
.login-screen {
  min-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: clamp(18px, 3vh, 34px) 16px 28px !important;
}

.welcome-shell {
  width: min(100%, 610px) !important;
  min-height: auto !important;
  align-content: start !important;
}

.welcome-brand {
  margin: 0 0 clamp(12px, 2vh, 22px) !important;
}

.welcome-logo {
  display: block !important;
  width: min(330px, 70vw) !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 205px !important;
  object-fit: contain !important;
}

.login-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: min(100%, 540px) !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
}

.welcome-security {
  margin-top: 20px !important;
  padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
}

/* An explicit class used by the startup watchdog when old cached CSS is present. */
.login-screen.castsight-startup-recovered .welcome-logo {
  width: min(300px, 64vw) !important;
  max-height: 185px !important;
}

.castsight-startup-message {
  display: none;
  width: min(100%, 540px);
  margin: 10px auto 0;
  padding: 11px 14px;
  border: 1px solid rgba(97, 168, 255, .32);
  border-radius: 12px;
  background: rgba(4, 17, 31, .92);
  color: rgba(239, 247, 255, .88);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.castsight-startup-message.is-visible { display: block; }

@media (max-height: 760px) and (min-width: 641px) {
  .login-screen { padding-top: 14px !important; }
  .welcome-logo { width: min(250px, 58vw) !important; max-height: 150px !important; }
  .welcome-brand { margin-bottom: 10px !important; }
  .login-card { padding-top: 22px !important; padding-bottom: 22px !important; }
  .welcome-security { margin-top: 12px !important; }
}

@media (max-width: 640px) {
  .login-screen { padding: 18px 12px 22px !important; }
  .welcome-logo { width: min(250px, 72vw) !important; max-height: 155px !important; }
  .login-card { padding: 22px 17px !important; }
  .welcome-security { margin-top: 16px !important; }
}
