.portal-auth-top-trigger,
.portal-auth-mobile-trigger {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.portal-auth-top-trigger {
  padding: 0;
  color: inherit;
  background: transparent;
}

.portal-auth-account-link {
  color: #f4d56c;
  font-weight: 800;
}

.portal-auth-mobile-actions {
  display: none;
}

.portal-auth-dialog {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0s linear 0.28s, opacity 0.28s ease;
}

.portal-auth-dialog.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.portal-auth-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  cursor: default;
  background: rgba(4, 29, 43, 0.67);
  backdrop-filter: blur(5px);
}

.portal-auth-sheet {
  position: relative;
  width: min(100%, 520px);
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(218, 231, 237, 0.9);
  border-radius: 25px;
  color: #173c4e;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(3, 32, 47, 0.27);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.portal-auth-dialog.is-open .portal-auth-sheet {
  transform: translateY(0) scale(1);
}

.portal-auth-sheet::before {
  position: absolute;
  top: -85px;
  left: -75px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(23, 121, 158, 0.07);
  content: '';
  pointer-events: none;
}

.portal-auth-handle {
  display: none;
}

.portal-auth-sheet-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.portal-auth-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #b18415;
  font-size: 0.73rem;
  font-weight: 800;
}

.portal-auth-sheet-head h2 {
  margin: 0 0 5px;
  color: #0d4059;
  font-size: 1.38rem;
}

.portal-auth-sheet-head p {
  margin: 0;
  color: #758a95;
  font-size: 0.82rem;
}

.portal-auth-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #dce8ed;
  border-radius: 12px;
  cursor: pointer;
  color: #54717f;
  background: #f7fafb;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.portal-auth-close:hover {
  color: #0d5677;
  background: #edf6f9;
  transform: rotate(5deg);
}

.portal-auth-options {
  position: relative;
  display: grid;
  gap: 11px;
}

.portal-auth-option {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #e0eaee;
  border-radius: 17px;
  color: #173c4e;
  background: #fbfdfe;
  text-decoration: none;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.portal-auth-option:hover {
  border-color: #b8d9e5;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(13, 75, 103, 0.09);
  transform: translateY(-2px);
}

.portal-auth-option-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.15rem;
}

.portal-auth-option-user .portal-auth-option-icon {
  color: #0f678d;
  background: #e5f4fa;
}

.portal-auth-option-register .portal-auth-option-icon {
  color: #167359;
  background: #e6f7f1;
}

.portal-auth-option-staff .portal-auth-option-icon {
  color: #8b6811;
  background: #fff4d7;
}

.portal-auth-option-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.portal-auth-option-copy strong {
  margin-bottom: 3px;
  font-size: 0.91rem;
}

.portal-auth-option-copy small {
  overflow: hidden;
  color: #78909b;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-auth-option-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #3d6a7d;
  background: #edf4f6;
  transition: transform 0.2s ease;
}

.portal-auth-option:hover .portal-auth-option-arrow {
  transform: translateX(-3px);
}

.portal-auth-sheet-note {
  margin: 17px 3px 0;
  color: #8799a2;
  font-size: 0.68rem;
  line-height: 1.9;
  text-align: center;
}

body.portal-auth-is-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .portal-auth-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
  }

  .portal-auth-mobile-actions .mobile-colleague-link {
    display: block;
    margin: 0;
  }

  .portal-auth-mobile-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #0f4863;
    background: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .portal-auth-dialog {
    place-items: end center;
    padding: 0;
  }

  .portal-auth-sheet {
    width: 100%;
    max-height: min(90vh, 650px);
    padding: 12px 17px 24px;
    overflow-y: auto;
    border: 0;
    border-radius: 25px 25px 0 0;
    transform: translateY(105%);
  }

  .portal-auth-dialog.is-open .portal-auth-sheet {
    transform: translateY(0);
  }

  .portal-auth-handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 16px;
    border-radius: 10px;
    background: #d5e1e6;
  }

  .portal-auth-sheet-head {
    margin-bottom: 16px;
  }

  .portal-auth-sheet-head h2 {
    font-size: 1.15rem;
  }

  .portal-auth-option {
    grid-template-columns: 43px minmax(0, 1fr) 27px;
    min-height: 69px;
    padding: 10px 11px;
    border-radius: 15px;
  }

  .portal-auth-option-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
  }
}

@media (max-width: 390px) {
  .portal-auth-mobile-actions {
    gap: 5px;
  }

  .portal-auth-mobile-trigger,
  .portal-auth-mobile-actions .mobile-colleague-link {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 0.61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-auth-dialog,
  .portal-auth-sheet,
  .portal-auth-option,
  .portal-auth-close,
  .portal-auth-option-arrow {
    transition-duration: 0.01ms !important;
  }
}
