.bc-auth-wrap {
  --bc-auth-primary: #10b981;
  --bc-auth-primary-dark: #047857;
  --bc-auth-surface: #ffffff;
  --bc-auth-text: #111827;
  --bc-auth-muted: #6b7280;
  --bc-auth-line: #e5e7eb;
  --bc-auth-soft: #ecfdf5;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 28px 16px;
  box-sizing: border-box;
  font-family: inherit;
}

.bc-auth-wrap * {
  box-sizing: border-box;
}

.bc-auth-wrap .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bc-auth-wrap--compact {
  padding: 18px 0;
}

.bc-auth-wrap--trigger {
  display: inline-grid;
  width: auto;
  padding: 0;
}

.bc-auth-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--bc-auth-primary), #0ea5e9);
  color: #fff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.bc-auth-trigger:hover,
.bc-auth-trigger:focus {
  color: #fff;
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.bc-auth-trigger--icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.05rem;
}

.bc-auth-modal[hidden] {
  display: none;
}

.bc-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.bc-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.bc-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  max-height: min(92vh, 720px);
  overflow: auto;
}

.bc-auth-modal__dialog .bc-auth-card {
  width: 100%;
}

.bc-auth-modal__close {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.bc-auth-modal-open {
  overflow: hidden;
}

.bc-auth-card {
  width: min(100%, 430px);
  background: var(--bc-auth-surface);
  color: var(--bc-auth-text);
  border: 1px solid var(--bc-auth-line);
  border-color: color-mix(in srgb, var(--bc-auth-line) 82%, var(--bc-auth-primary));
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.bc-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--bc-auth-primary), #0ea5e9);
}

.bc-auth-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 4px auto 14px;
  border-radius: 8px;
  background: var(--bc-auth-soft);
  border: 1px solid var(--bc-auth-line);
  border-color: color-mix(in srgb, var(--bc-auth-primary) 25%, var(--bc-auth-line));
  overflow: hidden;
  color: var(--bc-auth-primary-dark);
  font-size: 1.05rem;
  font-weight: 800;
}

.bc-auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.bc-auth-head {
  text-align: center;
  margin-bottom: 18px;
}

.bc-auth-head h2,
.bc-auth-card--done h2 {
  margin: 0;
  color: var(--bc-auth-text);
  font-size: 1.18rem;
  line-height: 1.8;
  font-weight: 800;
}

.bc-auth-head p,
.bc-auth-card--done p {
  margin: 6px 0 0;
  color: var(--bc-auth-muted);
  font-size: 0.9rem;
  line-height: 1.9;
}

.bc-auth-form {
  margin: 0;
}

.bc-auth-step {
  display: grid;
  gap: 12px;
}

.bc-auth-step[hidden] {
  display: none;
}

.bc-auth-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.bc-auth-field span {
  color: var(--bc-auth-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.bc-auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--bc-auth-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bc-auth-text);
  padding: 0 14px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.bc-auth-field input:focus {
  border-color: var(--bc-auth-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc-auth-primary) 16%, transparent);
  background: #f9fffc;
  background: color-mix(in srgb, var(--bc-auth-primary) 4%, #fff);
}

.bc-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bc-auth-primary), #0ea5e9);
  color: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.bc-auth-button:hover,
.bc-auth-button:focus {
  color: #fff;
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.bc-auth-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.bc-auth-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--bc-auth-line);
  background: #f9fafb;
  color: var(--bc-auth-muted);
  font-size: 0.86rem;
}

.bc-auth-phone-row span {
  direction: ltr;
  color: var(--bc-auth-text);
  font-weight: 800;
}

.bc-auth-phone-row button,
.bc-auth-resend,
.bc-auth-bot-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bc-auth-primary-dark);
  padding: 0;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.bc-auth-code-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bc-auth-code-grid input {
  width: 100%;
  aspect-ratio: 1;
  min-height: 46px;
  border: 1px solid var(--bc-auth-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bc-auth-text);
  text-align: center;
  font-size: 1.22rem;
  font-weight: 900;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.bc-auth-code-grid input:focus {
  border-color: var(--bc-auth-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc-auth-primary) 16%, transparent);
}

.bc-auth-code-grid input.is-filled {
  border-color: var(--bc-auth-primary);
  background: var(--bc-auth-soft);
  color: var(--bc-auth-primary-dark);
}

.bc-auth-resend {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--bc-auth-primary-dark);
  font-size: 0.85rem;
}

.bc-auth-resend:disabled {
  color: var(--bc-auth-muted);
  cursor: default;
}

.bc-auth-resend b {
  direction: ltr;
  font-weight: 900;
}

.bc-auth-message {
  min-height: 28px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--bc-auth-muted);
  font-size: 0.86rem;
  line-height: 1.8;
  text-align: center;
}

.bc-auth-message.is-error {
  color: #b91c1c;
}

.bc-auth-message.is-success {
  color: #047857;
}

.bc-auth-message.is-pending {
  color: var(--bc-auth-primary-dark);
}

.bc-auth-bot-link {
  display: block;
  width: fit-content;
  margin: 6px auto 0;
  font-size: 0.86rem;
}

.bc-auth-bot-link[hidden] {
  display: none;
}

@media (max-width: 420px) {
  .bc-auth-wrap {
    padding-inline: 10px;
  }

  .bc-auth-card {
    padding: 18px;
  }

  .bc-auth-code-grid {
    gap: 6px;
  }

  .bc-auth-code-grid input {
    min-height: 42px;
    font-size: 1.08rem;
  }
}
