.spec-page {
  width: min(100%, 1700px);
  margin: 0 auto;
  display: grid;
  gap: 22px;
  padding-bottom: 40px;
}

.spec-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  min-height: 320px;
  padding: 34px 42px;
  border-radius: 32px;
  border: 1px solid #e2e8f0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 55%, #f6f0ff 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.spec-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 80%);
  pointer-events: none;
}

.spec-hero__content,
.spec-hero__visual {
  position: relative;
  z-index: 1;
}

.spec-hero__content {
  max-width: 880px;
  display: grid;
  align-content: center;
}

.spec-hero__eyebrow,
.spec-best-match__badge,
.spec-admin-panel__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #2f6bff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
  font-weight: 900;
  color: #102033;
}

.spec-hero p {
  margin: 0;
  max-width: 690px;
  color: #64748b;
  font-size: 17px;
  line-height: 1.6;
}

.spec-search {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 200px 170px 220px;
  gap: 12px;
  max-width: 1180px;
}

.spec-search__field input,
.spec-search__field select,
.spec-field input,
.spec-field select,
.spec-sort select {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #102033;
  font-size: 16px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.spec-search__field input:focus,
.spec-search__field select:focus,
.spec-field input:focus,
.spec-field select:focus,
.spec-sort select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.spec-btn,
.spec-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 20px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.spec-search__submit,
.spec-btn--primary {
  border: 0;
  padding: 0 24px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.24);
}

.spec-search__submit:hover,
.spec-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(59, 130, 246, 0.3);
}

.spec-btn--ghost {
  padding: 0 18px;
  border: 1px solid #d7e3fb;
  background: #fff;
  color: #2f6bff;
}

.spec-btn--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.36);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.1);
}

.spec-search__submit.is-loading {
  opacity: 0.82;
  pointer-events: none;
}

.spec-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dbe6ff;
  color: #4568a6;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.spec-chip:hover,
.spec-chip.is-active {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.12);
}

.spec-hero__visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100%;
}

.spec-hero__glow {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(59, 130, 246, 0.1) 40%, transparent 72%);
  filter: blur(64px);
}

.spec-hero__visual img {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
}

.spec-hero-card {
  position: absolute;
  z-index: 2;
  width: 220px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.spec-hero-card strong {
  display: block;
  color: #102033;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.spec-hero-card span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.spec-hero-card--top {
  top: 16px;
  right: 8px;
}

.spec-hero-card--bottom {
  bottom: 20px;
  left: 10px;
}

.spec-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.spec-stat-card,
.spec-best-match,
.spec-filters__card,
.spec-card,
.spec-admin-panel,
.spec-toolbar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.spec-stat-card {
  min-height: 84px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.spec-stat-card strong {
  font-size: 28px;
  color: #102033;
}

.spec-stat-card span {
  color: #64748b;
  font-size: 14px;
}

.spec-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.spec-filters__card {
  position: sticky;
  top: 102px;
  padding: 24px;
}

.spec-filters__head {
  margin-bottom: 16px;
}

.spec-filters__head h2,
.spec-toolbar__intro h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  color: #102033;
}

.spec-filters__head p,
.spec-toolbar__intro p,
.spec-admin-panel__head p {
  margin: 8px 0 0;
  color: #64748b;
  line-height: 1.6;
}

.spec-filters__form {
  display: grid;
  gap: 16px;
}

.spec-field {
  display: grid;
  gap: 8px;
}

.spec-field span {
  color: #102033;
  font-size: 14px;
  font-weight: 700;
}

.spec-filter-group {
  display: grid;
  gap: 10px;
}

.spec-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
  color: #102033;
  font-weight: 600;
}

.spec-check input {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

.spec-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-filter-tag {
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  align-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #4568a6;
  font-size: 13px;
  font-weight: 700;
}

.spec-filters__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.spec-content {
  display: grid;
  gap: 18px;
}

.spec-toolbar {
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.spec-toolbar__controls {
  display: grid;
  gap: 12px;
  min-width: 260px;
}

.spec-toolbar__meta,
.spec-inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #64748b;
  font-size: 14px;
}

.spec-toolbar__meta span,
.spec-inline-metrics span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fbff;
}

.spec-best-match {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 20px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(139, 92, 246, 0.04)),
    #fff;
}

.spec-best-match__media {
  display: flex;
  gap: 16px;
  align-items: center;
}

.spec-best-match__avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f6bff;
  font-size: 32px;
  font-weight: 800;
  flex-shrink: 0;
}

.spec-best-match__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spec-best-match h3 {
  margin: 10px 0 6px;
  font-size: 28px;
  color: #102033;
}

.spec-best-match p,
.spec-best-match li {
  color: #64748b;
}

.spec-best-match__body ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.spec-best-match__actions {
  display: grid;
  gap: 10px;
}

.spec-admin-panel {
  padding: 22px 24px;
  border-style: dashed;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(59, 130, 246, 0.03));
}

.spec-admin-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.spec-admin-panel__head h3 {
  margin: 10px 0 4px;
  font-size: 24px;
  color: #102033;
}

.spec-admin-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spec-admin-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.spec-admin-card strong {
  display: block;
  margin-bottom: 6px;
  color: #102033;
}

.spec-admin-card span {
  color: #64748b;
  line-height: 1.5;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.spec-card {
  position: relative;
  min-height: 600px;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 16px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.spec-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

.spec-card__favorite {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid #dbe6ff;
  border-radius: 50%;
  background: #fff;
  color: #8b5cf6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.spec-card__favorite:hover {
  transform: translateY(-1px) scale(1.03);
}

.spec-card__favorite.is-active {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
  background: #fff4f5;
}

.spec-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.spec-card__identity {
  display: flex;
  gap: 14px;
  align-items: center;
}

.spec-card__avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f6bff;
  font-size: 28px;
  font-weight: 800;
  flex-shrink: 0;
}

.spec-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spec-card__identity h3 {
  margin: 0 0 4px;
  font-size: 22px;
  color: #102033;
}

.spec-card__identity p {
  margin: 0;
  color: #64748b;
}

.spec-card__presence {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  font-weight: 700;
  white-space: nowrap;
}

.spec-card__presence.is-offline {
  background: #f1f5f9;
  color: #64748b;
}

.spec-card__specialization {
  font-size: 18px;
  font-weight: 800;
  color: #102033;
}

.spec-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 14px;
  margin-top: 6px;
}

.spec-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.spec-badge.is-verified {
  background: rgba(59, 130, 246, 0.12);
  color: #2f6bff;
}

.spec-badge.is-online {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.spec-badge.is-fast {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.spec-badge.is-muted {
  background: #f1f5f9;
  color: #64748b;
}

.spec-badge[data-spec-tooltip]:hover::after {
  content: attr(data-spec-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(16, 32, 51, 0.96);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  z-index: 4;
}

.spec-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.spec-card__metrics div {
  padding: 14px 12px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e8eef8;
}

.spec-card__metrics strong {
  display: block;
  color: #102033;
  font-size: 18px;
}

.spec-card__metrics span {
  color: #64748b;
  font-size: 13px;
}

.spec-card__section-title {
  margin-bottom: 8px;
  color: #102033;
  font-size: 14px;
  font-weight: 800;
}

.spec-portfolio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.spec-portfolio img,
.spec-empty-media-fallback {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef4ff, #f4f6fb);
}

.spec-empty-media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7a90;
  font-size: 13px;
  font-weight: 700;
}

.spec-review {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e8eef8;
}

.spec-review strong {
  display: block;
  margin-bottom: 6px;
  color: #f59e0b;
}

.spec-review p,
.spec-card__empty {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.spec-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.spec-empty {
  padding: 56px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.spec-empty__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef4ff;
  color: #2f6bff;
  font-size: 30px;
}

.spec-empty h3 {
  margin: 0 0 8px;
  color: #102033;
}

.spec-empty p {
  margin: 0 0 16px;
  color: #64748b;
}

@media (max-width: 1360px) {
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-best-match {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .spec-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

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

  .spec-search__field--task {
    grid-column: 1 / -1;
  }

  .spec-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .spec-filters__card {
    position: static;
  }

  .spec-admin-panel__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .spec-page {
    gap: 16px;
  }

  .spec-hero {
    min-height: auto;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .spec-hero h1 {
    font-size: 34px;
  }

  .spec-hero__visual {
    justify-content: center;
    min-height: 240px;
  }

  .spec-hero__visual img {
    width: min(100%, 320px);
    opacity: 0.92;
  }

  .spec-hero-card {
    width: 170px;
    padding: 12px;
  }

  .spec-search,
  .spec-stats,
  .spec-grid,
  .spec-card__actions,
  .spec-card__metrics {
    grid-template-columns: 1fr;
  }

  .spec-toolbar,
  .spec-admin-panel__head {
    padding: 18px;
    flex-direction: column;
  }

  .spec-card {
    min-height: auto;
  }

  .spec-card__top,
  .spec-card__identity {
    align-items: flex-start;
  }
}
