/* Auth layouts share one physical grid in every locale, including RTL. */
.portal-login { direction: ltr; padding-block: 84px 32px; }
.portal-login > section { min-width: 0; margin: 0; }
.portal-login[dir="rtl"] > section { direction: rtl; text-align: right; }
.portal-login h1 { line-height: 1.25; overflow-wrap: normal; }
.portal-login-tools { direction: ltr; }
.portal-language-trigger, .portal-locale-fixed { direction: ltr; }
.portal-login .portal-language-menu small,
.portal-login .portal-locale-fixed small { display: block; margin: 0; line-height: 1; }
.portal-login .portal-language-menu button { font-family: inherit; }
.portal-login input[type="email"], .portal-login input[type="tel"] { direction: ltr; text-align: start; }
.portal-login .auth-links button { min-width: 0; line-height: 1.5; }
@media ((max-width: 760px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 760px))) {
  .portal-login { padding: 76px 14px 24px; }
  .portal-login > section { margin-top: 0; }
  .portal-login-tools { position: absolute; }
}

.portal-login label { line-height: 1.5; }
.portal-login .auth-recovery p { min-height: 3.1em; }
@media ((max-width: 760px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 760px))) {
  .portal-login > section > p { min-height: 3.1em; }
}
@media ((max-width: 350px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 350px))) {
  .portal-login h1 { min-height: 2.5em; }
  .portal-login > section > p, .portal-login .auth-recovery p { min-height: 4.65em; }
}

.portal-login { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.portal-login > section { flex: 0 0 auto; margin: auto 0 28px; }
.portal-login .portal-login-footer { margin: 0 auto; }
.portal-login .auth-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; color: #777; font-size: 12px; font-weight: 400; line-height: 1.5; }
.portal-login .auth-consent input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: #808080; }
.portal-login .auth-consent a { color: #555; text-decoration: underline; text-underline-offset: 2px; }
.theme-toggle { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 0; padding: 0; }
.theme-toggle > span:last-child { display: inline; }
.portal-footer { width: 100%; max-width: 1500px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: 36px auto 0; padding: 18px 0; color: #b5b5b5; border-top: 1px solid #e9e9e9; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.portal-footer-tagline { color: #b5b5b5; }
.portal-footer-email { color: #808080; letter-spacing: 0; text-transform: none; text-decoration: none; }
.portal-footer-legal { flex: 0 0 100%; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 28px; text-align: center; font-size: 12px; line-height: 1.6; letter-spacing: 0; text-transform: none; }
.portal-footer-legal a { color: #666; text-decoration: underline; text-underline-offset: 3px; }
.portal-footer-legal a:hover, .portal-footer-email:hover { color: #333; }
html[data-theme="dark"] .portal-footer { border-color: #343a41; color: #7f8994; }
html[data-theme="dark"] .portal-footer-tagline { color: #7f8994; }
html[data-theme="dark"] .portal-footer-email, html[data-theme="dark"] .portal-footer-legal a { color: #b8bec6; }
html[data-theme="dark"] .portal-footer-legal a:hover, html[data-theme="dark"] .portal-footer-email:hover { color: #fff; }
@media ((max-width: 760px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 760px))) {
  .portal-login > section { margin: auto 0 24px; }
  .portal-footer { justify-content: center; gap: 10px 14px; margin-top: 28px; padding: 16px 0; text-align: center; }
  .portal-footer-copy, .portal-footer-tagline, .portal-footer-email { flex: 0 0 100%; }
  .portal-footer-legal { flex-direction: column; gap: 4px; }
  .portal-footer-legal a { max-width: 100%; padding-block: 5px; }
}

/* Keep the footer separated from content even when a page fills the viewport. */
:root { --portal-footer-gap: 64px; }
.shell { display: flex; flex-direction: column; }
.shell > .content { flex: 1 0 auto; width: 100%; margin-block: 0; }
.shell > .portal-footer { flex-shrink: 0; margin-top: var(--portal-footer-gap); }
.portal-login { min-height: 100vh; min-height: 100svh; justify-content: flex-start; padding: 24px 24px 0; }
.portal-login > section { margin-block: auto; }
.portal-login > footer.portal-footer { flex: 0 0 auto; width: 100%; margin: var(--portal-footer-gap) auto 0; }
.tooth-chart { width: min(300px, 100%); }
.tooth-chart svg { width: 100%; height: auto; aspect-ratio: 509 / 772; object-fit: contain; }
@media ((max-width: 760px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 760px))) {
  :root { --portal-footer-gap: 40px; }
  .portal-login { padding: 76px 14px 0; }
  .portal-login > section { margin-block: auto; }
}

/* Country uses the same dimensions and neutral surface as registration inputs. */
.portal-login select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 40px 0 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  color: #333;
  font: inherit;
  line-height: normal;
  cursor: pointer;
}
.portal-login[dir="rtl"] select { padding: 0 12px 0 40px; background-position: left 12px center; }
.portal-login select:disabled { cursor: default; opacity: .65; }

@media ((max-width: 760px) or (((pointer: coarse) and (hover: none) and (orientation: landscape) and (max-height: 560px)) and (max-height: 760px))) { .portal-login select { min-height: 44px; font-size: 16px; } }
