/* Isolated authentication layout. Kept separate so theme cache cannot flatten the touchscreen UI. */
body.admin-shell.auth-mode {
  min-height: 100vh;
  background: var(--page);
}

body.auth-mode .admin-topbar {
  min-height: 112px;
  padding: 24px 36px;
  background: #20333f;
  border-bottom: 1px solid #405364;
}

body.auth-mode .admin-topbar h1 { color: #fff; }
body.auth-mode .admin-topbar .eyebrow { color: #b8c9da; }

body.auth-mode .admin-topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-company-logo {
  display: block;
  width: auto;
  max-width: min(330px, 52vw);
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

body.auth-mode .auth-login-shell {
  display: grid !important;
  place-items: start center;
  min-height: calc(100vh - 112px);
  padding: 44px 22px !important;
}

body.auth-mode .auth-stage {
  display: block;
  width: min(620px, 100%) !important;
  padding: 30px !important;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow-md) !important;
}

body.auth-mode .auth-stage.hidden { display: none !important; }
body.auth-mode .auth-stage h2 { margin: 5px 0 8px; color: var(--ink); font-size: 30px; }
body.auth-mode .auth-stage > .subtle-copy { margin: 0 0 24px; color: var(--muted); font-size: 16px; }
body.auth-mode .auth-stage form,
body.auth-mode form.auth-stage { gap: 14px; }
body.auth-mode .auth-stage label { display: grid; gap: 8px; color: var(--ink); font-weight: 600; }

body.auth-mode .auth-stage input {
  box-sizing: border-box;
  width: 100% !important;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
  font: inherit;
  font-size: 22px;
  text-align: center;
  letter-spacing: 8px;
}

body.auth-mode .auth-keypad {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 14px;
}

body.auth-mode .auth-keypad button {
  min-width: 0 !important;
  min-height: 66px !important;
  padding: 8px !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
  font-size: 24px !important;
  box-shadow: none !important;
}

body.auth-mode .auth-keypad button:hover,
body.auth-mode .auth-keypad button:focus-visible { border-color: var(--brand) !important; background: var(--soft-blue) !important; }
body.auth-mode .auth-submit { width: 100% !important; min-height: 54px !important; margin-top: 14px; }

body.auth-mode .auth-user-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  margin: 22px 0 !important;
}

body.auth-mode .auth-user-choice {
  display: grid !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  min-height: 92px !important;
  padding: 14px 18px !important;
  border: 1px solid var(--line) !important;
  border-radius: 7px !important;
  background: var(--surface-muted) !important;
  color: var(--ink) !important;
  text-align: left !important;
  box-shadow: none !important;
}

body.auth-mode .auth-user-choice:hover,
body.auth-mode .auth-user-choice:focus-visible { border-color: var(--brand) !important; background: var(--soft-blue) !important; }
body.auth-mode .auth-user-avatar { display: grid !important; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--soft-blue); color: var(--brand); font-weight: 650; }
body.auth-mode .auth-user-choice > span:last-child { display: grid; gap: 4px; min-width: 0; }
body.auth-mode .auth-user-choice strong { color: var(--ink); font-size: 20px; }
body.auth-mode .auth-user-choice small { color: var(--muted); font-size: 15px; }
body.auth-mode #otpForm { display: grid; }
body.auth-mode #otpForm.hidden { display: none !important; }
body.auth-mode .form-message { min-height: 20px; margin: 8px 0 0; }

@media (max-width: 700px) {
  body.auth-mode .admin-topbar { min-height: 92px; padding: 18px; }
  body.auth-mode .auth-login-shell { min-height: calc(100vh - 92px); padding: 18px 10px !important; }
  body.auth-mode .auth-stage { padding: 20px !important; }
  body.auth-mode .auth-stage h2 { font-size: 25px; }
  .auth-company-logo { max-height: 56px; }
}
