.ib-auth-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--bd, #d7deea) 82%, transparent);
  border-radius: 18px;
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  box-shadow: 0 22px 70px color-mix(in srgb, #10233f 24%, transparent);
}

.ib-auth-dialog::backdrop {
  background: color-mix(in srgb, #16233a 54%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ib-auth-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.ib-auth-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.ib-auth-head img {
  display: block;
  width: 172px;
  height: auto;
  margin-bottom: 14px;
}

.ib-auth-head h2 {
  margin: 0;
  color: var(--tp, #152033);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}

.ib-auth-head p {
  margin: 7px 0 0;
  color: var(--ts, #687386);
  font-size: 14px;
  line-height: 1.55;
}

.ib-auth-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--bd, #d7deea);
  border-radius: 999px;
  background: var(--s1, #fff);
  color: var(--ts, #687386);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ib-auth-close:hover {
  border-color: var(--ac, #3867f6);
  color: var(--ac, #3867f6);
}

.ib-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--bd, #d7deea);
  border-radius: 12px;
  background: var(--s2, #f4f7fb);
}

.ib-auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ts, #687386);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ib-auth-tabs button.on {
  background: var(--s1, #fff);
  color: var(--ac, #3867f6);
  box-shadow: 0 2px 9px color-mix(in srgb, #0f2545 10%, transparent);
}

.ib-auth-form {
  display: grid;
  gap: 12px;
}

.ib-auth-field {
  display: grid;
  gap: 7px;
  color: var(--tp, #152033);
  font-size: 13px;
  font-weight: 700;
}

.ib-auth-field input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid var(--bd, #d7deea);
  border-radius: 10px;
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.ib-auth-field input:focus {
  border-color: var(--ac, #3867f6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac, #3867f6) 15%, transparent);
}

.ib-auth-company-wrap {
  position: relative;
}

.ib-auth-company-list {
  position: absolute;
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--bd, #d7deea);
  border-radius: 12px;
  background: var(--s1, #fff);
  box-shadow: 0 12px 32px color-mix(in srgb, #10233f 14%, transparent);
}

.ib-auth-company-list[hidden] {
  display: none;
}

.ib-auth-company-item {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bd, #d7deea) 72%, transparent);
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.ib-auth-company-item:last-child {
  border-bottom: 0;
}

.ib-auth-company-item:hover,
.ib-auth-company-item.active {
  background: color-mix(in srgb, var(--ac, #3867f6) 10%, #fff);
  color: var(--ac, #3867f6);
}

.ib-auth-otp {
  letter-spacing: .16em;
  text-align: center;
}

.ib-auth-actions {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.ib-auth-primary,
.ib-auth-secondary,
.ib-auth-google {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.ib-auth-google {
  gap: 10px;
  width: 100%;
  border: 1px solid var(--bd, #d7deea);
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  box-shadow: none;
}

.ib-auth-google-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 2px;
}

.ib-auth-google-wrap p {
  margin: 0;
  color: var(--ts, #687386);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.ib-auth-google-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ib-auth-google span {
  display: inline-block;
}

.ib-auth-google:hover {
  border-color: var(--ac, #3867f6);
  box-shadow: 0 8px 22px color-mix(in srgb, #10233f 7%, transparent);
}

.ib-auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 4px 0 2px;
  color: var(--ts, #687386);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.ib-auth-divider::before,
.ib-auth-divider::after {
  content: "";
  height: 1px;
  background: var(--bd, #d7deea);
}

.ib-auth-primary {
  border: 1px solid var(--ac, #3867f6);
  background: var(--ac, #3867f6);
  color: #fff;
}

.ib-auth-primary:disabled,
.ib-auth-secondary:disabled,
.ib-auth-google:disabled {
  opacity: .58;
  cursor: wait;
}

.ib-auth-secondary {
  border: 1px solid var(--bd, #d7deea);
  background: var(--s1, #fff);
  color: var(--ac, #3867f6);
}

.ib-auth-status {
  margin: 0;
  color: var(--ts, #687386);
  font-size: 13px;
  line-height: 1.5;
}

.ib-auth-status:empty {
  display: none;
}

.ib-auth-status:not(:empty) {
  display: block;
  min-height: 20px;
}

.ib-auth-status.is-error {
  color: var(--err, #d92d20);
}

.ib-auth-status.is-success {
  color: var(--ok, #138a55);
}

.ib-notice-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(450px, calc(100vw - 28px));
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--bd, #d7deea) 84%, transparent);
  border-radius: 16px;
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  box-shadow: 0 22px 70px color-mix(in srgb, #10233f 22%, transparent);
}

.ib-notice-dialog::backdrop {
  background: color-mix(in srgb, #16233a 52%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ib-notice-card {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.ib-notice-brand {
  color: var(--ac, #3867f6);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.ib-notice-card h2 {
  margin: 0;
  color: var(--tp, #152033);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: 0;
}

.ib-notice-card p {
  margin: 0;
  color: var(--ts, #687386);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  white-space: pre-line;
}

.ib-notice-input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid var(--bd, #d7deea);
  border-radius: 10px;
  background: var(--s1, #fff);
  color: var(--tp, #152033);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}

.ib-notice-input:focus {
  border-color: var(--ac, #3867f6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac, #3867f6) 15%, transparent);
}

.ib-notice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.ib-notice-actions button {
  min-width: 88px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ib-notice-secondary {
  border: 1px solid var(--bd, #d7deea);
  background: var(--s1, #fff);
  color: var(--ts, #687386);
}

.ib-notice-primary {
  border: 1px solid var(--ac, #3867f6);
  background: var(--ac, #3867f6);
  color: #fff;
}

.ib-notice-dialog.is-danger .ib-notice-primary {
  border-color: var(--err, #d92d20);
  background: var(--err, #d92d20);
}

.ib-notice-dialog.is-compact {
  width: min(390px, calc(100vw - 28px));
}

@media (max-width: 520px) {
  .ib-auth-dialog {
    width: min(440px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }

  .ib-auth-card {
    gap: 15px;
    padding: 20px;
  }

  .ib-auth-head img {
    width: 150px;
  }

  .ib-auth-head h2 {
    font-size: 20px;
  }

  .ib-notice-card {
    padding: 20px;
  }

  .ib-notice-card h2 {
    font-size: 19px;
  }

  .ib-notice-card p {
    font-size: 14px;
  }
}
