.post-stats-dashboard {
  margin-bottom: 20px;
}

.post-stats-card {
  background: var(--body-bg, #f8f9fe);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px 12px;
}

.post-stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #5e72e4;
  line-height: 1.2;
}

.post-stats-label {
  font-size: 0.8rem;
  color: #8898aa;
  margin-top: 4px;
}

.post-stats-section,
.post-stats-panel {
  background: var(--body-bg, #f8f9fe);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 20px;
}

/* Dashboard KPIs */
.ps-dash .ps-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  height: 100%;
}

.ps-dash .ps-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  flex-shrink: 0;
}

.ps-dash .ps-kpi-icon.is-green {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.ps-dash .ps-kpi-icon.is-amber {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.ps-dash .ps-kpi-icon.is-violet {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.ps-dash .ps-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.ps-dash .ps-kpi-label {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* Chart panels */
.ps-dash .ps-chart-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 16px 18px 18px;
}

.ps-dash .ps-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ps-dash .ps-chart-head h6 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.ps-dash .ps-chart-meta {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.ps-dash .ps-chart-body {
  position: relative;
  height: 260px;
}

.ps-dash .ps-chart-body-lg {
  height: 300px;
}

.ps-dash .ps-chart-body-md {
  height: 280px;
}

.ps-dash .ps-chart-body-sm,
.ps-modal-charts .ps-chart-body-sm {
  height: 200px;
}

/* Post stats modal — minimal, matches dashboard */
.ps-m-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ps-m-header-main {
  min-width: 0;
  flex: 1;
}

.ps-m-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.ps-m-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-m-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ps-m-open {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.ps-m-open:hover {
  text-decoration: underline;
}

.ps-m-open i {
  font-size: 0.7rem;
  margin-left: 2px;
}

.post-stats-modal.ps-m {
  padding: 16px 20px 20px;
}

.ps-m-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ps-m-kpi {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}

.ps-m-kpi-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
}

.ps-m-kpi-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 4px;
  white-space: nowrap;
}

.ps-m-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 12px;
}

.ps-m-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ps-m-stat span {
  font-size: 0.68rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-m-stat strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.ps-m-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ps-m-reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.8rem;
}

.ps-m-reaction em {
  font-style: normal;
  color: #64748b;
}

.ps-m-reaction strong {
  color: #0f172a;
  font-weight: 700;
}

.ps-modal-charts .ps-chart-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 12px 14px 14px;
}

.ps-modal-charts .ps-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ps-modal-charts .ps-chart-head h6 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ps-modal-charts .ps-chart-meta {
  font-size: 0.72rem;
  color: #64748b;
}

.ps-modal-charts .ps-chart-body {
  position: relative;
  height: 220px;
}

.ps-modal-charts .ps-chart-body-md {
  height: 240px;
}

.ps-modal-charts .ps-chart-body-lg {
  height: 260px;
}

.ps-modal-charts .ps-chart-empty .ps-chart-empty-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

.ps-modal-charts .ps-chart-empty canvas {
  opacity: 0.15;
}

.night-mode .ps-m-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-m-kicker {
  color: #94a3b8;
}

.night-mode .ps-m-title,
.night-mode .ps-m-kpi-value,
.night-mode .ps-m-stat strong,
.night-mode .ps-m-reaction strong {
  color: #f8f9fe;
}

.night-mode .ps-m-kpi {
  background: #1a1d29;
  border-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-m-stats {
  background: rgba(255, 255, 255, 0.04);
}

.night-mode .ps-m-kpi-label,
.night-mode .ps-m-stat span,
.night-mode .ps-m-reaction em {
  color: #94a3b8;
}

.night-mode .ps-m-reaction {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-modal-charts .ps-chart-panel {
  background: #1a1d29;
  border-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-modal-charts .ps-chart-head h6 {
  color: #f8f9fe;
}

.ps-dash .ps-chart-empty .ps-chart-empty-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.ps-dash .ps-chart-empty canvas {
  opacity: 0.15;
}

.ps-dash .ps-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  border-top: 0;
  white-space: nowrap;
}

.ps-dash .ps-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

/* Toolbar: tabs + date filter (Activity Monitor style) */
.ps-dash .ps-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.ps-dash .ps-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
}

.ps-dash .ps-tabs .nav-item {
  margin: 0;
}

.ps-dash .ps-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #334155 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.ps-dash .ps-tabs .nav-link i {
  width: 1em;
  text-align: center;
  opacity: 0.85;
}

.ps-dash .ps-tabs .nav-link:hover {
  background: #fff;
  color: #0f172a !important;
}

.ps-dash .ps-tabs .nav-link.active {
  background: #fff;
  border-color: #bfdbfe;
  color: #2563eb !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ps-dash .ps-mini-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-dash .ps-mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  color: #0f172a;
  text-decoration: none;
}

.ps-dash .ps-mini-row:hover {
  background: #f8fafc;
  color: #0f172a;
}

.ps-dash .ps-mini-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.ps-dash .ps-mini-thumb.is-cover {
  border-radius: 8px;
}

.ps-dash .ps-mini-body {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.ps-dash .ps-mini-title {
  display: block;
  max-width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-dash .ps-mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.ps-dash .ps-mini-chevron {
  color: #94a3b8;
  font-size: 0.75rem;
}

.ps-dash .ps-mini-row.is-static {
  cursor: default;
}

.ps-dash .ps-mini-thumb.is-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  text-decoration: none;
}

.ps-dash .ps-mini-meta .ps-type-pill {
  margin: 0;
}

.ps-dash .ps-mini-action {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.night-mode .ps-dash .ps-mini-thumb.is-icon {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.12);
}

.night-mode .ps-dash .ps-mini-row {
  color: #e2e8f0;
}

.night-mode .ps-dash .ps-mini-row:hover {
  background: rgba(148, 163, 184, 0.08);
}

.night-mode .ps-dash .ps-mini-meta {
  color: #94a3b8;
}

/* Studio secondary sections */
.ps-dash .ps-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  background: #f1f5f9;
}

.ps-dash .ps-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ps-dash .ps-subnav-link i {
  opacity: 0.85;
}

.ps-dash .ps-subnav-link:hover {
  background: #fff;
  color: #0f172a;
}

.ps-dash .ps-subnav-link.is-active {
  background: #fff;
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ps-dash .ps-section-intro h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ps-dash .ps-jump-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .ps-dash .ps-jump-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ps-dash .ps-jump-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ps-dash .ps-jump-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  color: #0f172a;
}

.ps-dash .ps-jump-card i {
  color: #2563eb;
  margin-bottom: 4px;
}

.ps-dash .ps-jump-card span {
  font-size: 0.9rem;
  font-weight: 700;
}

.ps-dash .ps-jump-card small {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.ps-dash .ps-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
}

.ps-dash .ps-filters-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
}

.ps-dash .ps-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}

.ps-dash .ps-chip:hover {
  background: #fff;
  color: #0f172a;
}

.ps-dash .ps-chip.is-active {
  background: #fff;
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ps-dash .ps-filters-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
  margin-left: auto;
}

.ps-dash .ps-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.ps-dash .ps-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ps-dash .ps-field input[type="date"] {
  height: 34px;
  min-width: 10rem;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
}

.ps-dash .ps-field input[type="date"]:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ps-dash .ps-apply {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 600;
}

.ps-dash .ps-apply.is-custom {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

@media (max-width: 767.98px) {
  .ps-dash .ps-filters-custom {
    width: 100%;
    margin-left: 0;
  }

  .ps-dash .ps-field {
    flex: 1 1 calc(50% - 10px);
  }

  .ps-dash .ps-field input[type="date"] {
    width: 100%;
    min-width: 0;
  }

  .ps-dash .ps-apply {
    width: 100%;
    justify-content: center;
  }

  .ps-dash .ps-tabs .nav-link {
    padding: 8px 11px;
  }
}

.post-stats-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8898aa;
  margin-bottom: 12px;
}

.post-stats-modal {
  padding: 20px;
}

.modal-xl .post-stats-modal {
  padding: 20px 24px;
}

.post-stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}

.post-stats-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.post-stats-list li span {
  color: #8898aa;
}

.post-stats-list li strong {
  color: #32325d;
  font-size: 1rem;
}

.post-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.post-stats-grid div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.post-stats-grid span {
  color: #8898aa;
}

.post-stats-grid strong {
  color: #32325d;
}

.post-stats-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-stats-reaction-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.08);
  font-size: 0.82rem;
  color: #525f7f;
}

.post-stats-bar-row {
  margin-bottom: 12px;
}

.post-stats-bar-row:last-child {
  margin-bottom: 0;
}

.post-stats-bar-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.post-stats-bar-meta span {
  color: #525f7f;
}

.post-stats-bar-track {
  height: 8px;
  background: rgba(94, 114, 228, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.post-stats-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #5e72e4;
}

.post-stats-bar-fill-alt {
  background: #2dce89;
}

.post-stats-day-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
}

.post-stats-day-date {
  font-size: 0.78rem;
  color: #8898aa;
}

.post-stats-day-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #32325d;
}

.post-stats-visitor-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 10px;
}

.night-mode .post-stats-card,
.night-mode .post-stats-section,
.night-mode .post-stats-panel,
.night-mode .post-stats-day-item,
.night-mode .ps-dash .ps-kpi,
.night-mode .ps-dash .ps-chart-panel,
.night-mode .ps-dash .ps-toolbar {
  background: #1a1d29;
  border-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-dash .ps-kpi-value,
.night-mode .ps-dash .ps-chart-head h6 {
  color: #f8f9fe;
}

.night-mode .ps-dash .ps-kpi-label,
.night-mode .ps-dash .ps-chart-meta {
  color: #adb5bd;
}

.night-mode .post-stats-label,
.night-mode .post-stats-panel-title,
.night-mode .post-stats-list li span,
.night-mode .post-stats-grid span,
.night-mode .post-stats-bar-meta span,
.night-mode .post-stats-day-date {
  color: #adb5bd;
}

.night-mode .post-stats-list li strong,
.night-mode .post-stats-grid strong,
.night-mode .post-stats-bar-meta strong,
.night-mode .post-stats-day-value {
  color: #f8f9fe;
}

.night-mode .post-stats-reaction-pill {
  background: rgba(94, 114, 228, 0.18);
  color: #e9ecef;
}

.night-mode .post-stats-bar-track {
  background: rgba(255, 255, 255, 0.08);
}

.night-mode .post-stats-list li,
.night-mode .post-stats-visitor-row {
  border-color: rgba(255, 255, 255, 0.06);
}

/* Creator Studio */
.ps-studio-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 4px;
}

.ps-studio-greeting {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 2px;
}

.ps-studio-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.ps-studio-completeness {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ps-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.ps-ring svg {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.ps-ring-bg {
  fill: none;
  stroke: rgba(37, 99, 235, 0.12);
  stroke-width: 3.2;
}

.ps-ring-fg {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.ps-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
}

.ps-insight {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  height: 100%;
}

.ps-insight-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.ps-insight-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

.ps-trend {
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 6px;
}

.ps-trend.is-up { color: #16a34a; }
.ps-trend.is-down { color: #94a3b8; }

.ps-heatmap {
  overflow-x: auto;
  padding-bottom: 6px;
}

.ps-heatmap-hours,
.ps-heatmap-row {
  display: grid;
  grid-template-columns: 36px repeat(24, minmax(14px, 1fr));
  gap: 3px;
  align-items: center;
  min-width: 420px;
}

.ps-heatmap-hours {
  margin-bottom: 4px;
}

.ps-heatmap-h,
.ps-heatmap-corner {
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
}

.ps-heatmap-day {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
}

.ps-heatmap-cell {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(37, 99, 235, 0.08);
}

.ps-heatmap-cell.level-1 { background: rgba(37, 99, 235, 0.22); }
.ps-heatmap-cell.level-2 { background: rgba(37, 99, 235, 0.4); }
.ps-heatmap-cell.level-3 { background: rgba(37, 99, 235, 0.62); }
.ps-heatmap-cell.level-4 { background: #2563eb; }

.ps-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.ps-heatmap-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(37, 99, 235, 0.08);
}

.ps-heatmap-legend i:nth-child(2) { background: rgba(37, 99, 235, 0.08); }
.ps-heatmap-legend i:nth-child(3) { background: rgba(37, 99, 235, 0.22); }
.ps-heatmap-legend i:nth-child(4) { background: rgba(37, 99, 235, 0.4); }
.ps-heatmap-legend i:nth-child(5) { background: rgba(37, 99, 235, 0.62); }
.ps-heatmap-legend i:nth-child(6) { background: #2563eb; }

.ps-mini-tabs .nav-link {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
}

.ps-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
}

.ps-profile-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.ps-profile-card:hover {
  color: inherit;
  text-decoration: none;
}

.ps-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.ps-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.ps-verified { color: #2563eb; margin-left: 4px; }

.ps-health-list,
.ps-money-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ps-health-list li,
.ps-money-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
}

.ps-health-list li:last-child,
.ps-money-list li:last-child {
  border-bottom: 0;
}

.ps-health-list li i { margin-right: 8px; }
.ps-health-list li.is-ok { color: #0f172a; }
.ps-health-list li.is-ok i { color: #2563eb; }
.ps-health-list li.is-warn { color: #64748b; }
.ps-health-list li.is-warn i { color: #cbd5e1; }

.ps-money-list li span { color: #64748b; }
.ps-money-list li strong { color: #0f172a; }

.ps-side-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.ps-side-row:last-child { border-bottom: 0; }

/* List rows */
.ps-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-radius: 12px;
  transition: background .15s ease;
}

.ps-list-item:hover {
  background: rgba(37, 99, 235, 0.06);
}

.ps-list-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  flex-shrink: 0;
  text-decoration: none;
}

.ps-list-body {
  min-width: 0;
  flex: 1;
}

.ps-list-title {
  display: block;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-list-title:hover { color: #2563eb; }

.ps-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.ps-list-metric {
  text-align: right;
  min-width: 64px;
  flex-shrink: 0;
}

.ps-list-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
  flex: 0 0 auto;
  max-width: 46%;
}

.ps-list-metrics .ps-list-metric {
  min-width: 48px;
}

@media (max-width: 991px) {
  .ps-dash .ps-mini-row.is-static {
    flex-wrap: wrap;
  }

  .ps-list-metrics {
    max-width: 100%;
    width: 100%;
    justify-content: flex-start;
    padding-left: 52px;
  }
}

.ps-dash .ps-m-stats {
  margin-bottom: 16px;
}

.ps-list-metric strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}

.ps-list-metric span {
  font-size: 11px;
  color: #64748b;
}

.ps-list-action { flex-shrink: 0; }

/* Node cards (pages/groups/events) */
.ps-node-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-node-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ps-node-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
  color: inherit;
  text-decoration: none;
}

.ps-node-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.ps-node-thumb.is-cover {
  border-radius: 12px;
  width: 72px;
  height: 48px;
}

.ps-node-body { min-width: 0; flex: 1; }

.ps-node-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-node-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.ps-node-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.ps-node-stats strong { color: #0f172a; }
.ps-node-chevron { color: #94a3b8; }

.ps-side-insight {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.ps-side-insight:last-child { border-bottom: 0; }

.ps-side-insight-label {
  font-size: 13px;
  color: #64748b;
}

.ps-side-insight-value {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.ps-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ps-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
}

.ps-tag-chip em {
  font-style: normal;
  color: #64748b;
  font-weight: 500;
}

.ps-side-node {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.ps-side-node:hover {
  color: inherit;
  text-decoration: none;
}

.ps-side-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.ps-side-thumb.is-cover {
  width: 48px;
  height: 32px;
  border-radius: 8px;
}

.ps-post-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.ps-post-cell-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  flex-shrink: 0;
}

.ps-post-cell-title {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-post-cell-title:hover { color: #2563eb; }

.ps-table.ps-sortable th.is-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ps-table.ps-sortable th.is-sortable::after {
  content: " ↕";
  opacity: 0.35;
  font-size: 11px;
}

.ps-table.ps-sortable th.is-sortable.is-asc::after {
  content: " ↑";
  opacity: 0.9;
  color: #2563eb;
}

.ps-table.ps-sortable th.is-sortable.is-desc::after {
  content: " ↓";
  opacity: 0.9;
  color: #2563eb;
}

.night-mode .ps-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.night-mode .ps-list-metric strong,
.night-mode .ps-side-insight-value,
.night-mode .ps-node-stats strong {
  color: #f8f9fe;
}

.night-mode .ps-node-card {
  border-color: rgba(255, 255, 255, 0.08);
}

.night-mode .ps-node-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: none;
}

.night-mode .ps-tag-chip {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.night-mode .ps-side-insight,
.night-mode .ps-side-row {
  border-color: rgba(255, 255, 255, 0.06);
}

.night-mode .ps-studio-title,
.night-mode .ps-ring-value,
.night-mode .ps-insight-value,
.night-mode .ps-money-list li strong {
  color: #f8f9fe;
}

.night-mode .ps-insight {
  background: rgba(255, 255, 255, 0.04);
}

.night-mode .ps-heatmap-cell {
  background: rgba(37, 99, 235, 0.12);
}

.night-mode .ps-heatmap-cell.level-1 { background: rgba(37, 99, 235, 0.28); }
.night-mode .ps-heatmap-cell.level-2 { background: rgba(37, 99, 235, 0.48); }
.night-mode .ps-heatmap-cell.level-3 { background: rgba(37, 99, 235, 0.7); }
.night-mode .ps-heatmap-cell.level-4 { background: #3b82f6; }

.night-mode .ps-health-list li,
.night-mode .ps-money-list li,
.night-mode .ps-side-row {
  border-color: rgba(255, 255, 255, 0.06);
}

.night-mode .ps-dash .ps-tabs,
.night-mode .ps-dash .ps-filters,
.night-mode .ps-dash .ps-filters-presets {
  background: rgba(255, 255, 255, 0.04);
}

.night-mode .ps-dash .ps-tabs .nav-link,
.night-mode .ps-dash .ps-chip {
  color: #cbd5e1 !important;
}

.night-mode .ps-dash .ps-subnav {
  background: rgba(15, 23, 42, 0.55);
}

.night-mode .ps-dash .ps-subnav-link {
  color: #cbd5e1;
}

.night-mode .ps-dash .ps-subnav-link:hover,
.night-mode .ps-dash .ps-subnav-link.is-active {
  background: rgba(30, 41, 59, 0.95);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.35);
}

.night-mode .ps-dash .ps-section-intro h5,
.night-mode .ps-dash .ps-jump-card {
  color: #e2e8f0;
}

.night-mode .ps-dash .ps-jump-card {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.15);
}

.night-mode .ps-dash .ps-jump-card small {
  color: #94a3b8;
}

.night-mode .ps-dash .ps-tabs .nav-link.active,
.night-mode .ps-dash .ps-chip.is-active {
  background: #1a1d29;
  border-color: rgba(37, 99, 235, 0.45);
  color: #93c5fd !important;
}

@media (max-width: 767px) {
  .ps-m-header {
    padding: 14px 16px 12px;
  }

  .post-stats-modal,
  .post-stats-modal.ps-m {
    padding: 14px 16px 16px;
  }

  .ps-m-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ps-m-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ps-modal-charts .ps-chart-body,
  .ps-modal-charts .ps-chart-body-md,
  .ps-modal-charts .ps-chart-body-sm {
    height: 200px;
  }

  .ps-dash .ps-chart-body,
  .ps-dash .ps-chart-body-lg,
  .ps-dash .ps-chart-body-md {
    height: 220px;
  }

  .ps-dash .ps-kpi {
    padding: 12px;
  }

  .ps-dash .ps-kpi-value {
    font-size: 1.15rem;
  }
}
