:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f2f5f9;
  --text: #111827;
  --muted: #667085;
  --border: #d9e0ea;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --danger: #dc2626;
  --warning: #b45309;
  --shadow: 0 18px 60px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.09), transparent 28rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 52%);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.stage-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 12px;
  background: #101828;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #aab3c5;
  font-size: 12px;
}

.stage-list {
  display: grid;
  gap: 8px;
}

.stage-item {
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d0d5dd;
  text-align: left;
}

.stage-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.stage-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.stage-dot {
  display: block;
  width: 8px;
  height: 26px;
  border-radius: 99px;
  background: #344054;
}

.stage-dot.blue { background: #2563eb; }
.stage-dot.amber { background: #d97706; }
.stage-dot.violet { background: #7c3aed; }
.stage-dot.green { background: #059669; }
.stage-dot.pink { background: #db2777; }
.stage-dot.cyan { background: #0891b2; }

.stage-copy strong,
.stage-copy small {
  display: block;
}

.stage-copy strong {
  font-size: 13px;
}

.stage-copy small {
  margin-top: 4px;
  font-size: 12px;
  color: #98a2b3;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.top-bar,
.panel-head,
.top-actions,
.summary-card,
.metric-strip,
.deal-top,
.deal-meta,
.link-row,
.outreach-item {
  display: flex;
  align-items: center;
}

.top-bar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.top-bar p,
.panel-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.top-actions {
  gap: 10px;
  flex-shrink: 0;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='20' height='20' rx='6' fill='%23eef6f5' stroke='%23b7d9d4'/%3E%3Cpath d='M8 9.25h6l-3 4-3-4Z' fill='%230f766e'/%3E%3C/svg%3E");
  background-position: calc(100% - 10px) 50%;
  background-size: 22px 22px;
  background-repeat: no-repeat;
}

select:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.global-campaign-control {
  width: min(360px, 34vw);
  flex: 0 1 360px;
}

.global-campaign-control select {
  width: 100%;
  min-height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.icon-button,
.primary-button,
.secondary-button,
.review-actions button,
.segmented button,
.editor-toolbar button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.library-actions > .secondary-button {
  min-height: 37px;
  padding: 0 10px;
  font-size: 12px;
}

.secondary-button.active-filter {
  border-color: #0f766e;
  background: #eef6f5;
  color: #0f766e;
}

.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.compact-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.commercial-fetch-button {
  width: 118px;
  white-space: nowrap;
}

.primary-button {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.secondary-button {
  color: #344054;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-card {
  gap: 10px;
  min-height: 84px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.04);
}

.summary-card svg {
  color: var(--accent);
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  margin-left: auto;
  font-size: 26px;
  line-height: 1;
}

.screen-summary-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.reply-metric-card {
  appearance: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.reply-metric-card:hover,
.reply-metric-card.active {
  border-color: rgba(15, 118, 110, 0.58);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.12);
}

.reply-metric-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.left-column,
.right-column {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head.compact {
  margin-bottom: 14px;
}

.panel-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.search-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
}

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

.campaign-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.campaign-card {
  flex: 0 0 min(420px, 86vw);
  position: relative;
  display: flex;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.campaign-card.selected {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 1px #0f766e;
}

.campaign-list-tab.loading {
  opacity: 0.7;
  cursor: wait;
}

.campaign-card-main {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 0 36px 38px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.campaign-card small,
.campaign-card span,
.campaign-meta {
  color: var(--muted);
  font-size: 12px;
}

.campaign-platform-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-self: end;
}

.campaign-list-counts {
  display: flex !important;
  gap: 6px;
  flex-wrap: wrap;
}

.campaign-list-counts button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.campaign-list-counts button.active {
  background: #0f766e;
  color: #ffffff;
}

.campaign-platform-tags b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.compact-icon {
  width: 30px;
  height: 30px;
}

.campaign-card .compact-icon {
  position: absolute;
  top: 10px;
  right: 10px;
}

.danger-icon {
  color: #b91c1c;
}

.campaign-list-tab {
  position: absolute;
  left: 14px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d6e7e4;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.campaign-list-tab.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.campaign-creators-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  min-width: 0;
}

.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
  font-size: 13px;
}

.subsection-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.subsection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.28);
}

.danger-button:hover {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.42);
}

.outreach-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.progress-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.progress-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.progress-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-card-head b {
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
}

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

.progress-metrics span {
  min-height: 70px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.progress-metrics b,
.progress-metrics small {
  display: block;
}

.progress-metrics b {
  font-size: 24px;
}

.progress-metrics small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.platform-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.platform-card.selected {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 1px #0f766e;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
}

.platform-card strong {
  font-size: 15px;
}

.platform-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.segmented,
.editor-toolbar {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-2);
  -webkit-overflow-scrolling: touch;
}

.segmented button {
  flex: 0 0 auto;
}

.screening-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reply-drawer {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 34px rgba(16, 24, 40, 0.05);
}

.reply-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.reply-drawer-head strong,
.reply-drawer-head span {
  display: block;
}

.reply-drawer-head strong {
  font-size: 15px;
}

.reply-drawer-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.reply-mail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding-right: 4px;
}

.reply-mail-card {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.reply-mail-card:hover {
  border-color: rgba(15, 118, 110, 0.38);
  background: #ffffff;
}

.reply-mail-card.expanded {
  border-color: rgba(15, 118, 110, 0.46);
  background: #ffffff;
}

.reply-mail-summary-row {
  display: block;
  min-width: 0;
}

.reply-mail-summary-row,
.reply-card-meta,
.reply-mail-expanded {
  grid-column: 1 / -1;
}

.reply-mail-expanded {
  width: 100%;
}

.reply-mail-body {
  max-height: 260px;
}

.reply-mail-summary {
  width: 100%;
}

.reply-mail-card.expanded {
  margin-bottom: 6px;
}

.reply-card-meta {
  position: relative;
  z-index: 4;
}

.reply-platform-dropdown.open {
  z-index: 20;
}

.reply-platform-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
}

.reply-platform-dropdown.open .reply-platform-menu {
  display: grid;
}

@media (max-width: 900px) {
  .reply-card-meta {
    align-items: stretch;
  }

  .reply-card-meta .review-actions {
    margin-left: 0;
  }
}

.reply-mail-summary-row {
  gap: 12px;
  align-items: center;
}

.reply-mail-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.reply-mail-summary strong {
  color: var(--text);
  font-size: 13px;
}

.reply-mail-summary span,
.reply-mail-summary time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-mail-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reply-mail-expanded {
  display: grid;
  gap: 8px;
  cursor: default;
}

.reply-mail-subject {
  font-size: 13px;
  font-weight: 800;
}

.reply-mail-body {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.segmented button,
.editor-toolbar button {
  min-height: 31px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented .active,
.editor-toolbar .active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.creator-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.table-panel {
  overflow: hidden;
}

.library-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.library-actions select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
}

.campaign-selector {
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.campaign-selector label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  flex: 0 1 360px;
}

.campaign-selector select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
}

.campaign-selector-meta {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.library-platform-filter {
  flex-shrink: 0;
}

.library-platform-filter button {
  min-width: 46px;
}

.library-platforms {
  display: grid;
  gap: 18px;
}

.library-platform-block {
  display: grid;
  gap: 9px;
}

.platform-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-section-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-section-title span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
  color: var(--muted);
  font-size: 13px;
}

.pagination-bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-bar strong {
  color: var(--text);
  font-size: 13px;
}

.panel-filters,
.payment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-filters .campaign-selector {
  margin-bottom: 0;
}

.table-row {
  display: grid !important;
  grid-template-columns: minmax(190px, 1.35fr) 0.58fr 0.55fr 0.55fr minmax(120px, 0.8fr) 0.7fr 116px;
  gap: 10px;
  align-items: center;
  min-width: 850px;
  min-height: 58px;
  padding: 0 8px;
  border-bottom: 1px solid #eef2f6;
  font-size: 13px;
}

.table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button.active {
  color: #0f766e;
}

.table-sort-button b {
  font-size: 12px;
  line-height: 1;
}

.inline-select {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.wide-input {
  width: 100%;
}

.table-row.creator-metrics-row {
  grid-template-columns: minmax(190px, 1.25fr) 90px 92px 92px 98px 116px 82px 76px 116px;
  min-width: 1030px;
}

.table-row.campaign-list-row {
  grid-template-columns: minmax(190px, 1.2fr) minmax(170px, 0.9fr) 100px minmax(170px, 1fr) minmax(180px, 1fr);
  min-width: 884px;
}

.table-row.tk-screening-row {
  grid-template-columns: minmax(190px, 1.1fr) minmax(170px, 0.9fr) 96px 96px minmax(170px, 1fr) minmax(170px, 1fr) minmax(220px, 1.25fr) 116px;
  min-width: 1240px;
}

.table-row.yt-screening-row {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, 0.9fr) minmax(180px, 1fr) 110px 82px 118px 116px 82px 72px 116px;
  min-width: 1360px;
}

.table-row.tk-library-row {
  grid-template-columns: 30px minmax(150px, 1fr) minmax(150px, 0.92fr) 88px 88px minmax(145px, 1fr) minmax(145px, 1fr) minmax(160px, 1.05fr);
  min-width: 960px;
}

.table-row.yt-library-row {
  grid-template-columns: 30px minmax(138px, 0.95fr) minmax(154px, 1fr) minmax(150px, 0.95fr) minmax(150px, 1fr) 92px 72px 106px 104px 72px 60px;
  min-width: 1160px;
}

.table-row.library-unified-row {
  grid-template-columns: 36px 72px 220px 230px 140px 140px 260px 300px 118px 90px;
  min-width: 1606px;
}

.table-row.library-summary-row {
  grid-template-columns: 36px 72px minmax(260px, 1fr) minmax(220px, 0.8fr);
  min-width: 720px;
}

.table-row.tk-library-detail-row {
  grid-template-columns: 36px minmax(260px, 1.1fr) minmax(210px, 0.9fr) 110px 110px minmax(240px, 1fr) minmax(280px, 1.2fr);
  min-width: 1280px;
}

.table-row.yt-library-detail-row {
  grid-template-columns: 36px minmax(260px, 1.1fr) minmax(210px, 0.85fr) minmax(200px, 0.9fr) 110px 82px 124px 120px 82px 76px;
  min-width: 1420px;
}

.table-row.campaign-all-row {
  grid-template-columns: 38px 82px minmax(260px, 1.2fr) minmax(230px, 1fr) 140px minmax(220px, 0.9fr);
  min-width: 1160px;
}

.table-row.commercial-row {
  grid-template-columns: minmax(260px, 1.25fr) 110px 110px 124px 92px 92px 112px;
  min-width: 980px;
}

.table-row.deal-progress-row {
  grid-template-columns: minmax(220px, 1.1fr) 68px minmax(178px, 0.82fr) 132px 112px 126px 126px 76px minmax(180px, 0.9fr) 58px;
  min-width: 1320px;
}

.table-row.payment-row {
  grid-template-columns: minmax(220px, 0.95fr) 210px 116px minmax(230px, 1fr) minmax(200px, 0.88fr) minmax(200px, 0.88fr) minmax(200px, 0.88fr);
  min-width: 1500px;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.table-row.delivery-row {
  grid-template-columns: minmax(190px, 0.95fr) 62px minmax(160px, 0.72fr) 116px 82px 74px 74px 74px 184px;
  min-width: 1030px;
}

.deal-progress-table {
  overflow-y: visible;
}

.deal-detail-row {
  width: 100%;
  min-width: 1320px;
  padding: 0 8px 12px;
  border-bottom: 1px solid #eef2f6;
}

.compact-link-details {
  max-width: 100%;
}

.compact-link-details summary {
  display: block;
  cursor: pointer;
  color: #2563eb;
  list-style: none;
}

.compact-link-details summary::-webkit-details-marker {
  display: none;
}

.compact-link-details summary span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-link-details div {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: normal;
}

.table-row.sent-mail-row {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 180px;
  min-width: 760px;
}

.table-row.approved-row {
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr) 160px;
  min-width: 820px;
}

.deal-object-cell {
  display: grid;
  gap: 6px;
}

.deal-detail-trigger {
  justify-self: start;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.deal-detail-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #f8fffd;
}

.creator-table > .deal-detail-panel {
  min-width: 1040px;
}

.deal-detail-row > .deal-detail-panel {
  min-width: 0;
}

.delivery-link-edit-cell {
  min-width: 0;
  overflow: visible;
}

.delivery-link-input {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-link-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  width: min(220px, 100%);
  max-width: 220px;
}

.delivery-link-view.empty {
  grid-template-columns: minmax(0, 1fr);
}

.delivery-link-display {
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  cursor: text;
}

.delivery-link-display span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-link-view.empty .delivery-link-display {
  color: var(--muted);
}

.delivery-link-display:hover {
  border-color: #0f766e;
  background: #f8fffd;
}

.delivery-link-display:focus-visible,
.delivery-link-open:focus-visible {
  outline: 0;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.delivery-link-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
}

.delivery-link-open:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.payment-link-cell {
  display: flex;
  align-items: center;
  min-width: 0;
}

.payment-amount-cell {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
}

.payment-row > span:first-child {
  align-self: center;
}

.currency-select {
  min-width: 0;
}

.status-ok,
.status-waiting {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-ok {
  background: #ecfdf3;
  color: #027a48;
}

.status-waiting {
  background: #fff7ed;
  color: #c2410c;
}

.big-section-tabs {
  display: flex;
  gap: 10px;
  margin: 8px 0 14px;
}

.big-section-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #eef6f5;
  color: #0f766e;
  font-weight: 900;
}

.deal-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deal-detail-head strong {
  font-size: 14px;
}

.deal-detail-head span {
  color: var(--muted);
  font-size: 13px;
}

.deal-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.deal-detail-grid span {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid #d9ebe8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.deal-detail-grid b {
  color: var(--text);
  font-size: 13px;
}

.table-header {
  display: grid !important;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.creator-cell strong,
.creator-cell small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.creator-cell small {
  margin-top: 4px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-list b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.text-link {
  color: #2563eb;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.text-link:hover {
  text-decoration: underline;
}

.creator-name-link,
.creator-profile-link {
  color: inherit;
  text-decoration: none;
}

.creator-name-link:hover,
.creator-profile-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.creator-profile-link {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}

.platform-pill.tiktok {
  background: #f3f4f6;
  color: #111827;
}

.platform-pill.instagram {
  background: #fdf2f8;
  color: #be185d;
}

.platform-pill.youtube {
  background: #fef2f2;
  color: #dc2626;
}

.match-cell {
  display: grid;
  gap: 7px;
}

.match-cell b {
  font-size: 13px;
}

.match-cell {
  position: relative;
}

.match-cell::after {
  content: "";
  display: block;
  width: 76px;
  height: 5px;
  border-radius: 99px;
  background: #e5e7eb;
}

.match-cell i {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 76px;
  height: 5px;
  border-radius: 99px;
  background: var(--accent);
}

.review-actions {
  display: flex;
  gap: 6px;
}

.metric-input {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
}

.metric-input:focus {
  outline: 0;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.metric-risk {
  color: #b91c1c;
  font-weight: 800;
}

.metric-good {
  color: #047857;
  font-weight: 800;
}

.review-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
}

.commercial-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef2f6;
}

.commercial-head {
  margin-bottom: 10px;
  color: #344054;
  font-size: 14px;
}

.metric-strip {
  gap: 10px;
  margin-bottom: 16px;
}

.metric-strip div {
  flex: 1;
  min-height: 76px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.metric-strip strong,
.metric-strip span {
  display: block;
}

.metric-strip strong {
  font-size: 18px;
}

.metric-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 150px;
  padding: 12px 8px 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc, #eef4f8);
}

.bar-chart i {
  flex: 1;
  min-width: 18px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0f766e, #5eead4);
}

.outreach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
}

.outreach-accordion {
  display: grid;
  gap: 10px;
}

.deal-campaign-row .campaign-selector {
  justify-content: flex-end;
}

.deal-sections {
  display: grid;
  gap: 12px;
}

.deal-mail-grid {
  padding: 12px;
}

.inline-panel-head {
  margin-bottom: 0;
}

.outreach-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.outreach-section > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.outreach-section > summary::-webkit-details-marker {
  display: none;
}

.outreach-section > summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.accordion-title-with-caret {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.accordion-title-with-caret > b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 5px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 12px;
  line-height: 1;
}

.outreach-section[open] > summary {
  border-bottom: 1px solid var(--border);
}

.template-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.template-recipient {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.template-subject-input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
  color: #101828;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.template-subject-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.rich-editor-toolbar button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  cursor: pointer;
}

.rich-editor-toolbar button:hover {
  border-color: var(--border);
  background: #f8fafc;
  color: #0f766e;
}

.template-rich-editor {
  width: 100%;
  min-height: 230px;
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
  background: #ffffff;
}

.template-rich-editor:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.template-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.template-preview {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.template-preview summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #344054;
}

.template-preview summary::-webkit-details-marker {
  display: none;
}

.template-preview summary::after {
  content: '展开';
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.template-preview[open] summary::after {
  content: '收起';
}

.template-preview strong,
.template-preview span {
  font-size: 13px;
}

.template-preview span {
  color: var(--muted);
  font-weight: 600;
}

.template-preview-subject {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
}

.template-preview-subject strong {
  color: #101828;
  white-space: nowrap;
}

.template-preview-subject span {
  color: #344054;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-preview-body {
  margin-top: 12px;
  color: #344054;
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.template-side,
.outreach-list {
  display: grid;
  gap: 10px;
}

.template-side {
  align-content: start;
}

.template-side > strong {
  font-size: 13px;
}

.template-card {
  display: grid;
  gap: 6px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.template-card-body {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.template-card.active {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.template-name-input {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  outline: none;
}

.template-name-input:focus {
  border-bottom: 1px solid #0f766e;
}

.template-card span {
  font-weight: 800;
}

.template-card small {
  color: var(--muted);
  line-height: 1.45;
}

.send-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.sender-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.sender-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sender-select {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.sender-select select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.queue-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.queue-status b {
  color: var(--text);
}

.queue-status small {
  margin-left: auto;
  color: var(--muted);
}

.send-list {
  display: grid;
  gap: 8px;
}

.send-row {
  display: grid;
  grid-template-columns: 28px minmax(160px, 1fr) minmax(190px, 1fr) 76px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.send-row span {
  color: var(--muted);
  font-size: 12px;
}

.send-row b {
  justify-self: end;
  color: #047857;
  font-size: 12px;
}

.send-row b.risk {
  color: var(--warning);
}

.send-row small {
  grid-column: 2 / -1;
  color: #b42318;
  font-size: 12px;
  line-height: 1.35;
}

.send-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-name-list {
  align-content: start;
  max-height: 640px;
  overflow: auto;
}

.outreach-name-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
  color: var(--text);
}

.outreach-name-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.main-grid.single-column {
  grid-template-columns: 1fr;
}

.outreach-item,
.deal-item,
.status-row {
  width: 100%;
  text-align: left;
}

.outreach-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.outreach-item:hover,
.deal-item:hover {
  border-color: #0f766e;
}

.deal-item {
  width: 100%;
  text-align: left;
}

.outreach-item strong,
.outreach-item small {
  display: block;
}

.outreach-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.health {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}

.health.warning {
  background: #fef3c7;
  color: #92400e;
}

.follow-up {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.deal-list,
.link-list,
.status-list {
  display: grid;
  gap: 10px;
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.delivery-refresh-progress {
  display: grid;
  gap: 8px;
  margin: -4px 0 16px;
  padding: 12px 14px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fafc;
}

.delivery-refresh-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.delivery-refresh-meta b {
  color: var(--text);
  font-size: 13px;
}

.delivery-refresh-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf2;
}

.delivery-refresh-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
  transition: width 240ms ease;
}

.delivery-summary div {
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.delivery-summary span,
.delivery-summary strong {
  display: block;
}

.delivery-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-summary strong {
  margin-top: 9px;
  font-size: 22px;
  line-height: 1;
}

.delivery-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.delivery-state-pill.normal {
  background: #ecfdf3;
  color: #047857;
}

.delivery-state-pill.overdue {
  background: #fef2f2;
  color: #dc2626;
}

.delivery-link-list .empty-state {
  min-height: 110px;
}

.status-creator-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.status-creator-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.status-creator-row strong,
.status-creator-row small {
  display: block;
}

.status-creator-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-creator-row b {
  justify-self: end;
  color: #047857;
  font-size: 12px;
}

.status-creator-row b.risk {
  color: var(--warning);
}

.deal-item {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.deal-top,
.deal-meta {
  justify-content: space-between;
  gap: 10px;
}

.deal-top span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #047857;
  font-weight: 800;
}

.deal-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e7eb;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0f766e);
}

.status-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 64px 58px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.status-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef6f5;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.status-row strong,
.status-row small {
  display: block;
}

.status-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-row > span:not(.status-dot) {
  color: var(--muted);
  font-size: 12px;
}

.status-row b {
  color: #047857;
  font-size: 12px;
}

.status-row b.risk {
  color: var(--warning);
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, 0.5fr) 48px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.link-row strong,
.link-row small,
.link-row span {
  display: block;
}

.link-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.link-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.link-row span {
  font-size: 13px;
  font-weight: 800;
}

.link-row b {
  color: #047857;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.38);
}

.modal {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.28);
}

.account-modal {
  width: min(760px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head .icon-button {
  font-size: 20px;
  line-height: 1;
}

.modal-form {
  display: grid;
  gap: 12px;
}

.modal-form strong {
  font-size: 14px;
}

.modal-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.modal-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
}

.modal-form input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.smtp-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.account-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.notification-panel {
  min-height: calc(100vh - 142px);
}

.notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 900;
}

.notification-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.notification-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-weight: 800;
}

.notification-tabs button.active {
  border-color: rgba(15, 118, 110, 0.62);
  background: #f6fffc;
  color: #0f766e;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(220px, auto);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.notification-item:hover {
  border-color: rgba(15, 118, 110, 0.5);
  background: #f8fffd;
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef6f5;
  color: #0f766e;
}

.notification-item strong,
.notification-item small {
  display: block;
}

.notification-item strong {
  font-size: 14px;
}

.notification-item small,
.notification-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.notification-item em {
  justify-self: end;
  text-align: right;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .stage-rail {
    position: static;
    height: auto;
    padding: 16px;
  }

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

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

@media (max-width: 820px) {
  .workspace {
    padding: 18px 14px;
  }

  .top-bar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-actions .primary-button {
    flex: 1;
  }

  .summary-grid,
  .platform-grid,
  .progress-dashboard,
  .stage-list,
  .outreach-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-actions {
    justify-content: stretch;
  }

  .search-actions .primary-button,
  .search-actions .secondary-button {
    flex: 1;
  }

  .metric-strip {
    flex-direction: column;
  }

  .link-row {
    grid-template-columns: 1fr 1fr;
  }

  .account-forms {
    grid-template-columns: 1fr;
  }
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #101828;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.24);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.empty-state {
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.empty-state.compact-empty {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}

.table-row.rejected {
  opacity: 0.55;
}

.table-row.red-flagged-row {
  background: #fff1f2;
}

.table-row.red-flagged-row:hover {
  background: #ffe4e6;
}

.red-flag-label {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
}

.inline-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.review-actions button.defer {
  border-color: #fed7aa;
  color: #c2410c;
}

.review-actions button.approve {
  border-color: #059669;
  color: #047857;
}

.review-actions button.reject {
  border-color: #fecaca;
  color: #b91c1c;
}

.review-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.approved {
  background: #dcfce7;
  color: #166534;
}

.status-pill.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.neutral {
  background: #f2f4f7;
  color: #475467;
}

.status-row {
  cursor: pointer;
}

.status-row:hover {
  border-color: #0f766e;
}

.link-row button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.loading-card {
  display: grid;
  gap: 10px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card strong {
  font-size: 20px;
}

.loading-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.loading-card.error span {
  color: #b42318;
}

.loading-card .primary-button {
  justify-self: center;
  margin-top: 8px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.13), transparent 36rem),
    linear-gradient(180deg, #fbfcff 0%, #eef4f8 100%);
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card strong,
.login-card span,
.login-card label {
  display: block;
}

.login-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.login-card > div > span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-card label span {
  margin-bottom: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
}

.login-card input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-card .primary-button {
  width: 100%;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  h1 {
    font-size: 25px;
  }

  .summary-card {
    min-height: 74px;
  }

  .summary-card strong {
    font-size: 22px;
  }

  .panel {
    padding: 14px;
  }
}

.campaign-panel-head {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.reply-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reply-card-meta .review-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.table-row.commercial-row {
  grid-template-columns: minmax(260px, 1.35fr) 170px 120px 136px 100px 100px;
  min-width: 930px;
}

.deal-mail-thread {
  display: grid;
  gap: 14px;
}

.deal-mail-reply {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9ebe8;
  border-radius: 8px;
  background: #ffffff;
}

.deal-mail-reply strong,
.deal-mail-reply span {
  display: block;
}

.deal-mail-reply strong {
  font-size: 14px;
}

.deal-mail-reply span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.deal-mail-reply pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.deal-mail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  padding: 0;
}

.deal-single-send-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1fr) 82px auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.deal-single-send-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.deal-single-send-row b {
  color: #047857;
  font-size: 13px;
}

@media (max-width: 920px) {
  .deal-mail-grid {
    grid-template-columns: 1fr;
  }

  .deal-single-send-row {
    grid-template-columns: 1fr;
  }
}

.main-grid.single-column,
.main-grid.single-column .left-column,
.left-column,
.panel,
.negotiation-panel,
.outreach-panel,
.table-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.summary-card.active,
.reply-metric-card.active {
  border-color: rgba(15, 118, 110, 0.62);
  background: #f6fffc;
}

.summary-card strong {
  font-size: 18px;
  line-height: 1.2;
}

.rich-editor-toolbar {
  min-height: 44px;
  padding: 6px 8px;
}

.rich-editor-toolbar .toolbar-save-template {
  width: auto;
  min-width: 104px;
  height: 32px;
  margin-left: auto;
  padding: 0 12px;
  display: inline-flex;
  place-items: initial;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-color: var(--border);
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.rich-editor-toolbar .toolbar-save-template:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: #f6fffc;
}

.template-editor {
  gap: 12px;
  padding: 14px;
}

.template-recipient {
  padding-top: 2px;
}

.template-side {
  padding-top: 2px;
}

.outreach-grid,
.deal-mail-grid {
  align-items: start;
}

.reply-mail-card,
.reply-card-meta,
.reply-mail-list {
  overflow: visible;
}

.table-row.deal-progress-row,
.table-row.commercial-row {
  align-items: center;
}

.table-row.deal-progress-row > span,
.table-row.commercial-row > span {
  min-width: 0;
}

.deal-detail-trigger {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  min-height: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deal-detail-trigger:hover {
  color: #0f766e;
}

.campaign-panel {
  min-height: calc(100vh - 142px);
}

.embedded-campaign-panel {
  min-height: 0;
  margin-bottom: 18px;
}

.embedded-campaign-panel .campaign-grid {
  min-height: 0;
}

.library-search-block {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.library-results-block {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.library-results-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  background: #ffffff;
  padding: 14px 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.library-results-toggle:hover {
  background: #f8fafc;
}

.library-results-toggle strong,
.library-results-toggle span {
  display: block;
}

.library-results-toggle strong {
  font-size: 15px;
}

.library-results-toggle span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.library-results-toggle > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #b7d9d4;
  border-radius: 6px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 12px;
  transition: transform 160ms ease;
}

.library-results-block.open .library-results-toggle > b {
  transform: rotate(180deg);
}

.library-results-content {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid #eef2f6;
}

.library-results-block.open .library-results-content {
  display: block;
}

.library-results-content .panel-head.compact {
  padding-top: 14px;
}

.campaign-panel-head {
  min-height: 50px;
  align-items: center;
  margin-bottom: 16px;
}

.campaign-grid {
  min-height: 158px;
  align-items: stretch;
}

.campaign-card {
  align-self: stretch;
}

.reply-platform-dropdown {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  width: 184px;
  max-width: 100%;
}

.reply-platform-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.reply-platform-trigger:hover,
.reply-platform-dropdown.open .reply-platform-trigger {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.reply-platform-trigger span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.reply-platform-trigger strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.reply-platform-trigger b {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.reply-platform-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 184px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
}

.reply-platform-dropdown.open .reply-platform-menu {
  display: grid;
  gap: 4px;
}

.reply-platform-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.reply-platform-menu button:hover {
  background: #eef6f5;
  color: #0f766e;
}

.reply-platform-menu button.selected {
  background: #0f766e;
  color: #ffffff;
}

.template-side {
  padding-top: 14px;
}

.template-side > strong {
  min-height: 18px;
  display: flex;
  align-items: flex-start;
  color: #344054;
}

.commercial-data-value {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

select,
.global-campaign-control select,
.library-actions select,
.campaign-selector select,
.inline-select,
.currency-select,
.sender-select select {
  appearance: none;
  padding-right: 42px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='20' height='20' rx='6' fill='%23eef6f5' stroke='%23b7d9d4'/%3E%3Cpath d='M8 9.25h6l-3 4-3-4Z' fill='%230f766e'/%3E%3C/svg%3E");
  background-position: calc(100% - 10px) 50%;
  background-size: 22px 22px;
  background-repeat: no-repeat;
}

.accordion-title-with-caret > b,
.reply-platform-trigger b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 6px;
  background: #eef6f5;
  color: #0f766e;
  font-size: 11px;
  line-height: 1;
}

.reply-platform-trigger b {
  margin-left: auto;
}
