/* Mission Control — dark, precise, one-screen cockpit (Today + 3 lanes, 2026-08-29). */
:root {
  color-scheme: dark;
  --bg: #10100f;
  --surface: #151514;
  --surface-raised: #1b1b1a;
  --surface-hover: #20201f;
  --ink: #f2f1ed;
  --ink-soft: #c6c4bd;
  --muted: #85837d;
  --faint: #5e5d59;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --accent: #d6a54a;
  --accent-hover: #e0b65f;
  --accent-ink: #1e1708;
  --ok: #58ae73;
  --ok-bg: rgba(88, 174, 115, .1);
  --warn: #d6a54a;
  --warn-bg: rgba(214, 165, 74, .1);
  --bad: #df6a59;
  --bad-bg: rgba(223, 106, 89, .1);
  --info: #8d94d7;
  --info-bg: rgba(141, 148, 215, .1);
  --overlay: rgba(0, 0, 0, .72);
  --focus: rgba(214, 165, 74, .38);
  --bubble-me: #2a2417;
  --claude: var(--info);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(360px, 100%);
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 80px var(--overlay);
}
.login-card h1 { margin: 18px 0 6px; font-size: 24px; letter-spacing: -.55px; font-weight: 590; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-card input { width: 100%; margin-bottom: 10px; }
.form-error { margin-top: 10px; color: var(--bad); font-size: 13px; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 6px; font-size: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(16, 16, 15, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 590; letter-spacing: -.1px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.freshness { color: var(--muted); font-size: 12px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 16px;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--ink); }
.icon-btn.spinning { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-shell { width: min(1440px, 100%); margin: 0 auto; padding: 42px 32px 72px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 590; letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; letter-spacing: -1.2px; font-weight: 590; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.primary-btn, .secondary-btn, .text-btn {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 590;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.primary-btn { border: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 15px; }
.primary-btn:hover { background: var(--accent-hover); }
.secondary-btn { border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink-soft); padding: 9px 14px; }
.secondary-btn:hover { background: var(--surface-hover); color: var(--ink); }
.text-btn { width: fit-content; margin-top: 7px; padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: 12px; }
.text-btn:hover { color: var(--accent); }
.full-btn { width: 100%; min-height: 42px; margin-top: 10px; }
.new-btn { min-width: 138px; }

.workspace-tabs { display: flex; gap: 4px; width: fit-content; padding: 3px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.workspace-tab { min-width: 112px; padding: 7px 13px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 590; }
.workspace-tab:hover { color: var(--ink-soft); }
.workspace-tab.active { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

.job-throughput { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.job-throughput .throughput-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.job-throughput .backlog-classes { display: flex; flex-wrap: wrap; gap: 16px; }

.overview-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.overview-head, .campaign-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) minmax(140px, .75fr) minmax(220px, 1fr) minmax(190px, 1fr) minmax(220px, 1fr);
}
.overview-head { min-height: 40px; align-items: center; background: var(--bg); border-bottom: 1px solid var(--line); }
.overview-head span { padding: 0 16px; color: var(--faint); font-size: 10px; font-weight: 590; letter-spacing: .065em; text-transform: uppercase; }
.campaign-row { min-height: 126px; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.campaign-row:last-child { border-bottom: 0; }
.campaign-row:hover { background: var(--surface-hover); }
.overview-cell { min-width: 0; padding: 18px 16px; border-right: 1px solid var(--line); }
.overview-cell:last-child { border-right: 0; }
.campaign-title-line { display: flex; align-items: flex-start; gap: 10px; }
.campaign-cell h2 { min-width: 0; margin: 0; font-size: 15px; line-height: 1.3; letter-spacing: -.2px; font-weight: 590; overflow-wrap: anywhere; }
.campaign-cell p { margin: 7px 0 3px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.sequence-id { color: var(--faint); font-size: 10px; }
.status-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 20px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 590; white-space: nowrap; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.live { color: var(--ok); background: var(--ok-bg); }
.status-pill.warning { color: var(--bad); background: var(--bad-bg); }
.status-pill.paused { color: var(--muted); }
.status-pill.draft { color: var(--warn); background: var(--warn-bg); }
.cell-value { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 590; }
.cell-note { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.domain-list { max-width: 230px; overflow-wrap: anywhere; }
.empty-value { color: var(--faint); font-size: 12px; }
.metrics { display: flex; flex-wrap: wrap; gap: 14px; }
.metric { display: flex; min-width: 42px; flex-direction: column; }
.metric strong { font-size: 14px; line-height: 1.2; font-weight: 590; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.metric small { margin-top: 4px; color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.overview-note { margin: 10px 2px 0; color: var(--faint); font-size: 11px; }
.empty-state { display: flex; flex-direction: column; gap: 5px; padding: 54px 24px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink-soft); font-weight: 590; }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; }
.sheet-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--overlay); }
.sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 920px);
  padding: 12px 22px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -24px 80px var(--overlay);
}
.sheet-grab { width: 38px; height: 4px; margin: 0 auto 18px; border-radius: 999px; background: var(--line-strong); }
.sheet h2 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.45px; font-weight: 590; }
.sheet-copy { margin: 0 0 16px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.safety-note { margin: 10px 0 0; color: var(--faint); font-size: 11px; line-height: 1.45; }
.sheet label { display: block; margin: 0 0 11px; color: var(--muted); font-size: 11px; font-weight: 590; }
input, textarea, select {
  width: 100%; margin-top: 5px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--bg); color: var(--ink); font-size: 13px; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.copy-step { margin: 0 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.copy-step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.copy-step-head strong { font-size: 12px; font-weight: 590; }
.remove-step { border: 0; background: none; color: var(--bad); font-size: 11px; }
.copy-meta { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.delay-label { position: relative; }
.delay-label input { padding-right: 40px; }
.delay-label span { position: absolute; right: 10px; bottom: 11px; color: var(--faint); font-size: 10px; }

@media (max-width: 1040px) {
  .page-shell { padding-inline: 20px; }
  .overview-panel { overflow: visible; border: 0; background: transparent; }
  .overview-head { display: none; }
  .campaign-list { display: grid; gap: 10px; }
  .campaign-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
  .campaign-row:last-child { border-bottom: 1px solid var(--line); }
  .overview-cell { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .overview-cell::before { content: attr(data-label); display: block; margin-bottom: 10px; color: var(--faint); font-size: 10px; font-weight: 590; letter-spacing: .055em; text-transform: uppercase; }
  .campaign-cell { grid-column: 1 / -1; min-height: 105px; border-right: 0; }
  .campaign-cell::before { display: none; }
  .overview-cell:nth-child(3), .overview-cell:nth-child(5) { border-right: 0; }
  .overview-cell:nth-child(4), .overview-cell:nth-child(5) { border-bottom: 0; }
}

@media (max-width: 620px) {
  .topbar { height: 50px; padding: 0 14px; }
  .brand > span:last-child { display: none; }
  .page-shell { padding: 26px 12px 48px; }
  .page-heading { align-items: flex-start; margin-bottom: 22px; }
  .page-heading h1 { font-size: 28px; letter-spacing: -.8px; }
  .subtitle { max-width: 280px; font-size: 12px; }
  .icon-btn { width: 44px; height: 44px; }
  .new-btn { min-width: auto; min-height: 44px; padding: 9px 11px; white-space: nowrap; }
  .workspace-tabs { width: 100%; }
  .workspace-tab { flex: 1; min-width: 0; min-height: 44px; }
  .campaign-row { display: block; }
  .overview-cell { min-height: 0; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .overview-cell:last-child { border-bottom: 0; }
  .campaign-cell { padding: 16px 14px; }
  .campaign-title-line { justify-content: space-between; }
  .metrics { gap: 20px; }
  .text-btn { min-height: 32px; padding-top: 8px; margin-top: 2px; }
  .sheet { padding-inline: 16px; }
  .form-grid, .copy-meta { grid-template-columns: 1fr; gap: 0; }
  .delay-label { max-width: 140px; }
}

.miro-list { display: grid; gap: 12px; }
.miro-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.miro-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.miro-card-head h3 { margin: 0; font-size: 15px; line-height: 1.3; letter-spacing: -.2px; font-weight: 590; overflow-wrap: anywhere; }
.miro-domain { margin: 5px 0 0; color: var(--muted); font-size: 11px; font-weight: 590; letter-spacing: .05em; text-transform: uppercase; }
.miro-purpose { margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.miro-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

@media (max-width: 620px) {
  .miro-card { padding: 15px; }
  .miro-card-foot { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 💬 Talk — chat with Serok / Claude (2026-08-27) */
.talk-thread { display: flex; flex-direction: column; max-width: 680px; margin: 0 auto;
  padding: 8px 0 16px; min-height: 40vh; }
.chat-msg { max-width: 85%; margin: 5px 0; padding: 10px 14px; border-radius: 14px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.chat-msg.me { align-self: flex-end; background: var(--bubble-me);
  border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.chat-msg.serok { align-self: flex-start; background: var(--surface-raised);
  border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.claude { align-self: flex-start; background: var(--surface-raised);
  border: 1px solid var(--line); border-left: 2px solid var(--claude);
  border-bottom-left-radius: 4px; }
.agent-chip { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--claude); margin-bottom: 3px; }
.chat-wait { align-self: flex-end; color: var(--muted); font-size: 12px; margin: 0 4px 6px; }
.chat-composer { position: sticky; bottom: 0; display: flex; gap: 8px; max-width: 680px;
  margin: 0 auto; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); }
.chat-composer input { flex: 1; padding: 11px 14px; background: var(--surface-raised);
  border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }

/* 💼 Jobs — cards, tiles, sections (was never styled; added with the 2026-08-29 redesign) */
.job-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 14px; }
.job-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.job-tile strong { font-size: 22px; font-weight: 590; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; }
.job-tile span { color: var(--muted); font-size: 11px; }
.job-section { margin: 22px 0 0; }
.job-section-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; }
.job-section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.3px; font-weight: 590; }
.job-section-count { color: var(--muted); font-size: 12px; }
.job-list { display: grid; gap: 10px; }
.job-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); }
.job-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-card-title h3 { margin: 0; font-size: 14px; line-height: 1.3; letter-spacing: -.2px;
  font-weight: 590; overflow-wrap: anywhere; }
.job-company { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.job-card-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 16px; margin-top: 12px; }
.job-note { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.job-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.job-actions { display: flex; align-items: center; gap: 12px; }

/* Today — the one queue + tappable lane rows */
.lane-list { display: grid; gap: 8px; margin-top: 24px; }
.lane-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); text-align: left; transition: background .15s ease; }
.lane-row:hover { background: var(--surface-hover); }
.lane-row.lane-alert { border-color: var(--warn); }
.lane-emoji { font-size: 18px; }
.lane-label { min-width: 84px; font-size: 14px; font-weight: 590; }
.lane-status { flex: 1; color: var(--muted); font-size: 12px; text-align: right;
  overflow-wrap: anywhere; }
.lane-chevron { color: var(--faint); font-size: 18px; }
.today-more { margin: 4px 2px; }
.today-miro-details { margin-top: 20px; }
.today-miro-details summary { padding: 10px 2px; color: var(--muted); font-size: 13px;
  font-weight: 590; cursor: pointer; list-style-position: inside; }
.today-miro-details[open] summary { color: var(--ink-soft); }
.today-miro-details .miro-list { margin-top: 8px; }

/* Needs-you approval cards */
.needs-card { padding: 16px; border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 10px; background: var(--surface); }
.needs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.needs-head h3 { margin: 0; font-size: 14px; line-height: 1.3; letter-spacing: -.2px;
  font-weight: 590; overflow-wrap: anywhere; }
.needs-kind { flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 590;
  letter-spacing: .04em; text-transform: uppercase; }
.needs-detail { margin-top: 10px; }
.needs-detail summary { color: var(--ink-soft); font-size: 12px; font-weight: 590; cursor: pointer; }
.needs-detail pre { max-height: 320px; margin: 8px 0 0; padding: 12px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--ink-soft); font-size: 12px; line-height: 1.5; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.needs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.needs-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.needs-primary { min-height: 38px; }

/* 🐶 Content lane */
.content-kill { display: flex; flex-direction: column; gap: 4px; padding: 16px;
  margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); }
.content-kill strong { font-size: 26px; font-weight: 590; letter-spacing: -.6px;
  font-variant-numeric: tabular-nums; }
.content-section-head { margin: 22px 0 10px; font-size: 16px; letter-spacing: -.3px;
  font-weight: 590; }
.content-drafts { display: grid; gap: 10px; }
.report-error { color: var(--bad); }

@media (max-width: 620px) {
  .job-tiles { grid-template-columns: repeat(2, 1fr); }
  .lane-status { display: none; }
  .lane-label { flex: 1; }
}
