.approval-screen {
  display: grid;
  gap: 24px;
}

.stats--approval {
  grid-template-columns: repeat(3, minmax(0, 220px));
}

.approval-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 20px;
  align-items: start;
}

.approval-primary-column,
.approval-side-column {
  display: grid;
  gap: 20px;
}

.approval-side-column {
  align-self: start;
  min-height: 100%;
}

.news-panel,
.script-workbench,
.queue-panel,
.scripts-selection-panel,
.approval-side-panel {
  padding: 24px;
}

.news-panel {
  min-height: 0;
}

.news-panel__filters-heading {
  margin-bottom: 14px;
}

.news-panel__filters-heading h2 {
  margin: 0;
}

.news-panel__filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 176px) minmax(150px, 184px);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.news-panel__results-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "refresh count";
  column-gap: 16px;
  width: 100%;
  align-items: start;
  justify-items: start;
  margin-bottom: 18px;
  text-align: left;
}

.news-panel__results-summary .section-counter--news {
  grid-area: count;
  justify-self: end;
}

.news-panel .section-heading p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section-counter-stack--news {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: max-content;
}

.section-last-refresh {
  grid-area: refresh;
  justify-self: start;
  color: #00e88f;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 0 12px rgba(0, 232, 143, 0.42);
  text-transform: uppercase;
}

.script-workbench {
  min-height: 0;
}

.news-panel,
.queue-panel,
.scripts-selection-panel,
.approval-side-panel,
.script-workbench {
  background: #0a0a0a;
  border: 1px solid #262626;
}

.approval-side-panel {
  position: sticky;
  top: 28px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 56px);
  min-height: 720px;
  overflow: hidden;
}

.approval-side-section {
  min-height: 0;
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(0, 1fr);
}

.approval-side-section__header {
  margin-bottom: 0 !important;
}

.approval-side-divider {
  height: 1px;
  margin: 18px -24px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.14) 10%, rgba(255, 255, 255, 0.14) 90%, transparent 100%);
}

.approval-editor-actions {
  margin-top: 16px;
}

.queue-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 12px;
}

.queue-actions--panel {
  margin-top: 16px;
}

.queue-list {
  display: grid;
  gap: 10px;
  grid-auto-rows: max-content;
  align-content: start;
}

.queue-list--integrated {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.queue-item {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 10px 12px;
  border-radius: 0;
}

.queue-item strong {
  display: block;
  margin-bottom: 0;
  line-height: 1.2;
}

.queue-list__empty {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-inline: 16px;
}

.queue-item--monitor {
  display: grid;
  gap: 4px;
  grid-auto-rows: max-content;
  align-content: start;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  align-self: start;
}

.queue-item__header,
.queue-progress__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.queue-item__title-group {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.queue-item__actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}

.queue-item__dismiss {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 87, 100, 0.34);
  border-radius: 0;
  background: rgba(43, 11, 16, 0.56);
  color: #ffb4bf;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  line-height: 1;
}

.queue-item__dismiss:hover:not(:disabled) {
  transform: none;
  filter: brightness(1.15);
}

.queue-item__eyebrow,
.script-selection-card__eyebrow {
  margin-bottom: 0;
  color: var(--muted);
}

.queue-item__footer {
  margin: 0;
}

.queue-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.queue-status-pill--active {
  color: #9ef7cf;
  border-color: rgba(0, 232, 143, 0.28);
  background: rgba(0, 232, 143, 0.1);
}

.queue-status-pill--warm {
  color: #ffd488;
  border-color: rgba(244, 183, 64, 0.3);
  background: rgba(244, 183, 64, 0.12);
}

.queue-status-pill--error {
  color: #ffb4bf;
  border-color: rgba(217, 87, 100, 0.3);
  background: rgba(217, 87, 100, 0.12);
}

.queue-progress {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  align-content: start;
}

.queue-progress__meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.1;
  margin-bottom: 4px;
}

.queue-progress__track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 0;
}

.queue-progress__fill {
  height: 100%;
  border-radius: inherit;
}

.queue-progress__fill--active {
  background: linear-gradient(90deg, rgba(0, 232, 143, 0.68), rgba(86, 255, 187, 0.96));
}

.queue-progress__fill--warm {
  background: linear-gradient(90deg, rgba(244, 183, 64, 0.75), rgba(255, 214, 133, 0.96));
}

.queue-progress__fill--error {
  background: linear-gradient(90deg, rgba(217, 87, 100, 0.78), rgba(255, 149, 166, 0.96));
}

.approval-stats-sr {
  display: none !important;
}

.script-selection-list {
  display: grid;
  gap: 12px;
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 2px;
  scrollbar-width: none !important;
}

.script-selection-list::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

.script-selection-card {
  position: relative;
  display: grid;
  justify-self: center;
  gap: 10px;
  align-content: start;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.96));
  padding: 15px 16px;
  border-radius: 0;
  cursor: pointer;
  min-height: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.script-selection-card:hover,
.script-selection-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  outline: none;
}

.script-selection-card.is-selected {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 133, 0.32), transparent 38%),
    linear-gradient(180deg, rgba(46, 32, 8, 0.98), rgba(17, 12, 4, 0.98));
  border-color: rgba(244, 183, 64, 0.58) rgba(244, 183, 64, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 133, 0.18),
    inset 0 -1px 0 rgba(255, 214, 133, 0.18),
    0 16px 28px -24px rgba(244, 183, 64, 0.36),
    0 -16px 28px -24px rgba(244, 183, 64, 0.28);
}

.script-selection-card.is-processed {
  padding-right: 52px;
  background:
    radial-gradient(circle at top left, rgba(0, 232, 143, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(7, 32, 22, 0.96), rgba(5, 16, 12, 0.98));
  border-color: rgba(0, 232, 143, 0.46) rgba(0, 232, 143, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(158, 247, 207, 0.1),
    inset 0 -1px 0 rgba(158, 247, 207, 0.1),
    0 14px 24px -22px rgba(0, 232, 143, 0.22),
    0 -14px 24px -22px rgba(0, 232, 143, 0.18);
}

.script-selection-card.is-processed.is-selected {
  border-color: rgba(158, 247, 207, 0.72) rgba(0, 232, 143, 0.18);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(158, 247, 207, 0.18),
    inset 0 -1px 0 rgba(158, 247, 207, 0.18),
    0 16px 28px -24px rgba(0, 232, 143, 0.34),
    0 -16px 28px -24px rgba(0, 232, 143, 0.24);
}

.script-selection-card.is-locked {
  cursor: not-allowed;
  opacity: 0.92;
}

.script-selection-card.is-locked:hover,
.script-selection-card.is-locked:focus-visible {
  transform: none;
  border-color: rgba(255, 255, 255, 0.12);
}

.script-selection-card__status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 232, 143, 0.36);
  background: rgba(0, 232, 143, 0.12);
  color: #9ef7cf;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.script-selection-card__status--progress {
  border-color: rgba(71, 188, 255, 0.34);
  background: rgba(71, 188, 255, 0.12);
  color: #b3e5ff;
}

.script-selection-card__status--failed {
  border-color: rgba(217, 87, 100, 0.38);
  background: rgba(217, 87, 100, 0.14);
  color: #ffb4bf;
}

.script-selection-card__dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(158, 247, 207, 0.32);
  border-radius: 0;
  background: rgba(0, 232, 143, 0.1);
  color: #c8ffe5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.script-selection-card__dismiss:hover:not(:disabled),
.script-selection-card__dismiss:focus-visible {
  transform: none;
  outline: none;
  filter: brightness(1.2);
  border-color: rgba(158, 247, 207, 0.58);
}

.script-selection-card .topic {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.topic-detail-sources__empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.topic-dialog-summary-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topic-dialog-summary {
  margin: 0 0 18px;
  color: #d0d4d8;
  line-height: 1.75;
  font-size: 0.98rem;
  max-width: 82ch;
}

.topic-detail-sources__meta {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topic-detail-sources {
  display: grid;
  gap: 10px;
}

.topic-detail-sources__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topic-dialog-shell {
  background: var(--bg-elevated);
}

.topic-detail-sources__header h3 {
  margin-bottom: 0;
}

.news-panel .section-heading,
.queue-panel .section-heading,
.approval-side-panel .section-heading,
.scripts-selection-panel .section-heading,
.script-workbench .section-heading {
  margin-bottom: 16px;
}
