.tmfua-open {
  overflow: hidden;
}

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

.tmfua-modal {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tmfua-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 20, 0.78);
}

.tmfua-panel {
  position: relative;
  width: min(440px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  color: #f8fafc;
  background: #101425;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.tmfua-panel h2 {
  margin: 0 46px 16px 0;
  font-size: 24px;
  line-height: 1.2;
}

.tmfua-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
  cursor: pointer;
}

.tmfua-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.tmfua-tabs button,
.tmfua-form button,
.tmfua-logout,
.tmfua-favorite button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.tmfua-tabs button {
  min-height: 42px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.tmfua-tabs button.is-active {
  color: #111827;
  background: #74f7d1;
}

.tmfua-message {
  min-height: 18px;
  margin-bottom: 8px;
  color: #74f7d1;
  font-size: 14px;
}

.tmfua-message.is-error {
  color: #fca5a5;
}

.tmfua-form,
.tmfua-account {
  display: none;
}

.tmfua-form.is-active,
.tmfua-account.is-active {
  display: grid;
  gap: 14px;
}

.tmfua-form label {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-weight: 700;
}

.tmfua-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tmfua-password-field {
  position: relative;
  display: block;
}

.tmfua-password-field input {
  width: 100%;
  padding-right: 52px;
}

.tmfua-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 36px;
  min-height: 0;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #111827;
  background: #74f7d1;
  cursor: pointer;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tmfua-password-toggle:hover {
  color: #111827;
  background: #8cf9da;
}

.tmfua-form button:not(.tmfua-password-toggle),
.tmfua-logout {
  min-height: 42px;
  color: #111827;
  background: #74f7d1;
}

.tmfua-form button[type="submit"] {
  margin-top: 10px;
}

.tmfua-form small {
  color: #94a3b8;
}

.tmfua-favorites {
  display: grid;
  gap: 8px;
}

.tmfua-favorite {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.tmfua-favorite a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.tmfua-favorite button {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: rgba(248, 113, 113, 0.28);
}

.tmfua-favorites-page .tmf-empty-state .tmf-pill-button {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  text-decoration: none;
}

.tmfua-user-name {
  color: #74f7d1;
  font-weight: 950;
  text-shadow: 0 0 22px rgba(116, 247, 209, .34);
}

.tmfua-favorite-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tmfua-favorite-card.is-selected .tmf-card-link {
  box-shadow: 0 0 0 2px #74f7d1, 0 16px 38px rgba(39, 215, 206, .18);
}

.tmfua-select-favorite {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 11px;
  color: #fff;
  background: rgba(8, 9, 19, .82);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.tmfua-favorites-page.is-select-mode .tmfua-select-favorite {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tmfua-select-favorite input {
  width: 16px;
  height: 16px;
  accent-color: #74f7d1;
}

.tmfua-remove-favorite-card {
  min-height: 40px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 12px;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  cursor: pointer;
  font-weight: 850;
  transition: .18s ease;
}

.tmfua-remove-favorite-card:hover {
  color: #fff;
  background: rgba(248, 113, 113, 0.24);
}

.tmfua-remove-favorite-card:disabled {
  opacity: .55;
  cursor: wait;
}

.tmfua-favorites-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tmfua-select-mode-toggle {
  border: 1px solid rgba(116, 247, 209, .28);
  color: #dffcf6;
  background: rgba(116, 247, 209, .1);
}

.tmfua-select-mode-toggle.is-active {
  color: #111827;
  background: #74f7d1;
}

.tmfua-bulk-favorites {
  position: sticky;
  top: 86px;
  z-index: 20;
  margin: 0 0 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(116, 247, 209, .3);
  border-radius: 16px;
  color: #dffcf6;
  background: rgba(16, 20, 37, .92);
  box-shadow: 0 14px 38px rgba(0,0,0,.26);
  backdrop-filter: blur(14px);
}

.tmfua-bulk-remove,
.tmfua-confirm-yes,
.tmfua-confirm-no {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.tmfua-bulk-remove,
.tmfua-confirm-yes {
  color: #fff;
  background: #e25353;
}

.tmfua-bulk-remove:disabled {
  opacity: .55;
  cursor: wait;
}

.tmfua-confirm[hidden] {
  display: none;
}

.tmfua-confirm {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tmfua-confirm-panel {
  position: relative;
  width: min(380px, 94vw);
  padding: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  color: #f8fafc;
  background: #101425;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.tmfua-confirm-panel h2 {
  margin: 0 0 8px;
}

.tmfua-confirm-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.tmfua-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.tmfua-confirm-no {
  color: #e5e7eb;
  background: rgba(255,255,255,.1);
}
