.portfolio-toolbar {
  display: grid;
  grid-template-columns: 260px 180px;
  gap: 10px;
  align-items: end;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.page-head {
  margin-bottom: 10px;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.page-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toolbar-field label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
}

.toolbar-field input,
.toolbar-field select {
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 13px;
}

.portfolio-toolbar [data-agents-search] {
  width: 260px;
  max-width: 100%;
  height: 34px;
  font-size: 12px;
  border-radius: 10px;
}

.toolbar-field-sm {
  max-width: 220px;
}

.portfolio-card {
  overflow: hidden;
}

.portfolio-card .hd {
  padding: 14px 16px 0;
}

.portfolio-card .bd {
  padding: 14px 16px;
}

.portfolio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portfolio-head h2 {
  font-size: 15px;
}

.portfolio-head p {
  font-size: 12px;
}

.portfolio-count {
  font-weight: 700;
  font-size: 11px;
  padding: 4px 9px;
}

.portfolio-table-wrap {
  border: 1px solid var(--color-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface);
}

.portfolio-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table thead th {
  padding: 11px 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid var(--color-line);
}

.portfolio-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-line);
  vertical-align: middle;
}

.portfolio-table tbody tr:last-child td {
  border-bottom: none;
}

.portfolio-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, rgba(103, 63, 180, 0.98), rgba(146, 208, 80, 0.88));
}

.agent-avatar-photo {
  display: block;
  object-fit: cover;
  border: 1px solid var(--color-line);
  background: #fff;
}

.portfolio-agent-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.portfolio-agent-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.portfolio-domain {
  font-size: 14px;
  font-weight: 600;
}

.portfolio-domain-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-active {
  color: rgba(13, 15, 22, 0.86);
  background: rgba(146, 208, 80, 0.16);
  border-color: rgba(146, 208, 80, 0.32);
}

.status-paused {
  color: var(--color-text-muted);
  background: rgba(13, 15, 22, 0.04);
  border-color: rgba(13, 15, 22, 0.12);
}

.portfolio-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form {
  margin: 0;
}

.portfolio-action-btn {
  min-width: 78px;
  padding: 6px 10px;
  font-size: 12px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.88);
}

.portfolio-empty-cell {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 14px 12px;
}

.content-publications-screen {
  --content-space-xs: 8px;
  --content-space-sm: 10px;
  --content-space-md: 12px;
  --content-space-lg: 16px;
  --content-agents-col: clamp(300px, 24vw, 360px);
  --content-metric-card-min-height: 76px;
  --content-selected-card-min-height: 138px;
  --content-agent-item-min-height: 62px;
  --content-agent-list-min-height: calc((var(--content-agent-item-min-height) * 2) + var(--content-space-xs));
  --content-summary-block-height: calc((var(--content-metric-card-min-height) * 2) + var(--content-space-sm));
}

.content-alert-card .bd {
  padding-top: 14px;
}

.content-notice-alert {
  border: 1px solid rgba(146, 208, 80, 0.36);
  border-radius: 12px;
  background: rgba(146, 208, 80, 0.14);
  color: rgba(13, 15, 22, 0.82);
  padding: 12px;
  font-size: 12px;
  line-height: 1.35;
}

.content-error-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.content-error-list li {
  margin: 3px 0;
  font-size: 12px;
}

.content-error-more {
  margin: 8px 0 0;
  font-size: 12px;
}

.content-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--content-space-sm);
  margin-bottom: 0;
  min-height: var(--content-summary-block-height);
}

.content-metric-card {
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  padding: var(--content-space-md) 14px;
  min-height: var(--content-metric-card-min-height);
}

.content-metric-card p {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.content-metric-card strong {
  display: block;
  margin-top: var(--content-space-xs);
  font-size: 24px;
  line-height: 1;
}

.content-last-publication {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.content-last-publication::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
}

.status-error {
  color: #7a1f1f;
  background: rgba(220, 75, 75, 0.12);
  border-color: rgba(220, 75, 75, 0.35);
}

.content-hub-layout {
  display: grid;
  grid-template-columns: var(--content-agents-col) minmax(0, 1fr);
  gap: var(--content-space-md);
  align-items: start;
  margin-bottom: var(--content-space-md);
}

.content-right-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--content-space-md);
}

.content-publications-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: var(--content-space-md);
  align-items: start;
  min-width: 0;
}

.content-agents-panel {
  grid-column: 1;
  grid-row: 1;
  position: static;
  top: auto;
  width: 100%;
  max-height: none;
  min-height: 0;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.content-publications-area > .content-metrics-grid {
  grid-column: 1;
  grid-row: 1;
}

.content-publications-area > .content-selected-summary-card {
  grid-column: 2;
  grid-row: 1;
  min-height: var(--content-selected-card-min-height);
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.88);
}

.content-panel-head p {
  margin-top: 4px;
}

.content-agent-list-wrap {
  padding-top: var(--content-space-lg);
  overflow: visible;
  min-height: var(--content-agent-list-min-height);
  scrollbar-gutter: stable;
}

.content-agent-list {
  display: flex;
  flex-direction: column;
  gap: var(--content-space-xs);
}

.content-agent-item {
  display: grid;
  grid-template-columns: auto minmax(0, 52%) auto;
  gap: var(--content-space-sm);
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: var(--content-space-xs);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.9);
  min-height: var(--content-agent-item-min-height);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.content-agent-item:hover {
  border-color: rgba(103, 63, 180, 0.34);
  box-shadow: 0 0 0 2px rgba(103, 63, 180, 0.09);
}

.content-agent-item:focus-visible {
  outline: none;
  border-color: rgba(103, 63, 180, 0.42);
  box-shadow: 0 0 0 3px rgba(103, 63, 180, 0.15);
}

.content-agent-item.active {
  border-color: rgba(103, 63, 180, 0.45);
  background: rgba(103, 63, 180, 0.08);
}

.content-agent-avatar-wrap {
  display: inline-flex;
}

.content-agent-item .agent-avatar,
.content-agent-item .agent-avatar-photo {
  width: 40px;
  height: 40px;
}

.content-agent-meta {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.content-agent-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-agent-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-agent-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.content-feed-panel {
  display: flex;
  flex-direction: column;
  gap: var(--content-space-md);
  min-width: 0;
}

.content-feed-panel .empty-state .hd {
  padding-bottom: 18px;
}

.content-selected-summary-card .hd {
  padding-bottom: 10px;
}

.content-selected-summary-card .bd {
  margin-top: 0;
  padding-top: 0;
}

.content-selected-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
}

.content-selected-head > div {
  min-width: 0;
}

.content-selected-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.content-selected-head p {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  line-height: 1.35;
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}

.content-selected-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--content-space-xs);
  margin-top: 2px;
}

.content-selected-stats .pill {
  min-height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  padding: 8px 10px;
  background: rgba(103, 63, 180, 0.06);
  border-color: rgba(13, 15, 22, 0.12);
}

.content-posts-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--content-space-lg);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.content-post-card {
  height: 100%;
  width: 100%;
  min-width: 0;
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  border-color: rgba(13, 15, 22, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(103, 63, 180, 0.035) 100%);
}

.content-post-card .hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 0;
}

.content-post-author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-post-author-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, rgba(103, 63, 180, 0.98), rgba(146, 208, 80, 0.88));
}

.content-post-author-photo {
  display: block;
  object-fit: cover;
  border: 1px solid var(--color-line);
  background: #fff;
}

.content-post-author-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.content-post-author-name {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-post-head .status-badge {
  flex: none;
}

.content-post-body {
  display: flex;
  flex-direction: column;
  gap: var(--content-space-sm);
  min-width: 0;
}

.content-post-body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.content-post-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.content-post-main-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: none;
  border-radius: 0;
  background: transparent;
  display: block;
}

.content-post-carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13, 15, 22, 0.12);
  background: rgba(13, 15, 22, 0.02);
}

.content-post-carousel-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 0.33s ease;
  touch-action: pan-y;
}

.content-post-slide {
  flex: 0 0 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  position: relative;
  background: rgba(13, 15, 22, 0.02);
}

.content-post-slide .content-post-media-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
}

.content-post-slide[data-media-failed="true"] .content-post-main-media {
  display: none;
}

.content-post-slide[data-media-failed="true"] .content-post-media-placeholder {
  display: flex;
}

.content-post-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(10, 16, 28, 0.56);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.content-post-carousel-btn svg {
  width: 16px;
  height: 16px;
}

.content-post-carousel-btn.prev {
  left: var(--content-space-sm);
}

.content-post-carousel-btn.next {
  right: var(--content-space-sm);
}

.content-post-carousel-btn:hover {
  background: rgba(10, 16, 28, 0.72);
}

.content-post-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: var(--content-space-sm);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.content-post-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
  cursor: pointer;
}

.content-post-carousel-dot.is-active {
  width: 18px;
  background: #ffffff;
}

.content-post-media-placeholder {
  border: 1px dashed var(--color-line);
  border-radius: 14px;
  min-height: 180px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.78);
}

.content-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--content-space-sm);
}

.content-post-actions-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.content-post-action-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.content-post-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(13, 15, 22, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.content-post-action-btn svg {
  width: 15px;
  height: 15px;
}

.content-post-action-btn.is-like {
  color: #b7355a;
}

.content-post-action-btn:hover {
  border-color: rgba(103, 63, 180, 0.26);
  background: rgba(255, 255, 255, 0.92);
}

.content-post-action-count {
  min-width: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.content-post-price {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(103, 63, 180, 0.2);
  background: rgba(103, 63, 180, 0.08);
  font-weight: 700;
  color: var(--color-text);
}

.content-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--content-space-sm);
  flex-wrap: wrap;
  min-width: 0;
}

.content-post-open-btn {
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: none;
  border-color: rgba(103, 63, 180, 0.22);
  background: rgba(103, 63, 180, 0.08);
  color: rgba(13, 15, 22, 0.86);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.content-post-open-btn:hover {
  border-color: rgba(103, 63, 180, 0.32);
}

.content-post-open-btn:focus-visible {
  outline: none;
  border-color: rgba(103, 63, 180, 0.52);
  box-shadow: 0 0 0 3px rgba(103, 63, 180, 0.17);
}

.content-post-delete-btn {
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: none;
}
