/* ===== Протокол24 header profile emergency fix v3.3 ===== */

/* возвращаем нормальную высоту шапки и не даём профилю ломать layout */
.p24-header {
  min-height: auto !important;
}

.p24-header-inner {
  min-height: 76px !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(260px, 340px) !important;
  align-items: center !important;
  gap: 24px !important;
}

.p24-brand {
  justify-self: start !important;
}

.p24-nav {
  justify-self: center !important;
  justify-content: center !important;
}

.p24-actions {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.p24-actions .p24-btn {
  min-width: 0 !important;
}

.p24-user-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 46px !important;
  max-width: 230px !important;
  padding: 5px 13px 5px 6px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #dce6f7 !important;
  color: #10234f !important;
  box-shadow: 0 12px 30px rgba(20,35,79,.06) !important;
  text-decoration: none !important;
  overflow: hidden !important;
}

.p24-user-avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(145deg, #1e72ff, #0a3dca) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 950 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  box-shadow: 0 8px 20px rgba(21,93,252,.20) !important;
}

.p24-user-meta {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
  line-height: 1.05 !important;
}

.p24-user-label {
  color: #6b7b99 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
}

.p24-user-name {
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #10234f !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.p24-logout-link {
  color: #647497 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.p24-logout-link:hover {
  color: #155dfc !important;
}

/* На мобильном оставляем только круг профиля */
@media (max-width: 980px) {
  .p24-header-inner {
    display: flex !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }

  .p24-nav {
    display: none !important;
  }

  .p24-actions {
    margin-left: auto !important;
  }

  .p24-user-pill {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 4px !important;
    border-radius: 15px !important;
  }

  .p24-user-meta,
  .p24-logout-link,
  .p24-actions .p24-login {
    display: none !important;
  }
}