:root {
  --tb-auth-bg: #131517;
  --tb-auth-card: #131517;
  --tb-auth-btn: #1f2228;
  --tb-auth-text: #ffffff;
  --tb-auth-muted: rgba(255, 255, 255, 0.65);
  --tb-auth-border: rgba(255, 255, 255, 0.08);
  --tb-auth-overlay: rgba(0, 0, 0, 0.45);
  --tb-auth-radius: 22px;
  --tb-auth-input-bg: #131517;
  --tb-auth-input-border: #2b2c2e;
  --tb-auth-input-active: #27303f;
}

body.tb-auth-no-scroll {
  overflow: hidden !important;
}

body.tb-auth-no-scroll > *:not(#tb-auth-overlay) {
  filter: blur(6px);
  transition: filter 0.2s ease;
  pointer-events: none;
  user-select: none;
}

#tb-auth-widget {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tb-auth-widget-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tb-auth-trigger,
.tb-auth-account-link,
.tb-auth-dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 33px;
  min-height: 33px;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.tb-auth-trigger {
  background: #001A66;
  color: #B0C2F9 !important;
}

.tb-auth-trigger:hover {
  background: #0033cc;
  color: #ffffff !important;
}

.tb-auth-account-link {
  background: #333333;
  color: #CCCCCC !important;
}

.tb-auth-account-link:hover {
  background: #222222;
  color: #ffffff !important;
}

.tb-auth-dashboard-link {
  background: #001A66;
  color: #B0C2F9 !important;
}

.tb-auth-dashboard-link:hover {
  background: #0033cc;
  color: #ffffff !important;
}

.tb-auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--tb-auth-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tb-auth-overlay.is-open {
  display: flex;
}

.tb-auth-modal {
  width: 800px;
  max-width: 100%;
  height: 500px;
  max-height: 500px;
  background: var(--tb-auth-card);
  color: var(--tb-auth-text);
  border-radius: var(--tb-auth-radius);
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  direction: rtl;
}

.tb-auth-close,
.tb-auth-back {
  position: absolute;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

.tb-auth-close {
  right: 16px;
  left: auto;
}

.tb-auth-back {
  left: 16px;
  right: auto;
  padding: 0;
  margin: 0;
}

.tb-auth-back--global {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.tb-auth-back--global.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.tb-auth-close:hover,
.tb-auth-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tb-auth-modal__image {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #0f1113;
}

.tb-auth-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    #0f1113;
  color: rgba(255,255,255,0.55);
  font-size: 18px;
  letter-spacing: 0.5px;
}

.tb-auth-modal__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
  overflow: hidden;
  direction: rtl;
}

.tb-auth-image-placeholder img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 22px;
}

.tb-auth-view {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 72px);
  max-width: 320px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  will-change: opacity, transform;
}

.tb-auth-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

.tb-auth-view.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 10px));
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.tb-auth-title {
  margin: 0 0 24px;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.tb-auth-title--center {
  text-align: center;
}

.tb-auth-option-btn,
.tb-auth-submit-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--tb-auth-border);
  border-radius: 14px;
  background: var(--tb-auth-btn);
  color: #fff;
  cursor: pointer;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.tb-auth-option-btn:hover,
.tb-auth-submit-btn:hover {
  opacity: 0.96;
}

.tb-auth-option-btn + .tb-auth-option-btn {
  margin-top: 14px;
}

.tb-auth-option-btn__label {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.tb-auth-option-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}

.tb-auth-option-btn {
  gap: 10px;
}

.tb-auth-or {
  text-align: center;
  color: var(--tb-auth-muted);
  font-size: 14px;
  margin: 16px 0;
}

.tb-auth-chooser-register {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.tb-auth-chooser-register__muted {
  color: rgba(255,255,255,0.45);
}

.tb-auth-inline-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin: 0;
  text-decoration: none;
}

.tb-auth-inline-link:hover {
  color: #ffffff;
  opacity: 0.9;
}

.tb-auth-inline-link--small {
  font-size: 13px;
}

.tb-auth-team-login {
  margin-top: 18px;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}

.tb-auth-team-login span {
  color: rgba(255,255,255,0.55);
}

.tb-auth-team-login a {
  color: #fff !important;
  text-decoration: none !important;
  margin-inline-start: 4px;
}

.tb-auth-form {
  width: 100%;
}

.tb-auth-field {
  margin-bottom: 12px;
  text-align: right;
  width: 100%;
}

.tb-auth-field label {
  display: none;
}

.tb-auth-password-wrap {
  position: relative;
  width: 100%;
}

.tb-auth-field input,
.tb-auth-field input[type="email"],
.tb-auth-field input[type="password"],
.tb-auth-field input[type="text"] {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 54px !important;
  border-radius: 14px !important;
  border: 2px solid #2b2c2e !important;
  background: #131517 !important;
  color: #fff !important;
  padding: 0 16px !important;
  outline: none;
  box-sizing: border-box !important;
  text-align: right;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tb-auth-password-wrap input,
.tb-auth-password-wrap input[type="password"],
.tb-auth-password-wrap input[type="text"] {
  padding-left: 76px !important;
}

.tb-auth-field input::placeholder {
  color: rgba(255,255,255,0.45);
}

.tb-auth-field input:hover,
.tb-auth-field input:focus,
.tb-auth-field input[type="email"]:hover,
.tb-auth-field input[type="email"]:focus,
.tb-auth-field input[type="password"]:hover,
.tb-auth-field input[type="password"]:focus,
.tb-auth-field input[type="text"]:hover,
.tb-auth-field input[type="text"]:focus {
  background: #27303f !important;
  border-color: #ffffff !important;
}

.tb-auth-field input:not(:placeholder-shown):not(:focus),
.tb-auth-field input[type="email"]:not(:placeholder-shown):not(:focus),
.tb-auth-field input[type="password"]:not(:placeholder-shown):not(:focus),
.tb-auth-field input[type="text"]:not(:placeholder-shown):not(:focus) {
  background: #27303f !important;
  border-color: #3d4553 !important;
}

.tb-auth-field input:-webkit-autofill,
.tb-auth-field input:-webkit-autofill:hover,
.tb-auth-field input:-webkit-autofill:focus,
.tb-auth-field input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #27303f inset !important;
  box-shadow: 0 0 0 1000px #27303f inset !important;
  border: 2px solid #3d4553 !important;
}

.tb-auth-password-toggle {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1;
}

.tb-auth-password-toggle:hover {
  color: #ffffff;
}

.tb-auth-password-toggle__hide {
  display: none;
}

.tb-auth-password-toggle.is-active .tb-auth-password-toggle__show {
  display: none;
}

.tb-auth-password-toggle.is-active .tb-auth-password-toggle__hide {
  display: inline;
}

.tb-auth-submit-btn {
  display: flex;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  justify-content: center;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box !important;
}

.tb-auth-links,
.tb-auth-register-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tb-auth-link {
  text-decoration: none !important;
  font-size: 13px;
}

.tb-auth-link--forgot {
  color: rgba(255,255,255,0.8) !important;
}

.tb-auth-link--forgot:hover {
  color: #fff !important;
}

.tb-auth-signup-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tb-auth-signup-muted {
  color: rgba(255,255,255,0.45);
  font-size: 13px;
}

.tb-auth-register-footer {
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .tb-auth-overlay {
    padding: 16px;
  }

  .tb-auth-modal {
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 420px;
    grid-template-columns: 1fr;
  }

  .tb-auth-modal__image {
    display: none;
  }

  .tb-auth-modal__content {
    padding: 54px 24px 28px;
    min-height: 420px;
    align-items: center;
  }

  .tb-auth-title {
    font-size: 24px;
  }

  .tb-auth-view {
    width: calc(100% - 48px);
    max-width: 100%;
  }

  .tb-auth-links,
  .tb-auth-register-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tb-auth-view--register .tb-auth-register-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }

  .tb-auth-view--register .tb-auth-register-footer .tb-auth-signup-muted,
  .tb-auth-view--register .tb-auth-register-footer .tb-auth-inline-link {
    font-size: 12px;
  }

  .tb-auth-signup-wrap {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tb-auth-view,
  .tb-auth-view.is-active,
  .tb-auth-view.is-leaving {
    transition: none;
  }
}

.tb-auth-message {
  display: none;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.tb-auth-message.is-error {
  display: block;
  background: rgba(255, 71, 87, 0.14);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: #ffffff;
}

.tb-auth-message.is-success {
  display: block;
  background: rgba(46, 213, 115, 0.14);
  border: 1px solid rgba(46, 213, 115, 0.35);
  color: #ffffff;
}

.tb-auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Mobile pricing button */
.tb-auth-pricing-link {
  display: none;
}

@media (max-width: 767px) {
  .tb-auth-pricing-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 33px;
    min-height: 33px;
    padding: 0 16px;
    background: #000000;
    color: #ffffff !important;
    border: 1px solid #333333;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none !important;
  }

  .tb-auth-pricing-link:hover {
    background: #000000;
    color: #ffffff !important;
  }
}

.tb-auth-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

@media (min-width: 768px) {
  .tb-auth-modal__image,
  .tb-auth-image-placeholder {
    height: 500px;
    max-height: 500px;
  }

  .tb-auth-view--register .tb-auth-title,
  .tb-auth-view--forgot .tb-auth-title,
  .tb-auth-view--email .tb-auth-title {
    margin-bottom: 18px;
  }
}

.tb-auth-view .tb-auth-back {
  display: none;
}
