/* SHA-256 filename identifies this entry release for safe one-year browser caching. */
:root {
  color-scheme: dark;
  --navy: #071827;
  --yellow: #ffc400;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; min-height: 100%; margin: 0; }
body, button, input { font-family: Arial, Helvetica, sans-serif; }
body { min-height: 100dvh; background: var(--navy); color: #fff; }

.login-page {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: radial-gradient(circle at 20% 5%, rgb(13 92 168 / 28%), transparent 34%), linear-gradient(145deg, #050f18, #0a263d 62%, #071827);
}
.login-page::before, .login-page::after {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.login-page::before { top: -170px; right: -180px; background: rgb(52 143 222 / 23%); filter: blur(70px); }
.login-page::after { bottom: -200px; left: -200px; background: rgb(255 196 0 / 13%); filter: blur(75px); }
.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 28px;
  padding: clamp(24px, 6vw, 38px);
  background: rgb(255 255 255 / 7%);
  box-shadow: 0 28px 75px rgb(0 0 0 / 32%);
}
.login-logo { display: block; width: 150px; height: 80px; margin: 0 0 28px; border-radius: 16px; padding: 8px; object-fit: contain; background: #fff; }
.login-kicker { margin: 0 0 10px; color: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: clamp(34px, 8vw, 48px); line-height: 1.05; letter-spacing: -.035em; }
.login-copy { margin: 16px 0 26px; color: rgb(255 255 255 / 68%); line-height: 1.6; }
.login-form { display: grid; gap: 16px; }
.login-form label > span { display: block; margin: 0 0 7px; color: rgb(255 255 255 / 72%); font-size: 13px; }
.login-form input { width: 100%; min-height: 48px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 12px; outline: 0; padding: 12px 14px; background: #0a2032; color: #fff; font-size: 16px; }
.login-form input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgb(255 196 0 / 12%); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 86px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 34px; border: 0; border-radius: 8px; padding: 6px 9px; background: transparent; color: var(--yellow); font-size: 12px; font-weight: 800; cursor: pointer; }
.submit { min-height: 50px; border: 0; border-radius: 12px; padding: 13px; background: var(--yellow); color: #082c52; font-weight: 800; cursor: pointer; }
.login-form .submit { width: 100%; }
.submit:disabled { opacity: .65; cursor: wait; }
[data-message]:empty { display: none; }
.login-error { margin: 0; border: 1px solid rgb(248 113 113 / 35%); border-radius: 10px; padding: 11px 13px; background: rgb(239 68 68 / 14%); color: #fecaca; line-height: 1.45; }
.login-note { margin: 0; color: #b9d8f0; line-height: 1.45; }
.login-link { display: block; margin: 22px 0 0; color: rgb(255 255 255 / 60%); text-align: center; text-decoration: none; font-size: 13px; }
.login-link:focus-visible, .password-toggle:focus-visible, .submit:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.verifying { display: grid; justify-items: center; text-align: center; }
.verifying .login-logo { margin-bottom: 24px; }
.verifying p { margin: 16px 0 0; color: rgb(255 255 255 / 70%); font-size: 14px; }
.loading-orbit { width: 42px; height: 42px; border: 4px solid rgb(255 255 255 / 14%); border-top-color: var(--yellow); border-radius: 50%; animation: orbit .8s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.crm-host { width: 100%; height: 100dvh; overflow: hidden; background: #f4f6f8; }
.crm-frame { display: block; width: 100%; height: 100%; border: 0; }
.logout-button { position: fixed; z-index: 50; top: 14px; right: 20px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 10px; padding: 9px 14px; background: #202932; color: #fff; cursor: pointer; box-shadow: 0 8px 28px rgb(0 0 0 / 18%); }
.logout-button.password { right: 100px; font-size: 14px; }

.app-install { position: fixed; z-index: 20000; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 44px minmax(120px, 1fr) auto auto; align-items: center; gap: 10px; width: min(500px, calc(100vw - 28px)); border: 1px solid rgb(255 255 255 / 12%); border-radius: 16px; padding: 11px; background: #122436; color: #fff; box-shadow: 0 18px 50px rgb(0 0 0 / 32%); }
.app-install img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; }
.app-install strong { display: block; font-size: 14px; }
.app-install p { margin: 3px 0 0; color: #cbd7e2; font-size: 12px; line-height: 1.35; }
.app-install button { min-height: 38px; border: 0; border-radius: 10px; padding: 0 12px; background: var(--yellow); color: #082c52; font-weight: 800; cursor: pointer; }
.app-install .close { padding: 4px 8px; background: transparent; color: #aebdca; font-size: 20px; }

@media (max-width: 600px) {
  .login-page { padding: 16px; }
  .login-card { border-radius: 22px; }
  .login-logo { width: 136px; height: 72px; margin-bottom: 24px; }
  .logout-button { top: 10px; right: 10px; padding: 8px 11px; }
  .logout-button.password { right: 82px; }
  .app-install { grid-template-columns: 40px 1fr auto; gap: 8px; }
  .app-install img { width: 40px; height: 40px; }
  .app-install .close { position: absolute; top: -9px; right: -7px; width: 28px; height: 28px; border-radius: 50%; background: #243b51; color: #fff; }
  .app-install .primary { grid-column: 2 / 4; width: 100%; }
}
