.owner-action-page {
  background:
    linear-gradient(180deg, rgba(236, 231, 221, 0.72), rgba(247, 244, 238, 0.96)),
    var(--paper);
  overflow-x: hidden;
}

.action-shell {
  padding-top: 86px;
  overflow-x: hidden;
}

.action-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 5vw, 72px);
  align-items: start;
  padding: clamp(72px, 10vw, 118px) clamp(18px, 5vw, 72px) clamp(34px, 5vw, 58px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(32, 61, 52, 0.97), rgba(62, 109, 129, 0.78)),
    var(--forest);
  min-width: 0;
}

.action-hero h1 {
  max-width: 1080px;
  margin-bottom: 22px;
  color: #fff;
  text-shadow: none;
}

.action-hero p:not(.section-kicker) {
  max-width: 830px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.62;
}

.action-jump-button {
  min-width: 150px;
  color: #1e1707;
  box-shadow: 0 18px 42px rgba(214, 168, 79, 0.24);
}

.action-workspace {
  display: grid;
  gap: 20px;
  padding: clamp(28px, 5vw, 72px);
  min-width: 0;
}

.queue-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: end;
}

.queue-header h2 {
  max-width: 860px;
  margin: 0;
  color: var(--forest);
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 1;
}

.queue-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.queue-metrics article {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 16px 12px;
  border: 1px solid rgba(32, 61, 52, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.queue-metrics span {
  display: block;
  color: var(--forest);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  line-height: 1;
}

.queue-metrics p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.business-picker {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(32, 61, 52, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.business-picker label {
  min-width: 0;
}

.business-picker select {
  background: #fff;
}

.business-picker p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filter-button {
  min-height: 40px;
  border: 1px solid rgba(32, 61, 52, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
}

.filter-button:hover,
.filter-button:focus-visible {
  border-color: rgba(32, 61, 52, 0.32);
  background: #fff;
}

.filter-button.is-active {
  color: #17211f;
  border-color: var(--gold);
  background: var(--gold);
}

.action-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.68fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.action-list-panel,
.action-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.swipe-cue {
  display: none;
}

.carousel-dots {
  display: none;
}

.action-card,
.action-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(23, 33, 31, 0.05);
}

.action-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.action-card:hover,
.action-card:focus-visible {
  border-color: rgba(32, 61, 52, 0.3);
  box-shadow: 0 12px 28px rgba(23, 33, 31, 0.08);
  outline: none;
}

.action-card.is-selected {
  border-color: rgba(214, 168, 79, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 247, 231, 0.76), rgba(255, 255, 255, 0.96)),
    #fff;
}

.card-topline,
.card-footer,
.detail-topline,
.detail-meta,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.source-pill,
.priority-pill,
.status-pill,
.tag-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

.source-pill {
  color: var(--forest);
  background: rgba(111, 137, 119, 0.14);
}

.priority-pill {
  color: var(--forest);
  background: rgba(214, 168, 79, 0.18);
}

.priority-pill[data-priority="critical"] {
  color: #842c1d;
  background: #ffe8dc;
}

.priority-pill[data-priority="high"] {
  color: #8f5312;
  background: #fff0c7;
}

.status-pill {
  color: var(--blue);
  background: rgba(62, 109, 129, 0.12);
}

.tag-pill {
  color: var(--muted);
  background: rgba(23, 33, 31, 0.06);
}

.action-card h3 {
  margin: 0;
  color: var(--forest);
  font-size: 1.08rem;
  line-height: 1.25;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-footer {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.card-footer strong {
  color: var(--forest);
}

.action-detail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.detail-empty {
  color: var(--muted);
  font-weight: 850;
}

.detail-empty p {
  margin: 0;
}

.detail-heading h2 {
  margin: 12px 0 12px;
  color: var(--forest);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.detail-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.58;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-meta article,
.detail-section {
  min-width: 0;
  border: 1px solid rgba(32, 61, 52, 0.13);
  border-radius: 8px;
  background: rgba(251, 250, 247, 0.82);
}

.detail-meta article {
  padding: 14px;
}

.detail-meta span,
.detail-section h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-section h4 {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-meta strong {
  display: block;
  color: var(--forest);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-section {
  padding: 18px;
}

.detail-section p {
  margin: 0;
  color: var(--forest);
  font-weight: 500;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.detail-subsection {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(32, 61, 52, 0.11);
}

.detail-section.is-primary {
  background:
    linear-gradient(135deg, rgba(111, 137, 119, 0.12), rgba(214, 168, 79, 0.11)),
    #fff;
}

.detail-section.is-primary p,
.draft-copy {
  font-weight: 500;
}

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

.detail-button {
  min-height: 44px;
  border: 1px solid rgba(32, 61, 52, 0.18);
  border-radius: 6px;
  color: var(--forest);
  background: #fff;
  font: inherit;
  font-weight: 900;
}

.detail-button.is-primary {
  color: #17211f;
  border-color: var(--gold);
  background: var(--gold);
}

@media (max-width: 1040px) {
  .queue-header,
  .business-picker,
  .action-layout {
    grid-template-columns: 1fr;
  }

  .action-detail {
    position: static;
  }
}

@media (max-width: 760px) {
  .action-shell {
    padding-top: 68px;
  }

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

  .queue-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .queue-metrics article {
    grid-template-columns: 1fr;
    gap: 5px;
    justify-items: center;
    min-height: 76px;
    padding: 12px 6px;
    text-align: center;
  }

  .queue-metrics span {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .queue-metrics p {
    font-size: clamp(0.64rem, 2.7vw, 0.74rem);
    white-space: normal;
  }

  .action-hero {
    padding-top: 64px;
  }

  .action-jump-button {
    width: fit-content;
  }

  .action-workspace {
    padding: 24px 14px;
  }

  .action-list-panel {
    overflow: hidden;
  }

  .swipe-cue {
    display: flex;
    gap: 5px;
    align-items: center;
    width: fit-content;
    min-height: 18px;
    margin: 0 0 8px;
  }

  .swipe-cue::before,
  .swipe-cue::after {
    color: rgba(32, 61, 52, 0.56);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
  }

  .swipe-cue::before {
    content: "<";
  }

  .swipe-cue::after {
    content: ">";
  }

  .swipe-cue span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(214, 168, 79, 0.76);
  }

  .action-list {
    display: flex;
    gap: 12px;
    margin-inline: -14px;
    padding: 0 14px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .action-list::-webkit-scrollbar {
    display: none;
  }

  .action-card {
    flex: 0 0 min(78vw, 340px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .action-card p {
    display: none;
  }

  .carousel-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    min-height: 8px;
    margin-top: -2px;
  }

  .carousel-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(32, 61, 52, 0.22);
    transition:
      width 160ms ease,
      background-color 160ms ease;
  }

  .carousel-dots span.is-active {
    width: 18px;
    background: var(--gold);
  }

  .action-card,
  .action-detail {
    padding: 18px;
  }
}
