/* ── Кнопки в шапке (меню) ──────────────────────────── */
.trpro-header-auth-item,
.trpro-header-auth-fallback {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-left: 8px !important;
  list-style: none !important;
}

#trpro-nav-auth-placeholder:not(.trpro-header-auth-ready),
#trpro-header-auth-fallback:not(.trpro-header-auth-ready) {
  visibility: hidden;
}

.trpro-header-auth-fallback {
  position: fixed;
  top: 14px;
  right: 56px;
  z-index: 99990;
  margin: 0 !important;
}

.trpro-header-auth-fallback.is-mounted {
  position: static;
  top: auto;
  right: auto;
}

#trpro-header-auth-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#trpro-header-auth-bar .trpro-hdr-link {
  background: none !important;
  border: none !important;
  color: #1a1a1a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  padding: 8px 4px !important;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#trpro-header-auth-bar .trpro-hdr-link:hover {
  color: #1565c0 !important;
}

#trpro-header-auth-bar .trpro-hdr-register {
  background: #1565c0 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
}

#trpro-header-auth-bar .trpro-hdr-register:hover {
  background: #0d47a1 !important;
}

#trpro-header-auth-bar .trpro-hdr-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  color: #1a1a1a !important;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  max-width: 180px;
}

#trpro-header-auth-bar .trpro-hdr-user:hover {
  background: rgba(21, 101, 192, 0.08);
  color: #1565c0 !important;
}

#trpro-header-auth-bar .trpro-hdr-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

#trpro-header-auth-bar .trpro-hdr-avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Модальное окно входа ───────────────────────────── */
#trpro-auth-modal-root {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

#trpro-auth-modal-root.is-open {
  display: flex;
}

.trpro-auth-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.trpro-auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none !important;
  background: #f3f4f6 !important;
  color: #666 !important;
  border-radius: 50% !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.trpro-auth-modal-close:hover {
  background: #e5e7eb !important;
}

.trpro-auth-modal h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #111;
  text-align: center;
}

.trpro-auth-modal-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  line-height: 1.45;
}

.trpro-auth-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  margin-bottom: 18px;
}

#trpro-auth-modal-root .trpro-auth-modal-tab {
  flex: 1;
  padding: 10px 12px;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

#trpro-auth-modal-root .trpro-auth-modal-tab.active {
  background: #fff !important;
  color: #1565c0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

#trpro-auth-modal-root .trpro-auth-modal-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 0;
  background: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  color: #1f2937 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

#trpro-auth-modal-root .trpro-auth-modal-google:hover {
  border-color: #9ca3af !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.trpro-auth-modal-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trpro-auth-modal-or::before,
.trpro-auth-modal-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.trpro-auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#trpro-auth-modal-root .trpro-auth-modal-input {
  padding: 12px 14px;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  color: #111 !important;
  background: #fff !important;
}

#trpro-auth-modal-root .trpro-auth-modal-input:focus {
  border-color: #1565c0 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12) !important;
}

#trpro-auth-modal-root .trpro-auth-modal-submit {
  padding: 13px 16px;
  margin-top: 4px;
  background: linear-gradient(135deg, #1976d2, #1565c0) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.trpro-auth-modal-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 640px) {
  .trpro-header-auth-fallback:not(.is-mounted) {
    top: 10px;
    right: 10px;
    gap: 6px;
  }
  #trpro-header-auth-bar .trpro-hdr-link {
    font-size: 12px !important;
    padding: 6px 2px !important;
  }
  #trpro-header-auth-bar .trpro-hdr-register {
    padding: 8px 12px !important;
    font-size: 11px !important;
  }
}
