/* ============ The Ops Desk — Demo Site Machine (tool UI) ============ */
:root {
  --navy-900: #0a1322;
  --navy-800: #0e1b30;
  --navy-700: #14233b;
  --navy-600: #1c3153;
  --line: #24385c;
  --amber: #f5a623;
  --amber-soft: #f5a6232e;
  --text: #e8eef8;
  --muted: #8ba0c0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(1200px 500px at 80% -10%, #16304f55, transparent),
    var(--navy-900);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#chrome { max-width: 680px; margin: 0 auto; padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); }

/* Top bar */
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.brand-badge { display: inline-block; font-size: 11px; letter-spacing: .18em; font-weight: 700; color: var(--amber); margin-bottom: 4px; }
.brand h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.new-btn {
  flex: none; background: var(--amber); color: #1a1205; text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 12px;
}
.new-btn:active { transform: scale(.97); }

/* Search */
.search { position: relative; margin-bottom: 16px; }
.search input {
  width: 100%; padding: 13px 16px 13px 42px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--navy-800); color: var(--text); font-size: 16px;
}
.search svg { position: absolute; left: 14px; top: 14px; opacity: .6; }

/* Demo cards */
.card {
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; margin-bottom: 14px;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; align-items: center; font-size: 12.5px; color: var(--muted); }
.tag { padding: 3px 9px; border-radius: 99px; background: var(--navy-600); color: #c7d4ea; font-weight: 600; }
.tag.mood { color: var(--amber); background: var(--amber-soft); }
.tag.sample { background: #2b2412; color: #e7c66b; border: 1px solid #4a3d1c; }
select.status {
  background: var(--navy-600); color: var(--text); border: 1px solid var(--line);
  border-radius: 99px; padding: 6px 10px; font-size: 12.5px; font-weight: 600;
}
.status-Draft { color: #c7d4ea; } .status-Sent.to.lead { }
select.status[data-v="Sent to Lead"] { color: #ffd479; border-color: #6b5a24; }
select.status[data-v="Claimed"] { color: #7fd6a4; border-color: #2c5b41; }
select.status[data-v="Live"] { color: #fff; background: #1d7a4f; border-color: #2c8f5e; }
.card-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: var(--navy-600); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 12px;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1205; }
.btn.armed { background: #b3273c; border-color: #b3273c; color: #fff; }
.btn:active { transform: scale(.97); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* Form */
form.screen { display: flex; flex-direction: column; gap: 14px; }
.screen-head { margin-bottom: 4px; }
.screen-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.screen-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: #b9c8e2; margin-bottom: 6px; }
.field label small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--navy-800); color: var(--text); font: inherit; font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft);
}
.field.err input, .field.err select, .field.err textarea { border-color: #e56a6a; box-shadow: 0 0 0 3px #e56a6a26; }
.ferr { display: block; color: #ff9d9d; font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.services { display: flex; flex-direction: column; gap: 8px; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.mood-btn {
  border: 1.5px solid var(--line); background: var(--navy-800); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; padding: 10px 2px; border-radius: 12px; cursor: pointer;
}
.mood-btn.sel { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.mood-dot { display: block; width: 16px; height: 16px; border-radius: 50%; margin: 0 auto 6px; }
.generate {
  margin-top: 6px; background: var(--amber); color: #1a1205; border: none; border-radius: 14px;
  font: inherit; font-size: 17px; font-weight: 800; padding: 15px; cursor: pointer;
}
.generate:active { transform: scale(.98); }
.backlink { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 10px; }

/* Library header: counts, filter chips */
.libhead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.counts {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px;
}
.count b { font-size: 18px; }
.count span { font-size: 9px; }
.chip[data-filter="Needs follow-up"] { color: #ffd479; border-color: #6b5a24; }
.chip.on[data-filter="Needs follow-up"] { color: #1a1205; border-color: var(--amber); }

/* live search chip */
.livechip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin: -6px 0 14px; font-size: 13px; color: var(--muted);
}
.livechip button {
  border: none; background: var(--amber); color: #1a1205; font: inherit; font-size: 12px;
  font-weight: 800; padding: 5px 12px; border-radius: 99px; cursor: pointer; flex: none;
}

/* next-action note */
.noteinput {
  width: 100%; margin-top: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px dashed var(--line); background: var(--navy-900); color: var(--text);
  font: inherit; font-size: 13.5px;
}
.noteinput:focus { outline: none; border-color: var(--amber); border-style: solid; }

/* pitch pack modal (draft only) */
#pitchModal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
#pitchModal[hidden] { display: none; }
.pmask { position: absolute; inset: 0; background: #04070fcc; backdrop-filter: blur(3px); }
.psheet {
  position: relative; width: 100%; max-width: 680px; max-height: 88vh; overflow-y: auto;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
}
.phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.phead h3 { font-size: 18px; margin-top: 6px; }
.pdraft { display: inline-block; font-size: 10.5px; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; color: #ffd479; background: #2b2412; border: 1px solid #6b5a24; padding: 4px 9px; border-radius: 99px; }
.prow { margin-bottom: 14px; }
.prow label { display: block; font-size: 12px; font-weight: 700; color: #b9c8e2; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.prow-in { display: flex; gap: 8px; align-items: stretch; }
.plink-full { margin-top: 7px; word-break: break-all; font-size: 11px; color: var(--muted); line-height: 1.5; user-select: all; }
.prow-in input, .prow-in textarea {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-900); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical;
}
.ptone { margin-bottom: 14px; background: var(--navy-700); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ptone-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ptone-head b { font-size: 13.5px; }
.ptone textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--navy-900); color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.5; }

/* quick create paste box */
.pastebox { border: 1px dashed var(--line); border-radius: 14px; padding: 12px; background: #0c1730; }
.pastebox textarea {
  width: 100%; min-height: 90px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--navy-800); color: var(--text); font: inherit; font-size: 15px; resize: vertical;
}
.paste-btn { margin-top: 9px; border-style: dashed; border-color: var(--amber); color: var(--amber); background: transparent; }
.count { text-align: center; min-width: 0; }
.count b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.count span { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.count:nth-child(1) b { color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 2px; }
.chip {
  border: 1px solid var(--line); background: var(--navy-800); color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 13px; border-radius: 99px;
  white-space: nowrap; cursor: pointer; flex: none;
}
.chip.on { background: var(--amber); border-color: var(--amber); color: #1a1205; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 5px; vertical-align: 0; }
.btn.danger { color: #ffa8a8; border-color: #5c2a34; background: #2a1b22; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #22335380; backdrop-filter: blur(8px); color: var(--text);
  border: 1px solid var(--line); padding: 11px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  z-index: 400; max-width: min(92vw, 440px); text-align: center; line-height: 1.4;
}

/* Preview: slim bar stays pinned above the site; the site renders inline and scrolls natively */
#preview {
  position: fixed; inset: 0; z-index: 100; background: var(--navy-900);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  --pbar-h: 0px;
}
#preview[hidden] { display: none; }
.previewbar {
  position: sticky; top: 0; z-index: 60; flex-wrap: wrap;
  display: flex; align-items: center; gap: 8px;
  padding: calc(6px + env(safe-area-inset-top)) 10px 6px;
  background: var(--navy-900); border-bottom: 1px solid var(--line);
}
@media(max-width:560px) {
  .previewbar .pbar-who { order: 3; flex: 0 0 100%; width: 100%; padding-top: 3px; }
  .previewbar .pbar-acts { order: 2; margin-left: auto; }
  .pbar-btn { font-size: 11px; padding: 6px 8px; }
  .pbar-who b { font-size: 12.5px; }
}
.pbar-btn {
  flex: none; border: 1px solid var(--line); background: var(--navy-700); color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 11px; border-radius: 9px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pbar-btn.amber { background: var(--amber); border-color: var(--amber); color: #1a1205; }
.pbar-btn:active { transform: scale(.96); }
.pbar-who { flex: 1; min-width: 0; text-align: center; line-height: 1.2; color: var(--text); }
.pbar-who b { display: block; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar-who span { font-size: 11px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar-acts { display: flex; gap: 7px; flex: none; }
#siteRoot { min-height: 100%; }
.exitfull {
  position: fixed; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 70;
  padding: 6px 12px; font-size: 11.5px; opacity: .92; box-shadow: 0 4px 16px #0007;
}

