/* Complementos al diseño Tailwind — Monitoreo de Medios */

.viral-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.viral-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgb(15 23 42 / 0.12);
}

.impact-badge {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 2px 8px rgb(220 38 38 / 0.35);
}

.metric-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.alerts-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.alerts-scroll::-webkit-scrollbar {
  width: 6px;
}

.alerts-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.alert-item {
  animation: alert-in 0.35s ease-out;
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chart-bars .bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.chart-bars .bar-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.chart-bars .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.platform-facebook { background: #1877f2; color: #fff; }
.platform-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.platform-x { background: #0f1419; color: #fff; }
.platform-web { background: #0d9488; color: #fff; }
.platform-youtube { background: #ff0000; color: #fff; }

/* Pestañas principales */
.tab-btn-active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.1);
}

.tab-btn:not(.tab-btn-active):hover {
  color: #1e293b;
  background: rgb(255 255 255 / 0.5);
}

/* Formulario Admin */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15);
}

.form-input::placeholder {
  color: #94a3b8;
}

/* Tabla de fuentes */
.sources-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.sources-table tbody tr:hover {
  background: #f8fafc;
}

.sources-table tbody tr:last-child {
  border-bottom: none;
}

.network-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.network-badge svg {
  width: 14px;
  height: 14px;
}

.btn-delete-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  transition: background 0.15s, color 0.15s;
}

.btn-delete-source:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.category-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.category-tag-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.category-tag-gray {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.category-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.category-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.category-check:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.category-check:has(.category-check-input:checked) {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.12);
}

.category-check-input {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.sources-table tbody tr.editing-row {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-edit-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  transition: background 0.15s, color 0.15s;
}

.btn-edit-source:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-source-chip {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dashboard-source-chip:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgb(37 99 235 / 0.08);
}

.dashboard-source-chip .category-badges-wrap {
  margin-top: 0.35rem;
}

.category-pill {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.category-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.category-pill-active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.feedback-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.feedback-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Feed por medio — últimas 36 h */
.source-tabs {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.source-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.source-tab:hover {
  color: #1e40af;
  background: #f8fafc;
}

.source-tab--active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  background: #eff6ff;
}

.source-tab-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.source-tab--active .source-tab-count {
  background: #bfdbfe;
  color: #1e40af;
}

.feed-post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feed-post {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.feed-post:hover {
  box-shadow: 0 8px 24px -6px rgb(15 23 42 / 0.1);
}

.feed-post-media-wrap {
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 1;
}

.feed-post-media-wrap--video {
  aspect-ratio: 9 / 16;
  max-height: 420px;
}

.feed-post-media--video {
  object-fit: contain;
  background: #000;
}

.feed-post-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-post-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.feed-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.feed-post-platform {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.feed-post-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: #94a3b8;
}

.feed-post-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}

.feed-post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

.feed-metric {
  font-size: 0.75rem;
  color: #64748b;
}

.feed-metric--impact {
  color: #b91c1c;
  font-weight: 600;
}

.feed-post-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
}

.feed-post-link:hover {
  text-decoration: underline;
}

.feed-panel-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .feed-post {
    grid-template-columns: 1fr;
  }

  .feed-post-media-wrap {
    max-height: 280px;
    aspect-ratio: 4 / 3;
  }
}

/* Dashboard v3 — por red social */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dash-hero {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
}

.dash-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-stats-line {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
}

.btn-secondary,
.btn-primary {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.btn-secondary:hover {
  background: #f8fafc;
}

.btn-primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.platform-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.platform-summary-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  transition: border-color 0.15s, background 0.15s;
}

.platform-summary-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.platform-summary-card--active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
}

.platform-summary-count {
  background: #e2e8f0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.platform-summary-card--active .platform-summary-count {
  background: #bfdbfe;
  color: #1e40af;
}

.dash-feed-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
}

.dash-feed-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.dash-step-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.feed-source-select {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.platform-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.platform-tab:hover {
  background: #fff;
  color: #1e40af;
  border-color: #e2e8f0;
}

.platform-tab--active {
  background: #fff;
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 1px 4px rgb(37 99 235 / 0.12);
}

.platform-tab-count {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.platform-tab--active .platform-tab-count {
  background: #dbeafe;
  color: #1e40af;
}

.platform-tab-all-icon {
  font-size: 1rem;
  line-height: 1;
}

.dash-feed-body {
  min-height: 200px;
}

.platform-feed-list {
  padding: 0 1rem 1.25rem;
}

.feed-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
}

.dash-sources-details {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
}

.dash-sources-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  list-style: none;
}

.dash-sources-summary::-webkit-details-marker {
  display: none;
}

.dash-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.dash-sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.feed-post--text {
  grid-template-columns: 1fr;
}

.feed-yt-wrap {
  aspect-ratio: 16 / 9;
  max-height: none;
  background: #0f172a;
}

.feed-yt-embed {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.feed-yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.75rem;
}

.feed-post:has(.feed-yt-wrap) {
  grid-template-columns: minmax(260px, 360px) 1fr;
}

@media (max-width: 640px) {
  .feed-post:has(.feed-yt-wrap) {
    grid-template-columns: 1fr;
  }
}

.feed-post-source {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  background: #f1f5f9;
}

.platform-all {
  background: #6366f1;
  color: #fff;
}

/* ─── Monitor v4: sidebar + feed ─────────────────────────────────────────── */

.monitor-app {
  background: #0b1120;
  color: #e2e8f0;
}

.monitor-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(11 17 32 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(148 163 184 / 0.12);
}

.monitor-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.monitor-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.monitor-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgb(59 130 246 / 0.35);
}

.monitor-brand h1 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.monitor-brand p {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.monitor-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.monitor-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #86efac;
  background: rgb(34 197 94 / 0.12);
  border: 1px solid rgb(34 197 94 / 0.25);
}

.monitor-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 0.25);
  animation: monitor-pulse 2s ease-in-out infinite;
}

@keyframes monitor-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.monitor-top-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: rgb(15 23 42 / 0.8);
  border-radius: 0.65rem;
  border: 1px solid rgb(148 163 184 / 0.15);
}

.monitor-top-tab {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  border-radius: 0.5rem;
  transition: background 0.15s, color 0.15s;
}

.monitor-top-tab:hover {
  color: #e2e8f0;
}

.monitor-top-tab--active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
}

.monitor-main-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.monitor-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  min-height: calc(100vh - 88px);
}

@media (max-width: 900px) {
  .monitor-shell {
    grid-template-columns: 1fr;
  }
}

.monitor-sidebar {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border: 1px solid rgb(148 163 184 / 0.12);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.35);
}

@media (max-width: 900px) {
  .monitor-sidebar {
    position: static;
    max-height: none;
  }
}

.monitor-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgb(148 163 184 / 0.1);
}

.monitor-sidebar-head h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.monitor-sidebar-head p {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.monitor-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  border: 1px solid rgb(148 163 184 / 0.2);
  background: rgb(30 41 59 / 0.6);
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.monitor-icon-btn:hover {
  background: #334155;
  color: #fff;
}

.source-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.source-nav-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.25rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.source-nav-item:hover {
  background: rgb(51 65 85 / 0.45);
}

.source-nav-item--active {
  background: rgb(37 99 235 / 0.18);
  border-color: rgb(59 130 246 / 0.35);
}

.source-nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: #334155;
  color: #e2e8f0;
}

.source-nav-avatar--all {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  font-size: 1.1rem;
}

.source-nav-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.source-nav-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-nav-meta {
  font-size: 0.68rem;
  color: #64748b;
}

.source-nav-nets {
  display: flex;
  gap: 0.25rem;
}

.source-nav-net {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.source-nav-net svg {
  width: 12px;
  height: 12px;
}

.source-nav-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgb(51 65 85 / 0.8);
  color: #cbd5e1;
}

.source-nav-item--active .source-nav-count {
  background: rgb(59 130 246 / 0.35);
  color: #bfdbfe;
}

.source-nav-empty {
  padding: 0 1rem 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.monitor-sidebar-footer {
  margin: 0.5rem;
  padding: 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #93c5fd;
  border-radius: 0.5rem;
  border: 1px dashed rgb(59 130 246 / 0.35);
  background: rgb(37 99 235 / 0.08);
  transition: background 0.15s;
}

.monitor-sidebar-footer:hover {
  background: rgb(37 99 235 / 0.15);
}

.monitor-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgb(15 23 42 / 0.08);
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.monitor-content-head {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.monitor-content-head h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.monitor-content-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.monitor-content-sub strong {
  color: #334155;
}

.monitor-platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.plat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.plat-pill:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.plat-pill--active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.plat-pill em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.plat-pill--active em {
  background: #dbeafe;
  color: #1e40af;
}

.plat-pill-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.plat-pill .platform-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.monitor-feed-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.monitor-feed {
  padding: 1rem 1.25rem 1.5rem;
}

.monitor-feed-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
}

.source-group {
  margin-bottom: 1.75rem;
}

.source-group:last-child {
  margin-bottom: 0;
}

.source-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.source-group-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.source-group-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
}

.source-group-head h3 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.source-group-head p {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.source-group-nets {
  display: flex;
  gap: 0.35rem;
}

.source-group-net {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.post-stream {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.post-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgb(15 23 42 / 0.08);
}

.post-card--text {
  grid-template-columns: 1fr;
}

.post-card-media {
  display: block;
  background: #0f172a;
  min-height: 120px;
  overflow: hidden;
}

.post-card-media--yt,
.post-card-media--video {
  min-height: 0;
}

.post-card-media--yt .feed-yt-embed {
  min-height: 160px;
}

.post-card-media img,
.post-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 220px;
}

.post-card-body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
}

.post-card-meta .platform-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.post-card-platform {
  font-weight: 700;
  color: #334155;
}

.post-card-meta time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.post-card-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.post-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.post-card-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563eb;
  margin-top: auto;
}

.post-card-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.post-card:has(.post-card-media--yt) {
  grid-template-columns: minmax(260px, 380px) 1fr;
}

@media (max-width: 640px) {
  .post-card,
  .post-card:has(.post-card-media--yt) {
    grid-template-columns: 1fr;
  }
}

.monitor-admin-intro {
  margin-bottom: 1.25rem;
}

.monitor-admin-intro h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}

.monitor-admin-intro p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

#panel-admin:not(.hidden) {
  background: transparent;
}

.source-nav-divider {
  height: 1px;
  margin: 0.35rem 0.5rem 0.5rem;
  background: rgb(148 163 184 / 0.15);
  border: 0;
}

.source-nav-item--all {
  margin-bottom: 0.15rem;
}

.source-nav-item--quiet {
  opacity: 0.72;
}

.source-nav-item--quiet:hover {
  opacity: 1;
}

.source-nav-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.source-nav-row .source-nav-meta {
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.source-nav-nets {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.post-yt-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}

.post-yt-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}

.post-yt-player .feed-yt-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.post-yt-player .feed-yt-iframe {
  border-radius: 0;
}

.post-yt-live {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 8px rgb(220 38 38 / 0.45);
}

.post-card-media--yt {
  min-height: 0;
  background: #0f172a;
}

.post-card-media--yt .post-yt-player {
  min-height: 180px;
}

/* ─── Monitor v6: feed ancho + modal medios ───────────────────────────────── */

.monitor-v6 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border: 1px solid rgb(148 163 184 / 0.15);
  border-radius: 0.85rem;
}

.feed-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid rgb(148 163 184 / 0.2);
  background: rgb(30 41 59 / 0.7);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.feed-toolbar-btn:hover {
  background: #334155;
}

.feed-toolbar-btn--primary {
  background: rgb(37 99 235 / 0.25);
  border-color: rgb(59 130 246 / 0.45);
}

.feed-toolbar-btn--ghost {
  margin-left: auto;
  background: transparent;
  color: #93c5fd;
  border-style: dashed;
}

.feed-toolbar-btn-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 700;
}

.feed-toolbar-btn-value {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-toolbar-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgb(59 130 246 / 0.35);
  color: #dbeafe;
}

.feed-toolbar-select {
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid rgb(148 163 184 / 0.25);
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
}

.monitor-feed-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgb(15 23 42 / 0.08);
}

.monitor-feed-head {
  padding: 1rem 1.25rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.monitor-feed-head h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.monitor-feed-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.monitor-v6 .monitor-feed-scroll {
  max-height: calc(100vh - 200px);
}

.monitor-v6 .monitor-feed {
  padding: 1rem 1.25rem 1.5rem;
}

.sources-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sources-modal.hidden {
  display: none !important;
}

.sources-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.65);
  backdrop-filter: blur(4px);
  border: 0;
  cursor: pointer;
}

.sources-modal-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid rgb(148 163 184 / 0.2);
  border-radius: 1rem;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.45);
  overflow: hidden;
}

.sources-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgb(148 163 184 / 0.12);
}

.sources-modal-header h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.sources-modal-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.sources-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  border: 1px solid rgb(148 163 184 / 0.2);
  background: rgb(30 41 59 / 0.8);
  color: #cbd5e1;
  font-size: 1.25rem;
  line-height: 1;
}

.sources-modal-search-wrap {
  padding: 0.65rem 1rem;
}

.sources-modal-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(148 163 184 / 0.2);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.875rem;
}

.sources-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.5rem 0.75rem;
}

.source-modal-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.65rem;
  margin-bottom: 0.2rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  text-align: left;
}

.source-modal-item:hover {
  background: rgb(51 65 85 / 0.5);
}

.source-modal-item--active {
  background: rgb(37 99 235 / 0.2);
  border-color: rgb(59 130 246 / 0.35);
}

.source-modal-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #334155;
  color: #e2e8f0;
  flex-shrink: 0;
}

.source-modal-avatar--all {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
}

.source-modal-body {
  flex: 1;
  min-width: 0;
}

.source-modal-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-modal-meta {
  font-size: 0.7rem;
  color: #64748b;
}

.source-modal-nets {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.15rem;
}

.sources-modal-empty {
  padding: 0 1rem 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

body.modal-open {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.post-yt-play {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.post-yt-play.hidden {
  display: none;
}

.post-yt-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(220 38 38 / 0.92);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.35);
}

.post-yt-embed-slot {
  position: absolute;
  inset: 0;
}

.post-yt-embed-slot .feed-yt-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.post-yt-open {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 3;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  background: rgb(15 23 42 / 0.75);
  color: #fff;
}

.source-group {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.source-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
