.ss-auth-options {
  display: grid;
  gap: 0.85rem;
}

.ss-auth-options + form,
.ss-auth-options + p {
  margin-top: 1rem;
}

.ss-auth-buttons {
  display: grid;
  gap: 0.75rem;
}

.ss-auth-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #161616;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.ss-auth-button:hover,
.ss-auth-button:focus-visible {
  border-color: rgba(188, 32, 43, 0.28);
  background: #fff;
  outline: none;
}

.ss-auth-button:active {
  transform: translateY(1px);
}

.ss-auth-button[disabled],
.ss-auth-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.68;
}

.ss-auth-button__icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ss-auth-button__icon svg {
  width: 100%;
  height: 100%;
}

.ss-auth-button__label {
  flex: 0 1 auto;
}

.ss-auth-button__badge {
  margin-left: auto;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: rgba(17, 17, 17, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ss-auth-button--google .ss-auth-button__icon {
  color: #ea4335;
}

.ss-auth-button--facebook .ss-auth-button__icon {
  color: #1877f2;
}

.ss-auth-button--email .ss-auth-button__icon {
  color: var(--color-accent, #bc202b);
}

.ss-auth-feedback {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(17, 17, 17, 0.72);
}

.ss-auth-feedback[data-state="error"] {
  color: #9d2430;
}

.ss-auth-feedback[data-state="success"] {
  color: #21623d;
}

.ss-auth-shell {
  position: relative;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.ss-auth-shell__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0.32rem 0.82rem 0.32rem 0.32rem;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-contrast);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 24px rgba(17, 17, 17, 0.04);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.ss-auth-shell__toggle:hover,
.ss-auth-shell__toggle:focus-visible,
.ss-auth-shell.is-open .ss-auth-shell__toggle {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.08), 0 12px 28px rgba(17, 17, 17, 0.08);
  outline: none;
}

.ss-auth-shell__toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(188, 32, 43, 0.12), 0 2px 6px rgba(17, 17, 17, 0.08), 0 12px 28px rgba(17, 17, 17, 0.08);
}

.ss-auth-shell__toggle:active {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(17, 17, 17, 0.14);
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.08), 0 6px 16px rgba(17, 17, 17, 0.06);
}

.ss-auth-shell__toggle-copy {
  min-width: 0;
  max-width: 10.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  overflow: hidden;
}

.ss-auth-shell__toggle-label,
.ss-auth-shell__toggle-meta {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-auth-shell__head .dropdown-user-name,
.ss-auth-shell__head .dropdown-user-mail {
  min-width: 0;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-auth-shell__toggle-label {
  font-size: 0.94rem;
  font-weight: 640;
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.ss-auth-shell__toggle-meta {
  color: rgba(17, 17, 17, 0.54);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.15;
}

.ss-auth-shell__avatar {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.ss-auth-shell__avatar--large {
  width: 3rem;
  height: 3rem;
  flex-basis: 3rem;
}

.ss-auth-shell__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.ss-auth-shell__avatar-text,
.ss-auth-shell__avatar-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

.ss-auth-shell__avatar-text {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.88);
}

.ss-auth-shell__avatar--large .ss-auth-shell__avatar-text {
  font-size: 1rem;
}

.ss-auth-shell__avatar-icon {
  color: rgba(17, 17, 17, 0.58);
}

.ss-auth-shell__avatar-icon svg {
  width: 1rem;
  height: 1rem;
}

.ss-auth-shell__menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ss-auth-shell__menu.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.ss-auth-shell__head {
  width: 100%;
}

.ss-auth-shell[data-ss-auth-shell-state="anonymous"] .ss-auth-shell__toggle-label {
  font-weight: 600;
}

.ss-auth-page-bar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem var(--layout--padding) 0;
}

.ss-auth-page-bar__inner {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.ss-auth-shell--compact .ss-auth-shell__toggle {
  gap: 0.65rem;
  padding: 0.26rem 0.68rem 0.26rem 0.24rem;
}

.ss-auth-shell--compact .ss-auth-shell__toggle-meta {
  display: none;
}

.ss-auth-options--compact .ss-auth-buttons {
  gap: 0.6rem;
}

.ss-auth-options--compact .ss-auth-button {
  min-height: 2.85rem;
  padding: 0.8rem 0.95rem;
  font-size: 0.95rem;
}

html[data-color-scheme="dark"] .ss-auth-button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(27, 29, 31, 0.96);
  color: rgba(255, 255, 255, 0.96);
}

html[data-color-scheme="dark"] .ss-auth-button:hover,
html[data-color-scheme="dark"] .ss-auth-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(34, 36, 39, 0.98);
}

html[data-color-scheme="dark"] .ss-auth-button__badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
}

html[data-color-scheme="dark"] .ss-auth-feedback {
  color: rgba(255, 255, 255, 0.74);
}

html[data-color-scheme="dark"] .ss-auth-shell__toggle:hover,
html[data-color-scheme="dark"] .ss-auth-shell__toggle:focus-visible,
html[data-color-scheme="dark"] .ss-auth-shell.is-open .ss-auth-shell__toggle {
  background: rgba(34, 36, 39, 0.98);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-color-scheme="dark"] .ss-auth-shell__toggle {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(27, 29, 31, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 22px rgba(0, 0, 0, 0.18);
}

html[data-color-scheme="dark"] .ss-auth-shell__toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(188, 32, 43, 0.2), 0 2px 8px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-color-scheme="dark"] .ss-auth-shell__toggle:active {
  background: rgba(39, 42, 45, 0.98);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24), 0 8px 18px rgba(0, 0, 0, 0.2);
}

html[data-color-scheme="dark"] .ss-auth-shell__toggle-meta {
  color: rgba(255, 255, 255, 0.62);
}

html[data-color-scheme="dark"] .ss-auth-shell__avatar {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(49, 52, 56, 0.98), rgba(32, 34, 37, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-color-scheme="dark"] .ss-auth-shell__avatar-text {
  color: rgba(255, 255, 255, 0.92);
}

html[data-color-scheme="dark"] .ss-auth-shell__avatar-icon {
  color: rgba(255, 255, 255, 0.68);
}

@media (prefers-color-scheme: dark) {
  html[data-color-scheme="system"] .ss-auth-button {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(27, 29, 31, 0.96);
    color: rgba(255, 255, 255, 0.96);
  }

  html[data-color-scheme="system"] .ss-auth-button:hover,
  html[data-color-scheme="system"] .ss-auth-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(34, 36, 39, 0.98);
  }

  html[data-color-scheme="system"] .ss-auth-button__badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.74);
  }

  html[data-color-scheme="system"] .ss-auth-feedback {
    color: rgba(255, 255, 255, 0.74);
  }

  html[data-color-scheme="system"] .ss-auth-shell__toggle:hover,
  html[data-color-scheme="system"] .ss-auth-shell__toggle:focus-visible,
  html[data-color-scheme="system"] .ss-auth-shell.is-open .ss-auth-shell__toggle {
    background: rgba(34, 36, 39, 0.98);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.24);
  }

  html[data-color-scheme="system"] .ss-auth-shell__toggle {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(27, 29, 31, 0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  html[data-color-scheme="system"] .ss-auth-shell__toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(188, 32, 43, 0.2), 0 2px 8px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.24);
  }

  html[data-color-scheme="system"] .ss-auth-shell__toggle:active {
    background: rgba(39, 42, 45, 0.98);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24), 0 8px 18px rgba(0, 0, 0, 0.2);
  }

  html[data-color-scheme="system"] .ss-auth-shell__toggle-meta {
    color: rgba(255, 255, 255, 0.62);
  }

  html[data-color-scheme="system"] .ss-auth-shell__avatar {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(49, 52, 56, 0.98), rgba(32, 34, 37, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  html[data-color-scheme="system"] .ss-auth-shell__avatar-text {
    color: rgba(255, 255, 255, 0.92);
  }

  html[data-color-scheme="system"] .ss-auth-shell__avatar-icon {
    color: rgba(255, 255, 255, 0.68);
  }
}

@media (--breakpoint-max-md) {
  .ss-auth-shell__toggle {
    gap: 0.64rem;
    padding: 0.28rem 0.72rem 0.28rem 0.28rem;
  }

  .ss-auth-shell__toggle-copy {
    max-width: 8.1rem;
  }
}

@media (--breakpoint-max-sm) {
  .ss-auth-shell__toggle {
    gap: 0.52rem;
    padding: 0.24rem 0.62rem 0.24rem 0.22rem;
  }

  .ss-auth-shell__toggle-copy {
    max-width: 6.6rem;
  }

  .ss-auth-shell__toggle-meta {
    display: none;
  }

  .ss-auth-shell__menu {
    max-width: min(20rem, calc(100vw - var(--layout--padding) * 2));
  }
}

@media (max-width: 480px) {
  .ss-auth-shell__toggle {
    gap: 0.44rem;
    padding: 0.22rem 0.54rem 0.22rem 0.2rem;
  }

  .ss-auth-shell__toggle-copy {
    max-width: 5.1rem;
  }
}
