:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --ink: #1b1d1f;
  --ink-2: #464b51;
  --muted: #7c8288;
  --line: #e5e2da;
  --line-2: #eeece6;
  --accent: #f7b8cd;          /* light pink: buttons, logo, highlights */
  --accent-ink: #4a1230;      /* text on light pink */
  --accent-strong: #bf3567;   /* rose: pink text and thin lines on white */
  --logo-accent: #bf3567;
  --accent-soft: #fde8f0;
  --warn: #9a4a0b;
  --warn-soft: #fcefe1;
  --danger: #b42318;
  --ok: #17804a;
  --shadow: 0 1px 2px rgba(30, 25, 10, .05), 0 6px 20px rgba(30, 25, 10, .04);
  --radius: 12px;

  --c-sponsorship: #6236c9;  --c-sponsorship-bg: #efe9fd;
  --c-ugc: #1d5bc9;          --c-ugc-bg: #e5edfc;
  --c-gifting: #9a5300;      --c-gifting-bg: #fcefd8;
  --c-affiliate: #16764a;    --c-affiliate-bg: #e1f4e8;
  --c-other_collab: #0f6f68; --c-other_collab-bg: #dcf2ee;
  --c-not_brand_deal: #686d72; --c-not_brand_deal-bg: #ecece9;

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1112;
    --surface: #171a1c;
    --surface-2: #1b1f22;
    --ink: #ecebe6;
    --ink-2: #c2c5c7;
    --muted: #8a9095;
    --line: #2a2f33;
    --line-2: #22272a;
    --accent: #f4a9c2;
    --accent-ink: #3b0d22;
    --accent-strong: #f5a3bf;
    --logo-accent: #e8648f;
    --accent-soft: rgba(244, 169, 194, .13);
    --warn: #f0a35e;
    --warn-soft: rgba(240, 163, 94, .12);
    --danger: #ff7b72;
    --ok: #5bd394;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);

    --c-sponsorship: #b9a0ff;  --c-sponsorship-bg: rgba(155, 120, 255, .16);
    --c-ugc: #8fb4ff;          --c-ugc-bg: rgba(110, 160, 255, .15);
    --c-gifting: #f2bd6b;      --c-gifting-bg: rgba(240, 180, 90, .14);
    --c-affiliate: #73d6a0;    --c-affiliate-bg: rgba(90, 210, 150, .14);
    --c-other_collab: #6fd3c5; --c-other_collab-bg: rgba(95, 212, 196, .13);
    --c-not_brand_deal: #a3a8ad; --c-not_brand_deal-bg: rgba(160, 165, 170, .13);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ shell */

.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px 14px; border-right: 1px solid var(--line);
  background: var(--surface-2); overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 9px; padding: 2px 10px 16px;
  font: 600 21px/1 var(--serif); letter-spacing: -.01em; text-decoration: none;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.logo-main { fill: var(--accent); }
.logo-accent { fill: var(--logo-accent); }
.nav a, .views a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2);
}
.nav a:hover, .views a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active, .views a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav a { font-weight: 550; }
.nav-icon { display: inline-flex; align-items: center; gap: 9px; }
.nav-icon svg { width: 16px; height: 16px; opacity: .8; }
.views { margin-top: 14px; display: flex; flex-direction: column; gap: 1px; }
.views .label { padding: 6px 10px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.views .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.views a.active .count { color: var(--accent-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.sidebar-foot { margin-top: auto; padding: 14px 6px 0; display: flex; flex-direction: column; gap: 8px; }
.sync-pill { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-height: 20px; }
.sync-pill .spinner { width: 12px; height: 12px; }
.sync-pill a { color: var(--accent-strong); font-weight: 600; }
.sync-pill.error { color: var(--danger); }
.account { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.page { overflow-y: auto; height: 100%; padding: 28px 32px 48px; }
/* Pages still scroll by trackpad, wheel and keys; the bar itself is just clutter. */
.page { scrollbar-width: none; }
.page::-webkit-scrollbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font: 600 26px/1.15 var(--serif); }

/* ------------------------------------------------------------ controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 550; font-size: 13px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.96); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding: 6px 8px; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn svg { width: 14px; height: 14px; }
.btn-sm { padding: 4px 9px; font-size: 12.5px; }
.inline { display: inline; margin: 0; }
select.stage-select, .input, textarea.input {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  padding: 6px 10px; font-size: 13px;
}
textarea.input { width: 100%; resize: vertical; line-height: 1.5; padding: 10px 12px; }
.input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 18px;
  background-color: var(--c-not_brand_deal-bg); color: var(--c-not_brand_deal);
}
.chip.cat-sponsorship { background-color: var(--c-sponsorship-bg); color: var(--c-sponsorship); }
.chip.cat-ugc { background-color: var(--c-ugc-bg); color: var(--c-ugc); }
.chip.cat-gifting { background-color: var(--c-gifting-bg); color: var(--c-gifting); }
.chip.cat-affiliate { background-color: var(--c-affiliate-bg); color: var(--c-affiliate); }
.chip.cat-other_collab { background-color: var(--c-other_collab-bg); color: var(--c-other_collab); }
.dot.cat-sponsorship { background: var(--c-sponsorship); }
.dot.cat-ugc { background: var(--c-ugc); }
.dot.cat-gifting { background: var(--c-gifting); }
.dot.cat-affiliate { background: var(--c-affiliate); }
.dot.cat-other_collab { background: var(--c-other_collab); }
.dot.cat-not_brand_deal { background: var(--c-not_brand_deal); }
.chip.stage { background-color: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.chip.move { background-color: var(--accent-soft); color: var(--accent-strong); }
.chip.warn { background-color: var(--warn-soft); color: var(--warn); }
.chip.pending { background-color: transparent; color: var(--muted); border: 1px dashed var(--line); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none;
  border: 2px solid var(--line); border-top-color: var(--accent-strong); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card-body { padding: 16px 18px; }
.card h3 a, .card h3 span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.card h3 a { color: var(--accent-strong); text-decoration: none; }
.card h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }

.banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn); font-size: 13px; margin-bottom: 14px;
}
.banner.info { background: var(--accent-soft); color: var(--accent-strong); }
.banner a { font-weight: 600; }

/* ------------------------------------------------------------ inbox */

.inbox { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); height: 100%; min-height: 0; }
.list-col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.list-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line-2); }
.list-head h2 { font-size: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.search { width: 100%; }
.thread-list { overflow-y: auto; flex: 1; }
.thread {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line-2); text-decoration: none; position: relative;
}
.thread:hover { background: var(--surface-2); }
.thread.active { background: var(--accent-soft); }
.thread.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-strong); }
.thread > * { min-width: 0; }
.thread .who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.thread .subj { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.thread .snip { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thread .tags { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 15px; margin-bottom: 6px; }

.pane { overflow-y: auto; min-width: 0; }
.pane-inner { padding: 22px 28px 48px; max-width: 1180px; }
.back { display: none; }
.thread-head { margin-bottom: 18px; }
.thread-head h1 { font: 600 22px/1.25 var(--serif); margin-bottom: 10px; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.thread-meta .spacer { flex: 1; }
.reading { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

.msg { padding: 16px 18px; }
.msg + .msg { border-top: 1px solid var(--line-2); }
.msg-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 700;
}
.msg.mine .avatar { background: var(--accent-soft); color: var(--accent-strong); }
.msg-from { font-weight: 650; }
.msg-addr { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.msg-date { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); line-height: 1.6; }
.msg-body a { color: var(--accent-strong); }
.msg details { margin-top: 10px; }
.msg summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.msg details .msg-body { color: var(--muted); font-size: 13px; margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }
.attachments { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.attachment { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); }

/* deal side panel */
.deal-panel .summary { font-size: 14.5px; line-height: 1.55; }
.deal-panel .card-body + .card-body { border-top: 1px solid var(--line-2); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.panel-top .brandname { font-weight: 700; font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: 10px 1fr; gap: 9px; }
.step .pri { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.step .pri.high { background: var(--danger); }
.step .pri.medium { background: var(--warn); }
.step .pri.low { background: var(--muted); opacity: .6; }
.step .act { font-weight: 600; }
.step .why { color: var(--ink-2); font-size: 13px; }
.step .due { font-size: 12px; color: var(--warn); font-weight: 600; }
.reply-box {
  white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 11px 13px; font-size: 13.5px; line-height: 1.55; max-height: 280px; overflow-y: auto;
}
.reply-actions { display: flex; gap: 6px; margin-top: 8px; }
.terms { display: grid; grid-template-columns: 112px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.terms dt { color: var(--muted); }
.terms dd { margin: 0; overflow-wrap: anywhere; }
.terms ul { margin: 0; padding-left: 16px; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.flags li { display: flex; gap: 8px; font-size: 13px; color: var(--warn); }
.flags li::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-soft); display: grid; place-items: center; font-weight: 800; font-size: 11px; margin-top: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.stage::before { background: var(--accent-strong); }
.timeline li.created::before { background: var(--ink-2); }
.timeline .t-when { color: var(--muted); font-size: 12px; }
.timeline .t-src { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.recat { display: flex; flex-wrap: wrap; gap: 6px; }
.recat button { cursor: pointer; border: 1px solid transparent; }
.recat button:hover { border-color: currentColor; }
.cat-form select.chip { height: 28px; padding: 0 28px 0 12px; font-size: 12.5px; border-radius: 999px; border: 1px solid transparent; background-position: right 10px center; }

/* overview (empty reading pane) */
.overview { padding: 32px 36px; max-width: 880px; }
.overview h1 { font: 600 26px/1.2 var(--serif); margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 26px; }
.stats > .card { margin-top: 0; }
.stat { padding: 14px 16px; }
.stat .n { font: 600 24px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.todo { display: flex; flex-direction: column; }
.todo a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; text-decoration: none; border-top: 1px solid var(--line-2); }
.todo a:first-child { border-top: 0; }
.todo a:hover { background: var(--surface-2); }
.todo .what { font-weight: 600; }
.todo .sub { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ pipeline */

.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col {
  flex: 0 0 236px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 230px);
}
.col-head { padding: 11px 12px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.col-head .name { font-weight: 650; font-size: 13px; }
.col-head .meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.col-body { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; border-radius: 0 0 var(--radius) var(--radius); }
.col.drop .col-body { background: var(--accent-soft); }
.deal-card {
  display: block; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; cursor: grab; box-shadow: var(--shadow);
}
.deal-card:hover { border-color: var(--muted); }
.deal-card.dragging { opacity: .45; }
.deal-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.deal-card .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-card .amt { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }
.deal-card .next { color: var(--ink-2); font-size: 12.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card .foot { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.deal-card .foot .when { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.stats.pipeline-stats { margin-top: 0; }

/* ------------------------------------------------------------ deal page */

.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.deal-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.linked { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.linked a { text-decoration: none; font-weight: 550; }
.linked a:hover { color: var(--accent-strong); }

/* ------------------------------------------------------------ settings */

.settings { max-width: 760px; }
.settings section { margin-bottom: 14px; }
.settings h2 { font-size: 16px; margin-bottom: 4px; }
.settings p { margin: 4px 0 12px; color: var(--ink-2); }
.settings code { font-size: 12.5px; background: var(--line-2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.settings ol { margin: 6px 0 12px; padding-left: 20px; color: var(--ink-2); }
.settings ol li { margin-bottom: 4px; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; font-weight: 550; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-dot.on { background: var(--ok); }
.status-dot.bad { background: var(--danger); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 1180px) {
  .reading, .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .deal-panel { order: -1; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
  .sidebar {
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--line); overflow: visible;
  }
  .brand { padding: 0 8px 0 0; font-size: 19px; }
  .nav { display: flex; gap: 2px; }
  .nav-icon svg { display: none; }
  .views { order: 10; width: 100%; min-width: 0; flex-direction: row; overflow-x: auto; margin: 4px 0 0; gap: 4px; padding-bottom: 2px; }
  .views .label { display: none; }
  .views a { white-space: nowrap; border: 1px solid var(--line); padding: 4px 10px; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; flex-direction: row; align-items: center; }
  .sidebar-foot .account, .sidebar-foot .sync-pill span.txt { display: none; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-selection .list-col { display: none; }
  .inbox:not(.has-selection) .pane { display: none; }
  .list-col { border-right: 0; }
  .back { display: inline-flex; margin-bottom: 10px; }
  .pane-inner, .page, .overview { padding: 18px 16px 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terms { grid-template-columns: 96px 1fr; }
}

/* ------------------------------------------------------------ review queue */

.nav-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700;
}
.linkbtn {
  border: 0; background: none; padding: 0; color: var(--accent-strong); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.linkbtn:disabled { color: var(--muted); cursor: default; }
kbd {
  font: 600 10.5px/1 var(--font); padding: 2px 5px; border-radius: 4px; border: 1px solid currentColor;
  opacity: .55; margin-left: 4px;
}
a.stat-link { text-decoration: none; }
a.stat-link:hover { border-color: var(--accent-strong); }
.review-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent-soft); font-size: 13px; border-radius: var(--radius) var(--radius) 0 0; }

.review-page { max-width: 820px; margin: 0 auto; width: 100%; }
.review-done, .recheck { align-items: center; flex-wrap: wrap; }
.review-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.review-head h1 { font: 600 26px/1.15 var(--serif); }
.review-progress { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.review-progress .bar { width: 140px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.review-progress .bar i { display: block; height: 100%; background: var(--accent-strong); border-radius: 999px; }

.review-card .card-body { padding: 22px 24px; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rc-brand { font: 600 28px/1.15 var(--serif); margin: 0 0 6px; overflow-wrap: anywhere; }
.rc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin: 16px 0 4px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.suggest-label { font-weight: 700; }
.suggest-accept { background: var(--c-affiliate-bg); color: var(--c-affiliate); }
.suggest-decline { background: var(--c-not_brand_deal-bg); color: var(--ink-2); }
.suggest-ignore { background: var(--warn-soft); color: var(--warn); }
.rc-summary { font-size: 15.5px; line-height: 1.6; margin: 14px 0 18px; }
.rc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.rc-facts ul { margin: 0; padding-left: 18px; }
.label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.rc-pay { font-weight: 650; font-size: 15px; }
.rc-flags { margin-top: 16px; }
.rc-edit { margin-top: 16px; }
.rc-edit summary { cursor: pointer; color: var(--ink-2); font-weight: 550; font-size: 13px; }
.edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.edit-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.edit-grid .wide { grid-column: 1 / -1; }
.edit-grid .input { width: 100%; }
.rc-actions, .rc-decline { border-top: 1px solid var(--line-2); padding: 16px 24px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rc-actions .push-right { margin-left: auto; }
.rc-actions .btn { padding: 9px 16px; font-size: 14px; }
.btn.is-suggested { box-shadow: 0 0 0 2px var(--accent-strong); }
.btn-primary.is-suggested { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-strong); }
.rc-decline textarea { margin: 4px 0 12px; }
.send-note { color: var(--ink-2); margin: -4px 0 12px; }
.btn.counting { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.shortcuts { text-align: center; margin-top: 14px; }
.review-empty { text-align: center; padding: 72px 16px; }
.review-empty svg { width: 56px; height: 56px; margin-bottom: 12px; }
.review-empty h1 { font: 600 26px/1.2 var(--serif); margin-bottom: 6px; }

@media (max-width: 820px) {
  .review-card .card-body, .rc-actions, .rc-decline { padding-left: 16px; padding-right: 16px; }
  .rc-actions .push-right { margin-left: 0; }
  .rc-actions form, .rc-actions > .btn { flex: 1 1 auto; }
  .rc-actions .btn { width: 100%; }
  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .shortcuts { display: none; }
  kbd { display: none; }
  .nav-count { margin-left: 4px; }
}
.label .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ------------------------------------------------------------ Marina in Gmail */
.folder-tree { list-style: none; margin: 10px 0 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.folder-tree li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 4px 0; }
.folder-tree li > :first-child { font-weight: 650; }
.folder-tree li:not(.child) > :first-child { color: var(--ink); }
.folder-tree li.child { padding-left: 22px; position: relative; }
.folder-tree li.child::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 50%; width: 9px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.folder-tree a { color: var(--accent-strong); text-decoration: none; }
.folder-tree a:hover { text-decoration: underline; }
.cleanup-row { margin-top: 18px; }
.views-note { font-size: 12px; color: var(--muted); padding: 10px 10px 0; margin: 6px 0 0; line-height: 1.45; }
@media (max-width: 820px) { .views-note { display: none; } }
.review-progress .bar i { transition: width .3s ease; }
.rc-nav { display: flex; gap: 4px; }
.nav-arrow { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; text-decoration: none; }
a.nav-arrow:hover { border-color: var(--accent-strong); color: var(--accent-strong); text-decoration: none; }
.nav-arrow[aria-disabled] { opacity: .35; }
.done-today { font-weight: 600; color: var(--accent-strong); margin: 0 0 4px; }
.merge-form { margin-top: 10px; flex-wrap: nowrap; }
.merge-form select { flex: 1; min-width: 0; }
.rc-edit.merge { margin-top: 10px; }

/* ------------------------------------------------------------ deal chat */
.chat-card { scroll-margin-top: 16px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; margin-bottom: 12px; }
.chat-msg { display: flex; flex-direction: column; max-width: 88%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg .bubble { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 13px; border-radius: 12px; line-height: 1.55; font-size: 14px; }
.chat-msg.user .bubble { background: var(--accent-soft); color: var(--ink); border-bottom-right-radius: 4px; }
.chat-msg.assistant .bubble { background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.chat-msg.assistant .bubble:empty::after { content: "Thinking…"; color: var(--muted); }
.chat-tools { display: flex; gap: 12px; margin-top: 4px; padding-left: 4px; }
.chat-starters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chat-starters .chip { cursor: pointer; font-size: 12.5px; padding: 4px 10px; }
.chat-starters .chip:hover { border-color: var(--accent-strong); color: var(--accent-strong); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; resize: none; }
.rc-links { gap: 2px; flex-wrap: nowrap; }

/* ------------------------------------------------------------ deals list + combined view */
.emails-count { margin-left: auto; font-size: 11.5px; color: var(--muted); align-self: center; }
.head-agency { font: 400 16px/1 var(--font); }
.msg { scroll-margin-top: 12px; }
.msg-thread { font-size: 11.5px; color: var(--muted); margin: -4px 0 8px 43px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.deal-threads a { color: inherit; }
.dt-subject { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.dt-subject a { text-decoration: none; }
.dt-subject a:hover { color: var(--accent-strong); }
.dt-actions { margin-top: 4px; }
.dt-actions > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.dt-actions .rc-edit.merge { margin-top: 6px; }

/* ------------------------------------------------------------ dropdowns */
select.stage-select, select.input {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  height: 32px; padding: 0 32px 0 12px; line-height: 30px; font-size: 13px; font-weight: 550;
  border: 1px solid var(--line); border-radius: 8px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238a9095' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 11px 7px;
}
select.stage-select:hover, select.input:hover { border-color: var(--muted); }
select.input { height: 36px; line-height: 34px; }
.panel-top select.stage-select { max-width: 170px; }

/* ------------------------------------------------------------ next steps: done / dismiss */
.step { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.step .pri { display: inline-block; width: 7px; height: 7px; margin: 0 7px 2px 0; vertical-align: middle; }
.step-check .check {
  width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; padding: 0; display: grid; place-items: center;
}
.step-check .check:hover { border-color: var(--accent-strong); background: var(--accent-soft); }
.step-check .check:hover::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--accent-strong); border-bottom: 2px solid var(--accent-strong); transform: rotate(-45deg) translate(1px, -1px); }
.step-dismiss { opacity: 0; transition: opacity .15s; }
.step:hover .step-dismiss, .step-dismiss:focus-within { opacity: 1; }
.step-dismiss .linkbtn { color: var(--muted); text-decoration: none; font-weight: 500; }
.steps-done { margin-top: 12px; }
.steps-done summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.steps-done ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.steps-done li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.struck { text-decoration: line-through; color: var(--muted); }
@media (hover: none) { .step-dismiss { opacity: 1; } }

/* ------------------------------------------------------------ readable emails */
details.msg > summary { list-style: none; cursor: pointer; }
details.msg > summary::-webkit-details-marker { display: none; }
details.msg:not([open]) { padding-top: 12px; padding-bottom: 12px; }
details.msg:not([open]) .msg-head { margin-bottom: 0; }
details.msg:not([open]) .msg-addr { display: none; }
details.msg[open] .msg-snip { display: none; }
.msg-who { min-width: 0; flex: 1; }
.msg-snip { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.msg:not([open]):hover { background: var(--surface-2); }
.msgs-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.msg-body.email { white-space: normal; }
.msg-body.email p { margin: 0 0 10px; }
.msg-body.email p:last-child { margin-bottom: 0; }
.msg-body.email .eli { position: relative; padding-left: 18px; margin-bottom: 6px; }
.msg-body.email .eli::before { content: "•"; position: absolute; left: 4px; color: var(--muted); }
.msg-body.email .eli.lv2 { margin-left: 18px; }
.msg-body.email .eli.lv2::before { content: "◦"; }
.msg-body.email a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.msg-body.clamp { max-height: 360px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent); mask-image: linear-gradient(to bottom, #000 75%, transparent); }
.msg-body.clamp.full { max-height: none; -webkit-mask-image: none; mask-image: none; }
.show-full { margin-top: 6px; }
.msg-extra { margin-top: 10px; }
.msg-extra > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.msg-extra .msg-body { color: var(--muted); font-size: 13px; margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); }

/* ------------------------------------------------------------ sign in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.signin-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 36px 32px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.signin-card h1 { font: 600 32px/1.1 var(--serif); margin: 0; }
.signin-card p { margin: 0; }
.signin-logo { width: 44px; height: 44px; margin: 0 auto; }
.signin-logo .logo-main { fill: var(--accent); }
.signin-logo .logo-accent { fill: var(--logo-accent); }
.signin-btn { justify-content: center; padding: 11px 16px; font-size: 15px; }
.signin-note { line-height: 1.5; }

/* ------------------------------------------------------------ privacy policy */
.legal { max-width: 720px; margin: 0 auto; padding: 48px 16px 80px; line-height: 1.6; font-size: 15.5px; }
.legal-brand { font: 600 20px/1 var(--serif); color: var(--accent-strong); text-decoration: none; }
.legal h1 { font: 600 34px/1.15 var(--serif); margin: 20px 0 4px; }
.legal h2 { font: 600 21px/1.25 var(--serif); margin: 32px 0 8px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
body:has(.legal) { background: var(--bg); overflow-y: auto; }
