:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.08), transparent 30%),
    #020617;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(18px);
}

.shell-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1rem;
}

.shell-header-inner,
.shell-main,
.detail-shell {
  width: 100%;
}

.shell-header-inner,
.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.detail-hero {
  align-items: flex-start;
}

.shell-stack,
.detail-stack {
  display: grid;
  gap: 1rem;
  padding-top: 0.95rem;
  padding-bottom: 1.5rem;
}

.detail-hero-copy {
  flex: 1 1 auto;
  display: grid;
  gap: 0.7rem;
}

.brand-lockup,
.detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.eyebrow,
.section-eyebrow,
.worker-label,
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.84);
}

.page-title,
.detail-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
  font-weight: 800;
}

.detail-subtitle,
.inline-meta,
.panel-subtitle,
.cost-meta,
.worker-footer,
.issue-row-meta,
.helper-text,
.stat-meta {
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.86rem;
}

.header-actions,
.detail-hero-actions,
.refresh-status,
.detail-inline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-hero-side {
  min-width: 320px;
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.detail-status-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.6);
}

.detail-hero-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.refresh-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  display: inline-block;
  background: #38bdf8;
  box-shadow: 0 0 0 0.35rem rgba(56, 189, 248, 0.12);
}

.refresh-dot.is-loading {
  background: #f59e0b;
  box-shadow: 0 0 0 0.35rem rgba(245, 158, 11, 0.14);
}

.refresh-dot.is-live {
  background: #22c55e;
  box-shadow: 0 0 0 0.35rem rgba(34, 197, 94, 0.14);
}

.tabs-sticky {
  position: sticky;
  top: 5.25rem;
  z-index: 20;
}

.tab-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.88);
}

.tab-strip::-webkit-scrollbar {
  display: none;
}

.tab-pill {
  border: 0;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  background: transparent;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-pill:hover,
.tab-pill:focus-visible,
.tab-pill.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.proxy-grid,
.proxy-form-grid,
.proxy-actions,
.proxy-row-actions,
.proxy-mobile-actions {
  display: grid;
  gap: 0.85rem;
}

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

.proxy-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.42);
}

.proxy-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proxy-actions {
  grid-template-columns: repeat(2, max-content);
  align-items: center;
}

.proxy-import-textarea {
  min-height: 10rem;
}

.proxy-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-all;
}

.proxy-assignment {
  display: grid;
  gap: 0.2rem;
}

.proxy-card-mobile {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.5);
}

.proxy-row-actions,
.proxy-mobile-actions {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: flex-start;
}

.proxy-mobile-list {
  display: grid;
  gap: 0.85rem;
}

@media (max-width: 1100px) {
  .proxy-grid,
  .proxy-form-grid {
    grid-template-columns: 1fr;
  }
}

[hidden] {
  display: none !important;
}

.kpi-grid,
.dashboard-grid,
.cost-grid,
.worker-grid,
.settings-grid,
.form-grid {
  display: grid;
  gap: 1rem;
}

.kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

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

.worker-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.panel-span-5 { grid-column: span 5; }
.panel-span-6 { grid-column: span 6; }
.panel-span-7 { grid-column: span 7; }

.stat-card,
.panel,
.attention-card,
.worker-card,
.cost-card,
.stream-card,
.attention-summary-card,
.playback-card,
.source-card,
.issue-row,
.issue-row-expandable {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.88);
  border-radius: 1.35rem;
}

.stat-card,
.panel,
.playback-card,
.attention-summary-card {
  padding: 1rem;
}

.detail-shell .stat-card,
.detail-shell .panel,
.detail-shell .playback-card,
.detail-shell .attention-summary-card,
.detail-shell .source-card {
  padding: 0.95rem;
}

.stat-value,
.cost-value {
  margin-top: 0.45rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
}

.metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.55);
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.metric-summary-pill {
  min-height: 2.5rem;
  padding: 0.65rem 0.95rem;
  gap: 0.55rem;
}

.metric-summary-pill strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: inherit;
}

.metric-pill-success { color: #86efac; }
.metric-pill-warning { color: #fcd34d; }
.metric-pill-danger { color: #fda4af; }

.panel-header,
.attention-card-top,
.worker-card-top,
.stream-card-top,
.playback-card-top,
.attention-summary-top,
.source-head,
.issue-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-header {
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.detail-shell .panel-header {
  margin-bottom: 0.75rem;
}

.panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.stack-list,
.issue-list,
.source-stack {
  display: grid;
  gap: 0.9rem;
}

.section-stack-sm + .section-stack-sm {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.attention-card,
.worker-card,
.cost-card,
.stream-card {
  padding: 1rem;
}

.attention-title,
.issue-row-title,
.stream-card-title,
.worker-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.attention-id,
.stream-card-id {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.78);
  overflow-wrap: anywhere;
}

.worker-subtitle {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.78);
  overflow-wrap: anywhere;
}

.attention-copy,
.issue-row-preview,
.issue-detail-block,
.attention-summary-copy {
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.attention-summary-copy-soft,
.issue-detail-muted {
  color: rgba(148, 163, 184, 0.8);
}

.attention-summary-title,
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.attention-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.8rem;
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.85rem;
}

.attention-meta,
.attention-actions,
.table-actions,
.stream-card-actions,
.bulk-actions,
.bulk-actions-left,
.bulk-actions-right,
.playback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.playback-card {
  display: grid;
  gap: 0.8rem;
}

.playback-input {
  min-height: 2.75rem;
}

.playback-actions {
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.playback-actions .btn {
  min-height: 2.75rem;
  padding-inline: 0.95rem;
  border-radius: 0.85rem;
}

.attention-meta,
.stream-card-grid {
  margin-top: 0.8rem;
}

.worker-metrics,
.stream-card-grid,
.form-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-section-stack {
  display: grid;
  gap: 0.9rem;
}

.settings-section-card {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.34);
}

.settings-section-head {
  display: grid;
  gap: 0.2rem;
}

.settings-section-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
}

.settings-section-copy {
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.86rem;
  line-height: 1.45;
}

.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.settings-toggle-grid-single {
  grid-template-columns: 1fr;
}

.settings-field-span-full {
  grid-column: 1 / -1;
}

.worker-metrics > div,
.stream-card-grid > div {
  display: grid;
  gap: 0.2rem;
}

.worker-metrics span,
.stream-card-grid span,
.fact-label,
.cost-label {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.worker-metrics strong,
.stream-card-grid strong,
.fact-value {
  color: #f8fafc;
  font-size: 0.98rem;
}

.source-subtitle {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.78);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.filter-search {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.filter-search input {
  width: 100%;
}

.filter-select {
  min-width: 140px;
}

.toggle-field,
.toggle-card {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(2, 6, 23, 0.45);
}

.toggle-card-inline {
  justify-content: center;
}

.bulk-actions {
  justify-content: space-between;
  padding: 0.95rem 0;
  margin: 0 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-shell {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-header-topline {
  align-items: center;
}

.pagination-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.stream-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.stream-group + .stream-group {
  margin-top: 1.5rem;
}

.table th,
.table td {
  color: rgba(226, 232, 240, 0.95);
}

.table thead th {
  color: rgba(148, 163, 184, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody tr:nth-child(even) {
  background: rgba(2, 6, 23, 0.35);
}

.stream-health-line {
  font-size: 0.84rem;
  color: rgba(148, 163, 184, 0.82);
}

.stream-health-line strong,
.stream-health-issue {
  color: rgba(248, 250, 252, 0.96);
}

.stream-health-issue {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #fcd34d;
  overflow-wrap: anywhere;
}

.stream-card-list {
  display: grid;
  gap: 0.85rem;
}

.stream-card-grid {
  display: grid;
}

.panel-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
}

.issue-row {
  padding: 0.95rem 1rem;
}

.issue-row-summary {
  list-style: none;
  cursor: pointer;
}

.issue-row-summary-content {
  min-width: 0;
}

.issue-row-summary::-webkit-details-marker,
.issue-row-summary::marker {
  display: none;
}

.issue-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

.issue-row-titlewrap {
  min-width: 0;
}

.issue-row-details {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.65rem;
}

.issue-row-toggle {
  align-self: center;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.82);
}

.fact-list {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.fact-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr);
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fact-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0.85rem 0.95rem 1.6rem;
}

.tab-panel-stack {
  display: grid;
  gap: 1rem;
}

.dashboard-grid-detail {
  align-items: start;
}

.kpi-grid-detail {
  align-items: start;
}

.fact-value {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fact-value-break {
  font-size: 0.92rem;
  line-height: 1.45;
}

.provider-status-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(10, 16, 32, 0.92));
}

.provider-status-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.provider-status-title,
.provider-pane-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.provider-status-meta,
.provider-pane-copy {
  color: rgba(148, 163, 184, 0.82);
  font-size: 0.88rem;
  line-height: 1.5;
}

.provider-status-source,
.provider-status-error {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.94);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.provider-status-error {
  color: #fda4af;
}

.provider-status-note {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: rgba(191, 219, 254, 0.98);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.provider-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.provider-status-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.provider-fact-row {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(2, 6, 23, 0.38);
}

.provider-fact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.82);
}

.provider-fact-value {
  display: block;
  margin-top: 0.35rem;
  color: rgba(241, 245, 249, 0.96);
  font-size: 0.93rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.provider-pane {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.15rem;
  background: rgba(2, 6, 23, 0.34);
}

.provider-pane-head {
  display: grid;
  gap: 0.2rem;
}

.provider-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.provider-field-wide {
  grid-column: 1 / -1;
}

.provider-form-grid .form-control,
.provider-form-grid .toggle-card {
  min-width: 0;
}

.provider-form-grid .input,
.provider-form-grid .textarea {
  width: 100%;
}

.provider-textarea {
  min-height: 8.75rem;
}

.provider-textarea-lg {
  min-height: 11rem;
}

.provider-textarea-md {
  min-height: 8.75rem;
}

.back-link {
  color: rgba(148, 163, 184, 0.88);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: #f8fafc;
}

.playback-card-top,
.attention-summary-top {
  flex-wrap: wrap;
}

.form-grid,
.settings-grid {
  align-items: start;
}

.form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-nested {
  padding: 1rem;
  background: rgba(2, 6, 23, 0.32);
}

.worker-card-warning {
  border-color: rgba(245, 158, 11, 0.22);
}

.source-card {
  padding: 1.1rem;
}

.source-head {
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.source-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.source-field-full {
  grid-column: 1 / -1;
}

.source-fields .form-control {
  min-width: 0;
}

.source-fields textarea,
.source-fields input {
  width: 100%;
}

.source-title {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.82);
}

.source-actions {
  display: flex;
  gap: 0.45rem;
}

.variant-inspector {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.variant-inspector-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.variant-inspector-note {
  margin-bottom: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.2);
  color: rgba(254, 202, 202, 0.96);
}

.variant-list {
  display: grid;
  gap: 0.75rem;
}

.variant-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.32);
}

.variant-card.is-selected {
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.variant-card-copy {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.variant-card-title {
  font-weight: 700;
  color: #f8fafc;
}

.variant-card-meta {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.92rem;
  word-break: break-word;
}

.variant-card-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.variant-badge {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.96);
  background: rgba(15, 23, 42, 0.8);
}

.empty-state {
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: rgba(148, 163, 184, 0.82);
  text-align: center;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.desktop-only { display: block; }
.mobile-only { display: none; }

.checkbox {
  border-color: rgba(148, 163, 184, 0.6);
  background-color: transparent;
}

.checkbox:checked {
  border-color: #38bdf8;
  background-color: #38bdf8;
}

.checkbox:focus-visible,
.tab-pill:focus-visible,
.issue-row-summary:focus-visible,
.back-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .panel-span-5,
  .panel-span-6,
  .panel-span-7 {
    grid-column: span 2;
  }

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

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

  .provider-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell-inner,
  .detail-shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .tabs-sticky {
    top: 4.8rem;
  }

  .shell-header-inner,
  .detail-hero,
  .panel-header,
  .stream-group-header,
  .issue-row-main,
  .issue-row-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-grid,
  .dashboard-grid,
  .cost-grid,
  .worker-grid,
  .form-grid,
  .settings-grid,
  .form-grid-two,
  .stream-card-grid,
  .provider-form-grid,
  .settings-toggle-grid {
    grid-template-columns: 1fr;
  }

  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .detail-hero-side {
    min-width: 0;
    justify-items: stretch;
  }

  .detail-status-strip {
    width: 100%;
    justify-content: space-between;
  }

  .detail-hero-actions {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .bulk-actions,
  .pagination-cluster,
  .pagination-controls,
  .panel-footer,
  .playback-card-top {
    align-items: stretch;
  }

  .filter-search,
  .filter-select,
  .pagination-cluster,
  .pagination-controls,
  .playback-actions,
  .header-actions,
  .detail-hero-actions {
    width: 100%;
  }

  .table-actions,
  .stream-card-actions,
  .playback-actions {
    width: 100%;
  }

  .source-fields {
    grid-template-columns: 1fr;
  }

  .fact-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .fact-value {
    text-align: left;
  }

  .provider-status-top {
    flex-direction: column;
    align-items: stretch;
  }

  .provider-status-facts {
    grid-template-columns: 1fr;
  }

  .playback-actions .btn,
  .table-actions .btn,
  .stream-card-actions .btn,
  .header-actions .btn,
  .detail-hero-actions .btn {
    flex: 1 1 0;
  }

  .settings-field-span-full {
    grid-column: auto;
  }

  .pagination-controls .join,
  .panel-footer .join {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination-controls .join .btn,
  .panel-footer .join .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .shell-inner,
  .detail-shell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .shell-header {
    position: static;
  }

  .shell-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .brand-lockup {
    gap: 0.75rem;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .refresh-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .header-actions .btn,
  .header-actions a.btn {
    width: 100%;
  }

  .tabs-sticky {
    position: static;
  }

  .tab-strip {
    gap: 0.55rem;
    padding: 0.25rem;
    border-radius: 1rem;
  }

  .tab-pill {
    padding: 0.72rem 0.85rem;
    font-size: 0.94rem;
  }

  .stat-card,
  .panel,
  .attention-card,
  .worker-card,
  .cost-card,
  .stream-card,
  .issue-row,
  .issue-row-expandable {
    border-radius: 1.15rem;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-search,
  .filter-select,
  .toggle-field,
  #clearSearch {
    width: 100%;
  }

  .toggle-field {
    justify-content: space-between;
  }

  .bulk-actions-left,
  .bulk-actions-right {
    width: 100%;
  }

  .bulk-actions-right {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bulk-actions-right .btn {
    width: 100%;
  }

  .stream-card {
    padding: 0.9rem;
  }

  .stream-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stream-card-actions .btn,
  .stream-card-actions a.btn {
    width: 100%;
  }

  .worker-grid-compact,
  .cost-grid {
    grid-template-columns: 1fr;
  }
}
