:root {
  --bg: #080b0d;
  --bg-soft: #0c1012;
  --panel: #111619;
  --panel-raised: #151b1e;
  --panel-hover: #1a2226;
  --line: rgba(214, 231, 235, .12);
  --line-strong: rgba(214, 231, 235, .2);
  --text: #f4f5f1;
  --muted: #8f9b9f;
  --muted-strong: #b3bdc0;
  --accent: #d8ff43;
  --orange: #ff9b72;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

* { -webkit-font-smoothing: antialiased; }
html { background: var(--bg); }
body {
  background: radial-gradient(900px 520px at 92% -8%, rgba(216, 255, 67, .045), transparent 60%), var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -.012em;
  overflow-x: hidden;
}
main { min-width: 0; }

aside {
  background: rgba(8, 12, 14, .86);
  border-right-color: var(--line);
  padding: 30px 16px;
  backdrop-filter: blur(18px);
}
.brand { margin: 0 12px 44px; line-height: 1; }
.brand b { font-size: 24px; letter-spacing: .13em; font-weight: 720; }
.brand small { margin-top: 8px; font-size: 9px; letter-spacing: .22em; font-weight: 650; }
nav { display: grid; gap: 2px; }
nav { scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav button {
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  padding: 11px 13px;
  margin: 0;
  border-radius: 11px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
nav button:hover { background: rgba(255,255,255,.045); color: var(--text); }
nav button.active { background: #1b2226; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
#safety { left: 16px; bottom: 26px; color: #778387; letter-spacing: .06em; }

main { max-width: 1540px; padding: 46px 5vw 72px; }
header { align-items: flex-end; margin-bottom: 36px; gap: 28px; }
header > div:first-child { min-width: 0; flex: 1 1 auto; }
h1 { color: var(--text); font-size: clamp(32px, 3.2vw, 46px); line-height: 1.04; letter-spacing: -.045em; font-weight: 680; }
#page-purpose { max-width: 620px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: .19em; }
.header-actions { gap: 12px; }
.song-picker { position: relative; width: min(390px, 38vw); }
#scope-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  min-width: 292px;
  background: rgba(17, 22, 25, .9);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 580;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
#scope-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scope-trigger i { color: var(--muted); font-size: 15px; font-style: normal; }
#scope-trigger:hover, #scope-trigger[aria-expanded="true"] { border-color: rgba(216,255,67,.55); background: var(--panel-raised); }
.song-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(430px, 90vw);
  padding: 10px;
  background: rgba(17, 22, 25, .98);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
  backdrop-filter: blur(22px);
}
.song-search { display: block; padding: 2px 2px 9px; }
.song-search span { display: block; margin: 0 0 7px 5px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.song-search input { height: 42px; border-radius: 10px; }
.song-options { max-height: 360px; overflow-y: auto; display: grid; gap: 2px; }
.song-options button { display: block; width: 100%; padding: 10px 12px; background: transparent; color: var(--text); border: 0; border-radius: 10px; text-align: left; }
.song-options button:hover, .song-options button.selected { background: rgba(255,255,255,.055); }
.song-options button.selected { box-shadow: inset 2px 0 0 var(--accent); }
.song-options b, .song-options small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-options b { font-size: 13px; font-weight: 650; }
.song-options small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.song-empty { padding: 16px 12px; color: var(--muted); }
.inline-song-filter { width: min(390px,100%); margin: 0 0 18px; }
.inline-song-filter > span { display: block; margin: 0 0 8px 2px; color: var(--muted); font-size: 11px; font-weight: 620; }
.inline-song-filter .song-picker, .inline-song-filter #scope-trigger { width: 100%; }
.inline-song-filter .song-menu { right: auto; left: 0; }

button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, .button { transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease; }
button:hover, .button:hover { transform: translateY(-1px); }
button:active, .button:active { transform: translateY(0); }
.primary, .button.primary {
  background: var(--accent);
  color: #0a0d0e;
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(216,255,67,.08);
}
.primary:hover, .button.primary:hover { background: #e4ff70; border-color: #e4ff70; }
.button { border-radius: 10px; padding: 11px 16px; font-weight: 650; }

.insight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.insight-grid article, .opportunity, .settings-grid article {
  background: linear-gradient(145deg, rgba(20, 26, 29, .98), rgba(14, 19, 21, .98));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.1);
}
.insight-grid article { min-height: 154px; padding: 23px; }
.insight-grid article { display: flex; flex-direction: column; align-items: flex-start; }
.insight-grid article small, .insight-grid article strong, .insight-grid article span { display: block; }
.insight-grid article strong { margin: auto 0 5px; line-height: 1; }
.insight-grid article span { line-height: 1.35; }
.insight-grid article strong { font-size: 35px; font-weight: 680; letter-spacing: -.05em; }
.insight-grid article small { color: var(--muted-strong); font-size: 12px; font-weight: 580; }
.insight-grid article span, .insight-grid article p, .settings-grid p { color: var(--muted); }
.insight-grid .lead-card { grid-column: span 2; padding: 29px; }
.lead-card h2 { margin: 12px 0 3px; font-size: 35px; font-weight: 670; letter-spacing: -.045em; }
.opportunity { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 14px; padding: 22px 24px; }
.opportunity h3 { margin: 8px 0 4px; font-size: 23px; letter-spacing: -.025em; }
.activity-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.activity-strip div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 14px 18px; }
.activity-strip div + div { border-left: 1px solid var(--line); }
.activity-strip small { color: var(--muted); }
.activity-strip b { font-size: 20px; letter-spacing: -.03em; }
.workflow-guide { display: grid; grid-template-columns: 1.35fr repeat(3,minmax(0,1fr)); align-items: stretch; margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(15,20,22,.72); }
.workflow-heading { padding: 19px 22px; }
.workflow-heading h2 { margin: 8px 0 0; font-size: 17px; line-height: 1.3; letter-spacing: -.025em; }
.workflow-guide > button { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); text-align: left; }
.workflow-guide > button:hover { background: rgba(255,255,255,.035); }
.workflow-guide i { display: grid; flex: 0 0 auto; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(216,255,67,.34); border-radius: 50%; color: var(--accent); font-size: 11px; font-style: normal; }
.workflow-guide b, .workflow-guide small { display: block; }
.workflow-guide b { font-size: 12px; }
.workflow-guide small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.35; }
.page-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.page-tools p { color: var(--muted); margin: 0; }
.reels-command { margin-bottom: 18px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(15,20,22,.58); }
.reels-command-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; }
.reels-find { display: flex; flex: 1 1 330px; align-items: center; flex-wrap: wrap; gap: 9px 14px; }
.reels-find .eyebrow { flex: 0 0 100%; margin: 0; }
.reels-find .list-search { width: min(330px,100%); }
.reels-find > small { flex: 0 0 100%; color: var(--muted); font-size: 11px; }
.reels-command-actions { display: flex; align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.reels-action-group { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 7px 9px; }
.reels-action-group > span { display: block; width: 100%; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.reels-action-group > small,.reels-action-group .credit-estimate { align-self: center; color: var(--muted); font-size: 10px; }
.reels-action-group .analysis-batch { gap: 7px; }
.reels-action-group .analysis-batch > small { display: none; }
.reel-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reel-filter-row > span { margin-right: 2px; color: var(--muted); font-size: 11px; }
.reel-filter-row button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted-strong); font-size: 11px; }
.reel-filter-row button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.reel-filter-row button.active { border-color: rgba(216,255,67,.44); color: var(--accent); background: rgba(216,255,67,.08); }
.reel-filter-row b { margin-left: 4px; font-size: 10px; }
.reel-filter-row .clear-filter { color: var(--muted); border-color: transparent; }
.toolbar-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.list-search { width: min(310px,100%); }
.list-search input { height: 42px; padding-left: 14px; border-radius: 12px; }
.safe-note { color: var(--muted); font-size: 11px; }
.status-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 20px; margin: -2px 2px 12px; color: var(--muted); font-size: 10px; }
.status-guide span { display: inline-flex; align-items: center; gap: 6px; }
.status-guide b { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); color: var(--muted-strong); font-size: 9px; }
.status-guide b.READY { color: var(--accent); }
.status-guide b.HUMAN_REVIEW { color: var(--orange); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.table-wrap { max-width: 100%; overflow: auto; background: rgba(15, 20, 22, .88); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); }
table { background: transparent; border: 0; border-radius: 0; }
th { height: 48px; padding: 0 16px; color: #87959a; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 620; }
td { height: 59px; padding: 12px 16px; border-bottom: 1px solid rgba(214, 231, 235, .09); color: #e9ece8; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: rgba(255,255,255,.027); }
tbody tr:last-child td { border-bottom: 0; }
.click-row { cursor: pointer; }
.click-row td:first-child b, .click-row td:first-child small { display: block; }
.click-row td:first-child b { font-weight: 620; }
.click-row td:first-child small { color: var(--muted); margin-top: 4px; font-size: 12px; }
.creator-contact { margin-top: 18px; padding: 16px 18px; background: rgba(8,12,14,.62); border: 1px solid var(--line); border-radius: 14px; }
.creator-contact > small { display: block; margin-bottom: 9px; color: var(--accent); font-size: 10px; font-weight: 680; letter-spacing: .14em; }
.creator-contact a { display: block; width: fit-content; margin-top: 7px; color: var(--text); }
.creator-contact p { margin: 0; color: var(--muted); }
.th-button, .text-link { background: none; color: inherit; padding: 0; border: 0; font: inherit; }
.th-button { color: inherit; font-weight: 620; }
.th-button:hover { color: var(--text); }
.th-button.active { color: var(--accent); }
.text-link { text-decoration: underline; text-decoration-color: rgba(216,255,67,.45); text-underline-offset: 3px; }
.text-link:hover { color: var(--accent); }
.badge { border: 1px solid rgba(255,255,255,.06); font-size: 11px; padding: 5px 9px; border-radius: 999px; background: #252e32; color: var(--muted-strong); white-space: nowrap; }
.table-action { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); color: var(--text); text-decoration: none; white-space: nowrap; }
.table-action:hover { background: rgba(255,255,255,.075); border-color: rgba(216,255,67,.3); }
.READY, .POSTED { color: var(--accent); }
.HUMAN_REVIEW, .FAILED { color: var(--orange); }
.reels-table table { table-layout: fixed; min-width: 880px; }
.reels-table th:nth-child(1), .reels-table td:nth-child(1) { width: 24%; }
.reels-table th:nth-child(2), .reels-table td:nth-child(2) { width: 17%; }
.reels-table th:nth-child(3), .reels-table td:nth-child(3) { width: 15%; }
.reels-table th:nth-child(4), .reels-table td:nth-child(4) { width: 14%; }
.reels-table th:nth-child(5), .reels-table td:nth-child(5) { width: 17%; }
.reels-table th:nth-child(6), .reels-table td:nth-child(6) { width: 13%; }

.add-release { margin-top: 18px; color: var(--muted); }
.add-release summary { display: inline-block; cursor: pointer; padding: 4px 0; color: var(--muted-strong); }
.add-release summary:hover { color: var(--text); }
input, select { background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px; outline: none; }
input:focus, select:focus { border-color: rgba(216,255,67,.55); }
.section-heading { margin: 30px 2px 13px; font-size: 17px; letter-spacing: -.02em; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.settings-grid article { padding: 24px; }
.settings-grid h3 { margin-top: 0; font-size: 18px; }

body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100dvh;
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(10px);
}
.modal article { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; background: linear-gradient(145deg, #181f22, #111619); border: 1px solid var(--line-strong); border-radius: 24px; padding: 31px; box-shadow: 0 28px 80px rgba(0,0,0,.48); }
.modal h2 { margin: 10px 0 3px; font-size: 31px; letter-spacing: -.045em; }
.close { top: 16px; right: 18px; color: var(--muted-strong); background: transparent; font-size: 26px; }
.close:hover { color: var(--text); }
.detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 25px 0; }
.detail-stats div { background: rgba(7,10,12,.62); border: 1px solid rgba(255,255,255,.05); border-radius: 13px; padding: 15px; }
.detail-stats small { display: block; color: var(--muted); margin-bottom: 8px; }
.detail-stats b { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.modal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.secondary-action { display: inline-flex; align-items: center; justify-content: center; background: #f4f5f1; border: 1px solid #f4f5f1; color: #0a0d0e; text-decoration: none; cursor: pointer; }
.secondary-action:hover { background: #fff; border-color: #fff; color: #0a0d0e; }
a { color: var(--text); text-underline-offset: 3px; }
.insight-link { cursor: pointer; }
.insight-link:hover { background: linear-gradient(145deg, rgba(27, 35, 38, .98), rgba(16, 22, 24, .98)); border-color: rgba(216,255,67,.35); }
.page-actions { display: flex; align-items: center; gap: 10px; }
.analysis-batch { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; }
.analysis-batch label { display: grid; gap: 5px; }
.analysis-batch label > span, .analysis-batch > small { color: var(--muted); font-size: 10px; }
.analysis-batch select { min-width: 112px; padding: 10px; }
.analysis-batch > small { align-self: center; white-space: nowrap; }
.analysis-batch.is-busy { align-items: center; }
.analysis-batch.is-busy button { min-width: 190px; opacity: .82; }
.analysis-batch.is-busy small { max-width: 280px; line-height: 1.4; white-space: normal; }
.empty-analysis.is-analyzing { position: relative; border-color: rgba(216,255,67,.3); }
.analysis-spinner { display: inline-block; width: 18px; height: 18px; margin-bottom: 12px; border: 2px solid rgba(216,255,67,.25); border-top-color: var(--accent); border-radius: 50%; animation: analysis-spin .8s linear infinite; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
.credit-estimate { align-self: center; color: var(--muted); font-size: 10px; white-space: nowrap; }
.preflight-card { max-width: 660px; }
.fetch-choice { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8,11,13,.52); }
.fetch-choice.primary-choice { border-color: rgba(216,255,67,.3); background: rgba(216,255,67,.045); }
.fetch-choice b { display: block; margin-bottom: 5px; }
.fetch-choice p { max-width: 430px; margin: 0 0 8px; color: var(--muted-strong); line-height: 1.45; }
.fetch-choice small { color: var(--accent); }
.fetch-choice label { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--text); font-weight: 650; }
.fetch-choice select { min-width: 130px; padding: 7px 10px; }
@media (max-width: 620px) {
  .fetch-choice { align-items: stretch; flex-direction: column; }
  .fetch-choice button { width: 100%; }
}
.preflight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.preflight-grid div { min-height: 92px; padding: 18px; background: rgba(8,12,14,.94); }
.preflight-grid small, .preflight-grid b { display: block; }
.preflight-grid small { margin-bottom: 8px; color: var(--muted); }
.preflight-grid b { line-height: 1.35; }
.estimate-note { margin: 16px 0 0; color: var(--muted-strong); font-size: 12px; line-height: 1.6; }
.page-actions > button:not(.primary) { background: transparent; border: 1px solid var(--line-strong); color: var(--muted-strong); border-radius: 10px; }
.page-actions > button:not(.primary):hover { background: rgba(255,255,255,.05); color: var(--text); }

.opportunity-summary {
  display: grid;
  grid-template-columns: 150px 150px 150px 1fr;
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.opportunity-summary > div, .opportunity-summary > p { margin: 0; padding: 19px 20px; background: rgba(15,20,22,.96); }
.opportunity-summary small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.opportunity-summary b { font-size: 25px; letter-spacing: -.04em; }
.opportunity-summary > p { display: flex; align-items: center; color: var(--muted); line-height: 1.5; }
.opportunity-row td:nth-child(2) b, .opportunity-row td:nth-child(2) small { display: block; }
.opportunity-row td:nth-child(2) small { color: var(--muted); margin-top: 4px; }
.opportunity-row td:nth-child(3) { color: var(--muted-strong); max-width: 390px; }
.analysis-state { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.analysis-state.COMPLETED { color: var(--accent); }
.analysis-state.FAILED { color: var(--orange); }
.score { display: inline-grid; place-items: center; min-width: 38px; height: 30px; border-radius: 999px; background: #232b2f; color: var(--muted-strong); font-weight: 700; }
.score.high { background: rgba(216,255,67,.12); color: var(--accent); }
.priority-name { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.compact-button { padding: 8px 12px; border-radius: 9px; }
.OPENED { color: #d7dce0; }
.CONTACTED { color: #90c9ff; }
.REPLIED, .WON { color: var(--accent); }

.contact-context { color: var(--muted); line-height: 1.55; }
.analysis-card { margin-top: 23px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: rgba(6,9,10,.55); }
.analysis-details { margin-top: 18px; }
.analysis-details summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.analysis-details summary::-webkit-details-marker { display: none; }
.analysis-details summary span { min-width: 0; }
.analysis-details summary small, .analysis-details summary b { display: block; }
.analysis-details summary b { margin-top: 7px; color: var(--text); font-size: 14px; line-height: 1.45; }
.analysis-details summary strong { flex: 0 0 auto; color: var(--accent); font-size: 12px; }
.analysis-details summary i { margin-left: 4px; color: var(--muted); font-style: normal; }
.analysis-details[open] summary i { display: inline-block; transform: rotate(180deg); }
.analysis-card > small, .analysis-heading small { color: var(--accent); font-size: 9px; letter-spacing: .18em; }
.analysis-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.analysis-heading h3, .empty-analysis h3 { margin: 8px 0 0; font-size: 17px; line-height: 1.4; }
.analysis-confidence { flex: 0 0 auto; color: var(--accent); font-size: 13px; font-weight: 700; }
.analysis-card dl { display: grid; gap: 13px; margin: 20px 0 15px; }
.analysis-card dl div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; }
.analysis-card dt { color: var(--muted); font-size: 11px; }
.analysis-card dd { margin: 0; color: var(--muted-strong); font-size: 13px; line-height: 1.45; }
.evidence-row { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-row span { padding: 5px 8px; border-radius: 999px; background: #232b2f; color: var(--muted-strong); font-size: 10px; }
.analysis-limit, .empty-analysis p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.empty-analysis button { margin-top: 8px; }
.message-preview { margin: 24px 0 12px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: rgba(6,9,10,.55); }
.message-preview small { color: var(--accent); font-size: 9px; letter-spacing: .18em; }
.message-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.message-language { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.message-language button, .message-language-label { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted-strong); font-size: 10px; letter-spacing: 0; }
.message-language button.active { border-color: rgba(216,255,67,.42); color: var(--accent); background: rgba(216,255,67,.07); }
.message-language button.translate-action { color: var(--text); }
.message-preview p { color: var(--text); font-size: 16px; line-height: 1.55; }
.message-preview span { color: var(--muted); font-size: 11px; }
.message-locked { border-style: dashed; background: rgba(6,9,10,.35); }
.message-locked p { color: var(--muted-strong); font-size: 14px; }
.contact-line { display: inline-block; margin: 5px 0 8px; color: var(--accent); }
.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 25px;
}
.contact-actions-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.contact-actions .primary {
  width: 100%;
  justify-content: center;
}
.contact-actions .secondary-action {
  width: 100%;
  justify-content: center;
  min-width: 0;
  max-width: none;
}
.outcome-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.outcome-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.outcome-heading small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.outcome-heading p { max-width: 270px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.outcome-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.outcome-row span { width: 100%; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.outcome-row button { padding: 7px 10px; background: transparent; color: var(--muted-strong); border: 1px solid var(--line); }
.outcome-row button:hover { color: var(--text); border-color: var(--line-strong); }
.outcome-row button.active { color: var(--text); border-color: rgba(216,255,67,.6); background: rgba(216,255,67,.11); }

.usage-panel { margin-top: 16px; padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(20,26,29,.98), rgba(14,19,21,.98)); }
.usage-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.usage-heading h3 { margin: 7px 0 0; font-size: 25px; }
.usage-heading > div:last-child { text-align: right; }
.usage-heading > div:last-child small { display: block; color: var(--muted); margin-bottom: 7px; }
.usage-heading strong { font-size: 25px; }
.usage-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-top: 25px; }
.usage-meter > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.usage-meter span { color: var(--muted-strong); }
.usage-meter b { font-size: 13px; }
.usage-meter b small { color: var(--muted); font-weight: 500; }
.meter-track { height: 5px; margin: 12px 0 9px; overflow: hidden; border-radius: 99px; background: #273034; }
.meter-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.usage-meter > small, .usage-note { color: var(--muted); }
.usage-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: #1b2326; color: var(--text); box-shadow: var(--shadow); }
.toast.error { border-color: rgba(255,137,88,.45); color: #ffc0a8; }
.empty-state { padding: 48px 28px; border: 1px solid var(--line); border-radius: 19px; background: rgba(15,20,22,.7); text-align: center; }
.empty-state h2 { margin: 12px 0 8px; font-size: 24px; }
.empty-state p:last-child { max-width: 520px; margin: 0 auto; color: var(--muted); line-height: 1.55; }
.song-comparison { margin-top: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: rgba(15,20,22,.78); }
.comparison-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.comparison-heading h3 { margin: 7px 0 5px; font-size: 20px; }
.comparison-heading p:last-child { margin: 0; color: var(--muted); }
.comparison-heading > button { background: transparent; border: 1px solid var(--line-strong); color: var(--muted-strong); }
.comparison-bars { display: grid; gap: 4px; margin-top: 18px; }
.comparison-row { display: grid; grid-template-columns: 28px minmax(150px,1.1fr) minmax(170px,2fr) 70px; align-items: center; gap: 13px; width: 100%; padding: 11px 12px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: left; }
.comparison-row:hover, .comparison-row.selected { border-color: var(--line); background: rgba(255,255,255,.03); }
.comparison-row.selected { border-color: rgba(216,255,67,.28); }
.comparison-rank { color: var(--muted); font-size: 11px; }
.comparison-name b, .comparison-name small { display: block; }
.comparison-name b { font-size: 12px; }
.comparison-name small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.comparison-track { height: 6px; overflow: hidden; border-radius: 99px; background: #252e32; }
.comparison-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.comparison-row strong { text-align: right; font-size: 12px; }
.release-form { grid-template-columns: 1fr; margin: 20px 0 0; }
.release-form label { display: grid; gap: 7px; color: var(--muted-strong); font-size: 12px; }
.release-form label small { color: var(--muted); line-height: 1.4; }
.delete-zone { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,155,114,.25); }
.delete-zone h3 { margin: 7px 0; font-size: 17px; }
.delete-zone > div > p:last-child { color: var(--muted); line-height: 1.5; }
.danger-outline, .danger { border: 1px solid rgba(255,155,114,.42); background: transparent; color: var(--orange); }
.danger-outline:hover { background: rgba(255,155,114,.08); }
.delete-confirm { margin-top: 16px; padding: 16px; border: 1px solid rgba(255,155,114,.28); border-radius: 14px; background: rgba(25,10,8,.25); }
.delete-confirm label { display: grid; gap: 9px; color: var(--muted-strong); font-size: 12px; }
.delete-confirm .danger:not(:disabled) { background: var(--orange); color: #160b07; font-weight: 700; }
.delete-confirm button:disabled { opacity: .38; cursor: not-allowed; }
.onboarding { margin-bottom: 20px; overflow: hidden; border: 1px solid rgba(216,255,67,.3); border-radius: 20px; background: linear-gradient(120deg,rgba(216,255,67,.08),rgba(15,20,22,.88) 55%); }
.onboarding-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.onboarding-heading h2 { margin: 7px 0 5px; font-size: 22px; }
.onboarding-heading p:last-child { margin: 0; color: var(--muted-strong); }
.onboarding-heading > strong { display: grid; place-items: center; width: 68px; height: 68px; border: 5px solid var(--accent); border-radius: 50%; color: var(--accent); }
.onboarding-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--line); }
.onboarding-steps button { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 16px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: rgba(0,0,0,.12); color: var(--text); text-align: left; }
.onboarding-steps button:last-child { border-right: 0; }
.onboarding-steps i { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted-strong); font-style: normal; }
.onboarding-steps .complete i { border-color: var(--accent); background: var(--accent); color: #0b0d0e; }
.onboarding-steps span,.onboarding-steps b,.onboarding-steps small { display: block; min-width: 0; }
.onboarding-steps b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-steps small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.management-panel,.admin-health,.backup-panel { margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(15,20,22,.78); }
.management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.management-heading h3,.admin-health h3,.backup-panel h3 { margin: 7px 0 5px; font-size: 20px; }
.management-heading p:last-child,.admin-health > div:first-child p:last-child,.backup-panel p:last-child { margin: 0; color: var(--muted); }
.management-heading > strong { color: var(--accent); font-size: 34px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; border-top: 1px solid var(--line); }
.team-row span,.team-row b,.team-row small { display: block; }
.team-row small { margin-top: 4px; color: var(--muted); }
.team-row em { color: var(--muted-strong); font-size: 11px; font-style: normal; letter-spacing: .08em; }
.team-row select { min-width: 125px; }
.team-row.pending { color: var(--muted-strong); }
.invite-form { display: grid; grid-template-columns: minmax(200px,1fr) 150px auto; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-callout { margin: 18px 0 0; padding: 14px; border: 1px solid rgba(216,255,67,.15); border-radius: 12px; color: var(--muted-strong); background: rgba(216,255,67,.04); }
.billing-panel .management-heading { display: grid; grid-template-columns: 1fr auto; }
.billing-panel .management-heading > small { grid-column: 2; color: var(--muted); text-align: right; }
.billing-actions { display: flex; align-items: center; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.billing-actions span { color: var(--muted); font-size: 12px; }
.copy-field,.admin-form label { display: grid; gap: 8px; margin-top: 18px; color: var(--muted-strong); font-size: 12px; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.admin-form label { margin: 0; }
.admin-form > p,.admin-form > button { grid-column: 1 / -1; }
.admin-totals { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.admin-totals article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(15,20,22,.78); }
.admin-totals small,.admin-totals strong { display: block; }
.admin-totals small { color: var(--muted); }
.admin-totals strong { margin-top: 8px; font-size: 30px; }
.admin-health { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center; gap: 12px; }
.admin-health > div:first-child { grid-column: 1 / -1; }
.health-item { display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }
.health-item i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.health-item.ok i { background: var(--accent); box-shadow: 0 0 12px rgba(216,255,67,.4); }
.health-item b,.health-item small { display: block; font-size: 10px; }
.health-item small { margin-top: 4px; color: var(--muted); }
.backup-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.admin-table td:last-child { display: flex; gap: 7px; }
.admin-table td small { display: block; margin-top: 4px; color: var(--muted); }

#job-banner:empty { display: none; }
#job-banner { margin: -18px 0 24px; }
#job-banner > button { display: flex; align-items: center; width: 100%; gap: 12px; padding: 12px 15px; border: 1px solid rgba(216,255,67,.2); border-radius: 13px; background: rgba(216,255,67,.045); color: var(--text); text-align: left; }
#job-banner > button:hover { border-color: rgba(216,255,67,.42); background: rgba(216,255,67,.075); }
#job-banner span:nth-child(2) { min-width: 0; flex: 1; }
#job-banner b,#job-banner small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#job-banner b { font-size: 12px; }
#job-banner small { margin-top: 3px; color: var(--muted); font-size: 10px; }
#job-banner i { color: var(--accent); font-size: 11px; font-style: normal; }
.job-banner-icon { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(216,255,67,.08); }
.job-banner-icon.running { animation: jobPulse 1.5s ease-in-out infinite; }
.job-banner-icon.paused { background: var(--orange); box-shadow: 0 0 0 5px rgba(255,155,114,.08); }
@keyframes jobPulse { 50% { opacity: .42; transform: scale(.82); } }
.jobs-intro { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 16px; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg,rgba(20,26,29,.98),rgba(14,19,21,.98)); }
.jobs-intro h2 { margin: 8px 0 5px; font-size: 24px; letter-spacing: -.035em; }
.jobs-intro p:last-child { max-width: 650px; margin: 0; color: var(--muted); }
.jobs-intro > strong { color: var(--accent); font-size: 42px; letter-spacing: -.05em; }
.job-list { display: grid; gap: 12px; }
.job-card { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: rgba(15,20,22,.88); }
.job-card.running { border-color: rgba(216,255,67,.24); }
.job-card.failed { border-color: rgba(255,155,114,.28); }
.job-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.job-heading h3 { margin: 7px 0 0; font-size: 18px; }
.job-state { display: grid; justify-items: end; gap: 6px; }
.job-state small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.job-status { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: 10px; white-space: nowrap; }
.job-status.running,.job-status.completed { color: var(--accent); border-color: rgba(216,255,67,.25); }
.job-status.failed,.job-status.cancelled { color: var(--orange); }
.job-progress { height: 7px; margin: 19px 0 13px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055); }
.job-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.job-card.failed .job-progress i,.job-card.cancelled .job-progress i { background: var(--orange); }
.job-numbers { display: flex; flex-wrap: wrap; gap: 7px 20px; color: var(--muted); font-size: 11px; }
.job-numbers b { color: var(--text); }
.job-message { margin: 14px 0 0; color: var(--muted-strong); font-size: 12px; }
.job-actions { display: flex; gap: 9px; margin-top: 16px; }
.job-actions button { padding: 8px 13px; }
.job-list.history .job-card { padding: 17px 19px; }
.jobs-empty { padding: 36px; border: 1px dashed var(--line-strong); border-radius: 18px; text-align: center; }
.jobs-empty h3 { margin: 0 0 6px; }
.jobs-empty p { margin: 0 0 16px; color: var(--muted); }

.audience-overview { display: grid; grid-template-columns: 1.35fr repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--line); }
.audience-overview article { display: flex; min-height: 150px; flex-direction: column; align-items: flex-start; padding: 23px; background: rgba(15,20,22,.98); }
.audience-overview article strong,.audience-overview article span,.audience-overview article small { display: block; }
.audience-overview article strong { margin: auto 0 5px; font-size: 34px; letter-spacing: -.05em; }
.audience-overview article span { color: var(--muted); line-height: 1.4; }
.audience-overview article small { color: var(--muted-strong); }
.audience-overview .audience-lead { background: linear-gradient(135deg,rgba(216,255,67,.09),rgba(15,20,22,.98) 68%); }
.audience-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 32px 0 8px; }
.audience-toolbar h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.035em; }
.audience-toolbar p { margin: 0; color: var(--muted); }
.audience-toolbar .list-search { flex: 0 1 310px; }
.audience-notice { max-width: 760px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.audience-table table { table-layout: fixed; min-width: 800px; }
.audience-table th:nth-child(1),.audience-table td:nth-child(1) { width: 20%; }
.audience-table th:nth-child(2),.audience-table td:nth-child(2) { width: 34%; }
.audience-table th:nth-child(3),.audience-table td:nth-child(3) { width: 11%; }
.audience-table th:nth-child(4),.audience-table td:nth-child(4) { width: 13%; }
.audience-table th:nth-child(5),.audience-table td:nth-child(5) { width: 12%; }
.audience-table th:nth-child(6),.audience-table td:nth-child(6) { width: 10%; text-align: right; }
.audience-row td:first-child b,.audience-row td:first-child small { display: block; }
.audience-row td:first-child small { margin-top: 4px; color: var(--muted); }
.relationship-status { display: inline-flex; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: 11px; }
.relationship-status.ENGAGED { color: var(--text); border-color: rgba(255,255,255,.24); }
.relationship-status.VIP { color: var(--accent); border-color: rgba(216,255,67,.32); background: rgba(216,255,67,.055); }
.relationship-status.ARCHIVED { opacity: .55; }
.audience-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 38px; border: 1px dashed var(--line-strong); border-radius: 20px; background: rgba(15,20,22,.55); }
.audience-empty h2 { margin: 8px 0; font-size: 24px; }
.audience-empty p:last-child { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.55; }
.audience-detail-card { width: min(720px,100%); }
.audience-signal-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 24px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--line); }
.audience-signal-grid div { padding: 17px; background: rgba(8,12,14,.78); }
.audience-signal-grid small,.audience-signal-grid b { display: block; }
.audience-signal-grid small { color: var(--muted); font-size: 10px; }
.audience-signal-grid b { margin-top: 7px; font-size: 16px; }
.audience-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.audience-form label { display: grid; gap: 7px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.audience-form .audience-note,.audience-form .modal-actions { grid-column: 1 / -1; }
.audience-form textarea { width: 100%; min-height: 100px; padding: 12px; resize: vertical; color: var(--text); font: inherit; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.audience-form textarea:focus { border-color: rgba(216,255,67,.55); outline: none; }

@media (max-width: 1050px) {
  main { padding-left: 32px; padding-right: 32px; }
  .song-picker, #scope-trigger { min-width: 230px; }
  .workflow-guide { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .workflow-heading { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .workflow-guide > button:first-of-type { border-left: 0; }
  .onboarding-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-health { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-health > div:first-child { grid-column: 1 / -1; }
  .audience-overview { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  body { grid-template-columns: minmax(0, 1fr); }
  aside { position: static; height: auto; padding: 20px 18px 14px; }
  .brand { margin: 0 8px 20px; }
  nav { display: flex; overflow-x: auto; padding-bottom: 2px; }
  nav button { white-space: nowrap; }
  #safety { display: none; }
  .insight-grid, .settings-grid { grid-template-columns: 1fr 1fr; }
  .opportunity-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opportunity-summary > p { grid-column: 1 / -1; }
  .usage-grid { grid-template-columns: 1fr 1fr; }
  .toolbar-line { align-items: stretch; flex-direction: column; }
  .reels-command-top { align-items: stretch; flex-direction: column; }
  .reels-command-actions { justify-content: flex-start; }
  .list-search { width: 100%; }
  .admin-totals { grid-template-columns: 1fr 1fr; }
  .audience-toolbar { align-items: stretch; flex-direction: column; }
  .audience-toolbar .list-search { width: 100%; flex-basis: auto; }
}
@media (max-width: 650px) {
  body { width: 100%; max-width: 100vw; grid-template-columns: minmax(0, 1fr); }
  aside, main, header, #view { width: 100%; max-width: 100%; min-width: 0; }
  nav { max-width: 100%; }
  .modal { padding: 14px; }
  .modal article { max-height: calc(100dvh - 28px); padding: 25px 20px; border-radius: 20px; }
  main { padding: 28px 18px 48px; }
  header { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .header-actions, .song-picker, #scope-trigger { width: 100%; }
  .song-menu { left: 0; right: auto; width: 100%; }
  .insight-grid, .settings-grid { grid-template-columns: 1fr; }
  .insight-grid .lead-card { grid-column: span 1; }
  .opportunity { align-items: flex-start; flex-direction: column; }
  .detail-stats { grid-template-columns: 1fr; }
  .preflight-grid { grid-template-columns: 1fr; }
  .activity-strip { grid-template-columns: 1fr; }
  .activity-strip div + div { border-left: 0; border-top: 1px solid var(--line); }
  .workflow-guide { grid-template-columns: 1fr; }
  .workflow-heading { grid-column: auto; }
  .workflow-guide > button { border-top: 1px solid var(--line); border-left: 0; }
  .workflow-guide > button:first-of-type { border-top: 0; }
  .page-actions { width: 100%; flex-wrap: wrap; }
  .reels-command { padding: 16px; }
  .reels-command-actions,.reels-action-group { width: 100%; }
  .reels-action-group > button,.reels-action-group .analysis-batch { flex: 1 1 auto; }
  .reels-action-group .analysis-batch { display: flex; width: 100%; }
  .reels-action-group .analysis-batch > button { flex: 1 1 auto; }
  .page-actions > button, .page-actions > .button { flex: 1 1 auto; }
  .status-guide { align-items: flex-start; flex-direction: column; gap: 7px; }
  .opportunity-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opportunity-summary > * { min-width: 0; overflow-wrap: anywhere; }
  .opportunity-summary > div, .opportunity-summary > p { padding: 15px; }
  .opportunity-summary > p { grid-column: 1 / -1; }
  .usage-heading { flex-direction: column; }
  .usage-heading > div:last-child { text-align: left; }
  .usage-grid { grid-template-columns: 1fr; }
  .comparison-heading { align-items: flex-start; flex-direction: column; }
  .onboarding-heading,.backup-panel,.billing-actions { align-items: flex-start; flex-direction: column; }
  .onboarding-steps,.admin-health { grid-template-columns: 1fr; }
  .onboarding-steps button { border-right: 0; border-bottom: 1px solid var(--line); }
  .invite-form,.admin-form { grid-template-columns: 1fr; }
  .admin-form > p,.admin-form > button { grid-column: auto; }
  .admin-totals { grid-template-columns: 1fr 1fr; }
  .jobs-intro { align-items: flex-start; flex-direction: column; }
  .job-heading { align-items: flex-start; flex-direction: column; }
  .job-state { justify-items: start; }
  .job-numbers { align-items: flex-start; flex-direction: column; }
  .audience-overview,.audience-signal-grid,.audience-form { grid-template-columns: 1fr; }
  .audience-form .audience-note,.audience-form .modal-actions { grid-column: auto; }
  .audience-empty { align-items: flex-start; flex-direction: column; padding: 26px; }
  #job-banner i { display: none; }
  .comparison-row { grid-template-columns: 24px minmax(0,1fr) 62px; }
  .comparison-track { grid-column: 2 / -1; }
  .engagement-table table { table-layout: fixed; min-width: 0; }
  .engagement-table th:nth-child(2), .engagement-table td:nth-child(2), .engagement-table th:nth-child(4), .engagement-table td:nth-child(4) { display: none; }
  .engagement-table th:nth-child(1), .engagement-table td:nth-child(1) { width: 25%; }
  .engagement-table th:nth-child(3), .engagement-table td:nth-child(3) { width: 37%; }
  .engagement-table th:nth-child(5), .engagement-table td:nth-child(5) { width: 19%; padding-left: 6px; padding-right: 6px; }
  .engagement-table th:nth-child(6), .engagement-table td:nth-child(6) { width: 19%; padding-left: 4px; padding-right: 4px; }
  .engagement-table td { height: auto; padding-top: 14px; padding-bottom: 14px; font-size: 11px; }
  .engagement-table td:nth-child(1), .engagement-table td:nth-child(3) { overflow-wrap: anywhere; }
  .engagement-table .badge, .engagement-table .table-action { white-space: nowrap; }
  .engagement-table .table-action { padding: 7px 6px; font-size: 10px; }
  .opportunities-table { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .opportunities-table table, .opportunities-table tbody { display: block; min-width: 0; }
  .opportunities-table thead { display: none; }
  .opportunities-table tr {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 9px 14px;
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15,20,22,.94);
  }
  .opportunities-table td { width: auto !important; height: auto; padding: 0; border: 0; }
  .opportunities-table td:nth-child(1) { grid-column: 2; grid-row: 2; justify-self: end; }
  .opportunities-table td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .opportunities-table td:nth-child(3) { grid-column: 1; grid-row: 2; color: var(--muted-strong); }
  .opportunities-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  .opportunities-table td:nth-child(5) { grid-column: 2; grid-row: 1; }
  .opportunities-table td:nth-child(6) { grid-column: 1; grid-row: 4; align-self: center; }
  .opportunities-table td:nth-child(7) { grid-column: 2; grid-row: 4; }
}

body.auth-visible > aside,
body.auth-visible > main { visibility: hidden; }
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  align-items: center;
  gap: clamp(40px, 8vw, 130px);
  padding: clamp(28px, 7vw, 110px);
  background: radial-gradient(760px 520px at 78% 8%, rgba(216,255,67,.075), transparent 68%), #080b0d;
}
.auth-brand { align-self: start; display: flex; flex-direction: column; gap: 9px; padding-top: 8px; }
.auth-brand b { font-size: clamp(32px, 5vw, 68px); letter-spacing: .13em; }
.auth-brand span { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .32em; }
.auth-card { width: min(100%, 510px); padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line-strong); border-radius: 28px; background: rgba(17,22,25,.96); box-shadow: var(--shadow); }
.auth-card h1 { margin: 9px 0 12px; font-size: clamp(34px, 4vw, 52px); }
.auth-card > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted-strong); line-height: 1.6; }
.auth-card form { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; }
.auth-card label { display: grid; gap: 8px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.auth-card label small { color: var(--muted); font-weight: 450; }
.auth-card input { min-height: 48px; font-size: 15px; }
.auth-card form .primary { min-height: 50px; margin-top: 4px; font-size: 15px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-top: 18px; }
.auth-links button { padding: 8px 0; color: var(--muted-strong); background: transparent; }
.auth-links button:hover { color: var(--accent); }
.auth-message { margin: -8px 0 20px; padding: 12px 14px; border: 1px solid rgba(216,255,67,.2); border-radius: 10px; color: var(--text); background: rgba(216,255,67,.06); line-height: 1.5; }
.follow-up-panel { display: grid; grid-template-columns: minmax(180px,1fr) repeat(auto-fit,minmax(175px,1fr)); gap: 10px; align-items: stretch; margin: 22px 0; padding: 18px; border: 1px solid rgba(216,255,67,.3); border-radius: 16px; background: rgba(216,255,67,.045); }
.follow-up-panel h3 { margin: 3px 0 0; }
.follow-up-panel button { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: rgba(15,20,22,.85); color: var(--text); border: 1px solid var(--line); }
.follow-up-panel button:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.follow-up-panel button span { display: grid; gap: 3px; }
.follow-up-panel button small { color: var(--muted); }
.todo-select { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.todo-section { margin: 0 0 25px; }
.todo-section-heading { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; }
.todo-section-heading h3 { margin: 0; font-size: 14px; }
.todo-section-heading span { min-width: 22px; padding: 3px 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; border-radius: 20px; background: rgba(255,255,255,.07); }
.todo-section.overdue .todo-section-heading h3 { color: #ffab88; }
.todo-section.today .todo-section-heading h3 { color: var(--accent); }
.todo-list { display: grid; gap: 10px; }
.todo-tabs { display: inline-flex; gap: 5px; max-width: 100%; margin: 0 0 20px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(15,20,22,.86); }
.todo-tabs button { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); white-space: nowrap; background: transparent; }
.todo-tabs button span { min-width: 22px; padding: 3px 6px; color: var(--muted); font-size: 10px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.055); }
.todo-tabs button.active { color: #0b0d0f; background: var(--accent); }
.todo-tabs button.active span { color: #0b0d0f; background: rgba(0,0,0,.12); }
.todo-empty { margin-top: 0; }
.todo-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.todo-card h3,.todo-card p { margin: 4px 0; }
.todo-card p { color: var(--muted-strong); }
.todo-card-copy { min-width: 0; }
.todo-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.todo-card-meta .badge { font-size: 10px; }
.todo-date { color: var(--accent); font-size: 12px; font-weight: 650; }
.todo-note { padding-left: 10px; border-left: 2px solid rgba(216,255,67,.45); color: var(--text) !important; font-size: 13px; line-height: 1.45; }
.todo-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.todo-card.done { opacity: .62; }
.reels-tabs { display: inline-flex; gap: 5px; margin: 0 0 20px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(15,20,22,.86); }
.reels-tabs button { display: flex; align-items: center; gap: 8px; color: var(--muted-strong); background: transparent; }
.reels-tabs button span { min-width: 24px; padding: 3px 6px; color: var(--muted); font-size: 10px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.055); }
.reels-tabs button.active { color: #0b0d0f; background: var(--accent); }
.reels-tabs button.active span { color: #0b0d0f; background: rgba(0,0,0,.12); }
.review-command { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: clamp(24px,4vw,58px); align-items: center; margin-bottom: 14px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(110deg,rgba(18,24,27,.98),rgba(12,16,18,.94)); }
.review-copy h2 { margin: 5px 0 8px; font-size: 24px; }
.review-copy > p:last-child { max-width: 570px; margin: 0; color: var(--muted-strong); line-height: 1.55; }
.review-analysis { min-width: 460px; padding-left: 24px; border-left: 1px solid var(--line); }
.review-analysis > .eyebrow { margin: 0 0 9px; }
.review-analysis .analysis-batch { display: grid; grid-template-columns: 132px minmax(190px,auto); gap: 8px 10px; align-items: end; }
.review-analysis .analysis-batch > small { grid-column: 1 / -1; white-space: normal; }
.review-selection { position: fixed; z-index: 80; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 10px 12px 10px 16px; border: 1px solid rgba(216,255,67,.38); border-radius: 14px; background: rgba(15,20,22,.97); box-shadow: 0 16px 38px rgba(0,0,0,.42); transform: translateX(-50%); }
.review-selection span { margin-right: auto; color: var(--muted-strong); }
.review-selection span b { margin-right: 4px; color: var(--accent); }
.review-selection button { padding: 9px 13px; }
.workspace-select { display: grid; gap: 8px; margin: 18px 0; color: var(--muted-strong); font-size: 12px; }
#safety > span { display: inline-block; max-width: 185px; margin-bottom: 8px; overflow: hidden; color: var(--text); font-weight: 650; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }

.follow-up-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.follow-up-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.follow-up-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
}
.follow-up-fields {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}
.follow-up-date,
.follow-up-note {
  display: grid;
  gap: 6px;
}
.follow-up-date span,
.follow-up-note span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.follow-up-date input[type="date"] {
  min-width: 0;
  width: 100%;
  padding: 8px 12px;
  height: auto;
}
.follow-up-date input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .85;
  cursor: pointer;
}
.follow-up-note textarea {
  width: 100%;
  min-height: 104px;
  max-height: 180px;
  padding: 11px;
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1113;
  resize: vertical;
  overflow-y: auto;
}
.follow-up-save {
  justify-self: start;
  min-height: 46px;
  padding: 8px 18px;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .auth-screen { grid-template-columns: 1fr; align-content: start; gap: 34px; overflow-y: auto; }
  .auth-brand { align-self: auto; }
  .auth-brand b { font-size: 30px; }
  .auth-card { justify-self: center; }
  .follow-up-form { grid-template-columns: 1fr; }
  .follow-up-fields { grid-template-columns: 1fr; }
  .follow-up-date input[type="date"] { min-width: 100%; }
  .follow-up-form button { justify-self: start; }
  .contact-actions { grid-template-columns: 1fr; }
  .todo-card { align-items: flex-start; flex-direction: column; }
  .todo-card-actions { justify-content: flex-start; }
  .todo-tabs { display: flex; width: 100%; }
  .todo-tabs button { flex: 1 0 auto; justify-content: center; }
  .reels-tabs { display: flex; width: 100%; overflow-x: auto; }
  .reels-tabs button { flex: 1 0 auto; justify-content: center; }
  .review-command { grid-template-columns: 1fr; padding: 18px; }
  .review-analysis { min-width: 0; padding: 17px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .review-analysis .analysis-batch { grid-template-columns: 1fr; }
  .review-analysis .analysis-batch > small { grid-column: auto; }
  .review-selection { bottom: 16px; gap: 7px; padding: 9px 10px 9px 13px; }
  .review-selection button { padding: 9px 10px; }
}
.audience-connection { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px; margin-bottom:24px; border:1px solid #364344; border-radius:18px; background:#101718; }
.audience-connection h3, .audience-history h3 { margin:0 0 8px; }
.audience-connection p { margin:0 0 8px; }
.audience-history { max-height:300px; overflow:auto; margin:20px 0; padding:16px; border:1px solid #364344; border-radius:12px; }
.audience-history article { border-top:1px solid #364344; padding:12px 0; }
.audience-history p { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) { .audience-connection { align-items:flex-start; flex-direction:column; } }
