/* Dashboard hotspots and the recent-run table share explicit desktop/mobile layouts. */
.run-table-head,
.run-table-row {
  display: grid;
  grid-template-columns: .8fr 2fr .7fr .6fr .65fr .75fr;
  align-items: center;
  gap: 12px;
}

.run-table-head { padding: 9px 12px; }
.run-table-body { display: grid; }

.run-table-row {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #e8eaec;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
  font-size: 8px;
}

.run-table-row:hover { background: #f8f9f9; }
.run-time { color: #767b83; }
.run-identity b,
.run-identity small { display: block; }
.run-identity b { font-size: 9px; }
.run-identity small { color: #8b9097; font-size: 7px; margin-top: 4px; }
.run-mode { justify-self: start; background: #eff0f1; border-radius: 5px; padding: 4px 6px; color: #686d75; font-size: 7px; }
.run-duration { color: #7c8188; }
.run-result { color: #55753d; }
.run-artifact { justify-self: start; border: 1px solid #e1e3e5; background: #f7f8f8; border-radius: 5px; padding: 4px 6px; color: #666b73; font-size: 7px; }
.run-table-row.warning-row { background: #fff8f6; }
.run-table-row.warning-row .run-result { color: #bd452d; }

.signal-empty { padding: 22px 10px; color: #8a8f96; font-size: 9px; line-height: 1.7; }
.signal-data strong,
.signal-data span,
.signal-data small { display: block; }
.signal-data strong { font-size: 10px; line-height: 1.45; margin: 7px 0; }
.signal-data span { font-size: 8px; line-height: 1.55; color: #747982; }
.signal-data small { font-size: 7px; color: #969aa1; margin-top: 9px; }
.signal-action { font-style: normal; color: var(--accent); font-size: 8px; white-space: nowrap; }

.pipeline .lane { height: 470px; min-height: 470px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pipeline .content-card { min-height: 106px; }
.pipeline-search { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; margin-top: 13px; padding: 8px 10px; border: 1px solid #dfe2e5; border-radius: 7px; background: #f7f8f8; }
.pipeline-search span { color: #777c84; font-size: 8px; font-weight: 700; }
.pipeline-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #282c33; font-size: 9px; }
.pipeline-search:focus-within { border-color: #cf765f; box-shadow: 0 0 0 3px #fff0ec; background: #fff; }
.pipeline-scroll-note { margin-top: 9px; color: #92969d; font-size: 7px; text-align: right; }
.pipeline[data-filter="draft"] .kanban,
.pipeline[data-filter="in_review"] .kanban,
.pipeline[data-filter="approved"] .kanban,
.pipeline[data-filter="draft"] .kanban-head,
.pipeline[data-filter="in_review"] .kanban-head,
.pipeline[data-filter="approved"] .kanban-head { grid-template-columns: minmax(0, 1fr); }
.pipeline[data-filter="draft"] .lane:not([data-lane="draft"]),
.pipeline[data-filter="draft"] [data-lane-head]:not([data-lane-head="draft"]),
.pipeline[data-filter="in_review"] .lane:not([data-lane="making"]),
.pipeline[data-filter="in_review"] [data-lane-head]:not([data-lane-head="making"]),
.pipeline[data-filter="approved"] .lane:not([data-lane="review"]),
.pipeline[data-filter="approved"] [data-lane-head]:not([data-lane-head="review"]) { display: none; }
.draft-header-actions { display: flex; gap: 7px; }
.draft-pane header .draft-header-actions .danger { color: #bd452d; }
.clear-drafts-note { margin: 18px 0; padding: 15px; border: 1px solid #efc5bc; border-radius: 8px; background: #fff7f5; }
.clear-drafts-note strong,
.clear-drafts-note span { display: block; }
.clear-drafts-note strong { font-size: 13px; }
.clear-drafts-note span { margin-top: 7px; color: #747982; font-size: 9px; line-height: 1.7; }
.danger-action { background: #bd452d; border-color: #a73924; }

.approval-queue { min-width: 0; }
.approval-search { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; margin: 0 16px 11px; padding: 8px 10px; border: 1px solid #dfe2e5; border-radius: 7px; background: #f7f8f8; }
.approval-search span { color: #777c84; font-size: 8px; font-weight: 700; }
.approval-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #282c33; font-size: 9px; }
.approval-search:focus-within { border-color: #cf765f; box-shadow: 0 0 0 3px #fff0ec; background: #fff; }
.approval-queue .approval-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; max-height: 430px; padding: 0 16px 2px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.approval-queue .approval-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 92px; padding: 12px; border: 1px solid #e3e5e7; border-radius: 8px; background: #fff; }
.approval-content-link { width: 100%; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; }
.approval-content-link .approval-version { display: block; color: var(--accent); font-size: 8px; }
.approval-content-link strong { display: -webkit-box; margin-top: 7px; overflow: hidden; color: #252930; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.approval-content-link small { display: block; margin-top: 6px; overflow: hidden; color: #858a91; font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.approval-queue .approval-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.approval-queue .approval-actions button { min-width: 52px; min-height: 30px; border: 1px solid #dfe2e5; border-radius: 6px; background: #fff; color: #686d75; font-size: 9px; }
.approval-queue .approval-actions .approve { border-color: #d6a397; background: #fff4f1; color: #bd452d; }

.publish-panel { min-width: 0; }
.publish-panel .panel-head { align-items: center; }
.publish-panel .date-nav { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #e1e3e5; border-radius: 6px; background: #f7f8f8; color: #686d75; font-size: 9px; font-variant-numeric: tabular-nums; }
.publish-panel .timeline { display: grid; gap: 7px; max-height: 430px; margin-top: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.timeline-task { position: relative; width: 100%; min-width: 0; border: 1px solid #e3e5e7; border-radius: 8px; background: #fff; padding: 11px 12px; text-align: left; }
.timeline-task:hover { border-color: #d6a397; background: #fffaf8; }
.timeline-task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-task-meta time { color: #767b83; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-task .plan-status { border-radius: 4px; padding: 4px 6px; background: #f0f1f2; color: #6d727a; font-size: 8px; font-style: normal; white-space: nowrap; }
.timeline-task .plan-status.ready { background: #fff0ec; color: #bd452d; }
.timeline-task .plan-status.failed,
.timeline-task .plan-status.partial { background: #fff0ec; color: #bd452d; }
.timeline-task > strong { display: -webkit-box; margin-top: 9px; overflow: hidden; color: #252930; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.timeline-task > small { display: block; margin-top: 5px; overflow: hidden; color: #858a91; font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.timeline-task-action { display: block; margin-top: 9px; color: var(--accent); font-size: 8px; }

.dashboard-hotspots { margin-top: 12px; padding: 18px; }
.dashboard-hotspot-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dashboard-hotspot-head h2 { font-size: 14px; margin: 0 0 5px; }
.dashboard-hotspot-head p { font-size: 8px; color: #898e95; margin: 0; }
.dashboard-hotspot-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dashboard-hotspot { border: 1px solid #e4e6e8; background: #fff; border-radius: 8px; padding: 13px; text-align: left; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; min-width: 0; }
.dashboard-hotspot:hover { border-color: #d6a397; background: #fff9f7; }
.dashboard-hotspot .hotspot-rank { width: 27px; height: 27px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 700; display: grid; place-items: center; }
.dashboard-hotspot small,
.dashboard-hotspot strong,
.dashboard-hotspot span { display: block; }
.dashboard-hotspot small { font-size: 7px; color: #92969d; }
.dashboard-hotspot strong { font-size: 10px; line-height: 1.4; margin: 5px 0; }
.dashboard-hotspot p { font-size: 7px; color: #777c84; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.dashboard-hotspot > em { grid-column: 2; justify-self: start; color: #55753d; font-style: normal; font-size: 7px; margin-top: 3px; }

@media (max-width: 800px) {
  .run-history { padding: 14px; overflow: visible; }
  .run-history .automation-section-head { display: block; }
  .run-filters { margin-top: 10px; width: max-content; }
  .run-table-head { display: none; }
  .run-table-body { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  .run-table-body .run-table-row { appearance: none; display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) auto auto !important; gap: 9px 10px; padding: 13px; border: 1px solid #e4e6e8 !important; border-radius: 8px; box-shadow: none; }
  .run-table-body .run-table-row > .run-time { grid-column: 1 / 3 !important; grid-row: 1 !important; font-size: 11px; }
  .run-table-body .run-table-row > .run-result { grid-column: 3 !important; grid-row: 1 !important; text-align: right; font-size: 11px; }
  .run-table-body .run-table-row > .run-identity { grid-column: 1 / 4 !important; grid-row: 2 !important; min-width: 0; }
  .run-table-body .run-identity b { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .run-table-body .run-identity small { font-size: 11px; line-height: 1.4; margin-top: 5px; }
  .run-table-body .run-table-row > .run-mode,
  .run-table-body .run-table-row > .run-duration,
  .run-table-body .run-table-row > .run-artifact { grid-row: 3 !important; align-self: center; font-size: 10px; }
  .run-table-body .run-table-row > .run-mode { grid-column: 1 !important; }
  .run-table-body .run-table-row > .run-duration { grid-column: 2 !important; }
  .run-table-body .run-table-row > .run-artifact { grid-column: 3 !important; justify-self: end; }
  .dashboard-hotspots { padding: 14px; }
  .dashboard-hotspot-head { display: block; }
  .dashboard-hotspot-head .text-btn { margin-top: 8px; }
  .dashboard-hotspot-list { grid-template-columns: 1fr; }
  .dashboard-hotspot { grid-template-columns: 27px 1fr; }
  .pipeline .lane { height: 450px !important; min-height: 450px !important; overflow-y: auto !important; }
  .pipeline-search { grid-template-columns: 1fr; gap: 5px; }
  .pipeline-search span { font-size: 10px; }
  .pipeline-search input { font-size: 12px; }
  .pipeline-scroll-note { text-align: left; line-height: 1.5; }
  .approval-list { max-height: 450px !important; overflow-y: auto !important; }
  .approval-search { grid-template-columns: 1fr; gap: 5px; margin: 0 14px 11px; }
  .approval-search span { font-size: 10px; }
  .approval-search input { font-size: 12px; }
  .approval-queue .approval-list { max-height: 450px !important; padding: 0 14px 2px; }
  .approval-queue .approval-item { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .approval-content-link .approval-version { font-size: 10px; }
  .approval-content-link strong { font-size: 14px; }
  .approval-content-link small { font-size: 11px; }
  .approval-queue .approval-actions { grid-template-columns: 1fr 1fr; }
  .approval-queue .approval-actions button { min-height: 36px; font-size: 11px; }
  .publish-panel .timeline { max-height: 390px; }
  .timeline-task-meta time { font-size: 13px; }
  .timeline-task > strong { font-size: 14px; }
  .timeline-task > small { font-size: 11px; }
  .timeline-task-action { font-size: 10px; }
}
