/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Page ── */
.tb-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eae9e8;
  font-family: 'Inter', sans-serif;
  padding: 24px;
}

.tb-login-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1160px;
  gap: 0;
}

/* ── Card ── */
.tb-login-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 3px 64px 20px;
  width: 46%;
  min-width: 420px;
  flex-shrink: 0;
}
.pd-01 {
  padding: 60px 64px 56px;
}

/* ── Back Button ── */
.tb-login-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #d4d4d4;
  background: #ffffff;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 16px;
}

.tb-login-back:hover {
  background: #f5f5f5;
  border-color: #272727;
}

.tb-login-back-icon {
  display: block;
}

/* ── Sparkle Icon ── */
.tb-login-icon {
  text-align: center;
  margin-bottom: 24px;
}

.tb-login-sparkle {
  display: inline-block;
}

/* ── Headings ── */
.tb-login-title {
  font-size: 38px;
  font-weight: 700;
  color: #272727;
  text-align: center;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.tb-login-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: #666666;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

/* ── Form ── */
.tb-login-form {
  display: flex;
  flex-direction: column;
}

.tb-login-field {
  margin-bottom: 28px;
  flex: 1;
  min-width: 0;
}

.tb-login-row {
  display: flex;
  gap: 20px;
}

.tb-login-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #272727;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.tb-login-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid #272727;
  outline: none;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  padding: 4px 0 8px;
  background: transparent;
  color: #272727;
}

.tb-login-input:focus {
  border-bottom-color: #E87422;
}

/* ── Password toggle ── */
.tb-login-password-wrap {
  position: relative;
}

.tb-login-password-wrap .tb-login-input {
  padding-right: 36px;
}

.tb-login-toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-login-eye-icon {
  display: block;
}

/* ── Options row ── */
.tb-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.tb-login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.tb-login-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #272727;
  cursor: pointer;
  margin: 0;
}

.tb-login-remember-text {
  font-size: 14px;
  font-weight: 400;
  color: #272727;
  letter-spacing: -0.03em;
}

.tb-login-forgot {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.tb-login-forgot:hover {
  text-decoration: underline;
}

/* ── Buttons ── */
.tb-login-btn {
  width: 100%;
  height: 52px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.15s;
}

.tb-login-btn:hover {
  opacity: 0.85;
}

.tb-login-btn-primary {
  background: #272727;
  color: #ffffff;
  margin-bottom: 14px;
}

.tb-login-btn-secondary {
  background: #eae9e8;
  color: #272727;
}

.tb-login-globe-icon {
  display: block;
  flex-shrink: 0;
}

.tb-login-btn-text {
  display: inline-block;
}

/* ── Footer Text ── */
.tb-login-footer-text {
  text-align: center;
  font-size: 14px;
  color: #666666;
  letter-spacing: -0.03em;
  margin-top: 20px;
}

.tb-login-footer-link {
  color: #272727;
  font-weight: 700;
  text-decoration: none;
}

.tb-login-footer-link:hover {
  text-decoration: underline;
}

/* ── Illustration ── */
.tb-login-illustration {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 24px;
}

.tb-welcome-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: #272727;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.tb-welcome-heading em {
  font-style: italic;
  color: #E87422;
}

.tb-login-illustration-img {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}

@media (min-width: 901px) {
  .tb-signup-page .tb-login-back {
    position: relative;
    top: 64px;
    left: -30px;
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .tb-login-container {
    flex-direction: column;
  }

  .tb-login-card {
    width: 100%;
    min-width: 0;
    max-width: 480px;
  }

  .tb-login-illustration {
    padding-left: 0;
    margin-top: 32px;
  }

  .tb-login-illustration-img {
    max-height: 400px;
  }

  .tb-login-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ── Validation States ── */
.tb-login-input.is-valid {
  border-bottom-color: #16a34a !important;
}
.tb-login-input.is-invalid {
  border-bottom-color: #dc2626 !important;
}
.tb-login-field-wrap {
  position: relative;
}
.tb-field-icon {
  position: absolute;
  right: 0;
  bottom: 8px;
  font-size: 14px;
  pointer-events: none;
  display: none;
}
.tb-field-icon.show { display: block; }
.tb-field-icon.valid { color: #16a34a; }
.tb-field-icon.invalid { color: #dc2626; }
.tb-login-password-wrap .tb-field-icon {
  right: 36px;
}
.tb-field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}
.tb-field-error.show { display: block; }

/* ── Flash Alerts ── */
.tb-flash-alerts { margin-bottom: 20px; }
.tb-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.tb-alert-error, .tb-alert-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.tb-alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.tb-alert-warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* ── Toast Notifications ── */
.tb-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tb-toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  animation: tbToastIn 0.35s ease;
  min-width: 280px;
  max-width: 420px;
  color: #fff;
}
.tb-toast-error { background: #dc2626; }
.tb-toast-success { background: #16a34a; }
.tb-toast-warning { background: #d97706; }
@keyframes tbToastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Password Requirements ── */
.tb-password-reqs {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.tb-req {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tb-req i { font-size: 10px; color: #d4d4d4; }
.tb-req.met i { color: #16a34a; }

/* ══ Forgot Password ══ */
.tb-fp-hidden { display: none !important; }

.tb-fp-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.tb-fp-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid #d4d4d4;
  color: #aaa;
  background: #fff;
  transition: all .3s;
}
.tb-fp-dot.active { border-color: #272727; color: #272727; background: #f5f5f5; }
.tb-fp-dot.done { border-color: #16a34a; color: #fff; background: #16a34a; }
.tb-fp-line { width: 36px; height: 2px; background: #d4d4d4; transition: background .3s; }
.tb-fp-line.done { background: #16a34a; }

.tb-fp-otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.tb-fp-otp-input {
  width: 48px;
  height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: none;
  border-bottom: 2px solid #d4d4d4;
  border-radius: 0;
  background: transparent;
  font-family: 'Inter', sans-serif;
  transition: border-color .2s;
  outline: none;
}
.tb-fp-otp-input:focus { border-bottom-color: #272727; }
.tb-fp-otp-input.filled { border-bottom-color: #272727; }

.tb-fp-resend-row {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #777;
}
.tb-fp-resend-btn {
  background: none;
  border: none;
  color: #272727;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'Inter', sans-serif;
  padding: 0;
}
.tb-fp-resend-btn:hover { color: #E87422; }

.tb-fp-success-icon {
  text-align: center;
  margin-bottom: 16px;
}
.tb-fp-success-icon i {
  font-size: 56px;
  color: #16a34a;
}

@keyframes tbShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
