/* =========================================================================
   Knowledge Center v2 — login
   Standalone screen: no header, no shell.js — it rides on tokens.css and
   the shell.css reset, both linked by the page.
   ========================================================================= */

/* Flex, not grid: a centred grid item sizes its own column to its max-content
   width, so the card's max-width:100% resolved against its own 380px and the
   page scrolled sideways on a 390pt phone. A flex item measures against the
   container's content box, which is what "no wider than the screen" means. */
.kc-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.kc-login__card {
  width: 380px;
  max-width: 100%;
  background: var(--kc-surface);
  border-radius: 24px;
  box-shadow: var(--kc-sh-login);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.kc-login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
/* Wordmarks are wide, icon-style logos are square — cap the height and let
   the width follow so both stay legible. */
.kc-login__brand img {
  height: 26px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  display: block;
}
.kc-login__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.kc-login__title {
  font-size: var(--kc-fs-lg);
  font-weight: 600;
  letter-spacing: var(--kc-ls-title);
}
.kc-login__sub {
  font-size: var(--kc-fs-13);
  color: var(--kc-muted);
  text-align: center;
}

.kc-login__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.kc-login__error {
  font-size: 12.5px;
  color: var(--kc-danger);
  margin-top: -12px;
}
.kc-login__error[hidden] { display: none; }

.kc-login__submit {
  height: 48px;
  border: 0;
  border-radius: var(--kc-r-pill);
  background: var(--kc-text);
  color: var(--kc-on-dark);
  font-size: var(--kc-fs-md);
  font-weight: 500;
  margin-top: 6px;
  transition: background var(--kc-dur) var(--kc-ease);
}
.kc-login__submit:hover:not(:disabled) { background: #3a3a3c; }
.kc-login__submit:disabled { opacity: .6; cursor: default; }

.kc-login__foot {
  font-size: var(--kc-fs-11);
  color: var(--kc-faint);
  text-align: center;
}

@media (max-width: 720px) {
  .kc-login { padding: 24px 16px; }
  .kc-login__card { padding: 36px 24px; gap: 20px; }
}

/* Tenant selector — the last step of signing in for a superadmin, who
   belongs to no single company and has to say which one they are here for.
   It replaces the form inside the same card rather than opening a second
   screen: it is one act, not two. */
.kc-login__choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.kc-login__choice[hidden] { display: none; }

.kc-login__choice-title {
  font-size: 13px;
  color: var(--kc-text-2);
}

.kc-login__choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kc-login__choice-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--kc-text);
  background: var(--kc-field);
  border: 1px solid var(--kc-divider);
  border-radius: 10px;
  cursor: pointer;
}

.kc-login__choice-item:hover:not(:disabled) { background: var(--kc-field-hover); }
.kc-login__choice-item:disabled { opacity: .5; cursor: default; }
