.pwa-only-nav,
.pwa-install-nav,
.pwa-only {
  display: none !important;
}

.portal-pwa-mode .pwa-only-nav,
.portal-pwa-can-install .pwa-install-nav {
  display: list-item !important;
}

.portal-pwa-mode .pwa-only {
  display: block !important;
}

html.portal-pwa-pin-booting body > :not(.portal-pwa-pin-lock) {
  visibility: hidden;
}

html.portal-pwa-pin-booting .portal-pwa-pin-lock {
  visibility: visible;
}

.pwa-pin-page {
  padding-top: 32px;
  padding-bottom: 48px;
}

.pwa-pin-shell {
  max-width: 980px;
  margin: 0 auto;
}

.pwa-pin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.pwa-pin-intro,
.pwa-pin-status-card,
.pwa-pin-card,
.pwa-pin-browser-notice {
  background: #fff;
  border: 1px solid #eadede;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(50, 50, 50, 0.08);
}

.pwa-pin-intro {
  padding: 30px;
}

.pwa-pin-status-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
}

.pwa-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #f5eeee;
  color: #8a191c;
  font-size: 13px;
  font-weight: 700;
}

.pwa-pin-title {
  margin: 0 0 10px;
  color: #8a191c;
  font-size: 34px;
  font-weight: 700;
}

.pwa-pin-lead {
  margin: 0;
  color: #5f3435;
  font-size: 16px;
  line-height: 1.65;
}

.pwa-pin-status-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #eaf6f5;
  color: #306b73;
  font-size: 22px;
}

.pwa-pin-status-label {
  margin: 0 0 5px;
  color: #735c5c;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.pwa-pin-status-value {
  margin: 0;
  color: #323232;
  font-family: 'Signika', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.pwa-pin-status-help {
  margin: 12px 0 0;
  color: #735c5c;
  font-size: 13px;
  line-height: 1.45;
}

.pwa-pin-card {
  padding: 28px;
}

.pwa-pin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pwa-pin-field {
  margin: 0;
}

.pwa-pin-field--full {
  grid-column: 1 / -1;
}

.pwa-pin-field label {
  display: block;
  margin: 0 0 7px;
  color: #5f3435;
  font-weight: 700;
}

.pwa-pin-input {
  width: 100%;
  min-height: 54px;
  padding: 11px 14px;
  border: 1px solid #dccccb;
  border-radius: 8px;
  background: #fff;
  color: #323232;
  font-size: 24px;
  text-align: center;
  font-family: 'Signika', sans-serif;
}

.pwa-pin-input:focus {
  outline: none;
  border-color: #8a191c;
  box-shadow: 0 0 0 3px rgba(138, 25, 28, 0.12);
}

.pwa-pin-help {
  margin: 8px 0 0;
  color: #735c5c;
  font-size: 13px;
  line-height: 1.45;
}

.pwa-pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.pwa-pin-button {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: #8a191c;
  color: #fff;
  font-family: 'Signika', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.pwa-pin-button:hover,
.pwa-pin-button:focus {
  background: #741417;
  color: #fff;
}

.pwa-pin-button--secondary {
  border: 1px solid #d8c6c6;
  background: #fff;
  color: #8a191c;
}

.pwa-pin-button--secondary:hover,
.pwa-pin-button--secondary:focus {
  background: #f8f1f1;
  color: #741417;
}

.pwa-pin-button--quiet {
  background: transparent;
  color: #735c5c;
  text-transform: none;
}

.pwa-pin-button--quiet:hover,
.pwa-pin-button--quiet:focus {
  background: #f8f1f1;
  color: #8a191c;
}

.pwa-pin-message {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #eadede;
  background: #fcf8f8;
  color: #5f3435;
  font-size: 14px;
  line-height: 1.45;
}

.pwa-pin-message[data-type="success"] {
  border-color: #c8e3df;
  background: #edf8f7;
  color: #306b73;
}

.pwa-pin-message[data-type="error"] {
  border-color: #e1b7b8;
  background: #fbefef;
  color: #8a191c;
}

.pwa-pin-browser-notice {
  padding: 24px;
  color: #5f3435;
}

.portal-pwa-mode .pwa-pin-browser-notice {
  display: none;
}

.pwa-pin-settings[hidden] {
  display: none !important;
}

.portal-pwa-pin-lock {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.portal-pwa-pin-lock__card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid #eadede;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(50, 50, 50, 0.16);
  text-align: center;
}

.portal-pwa-pin-lock__icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #f5eeee;
  color: #8a191c;
  font-size: 24px;
}

.portal-pwa-pin-lock__title {
  margin: 0 0 8px;
  color: #8a191c;
  font-family: 'Signika', sans-serif;
  font-size: 27px;
  font-weight: 700;
}

.portal-pwa-pin-lock__text {
  margin: 0 0 18px;
  color: #5f3435;
  line-height: 1.5;
}

.portal-pwa-pin-lock__input {
  width: 100%;
  min-height: 56px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #dccccb;
  border-radius: 8px;
  color: #323232;
  font-family: 'Signika', sans-serif;
  font-size: 26px;
  text-align: center;
}

.portal-pwa-pin-lock__input:focus {
  outline: none;
  border-color: #8a191c;
  box-shadow: 0 0 0 3px rgba(138, 25, 28, 0.12);
}

.portal-pwa-pin-lock__error {
  min-height: 21px;
  margin: 0 0 12px;
  color: #8a191c;
  font-size: 14px;
}

.portal-pwa-pin-lock__actions {
  display: grid;
  gap: 10px;
}

.pwa-install-nav__button {
  border: 0;
  background: transparent;
  color: var(--color-black);
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  text-transform: uppercase;
}

.pwa-install-nav__button.nav-link {
  display: block;
  width: 100%;
  color: var(--color-black);
  font-size: 1.1em;
}

.pwa-install-nav__button.nav-link:hover,
.pwa-install-nav__button.nav-link:focus {
  color: var(--color-lightgreen);
}

.portal-pwa-install {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: rgba(32, 24, 24, 0.46);
}

.portal-pwa-install__card {
  position: relative;
  width: min(100%, 430px);
  padding: 30px 22px 22px;
  border: 1px solid #eadede;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.portal-pwa-install__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #f7f1f1;
  color: #5f3435;
  font-size: 24px;
  line-height: 1;
}

.portal-pwa-install__icon {
  box-sizing: border-box;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  padding: 4px;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.portal-pwa-install__icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  border-radius: 50%;
  object-fit: cover;
}

.portal-pwa-install__title {
  margin: 0 30px 10px;
  color: #8a191c;
  font-family: 'Signika', sans-serif;
  font-size: 23px;
  line-height: 1.18;
  font-weight: 700;
  text-align: center;
}

.portal-pwa-install__text {
  margin: 0 0 20px;
  color: #5f3435;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.portal-pwa-install__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-pwa-install__primary,
.portal-pwa-install__secondary {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.portal-pwa-install__primary {
  grid-column: 1 / -1;
  border: 1px solid #8a191c;
  background: #8a191c;
  color: #fff;
}

.portal-pwa-install__primary:disabled,
.portal-pwa-install__primary.is-loading {
  cursor: wait;
  opacity: 0.78;
}

.portal-pwa-install__secondary {
  border: 1px solid #dccccb;
  background: #fff;
  color: #5f3435;
}

.portal-pwa-install__secondary--quiet {
  color: #8a191c;
}

@media (max-width: 760px) {
  .pwa-pin-page {
    padding-top: 18px;
  }

  .pwa-pin-hero,
  .pwa-pin-form-grid {
    grid-template-columns: 1fr;
  }

  .pwa-pin-intro,
  .pwa-pin-status-card,
  .pwa-pin-card {
    padding: 20px;
  }

  .pwa-pin-title {
    font-size: 28px;
  }

  .portal-pwa-install {
    padding-left: 12px;
    padding-right: 12px;
  }

  .portal-pwa-install__card {
    padding: 26px 20px 20px;
  }

  .portal-pwa-install__icon {
    width: 84px;
    height: 84px;
  }

  .portal-pwa-install__title {
    margin-left: 24px;
    margin-right: 24px;
    font-size: 22px;
  }

  .portal-pwa-install__actions {
    grid-template-columns: 1fr;
  }

  .portal-pwa-install__primary {
    grid-column: auto;
  }
}

.portal-pwa-mode .nav-item.logoutbutton {
  display: none !important;
}

.portal-pwa-pin-lock--fullscreen {
  align-items: stretch;
  padding: max(18px, env(safe-area-inset-top)) 18px max(44px, calc(26px + env(safe-area-inset-bottom)));
  background: #ffffff;
  backdrop-filter: none;
}

.portal-pwa-pin-lock--fullscreen .portal-pwa-pin-lock__card {
  width: min(100%, 430px);
  min-height: 100%;
  margin: 0 auto;
  padding: 28px 10px max(34px, calc(22px + env(safe-area-inset-bottom)));
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}

.portal-pwa-pin-lock__app-icon {
  width: min(320px, 62vw);
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 0;
  object-fit: contain;
}

.portal-pwa-pin-lock--fullscreen .portal-pwa-pin-lock__title {
  margin-bottom: 10px;
  color: #252525;
  font-size: 25px;
  line-height: 1.15;
}

.portal-pwa-pin-lock--fullscreen .portal-pwa-pin-lock__text {
  max-width: 320px;
  margin: 0 auto 30px;
  color: #5f5f5f;
  font-size: 16px;
  line-height: 1.45;
}

.portal-pwa-pin-entry {
  width: 100%;
}

.portal-pwa-pin-alt-login {
  width: min(100%, 320px);
  margin: -12px auto 20px;
}

.portal-pwa-pin-alt-login[hidden] {
  display: none !important;
}

.portal-pwa-pin-alt-login__button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #dccccb;
  border-radius: 8px;
  background: #fff;
  color: #8a191c;
  font-family: 'Signika', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.portal-pwa-pin-alt-login__button:hover,
.portal-pwa-pin-alt-login__button:focus {
  background: #f8f1f1;
  color: #741417;
  text-decoration: none;
}

.portal-pwa-pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 0 22px;
}

.portal-pwa-pin-dot {
  width: 15px;
  height: 15px;
  border: 2px solid #8a191c;
  border-radius: 50%;
  background: transparent;
  transition: background-color 140ms ease, transform 140ms ease;
}

.portal-pwa-pin-dot.is-filled {
  background: #8a191c;
  transform: scale(1.05);
}

.portal-pwa-pin-error {
  min-height: 22px;
  margin: 0 0 16px;
  color: #8a191c;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.portal-pwa-pin-keypad {
  width: min(100%, 252px);
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-template-rows: repeat(4, 72px);
  grid-auto-rows: 72px;
  place-content: center;
  align-items: center;
  justify-items: center;
  gap: 18px;
}

.portal-pwa-pin-key {
  width: 72px;
  height: 72px;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4eeee;
  color: #2c2c2c;
  font-family: 'Signika', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.portal-pwa-pin-key:active {
  background: #eadede;
  transform: scale(0.97);
}

.portal-pwa-pin-entry.is-disabled .portal-pwa-pin-key {
  cursor: default;
  opacity: 0.55;
}

.portal-pwa-pin-entry.is-disabled .portal-pwa-pin-key:active {
  transform: none;
}

.portal-pwa-pin-key--empty {
  visibility: hidden;
  pointer-events: none;
}

.portal-pwa-pin-key--back {
  color: #8a191c;
  font-size: 28px;
}

.portal-pwa-pin-lock--notifications .portal-pwa-pin-lock__text {
  margin-bottom: 22px;
}

.portal-pwa-notification-onboarding__status {
  min-height: 22px;
  max-width: 320px;
  margin: 0 auto 16px;
  color: #6b5555;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.portal-pwa-notification-onboarding__actions {
  width: min(100%, 320px);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.portal-pwa-notification-onboarding__actions .pwa-pin-button {
  width: 100%;
  margin: 0;
}

.portal-pwa-notification-onboarding__actions .pwa-pin-button[disabled] {
  opacity: 0.68;
  cursor: progress;
}

.portal-pwa-pin-lock--shake .portal-pwa-pin-lock__card {
  animation: portalPwaPinShake 180ms ease-in-out;
}

.portal-pwa-auth-page {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: #323232;
  font-family: 'Open Sans', Arial, sans-serif;
}

.portal-pwa-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(34px, calc(26px + env(safe-area-inset-bottom)));
}

.portal-pwa-auth-card {
  width: min(100%, 430px);
  text-align: center;
}

.portal-pwa-auth-logo {
  width: min(80vw, 320px);
  max-width: 320px;
  height: 112px;
  margin: 0 auto 22px;
  display: block;
  object-fit: contain;
}

.portal-pwa-auth-title {
  margin: 0 0 10px;
  color: #252525;
  font-family: 'Signika', sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
}

.portal-pwa-auth-text {
  max-width: 320px;
  margin: 0 auto 22px;
  color: #5f5f5f;
  font-size: 16px;
  line-height: 1.45;
}

.portal-pwa-auth-alert {
  width: min(100%, 340px);
  margin: 0 auto 14px;
  padding: 11px 13px;
  border: 1px solid #eadede;
  border-radius: 8px;
  background: #fcf8f8;
  color: #5f3435;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.portal-pwa-auth-alert--error {
  border-color: #e1b7b8;
  background: #fbefef;
  color: #8a191c;
}

.portal-pwa-auth-alert--success {
  border-color: #c8e3df;
  background: #edf8f7;
  color: #306b73;
}

.portal-pwa-auth-alert--warning {
  border-color: #ead5a0;
  background: #fff8e6;
  color: #6d4b10;
}

.portal-pwa-auth-form {
  width: min(100%, 340px);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.portal-pwa-auth-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.portal-pwa-auth-field label {
  color: #5f3435;
  font-size: 13px;
  font-weight: 700;
}

.portal-pwa-auth-input {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #dccccb;
  border-radius: 8px;
  background: #fff;
  color: #323232;
  font-size: 17px;
}

.portal-pwa-auth-input:focus {
  outline: none;
  border-color: #8a191c;
  box-shadow: 0 0 0 3px rgba(138, 25, 28, 0.12);
}

.portal-pwa-auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
}

.portal-pwa-auth-link {
  display: inline-flex;
  justify-content: center;
  margin-top: 16px;
  color: #8a191c;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.portal-pwa-auth-link:hover,
.portal-pwa-auth-link:focus {
  color: #741417;
  text-decoration: underline;
}

.portal-pwa-auth-remember {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #5f3435;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.portal-pwa-auth-remember input {
  margin-top: 3px;
}

@keyframes portalPwaPinShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

@media (max-width: 430px) {
  .portal-pwa-pin-lock--fullscreen .portal-pwa-pin-lock__card {
    justify-content: flex-start;
    padding-top: 36px;
    padding-bottom: max(42px, calc(28px + env(safe-area-inset-bottom)));
  }

  .portal-pwa-pin-lock__app-icon {
    width: min(80vw, 320px);
    height: 108px;
    margin-bottom: 16px;
  }

  .portal-pwa-pin-dots {
    margin-bottom: 26px;
  }

  .portal-pwa-pin-alt-login {
    margin-top: -8px;
    margin-bottom: 18px;
  }

  .portal-pwa-pin-keypad {
    width: min(100%, 236px);
    grid-template-columns: repeat(3, 68px);
    grid-template-rows: repeat(4, 68px);
    grid-auto-rows: 68px;
    gap: 16px;
    margin-bottom: 40px;
  }

  .portal-pwa-pin-key {
    width: 68px;
    height: 68px;
  }

  .portal-pwa-auth-shell {
    align-items: flex-start;
    padding-top: 36px;
  }

  .portal-pwa-auth-logo {
    height: 108px;
    margin-bottom: 16px;
  }
}
