.tb-auth-main {
  box-sizing: border-box;
  min-height: calc(100vh - 150px);
  padding: 230px 16px 80px;
  background: #f8fafc;
  overflow-x: hidden;
}

html:has(.tb-auth-main),
body:has(.tb-auth-main) {
  overflow-x: hidden;
}

.tb-auth-main *,
.tb-auth-main *::before,
.tb-auth-main *::after {
  box-sizing: border-box;
}

.tb-auth-card {
  width: min(100%, 540px);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  padding: 42px 48px;
  border: 1px solid #eef0f4;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(10, 17, 40, 0.10);
  text-align: center;
}

.tb-auth-card--wide {
  width: min(100%, 820px);
  max-width: calc(100vw - 32px);
}

.tb-auth-title {
  margin: 0 0 32px;
  color: #0a1128;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.25;
}

.tb-auth-form {
  display: grid;
  gap: 22px;
}

.tb-auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: right;
}

.tb-auth-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tb-auth-field--full,
.tb-auth-actions,
.tb-auth-notice {
  grid-column: 1 / -1;
}

.tb-auth-label {
  color: #0a1128;
  font-size: 15px;
  font-weight: 800;
}

.tb-auth-input {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 1px solid #dfe3ea;
  border-radius: 17px;
  background: #fff;
  color: #0a1128;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.tb-auth-input:focus {
  border-color: #ed1c24;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.08);
}

.tb-auth-button {
  width: 100%;
  height: 62px;
  border: 0;
  border-radius: 17px;
  background: #9b0000;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(133, 0, 0, 0.20);
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.tb-auth-button:hover {
  background: #850000;
  transform: translateY(-1px);
}

.tb-auth-switch {
  margin: 24px 0 0;
  color: #0a1128;
  font-size: 15px;
}

.tb-auth-switch a,
.tb-auth-terms a {
  color: #ed1c24;
  font-weight: 900;
  text-decoration: none;
}

.tb-auth-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #0a1128;
  font-size: 15px;
}

.tb-auth-terms input {
  width: 18px;
  height: 18px;
}

.tb-auth-notice {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
}

.tb-auth-notice--error {
  border: 1px solid #fee2e2;
  background: #fff1f2;
  color: #dc2626;
}

.tb-auth-notice--success {
  border: 1px solid #dcfce7;
  background: #f0fdf4;
  color: #16a34a;
}

@media (max-width: 1023px) {
  .tb-auth-main {
    min-height: calc(100vh - 80px);
    padding-top: 118px;
  }
}

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

  .tb-auth-card {
    width: 100%;
    padding: 30px 20px;
    border-radius: 22px;
  }

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

  .tb-auth-grid {
    grid-template-columns: 1fr;
  }

  .tb-auth-input {
    height: 54px;
    border-radius: 15px;
  }
}
