/* OKKwork — панель «Профиль другого пользователя / специалиста» */

#okkwork-specialist-profile-panel,
#okkwork-specialist-profile-panel.profile-panel {
  display: none !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#okkwork-specialist-profile-panel.is-open {
  display: flex !important;
  flex-direction: column !important;
  font-family: "Rubik", system-ui, sans-serif !important;
  position: fixed !important;
  z-index: 101575 !important;
  top: 0 !important;
  left: auto !important;
  right: var(--okkwork-menu-rail-width, 280px) !important;
  bottom: 0 !important;
  width: var(--okkwork-profile-panel-width, min(var(--okkwork-profile-panel-max-width, 920px), calc(100vw - var(--okkwork-menu-rail-width, 280px)))) !important;
  min-width: 0 !important;
  max-width: min(var(--okkwork-profile-panel-max-width, 920px), calc(100vw - var(--okkwork-menu-rail-width, 280px))) !important;
  height: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  background: #e8f4fc !important;
  border-right: 1px solid rgba(6, 88, 162, 0.16) !important;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
  visibility: visible !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(100%) !important;
  transform-origin: right center;
  transition: transform var(--okkwork-profile-slide-ms, 0.4s) var(--okkwork-profile-slide-ease, ease-in-out) !important;
  will-change: transform;
}

#okkwork-specialist-profile-panel.is-open.is-profile-entering,
#okkwork-specialist-profile-panel.is-open.is-slide-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#okkwork-specialist-profile-panel.is-open.is-slide-open,
body.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open.is-slide-open {
  transform: translateX(0) !important;
}

#okkwork-specialist-profile-panel.is-open.is-profile-leaving {
  opacity: 1 !important;
  pointer-events: none !important;
  transform: translateX(100%) !important;
}

#okkwork-specialist-profile-panel[hidden] {
  display: none !important;
}

body.okkwork-specialist-profile-panel-open.okkwork-user-menu-slider-open {
  overflow: hidden !important;
}

body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open,
body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open,
body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open.is-slide-open,
body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open.is-slide-open {
  right: 0 !important;
  width: min(var(--okkwork-profile-panel-max-width, 920px), 100vw) !important;
  max-width: min(var(--okkwork-profile-panel-max-width, 920px), 100vw) !important;
  pointer-events: none !important;
}

body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open .profile-panel__body,
body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open .profile-panel__close,
body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open .profile-panel__body,
body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open #okkwork-specialist-profile-panel.is-open .profile-panel__close {
  pointer-events: auto !important;
}

body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open .okkwork-user-menu-book,
body.okkwork-profile-from-org.okkwork-specialist-profile-panel-open .okkwork-user-menu-slider-backdrop,
body.okkwork-profile-from-org.okkwork-profile-panel-open .okkwork-user-menu-book,
body.okkwork-profile-from-org.okkwork-profile-panel-open .okkwork-user-menu-slider-backdrop,
body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open .okkwork-user-menu-book,
body.okkwork-org-structure-open.okkwork-specialist-profile-panel-open .okkwork-user-menu-slider-backdrop,
body.okkwork-org-structure-open.okkwork-profile-panel-open .okkwork-user-menu-book,
body.okkwork-org-structure-open.okkwork-profile-panel-open .okkwork-user-menu-slider-backdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

body.okkwork-specialist-profile-panel-open .okkwork-user-menu-slider-backdrop {
  z-index: 101500 !important;
  pointer-events: auto;
}

body.okkwork-specialist-profile-panel-open .okkwork-user-menu-book.is-slider-open {
  z-index: 101580 !important;
}

/* .profile-page__header, .profile-page__title, .profile-panel__close — из okkwork-user-profile-panel.css */

#okkwork-specialist-profile-panel .profile-panel__scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#okkwork-specialist-profile-panel .profile-panel__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.spec-profile-page__layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 14px 18px;
  padding: 12px 16px 12px;
  align-items: start;
}

.spec-profile-aside__name {
  margin: 0 0 4px;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(6, 88, 162, 1);
}

.spec-profile-aside__presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(81, 95, 108, 0.95);
}

.spec-profile-aside__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c83030;
  flex-shrink: 0;
}

.spec-profile-aside__dot.is-online {
  background: #22a06b;
}

.spec-profile-aside__seen {
  margin-left: 30px;
  color: rgba(81, 95, 108, 0.75);
  font-size: 12px;
}

.spec-profile-aside__avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.spec-profile-aside__avatar {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #f5d0e8;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(6, 88, 162, 0.12);
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.spec-profile-aside__chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 23px;
  padding: 5px 14px;
  border: 0;
  border-radius: 4px;
  background: #4d5f72;
  color: #fff;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.spec-profile-aside__chat-ico {
  display: block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.spec-profile-aside__chat-label {
  white-space: nowrap;
}

.spec-profile-aside__chat:hover {
  background: #3a4a5a;
}

.spec-profile-fields {
  margin: 0;
  padding: 0;
}

.spec-profile-field {
  margin: 0 0 6px;
}

.spec-profile-field dt {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(81, 95, 108, 0.85);
}

.spec-profile-field dd {
  margin: 0;
  font-size: 14px;
  color: rgba(6, 88, 162, 1);
  border-bottom: 1px dashed rgba(6, 88, 162, 0.35);
  padding-bottom: 3px;
}

.spec-profile-field__link {
  color: rgba(6, 88, 162, 1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.spec-profile-field__link:hover {
  color: #044a8a;
}

.spec-profile-field__plain {
  display: inline;
}

.spec-profile-manager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.spec-profile-manager__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #dce8f2;
}

.spec-profile-manager:hover span {
  text-decoration: underline;
}

.spec-profile-manager--unassigned {
  cursor: default;
}

.spec-profile-manager--unassigned:disabled {
  opacity: 1;
  color: inherit;
}

.spec-profile-manager--unassigned .spec-profile-manager__avatar {
  object-fit: contain;
  background: transparent;
}

.spec-profile-manager--unassigned:hover span {
  text-decoration: none;
}

.spec-profile-about {
  margin-top: 8px;
}

.spec-profile-about__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
}

.spec-profile-about__box {
  box-sizing: border-box;
  padding: 10px 12px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.4;
  color: rgba(81, 95, 108, 0.95);
  min-height: 84px;
  max-height: 160px;
  overflow-x: hidden;
  overflow-y: auto;
}

.spec-profile-main__head {
  margin-bottom: 6px;
}

.spec-profile-main__role {
  margin: 0;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  line-height: 1.2;
}

.spec-profile-card__role-code {
  font-size: 12px;
  color: rgba(81, 95, 108, 0.85);
  white-space: nowrap;
}

.spec-profile-card--hero {
  padding: 14px 16px 12px;
}

.spec-profile-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(6, 88, 162, 0.06);
}

.spec-profile-card__hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.spec-profile-card__profile-type {
  margin: 0;
  font-size: 14px;
  color: rgba(81, 95, 108, 1);
}

.spec-profile-card__role-code {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(81, 95, 108, 0.85);
  white-space: nowrap;
}

.spec-profile-card__profile-type strong {
  color: rgba(6, 88, 162, 1);
  font-weight: 500;
}

.spec-profile-card--hero .profile-stars,
.spec-profile-mkk-card__stars {
  --profile-star-on: #f5c518;
  --profile-star-off: #4d5f72;
  --profile-star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  line-height: 1;
}

.spec-profile-card--hero .profile-star,
.spec-profile-mkk-card__stars .profile-star {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-color: var(--profile-star-off);
  -webkit-mask-image: var(--profile-star-mask);
  mask-image: var(--profile-star-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.spec-profile-card--hero .profile-star.is-on,
.spec-profile-mkk-card__stars .profile-star.is-on {
  background-color: var(--profile-star-on);
}

.spec-profile-card__eff-label {
  margin: 0 0 2px;
  font-size: 12px;
  color: rgba(81, 95, 108, 0.9);
}

.spec-profile-card__eff-val {
  margin: 0;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  line-height: 1;
}

.spec-profile-card__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
}

.spec-profile-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.spec-profile-chart-head .spec-profile-card__title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.spec-profile-chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.spec-profile-chart-filters__btn {
  padding: 3px 8px;
  border: 1px solid rgba(6, 88, 162, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  font-family: "Rubik-Light", "Rubik", sans-serif;
  font-size: 10px;
  font-weight: 300;
  line-height: 1.2;
  color: rgba(81, 95, 108, 0.95);
  cursor: pointer;
  white-space: nowrap;
}

.spec-profile-chart-filters__btn:hover {
  border-color: rgba(6, 88, 162, 0.45);
  color: rgba(6, 88, 162, 1);
}

.spec-profile-chart-filters__btn.is-active {
  border-color: rgba(6, 88, 162, 0.55);
  background: rgba(6, 88, 162, 0.12);
  color: rgba(6, 88, 162, 1);
  font-weight: 500;
}

.spec-profile-line-chart {
  width: 100%;
  min-height: 156px;
  margin-bottom: 10px;
}

.spec-profile-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.spec-profile-trend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.spec-profile-trend {
  display: inline-block;
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.spec-profile-trend--negative {
  background: rgba(248, 180, 180, 0.55);
  color: #9b3030;
}

.spec-profile-trend--satisfactory {
  background: rgba(255, 214, 140, 0.55);
  color: #8a5a00;
}

.spec-profile-trend--positive {
  background: rgba(200, 230, 255, 0.7);
  color: rgba(6, 88, 162, 1);
}

/* 2×2: метрики и МКК — одна сетка, симметричные колонки и отступы */
.spec-profile-dash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-bottom: 10px;
}

.spec-profile-dash > .spec-profile-card {
  margin-bottom: 0;
}

.spec-profile-dash > .spec-profile-metric,
.spec-profile-dash > .spec-profile-card {
  min-width: 0;
  height: 100%;
}

.spec-profile-metric {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  padding: 8px 8px 10px;
  min-height: 0;
}

.spec-profile-metric__title {
  margin: 0 0 8px;
  width: 100%;
  font-family: "Rubik-Light", "Rubik", sans-serif;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.25;
  color: rgba(6, 88, 162, 1);
}

.spec-profile-metric__indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  width: 100%;
  max-width: 110px;
  margin: 0 auto;
  padding: 6px 10px;
  border-radius: 8px;
  box-sizing: border-box;
}

.spec-profile-metric--green .spec-profile-metric__indicator {
  background: var(--profile-dash-green-pill-bg, #bfe0d4);
}

.spec-profile-metric--red .spec-profile-metric__indicator {
  background: var(--profile-dash-red-pill-bg, #ddc9d3);
}

.spec-profile-metric__value {
  margin: 0;
  font-family: "Rubik-Bold", "Rubik", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.spec-profile-metric--green .spec-profile-metric__value {
  color: var(--profile-dash-green-strong, #11bc20);
}

.spec-profile-metric--red .spec-profile-metric__value {
  color: var(--profile-dash-red-strong, #e31212);
}

.spec-profile-mkk-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.spec-profile-mkk-card__avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #dce8f2;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(6, 88, 162, 0.1);
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.spec-profile-mkk-card__name {
  margin: 4px 0 0;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  line-height: 1.25;
}

.spec-profile-mkk-card__stars {
  margin: 2px 0 6px;
}

.spec-profile-mkk-card__eff-label {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(81, 95, 108, 0.85);
}

.spec-profile-mkk-card__eff {
  margin: 0;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  line-height: 1;
}

.spec-profile-mkk-card__assigned {
  margin: 6px 0 0;
  font-size: 11px;
  color: rgba(81, 95, 108, 0.8);
  line-height: 1.35;
}

.spec-profile-mkk-card__assigned-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(81, 95, 108, 0.65);
}

.spec-profile-donut-wrap {
  position: relative;
  width: min(168px, 100%);
  margin: 0 auto 8px;
  aspect-ratio: 1;
}

.spec-profile-donut {
  width: 100%;
  height: 100%;
  display: block;
}

.spec-profile-donut svg {
  display: block;
  width: 100%;
  height: auto;
}

.spec-profile-donut-wrap.has-pie-chart .spec-profile-donut__center,
.spec-profile-donut-wrap.has-pie-chart .spec-profile-donut__share-pct {
  display: none;
}

.spec-profile-donut__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  width: 42%;
  line-height: 1.1;
}

.spec-profile-donut__center-days {
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
}

.spec-profile-donut__center-label {
  margin-top: 2px;
  font-family: "Rubik-Light", "Rubik", sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(81, 95, 108, 0.85);
}

.spec-profile-donut__ring-track {
  stroke: var(--profile-dash-ring-bg, #dce8f2);
}

.spec-profile-donut__ring-fill {
  stroke: var(--profile-dash-blue, #0658a2);
  transition: stroke-dashoffset 0.35s ease;
}

.spec-profile-donut__share-pct {
  margin: 0 0 4px;
  text-align: center;
  font-family: "Rubik-Medium", "Rubik", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(6, 88, 162, 1);
  line-height: 1.2;
}

.spec-profile-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: rgba(81, 95, 108, 0.95);
}

.spec-profile-donut-legend li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.spec-profile-donut-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 3px;
}

.spec-profile-donut-legend__meta {
  display: block;
  font-size: 10px;
  color: rgba(81, 95, 108, 0.7);
}

#okkwork-specialist-profile-panel .profile-page__footer-url a.spec-profile-footer__url {
  color: rgba(6, 88, 162, 1);
  text-decoration: none;
  word-break: break-all;
}

#okkwork-specialist-profile-panel .profile-page__footer-url a.spec-profile-footer__url:hover {
  text-decoration: underline;
}

#okkwork-specialist-profile-panel.is-org-mkk-manager .spec-profile-card--mkk,
#okkwork-specialist-profile-panel.is-org-mkk-manager .spec-profile-card--donut {
  display: none !important;
}

#okkwork-specialist-profile-panel.is-org-mkk-manager .spec-profile-card__role-code {
  visibility: visible;
}

@media (max-width: 900px) {
  .spec-profile-page__layout {
    grid-template-columns: 1fr;
  }

  .spec-profile-dash {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #okkwork-specialist-profile-panel.is-open {
    transition: none !important;
  }

  #okkwork-specialist-profile-panel.is-open.is-profile-entering,
  #okkwork-specialist-profile-panel.is-open.is-slide-open {
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
}
