/* ==================================================================
   Qurate Books — Product Management
   Palette and type follow the Qurate brand guidelines.

   One deliberate departure: the guidelines make Warm Peach the default
   background for marketing surfaces, but also say white is right for
   dense reading documents. This app is dense tabular data — 1,955 rows
   — so Warm Peach and Cream carry the frame (sign-in, top bar, table
   headers, accents) while the data itself sits on white for legibility.
   ================================================================== */

:root {
  /* Brand — exact values from the guidelines, do not tint */
  --saffron:    #FF9717;   /* signature accent */
  --ink:        #0B0F12;   /* rich black: headings, display type */
  --slate:      #4C5E60;   /* secondary / logo detailing */
  --gray-80:    #333333;   /* body text */
  --gray-40:    #999999;   /* tagline, metadata */
  --peach:      #FBE0C1;   /* signature background */
  --cream:      #FDF1DE;   /* softer background */
  --beige:      #F5EDE1;   /* card fills, call-outs */
  --mist:       #E5E5E5;   /* hairlines, dividers */
  --midnight:   #0F2A3C;   /* deep accent */

  /* Applied roles */
  --bg:         var(--cream);
  --surface:    #ffffff;
  --border:     var(--mist);
  --border-2:   #d8d2c8;
  --text:       var(--gray-80);
  --heading:    var(--ink);
  --muted:      #8a8378;
  --brand:      var(--saffron);
  --danger:     #b3261e;
  --ok:         #1e7a48;

  --radius:     8px;
  --shadow:     0 1px 2px rgba(11,15,18,.06), 0 8px 24px rgba(11,15,18,.07);

  --font: "Poppins", "Nunito", "Montserrat", Calibri, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;              /* the guidelines ask for breathing room */
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3 { color: var(--heading); font-weight: 700; letter-spacing: -.01em; }

/* ---------------------------- top bar ---------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 5px 18px;
  background: var(--surface);
  border-bottom: 3px solid var(--saffron);   /* the website's saffron nav strip */
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 14px; }
/* Guidelines set a 120px minimum on screen. */
.brand-logo { width: 120px; height: auto; display: block; }
.brand-divider { width: 1px; height: 30px; background: var(--mist); }
.brand-name {
  font-weight: 600; font-size: 13.5px; color: var(--heading); letter-spacing: .01em;
}
.brand-sub { font-size: 11.5px; color: var(--gray-40); font-weight: 500; }

.tabs { display: flex; gap: 2px; }
.tab {
  padding: 6px 12px; white-space: nowrap; border: 0; background: none; border-radius: 6px;
  cursor: pointer; color: var(--slate); font-weight: 500; font-family: inherit;
  position: relative;
}
.tab:hover { background: var(--beige); color: var(--ink); }
.tab.is-active { background: var(--peach); color: var(--ink); font-weight: 600; }
/* A tab for something still being built: there to be seen, not to be opened. */
.tab:disabled { color: var(--gray-40); cursor: default; background: none; }
.tab:disabled:hover { background: none; color: var(--gray-40); }

/* ----------------------------- views ----------------------------- */
main { padding: 22px; max-width: 1600px; margin: 0 auto; }
.view { display: none; }
.view.is-active { display: block; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  display: flex; align-items: stretch; flex: 1 1 460px; min-width: 300px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); overflow: hidden;
}
.search input { flex: 1; border: 0; padding: 10px 12px; outline: none; min-width: 0; background: none; }
.search:focus-within { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,151,23,.18); }
.field-select, .field-static {
  border: 0; border-right: 1px solid var(--border); background: var(--beige);
  padding: 10px; color: var(--slate); outline: none; font-weight: 500;
}
.field-static { white-space: nowrap; }
select.field-select { cursor: pointer; }
.toolbar > select.field-select {
  border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface);
}

.result-meta { color: var(--muted); font-size: 12.5px; margin: 0 2px 10px; min-height: 18px; font-weight: 500; }

/* ----------------------------- buttons ---------------------------- */
a.btn { text-decoration: none; display: inline-block; }
.btn {
  padding: 9px 16px; border: 1px solid var(--border-2); background: var(--surface);
  border-radius: var(--radius); cursor: pointer; font-weight: 600; font-family: inherit;
  white-space: nowrap; color: var(--slate);
}
.btn:hover { background: var(--beige); color: var(--ink); }
/* Saffron carries Ink type, never white — white on saffron fails contrast. */
.btn-primary {
  background: var(--saffron); border-color: var(--saffron); color: var(--ink); font-weight: 700;
}
.btn-primary:hover { background: #ffa838; border-color: #ffa838; color: var(--ink); }
.btn-danger { color: var(--danger); border-color: #e6c9c6; }
.btn-danger:hover { background: #fdf3f2; color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; padding: 12px; }
.icon-btn {
  border: 0; background: none; font-size: 24px; line-height: 1;
  cursor: pointer; color: var(--gray-40); padding: 0 4px;
}
.icon-btn:hover { color: var(--ink); }

/* ----------------------------- tables ----------------------------- */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow);
  max-height: calc(100vh - 250px);
}
table { border-collapse: collapse; width: 100%; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: var(--peach); z-index: 1;
  text-align: left; font-weight: 600; color: var(--ink); font-size: 12px;
  letter-spacing: .02em; padding: 11px 12px;
  border-bottom: 1px solid #e8cfae; white-space: nowrap;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid #f0ece4; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--cream); }
.col-actions { width: 1%; white-space: nowrap; }
/* A 13-digit ISBN reads as one run of digits, so never let it wrap. */
td.isbn { width: 1%; white-space: nowrap; }
.col-num { text-align: right; }
td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: -.01em; }
.empty { padding: 44px; text-align: center; color: var(--muted); }
.cell-sub { color: var(--gray-40); font-size: 11.5px; font-weight: 400; }
/* A value the form shows but does not offer to change: the POC and the
   salesperson on a lead are set by passing it on from the list, never by
   editing it here (the user, 2026-10-06). Sized like the inputs beside it so
   the row still lines up. */
.field-shown { margin: 0; padding: 7px 0; font-weight: 600; color: var(--heading);
  min-height: 38px; display: flex; align-items: center; }

/* The salesperson under the POC, in the leads list and its heading. */
.th-sub { font-size: 10.5px; font-weight: 500; color: var(--gray-40); text-transform: none; letter-spacing: 0; }
tbody td strong { color: var(--ink); font-weight: 600; }

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; border: 1px solid; letter-spacing: .02em;
}
.pill-Active    { color: #1e7a48; background: #eaf6ef; border-color: #bfe3ce; }
.pill-Completed { color: var(--midnight); background: #e9eef2; border-color: #c6d3dc; }
.pill-Delisted  { color: #8a5a0f; background: var(--peach); border-color: #eccfa6; }
.pill-Aborted   { color: var(--danger); background: #fdecea; border-color: #f0c8c4; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px;
  background: var(--beige); color: var(--slate); border: 1px solid var(--border);
  font-weight: 600;
}

.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; }

/* ----------------------------- modal ------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,15,18,.5);
  display: grid; place-items: center; padding: 24px; z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: 12px; width: min(980px, 100%);
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(11,15,18,.32);
  border-top: 4px solid var(--saffron);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.modal-body { padding: 20px 22px; overflow: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px; border-top: 1px solid var(--border); background: var(--cream);
  border-radius: 0 0 12px 12px;
}
.modal-actions { display: flex; gap: 8px; margin-left: auto; }
.form-error { color: var(--danger); font-size: 13px; font-weight: 500; }

/* ----------------------------- forms ------------------------------ */
fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 16px; margin: 0 0 16px;
}
fieldset legend {
  padding: 0 8px; font-weight: 600; font-size: 11.5px;
  color: var(--saffron); text-transform: uppercase; letter-spacing: .08em;
}
.grid { display: grid; gap: 13px 16px; grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
/* A heading inside a section's grid — "India", "International". */
.grid-sub {
  margin: 4px 0 -4px; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--gray-40);
}
.grid-sub:first-child { margin-top: 0; }
@media (max-width: 760px) {
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
}

.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f > label { font-size: 12px; font-weight: 600; color: var(--slate); letter-spacing: .01em; }
.f .req { color: var(--saffron); }
.f input, .f select, .f textarea {
  padding: 9px 10px; border: 1px solid var(--border-2);
  border-radius: 6px; background: var(--surface); outline: none; width: 100%;
  color: var(--gray-80);
}
.f input:focus, .f select:focus, .f textarea:focus {
  border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(255,151,23,.18);
}
.f input[readonly] { background: var(--beige); color: var(--slate); font-weight: 600; }
.f .hint { font-size: 11px; color: var(--gray-40); line-height: 1.45; }
.f .err { font-size: 11px; color: var(--danger); display: none; font-weight: 500; }
.f.has-error input, .f.has-error select, .f.has-error textarea { border-color: var(--danger); }
.f.has-error .err { display: block; }
.f textarea { resize: vertical; min-height: 60px; }

.input-row { display: flex; gap: 6px; }
.input-row select { flex: 0 0 132px; }
.input-row .btn { flex: 0 0 auto; }

.radio-row { display: flex; gap: 18px; padding-top: 5px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 7px; font-weight: 400; color: var(--gray-80); }
.radio-row input { width: auto; accent-color: var(--saffron); }

/* ------------------------- author combobox ------------------------ */
.combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 6px;
  box-shadow: var(--shadow); max-height: 260px; overflow: auto;
}
.combo-list[hidden] { display: none; }
.combo-opt { padding: 8px 11px; cursor: pointer; }
.combo-opt:hover, .combo-opt.is-active { background: var(--peach); }
.combo-opt .cell-sub { display: block; }
.combo-none { padding: 10px 11px; color: var(--muted); }

/* ----------------------------- toast ------------------------------ */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(11,15,18,.35); z-index: 80; font-size: 13.5px;
  font-weight: 500; border-left: 4px solid var(--saffron);
}
.toast[hidden] { display: none; }
.toast.is-error { background: var(--danger); border-left-color: #7d1a15; }

/* --------------------------- auth pages --------------------------- */
.auth-body {
  display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: var(--peach);            /* the quratebooks.com hero colour */
}
.auth-shell { width: min(430px, 100%); }
.auth-card {
  background: var(--surface); padding: 30px 30px 26px;
  border-radius: 14px; box-shadow: 0 18px 50px rgba(11,15,18,.14);
  border-top: 4px solid var(--saffron);
}
.auth-logo { display: block; width: 210px; max-width: 70%; margin: 0 auto 6px; }
.auth-title {
  text-align: center; font-size: 15px; font-weight: 600; color: var(--ink);
  margin: 14px 0 2px;
}
.auth-sub { text-align: center; font-size: 12.5px; color: var(--gray-40); margin: 0 0 22px; font-weight: 500; }
.auth-lead { margin: 0 0 18px; color: var(--gray-80); font-size: 13px; line-height: 1.6; }
.auth-card .f { margin-bottom: 14px; }
.auth-card .form-error { margin: 4px 0 12px; min-height: 18px; }
.auth-foot { margin: 16px 0 0; font-size: 12px; color: var(--gray-40); text-align: center; }
.auth-tagline {
  text-align: center; margin: 18px 0 0; font-size: 13px; font-style: italic;
  color: var(--slate); font-weight: 400;
}

/* ------------------------ account / role bits --------------------- */
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 9px 5px 13px;
  border: 1px solid var(--border-2); border-radius: 20px; background: var(--surface);
  cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--slate);
  font-family: inherit;
}
.user-chip:hover { background: var(--beige); color: var(--ink); }
.role-badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 700; border: 1px solid; text-transform: uppercase;
  letter-spacing: .07em;
}
.role-admin  { color: #8a5a0f; background: var(--peach); border-color: #eccfa6; }
.role-editor { color: var(--midnight); background: #e9eef2; border-color: #c6d3dc; }
.role-viewer { color: var(--slate); background: var(--beige); border-color: var(--mist); }
/* A salesperson: the Leads tab and nothing else (the user, 2026-10-01). */
.role-sales  { color: #1a5f4a; background: #e4f3ec; border-color: #bcdccd; }
.redacted { color: var(--gray-40); font-style: italic; font-size: 12px; }
.audit-detail { font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; color: var(--muted); }

body.no-write  [data-edit] { display: none; }
body.no-delete [data-del]  { display: none; }
body.no-write  #userTable [data-edit], body.no-delete #userTable [data-del] { display: inline-block; }

/* Near-duplicate author warning: a question to answer, not an error to fix,
   so it is roomier and less red than a field error. */
.similar-warn { text-align: left; }
.similar-warn p { margin: 0 0 6px; }
.similar-warn ul { margin: 0 0 6px; padding-left: 18px; }
.similar-warn li { margin: 2px 0; }
.similar-warn .hint { display: block; margin: 0 0 8px; }

/* Read-only record view. Label above value, so long titles and addresses
   wrap freely instead of being squeezed into a narrow value column. */
.detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; margin: 0; }
.detail .pair { min-width: 0; }
.detail dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
             color: var(--muted); margin: 0 0 2px; }
.detail dd { margin: 0; font-size: 14px; color: var(--midnight); overflow-wrap: anywhere; }
.detail dd.is-blank { color: var(--gray-40); }
@media (max-width: 700px) { .detail { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 900px) {
  .topbar-right { gap: 8px; }
  .user-chip span:first-child { display: none; }
  .brand-name, .brand-sub { display: none; }
  .brand-divider { display: none; }
}

/* --------------------------- list manager -------------------------- */
.list-note {
  margin: 0 0 12px; font-size: 12.5px; color: var(--slate);
  background: var(--beige); border-left: 3px solid var(--saffron);
  padding: 9px 12px; border-radius: 0 6px 6px 0;
}
tr.is-retired td:first-child { color: var(--gray-40); text-decoration: line-through; }
.pill-retired { color: var(--gray-40); background: var(--beige); border-color: var(--mist); }
.pill-live    { color: #1e7a48; background: #eaf6ef; border-color: #bfe3ce; }
.pill-locked  { color: #8a5a0f; background: var(--peach); border-color: #eccfa6; }

/* Catalogues tab */
#catsTable .col-check { width: 40px; text-align: center; }
#catsTable input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--saffron); cursor: pointer; vertical-align: middle; }
.cats-leftout { margin-top: 18px; }
.cats-leftout summary { cursor: pointer; font-weight: 600; color: var(--heading); margin: 0 2px 10px; }
#view-catalogues .table-wrap + .list-note,
#catsLeftOut .list-note { margin-top: 14px; }

/* ----------------------------- slack ------------------------------ */
.slack-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.slack-linked { font-size: 13px; color: var(--gray-80); }
.slack-linked strong { color: var(--ink); }
.slack-body .hint { font-size: 11.5px; color: var(--gray-40); flex: 1 1 100%; }

/* ------------------------- formats of a book ---------------------- */
.formats-body { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fmt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  background: var(--beige); border: 1px solid var(--border); font-size: 12px;
}
.fmt-chip.is-self { background: var(--peach); border-color: #eccfa6; font-weight: 600; }
.fmt-chip .cell-sub { font-size: 11px; }
.add-format { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; margin-top: 4px; }
.add-format select { padding: 5px 8px; border: 1px solid var(--border-2); border-radius: 6px; }
.add-format .hint { flex: 1 1 100%; }
.format-picks label { font-size: 13px; }
.format-picks input { accent-color: var(--saffron); }
.slack-chip {
  display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 4px;
  background: #e9eef2; border: 1px solid #c6d3dc; color: var(--midnight);
  font-size: 10.5px; font-family: var(--font); font-weight: 600;
  text-decoration: none; max-width: 190px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.slack-chip:hover { background: #dce6ed; }

/* ---- The Content Master panel on a book ---------------------------- */
.cm-panel { font-size: 13px; color: var(--text); }
.cm-where { margin: 0 0 10px; color: var(--muted); }
.cm-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.cm-tile {
  display: flex; flex-direction: column; width: 132px; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: inherit;
}
.cm-tile:hover { border-color: var(--brand); }
.cm-tile img {
  width: 100%; height: 150px; object-fit: contain; object-position: center;
  background: #f4f4f4; border-radius: 3px;
}
.cm-noimg {
  display: flex; align-items: center; justify-content: center;
  height: 150px; background: #f4f4f4; border-radius: 3px; color: var(--muted); font-size: 12px;
}
.cm-kind { margin-top: 6px; font-weight: 600; text-transform: capitalize; }
.cm-name { color: var(--muted); font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
.cm-annexure { margin: 0 0 10px; color: var(--muted); }
.cm-rest summary { cursor: pointer; color: var(--muted); }
.cm-rest ul { margin: 8px 0 0; padding-left: 18px; }
.cm-rest li { margin-bottom: 4px; overflow-wrap: anywhere; }
.cm-meta { color: var(--muted); font-size: 12px; }
.cm-upload {
  margin-top: 14px; padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.cm-upload.is-over { border-color: var(--brand); background: var(--beige); }
.cm-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-upload-note { margin: 6px 0 0; font-size: 11.5px; color: var(--gray-40); line-height: 1.45; }
.cm-upload-row .cm-upload-note { margin: 0; }
.cm-upload-list { margin-top: 10px; }
.cm-upload-scroll { overflow-x: auto; }
.cm-upload-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cm-upload-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--border); vertical-align: top; }
.cm-upload-table td:first-child { width: 22px; padding-top: 9px; }
.cm-upload-table select { width: auto; min-width: 170px; }
.cm-upload-name { overflow-wrap: anywhere; }
.cm-upload-name .cm-meta { display: block; }
.cm-upload-warn { display: block; color: var(--danger); font-size: 11.5px; }
.cm-upload-have { display: block; color: var(--slate, #4C5E60); font-size: 11.5px; }
.cm-upload-state { color: var(--muted); font-size: 12px; min-width: 120px; overflow-wrap: anywhere; }
.cm-upload-table tr.is-done .cm-upload-state { color: var(--ink); }
.cm-upload-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.cm-upload-status { color: var(--muted); font-size: 12px; }
.paper-upload { padding-top: 2px; }
.paper-upload .cm-upload-note { flex: 1 1 260px; }
.paper-list { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; }
.paper-list li { margin-bottom: 3px; overflow-wrap: anywhere; }
.paper-list .err-text { color: var(--danger); }
.findings {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--beige); font-size: 12.5px; line-height: 1.5;
}
.findings:empty { display: none; }
.findings .findings { margin: 0 0 8px; padding: 0; background: none; }
.findings .findings + .findings { border-top: 1px solid var(--border); padding-top: 8px; }
.findings p { margin: 0 0 6px; }
.findings .err-text { color: var(--danger); }
.findings-head { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.findings-sub { color: var(--slate); font-weight: 600; margin-top: 8px !important; }
.findings-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.findings-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.findings-table .cm-meta { display: block; }
.findings-label { font-weight: 600; min-width: 140px; }
.findings-choose { white-space: nowrap; }
.findings-choose .btn + .btn { margin-left: 6px; }
/* Sales: signing authors. */
/* Where the book-production tabs end and the sales ones begin. It used to be
   the word "SALES", which read as a dead tab once the tab beside it was renamed
   from "Book Sales" to "Sales" (the user, 2026-10-03). The line does the work;
   the word only repeated what was next to it. */
.tab-divider { align-self: center; width: 0; height: 18px; margin: 0 6px 0 12px;
  border-left: 1px solid var(--mist); }
/* The Sales tab's own tabs: one record to each — Total Sales, Invoices, Retail
   Invoices, and whatever follows (the user, 2026-10-03). */
.sales-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px;
  border-bottom: 1px solid var(--mist); }
.sales-tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent;
  margin-bottom: -1px; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-radius: 6px 6px 0 0; }
.sales-tab:hover { color: var(--ink); background: var(--cream); }
.sales-tab.is-active { color: var(--ink); border-bottom-color: var(--saffron); background: none; }
.sales-tab:focus-visible { outline: 2px solid var(--saffron); outline-offset: -2px; }

/* Inventory: the two forms, then the shelf and what moved. */
.stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin: 0 0 10px; }
.stock-grid label { display: block; font-size: 12.5px; }
.stock-grid input, .stock-grid select { width: 100%; padding: 6px 8px; font-size: 13px; }
.stock-wide { grid-column: 1 / -1; }
.stock-form h3 { color: var(--ink); }
.stock-way { display: inline-block; border-radius: 10mm; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.stock-way-in { background: #E7F4EC; color: #0B7A3D; }
.stock-way-out { background: var(--cream); color: #8A5A12; }
.sales-table tr.stock-low td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.sales-table tr.stock-none td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.sales-table tr.stock-gone td { color: var(--muted); text-decoration: line-through; }
@media (max-width: 760px) { .stock-grid { grid-template-columns: 1fr; } }

/* Sales: the figures, then the tables under them. */
.sales-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; margin: 0 0 14px; }
.sales-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--mist); border-radius: 6px; }
.sales-tile-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-40); }
.sales-tile-v { font-size: 21px; font-weight: 700; color: var(--heading); white-space: nowrap; }
/* A value too long for its tile — the royalty span reads "Rs 40,241 to Rs
   1,20,270" — wraps instead of being cut off. The figures themselves hold
   together: they are written with non-breaking spaces inside. */
.sales-tile-v.is-long { white-space: normal; font-size: 19px; line-height: 1.2; }
.sales-tile-sub { font-size: 11.5px; color: var(--muted); }
.sales-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sales-panel { margin: 0 0 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--mist);
  border-radius: 6px; overflow-x: auto; }
.sales-panel h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gray-40); }
.sales-table { font-size: 12.5px; width: 100%; }
.sales-table .num { text-align: right; white-space: nowrap; }
.sales-nolink { color: var(--muted); font-size: 11px; }
.sales-check { border-left: 3px solid var(--brand); }
.sales-check ul { margin: 6px 0 0 16px; font-size: 12.5px; }
.sales-cmd { margin: 6px 0; padding: 8px 10px; background: var(--cream); border: 1px solid var(--mist);
  border-radius: 4px; font-size: 12px; overflow-x: auto; }
.sales-import .cover-drop { max-width: 520px; }
/* The tab carries two records of the same money — all sales from the accounts
   sheet, then Kedar's invoices in detail — so each gets a heading of its own. */
/* What a record IS, under its tab. The tab says which one it is, so there is no
   heading here to repeat it. */
.sales-head { margin: 0 0 14px; padding: 10px 0 0; }
.sales-head .hint { margin: 0; max-width: 78ch; }
@media (max-width: 860px) { .sales-row { grid-template-columns: 1fr; } }

/* The proposal builder: the controls on the left, and on the right the very
   page that will be printed, asked of the server as it is built. */
.modal-wide { width: min(1340px, 100%); }
.prop { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.prop fieldset { margin: 0 0 14px; }
.prop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prop-row label { display: block; }
.prop-note { margin: 6px 0 0; }
.prop-sent ul { margin: 5px 0 0 16px; font-size: 12.5px; }
/* A proposal written outside the app, kept against the lead (2026-10-04). */
.prop-upload-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.prop-upload-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.prop-upload-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .prop-upload-row { grid-template-columns: 1fr; } }
.prop-services, .prop-addons { max-height: 330px; overflow: auto; border: 1px solid var(--mist);
  border-radius: 6px; padding: 4px 10px; }
.prop-service, .prop-addon { display: grid; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--mist); font-size: 12.5px; }
.prop-service { grid-template-columns: 18px minmax(0, 1.1fr) minmax(0, 1.4fr) 76px; }
/* The last column is the x on a line of your own; the priced rows above leave
   it empty so both kinds of row still line up. */
.prop-addon { grid-template-columns: 18px minmax(0, 1fr) 64px 72px 20px; }
.prop-service:last-child, .prop-addon:last-child { border-bottom: 0; }
.prop-service input[type=checkbox], .prop-addon input[type=checkbox] { width: 16px; height: 16px; }
.prop-service input[type=text], .prop-addon input[type=text] { padding: 4px 6px; font-size: 12px; }
.prop-addon i { font-style: normal; color: var(--muted); }
/* The + beneath the extras. There may be any number of lines of your own —
   "it should not be limited to only 2 services" (the user, 2026-10-13) — so
   the list ends with the way to make another. Dashed, because it is an empty
   slot rather than an action on anything. */
.prop-add-own { width: 100%; margin: 7px 0 3px; border-style: dashed;
  color: var(--muted); font-size: 12.5px; }
.prop-add-own:hover { color: var(--ink); border-color: var(--saffron); }
.prop-drop { border: 0; background: none; cursor: pointer; padding: 0; line-height: 1;
  font-size: 17px; color: var(--muted); opacity: .55; }
.prop-drop:hover { color: #b3261e; opacity: 1; }
.prop-rate { text-align: right; color: var(--muted); white-space: nowrap; }
/* The rate is typed over, so an extra can be priced for this author or given
   away (the users, 2026-10-05). It still reads as the quiet figure it was. */
input.prop-rate { width: 100%; box-sizing: border-box; background: transparent;
  border: 1px solid transparent; border-radius: 4px; padding: 2px 6px; font: inherit; }
input.prop-rate:hover { border-color: var(--mist); }
input.prop-rate:focus { border-color: var(--saffron); background: var(--surface); color: var(--heading); outline: none; }

.prop-side { position: sticky; top: 0; }
.prop-totals { border: 1px solid var(--mist); border-radius: 6px; padding: 10px 12px;
  background: var(--cream); margin-bottom: 12px; font-size: 13px; }
.prop-line { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.prop-line.is-total { margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--mist);
  font-weight: 700; font-size: 15px; color: var(--ink); }
.prop-inst { margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--mist);
  font-size: 11.5px; color: var(--muted); }
.prop-stop { margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--danger); }
.prop-dl { display: block; margin-top: 9px; text-align: center; }
.prop-outcome { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--mist);
  font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.prop-outcome b { color: var(--ink); }
.prop-warn { color: var(--danger); }

/* The invoice list: fifteen hundred of them, so it is filtered and paged. */
.inv-filters { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr auto auto; gap: 8px;
  align-items: center; margin: 0 0 10px; }
.inv-filters input[type=search], .inv-filters select { padding: 6px 9px; font-size: 13px; }
.inv-check { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; }
.inv-check input { width: 15px; height: 15px; }
.inv-count { margin: 0 0 7px; }
.inv-table td { vertical-align: top; }
.inv-table tr.inv-flag td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.inv-note { font-size: 11px; color: var(--muted); max-width: 240px; }
@media (max-width: 960px) { .inv-filters { grid-template-columns: 1fr 1fr; } }
/* 210mm is 794px and A4 is 1123px tall, so four pages are 4,492px. The page is
   drawn at its true size and shrunk to fit beside the form; a transform does
   not change what an element takes up, so the shell is given the shrunk size
   or the scroll runs on for the full 794px. */
.prop-preview { border: 1px solid var(--mist); border-radius: 6px; overflow: auto;
  height: 62vh; background: var(--mist); }
.prop-shell { width: 419px; height: 2371px; }
.prop-preview iframe { width: 794px; height: 4495px; border: 0; background: #fff;
  transform: scale(.5277); transform-origin: 0 0; display: block; }
/* Showing the document that was actually sent, rather than a draft being
   printed: the browser's PDF viewer does its own scrolling and scaling, so the
   shrink-to-fit above is taken off (the user, 2026-10-05). */
.prop-preview.is-doc .prop-shell { width: 100%; height: 100%; }
.prop-preview.is-doc iframe { width: 100%; height: 100%; transform: none; }

/* A button that reads as a link, beside the download of each proposal already
   sent: changing one starts another from its figures (2026-10-05). */
.linkish { background: none; border: 0; padding: 0; margin: 0 0 0 10px; font: inherit;
  color: var(--saffron); font-weight: 600; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--ink, var(--heading)); }

/* Nothing to draft, so the document gets the whole width rather than sitting in
   a 420px column beside an empty half (2026-10-05). */
.prop-sent-only { grid-template-columns: minmax(0, 1fr); }
.prop-sent-only .prop-side { position: static; }
.prop-sent-only .prop-preview { height: 68vh; }
.prop-sent-only .prop-totals { max-width: 420px; }

/* Which of the two the panel shows. */
.prop-which { display: flex; gap: 6px; margin: 0 0 8px; }
.prop-which button { flex: 1; padding: 5px 8px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--mist); border-radius: 6px; background: var(--surface);
  color: var(--muted); cursor: pointer; }
.prop-which button.is-on { border-color: var(--saffron); background: var(--saffron); color: #fff; }

@media (max-width: 1100px) {
  .prop { grid-template-columns: 1fr; }
  .prop-side { position: static; }
  .prop-preview { height: 50vh; }
}

/* The notice on a module still being built. */
.building-note { padding: 14px 16px; margin: 0 0 14px; background: var(--cream); border: 1px solid var(--mist);
  border-left: 3px solid var(--brand); border-radius: 6px; }
.building-note h2 { margin: 0 0 4px; font-size: 16px; }
.building-note p { margin: 0; font-size: 13px; color: var(--gray-80); max-width: 70ch; }

.lead-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.lead-chip { border: 1px solid var(--mist); background: var(--surface); border-radius: 14px; padding: 3px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--slate); }
.lead-chip.is-on { background: var(--ink, #0B0F12); color: #fff; border-color: var(--ink, #0B0F12); }
.lead-chip-due { border-color: #FF9717; color: #8A4B00; font-weight: 600; }
.lead-chip-due.is-on { background: #FF9717; border-color: #FF9717; color: #0B0F12; }
.lead-stage { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: var(--beige); color: var(--slate); white-space: nowrap; }
.lead-stage-new { background: #E8EEF2; }
.lead-stage-discovery, .lead-stage-manuscript, .lead-stage-proposal { background: #FFE9C7; color: #8A4B00; }
.lead-stage-payment { background: #FFD9A0; color: #6B3A00; }
.lead-stage-won { background: #D8F0DC; color: #1E6B30; }
.lead-stage-lost { background: #F1F1F1; color: #777; }
.lead-overdue { color: #B3261E; font-weight: 600; }
.lead-when { white-space: nowrap; }

/* The QSKU form in tabs. */
.form-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--mist);
  position: sticky; top: -1px; background: var(--surface); z-index: 10; }
.form-tab { border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 500; color: var(--slate); }
.form-tab:hover { background: var(--beige); }
.form-tab.is-on { background: var(--peach); color: var(--ink); font-weight: 600; }
fieldset.tab-off { display: none !important; }

/* QSKU form: other authors, the book size, the saved tick */
/* The author, "+ Add author" to its right, other authors beneath in the same column. */
.author-main, .coauthor-row { display: grid; grid-template-columns: minmax(0, 560px) auto; gap: 0 10px; align-items: start; }
.author-add { white-space: nowrap; align-self: flex-start; padding-top: 9px; padding-bottom: 9px; }
.coauthor-rows { display: flex; flex-direction: column; gap: 6px; }
.coauthor-rows:empty { display: none; }
.coauthor-row { align-items: center; }
.coauthor-row [data-coauthor-remove] { justify-self: start; }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.size-row select { width: auto; min-width: 170px; }
.size-part { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.size-part input { width: 96px; }
.size-row [hidden], .size-part[hidden] { display: none; }
.saved-tick { color: #1e7b34; font-weight: 600; margin-right: 8px; align-self: center; }
.saved-tick[hidden] { display: none; }
input:disabled { opacity: .55; cursor: not-allowed; }

/* Catalogue tab: the catalogue versions and the Generate button */
/* What a BISAC code stands for, under its field. */
.bisac-subject { display: block; font-size: 11.5px; color: var(--muted, #999); margin-top: 2px; }
.bisac-subject.is-unknown { color: var(--danger); }

/* "Generate Metadata" at the top of the Listing tab, and what it filled in. */
.meta-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--cream);
            border: 1px solid var(--mist); border-radius: 6px; }
.meta-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta-out { font-size: 12.5px; }
.meta-out.is-error { color: var(--danger); }
.meta-note { display: block; font-size: 11.5px; color: var(--ok); font-weight: 500; margin-top: 2px; }
.meta-note.is-check { color: var(--danger); }

/* What the agreement leaves open, under the field it belongs to: "Blank", or
   "Couldn't Find Section" (the users, 2026-09-29). */
.gap-note { display: block; font-size: 11.5px; color: var(--danger); font-weight: 500; margin-top: 2px; }

/* Amazon's description: the HTML, or the same thing rendered. */
.html-tools { display: flex; align-items: center; gap: 4px; margin: 2px 0 4px; }
.html-gap { flex: 1; }
.html-btn { font: inherit; font-size: 13px; line-height: 1; min-width: 28px; padding: 5px 8px; cursor: pointer;
            background: var(--surface); border: 1px solid var(--mist); border-radius: 4px; color: var(--ink, #0B0F12); }
.html-btn:disabled { opacity: 0.4; cursor: default; }
.html-btn.html-view { min-width: auto; font-size: 12.5px; }
.html-btn.html-view.is-on { background: #4C5E60; border-color: #4C5E60; color: #fff; }
.html-rendered { min-height: 160px; max-height: 340px; overflow: auto; padding: 8px 10px; background: var(--surface);
                 border: 1px solid var(--mist); border-radius: 4px; font-size: 13.5px; line-height: 1.5; }
.html-rendered p { margin: 0 0 8px; }
.html-count { text-align: right; font-size: 11.5px; color: var(--muted, #999); margin-top: 2px; }
.html-count.is-over { color: var(--danger); font-weight: 600; }

/* The formats of a book: each chip opens that entry; a dashed one is matched
   by title and author but not yet tied to the book. */
.fmt-chip { font: inherit; cursor: pointer; }
.fmt-chip.is-self { cursor: default; }
.fmt-chip.is-loose { border-style: dashed; }
.fmt-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* The international cover on the Listing tab: one panel per printer, each with
   its own template, button and answer (the users' feedback V17). */
.cover-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--cream);
             border: 1px solid var(--mist); border-radius: 6px; }
.cover-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cover-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface);
               border: 1px solid var(--mist); border-radius: 6px; }
.cover-panel h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.cover-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
              min-height: 76px; padding: 10px; text-align: center; font-size: 12.5px; cursor: pointer;
              color: var(--muted); border: 1.5px dashed var(--mist); border-radius: 6px;
              background: var(--cream); }
.cover-drop.is-over { border-color: var(--brand); background: #FFF6E8; }
.cover-drop.has-file { border-style: solid; border-color: var(--brand); }
.cover-drop-pick { text-decoration: underline; }
.cover-drop-file { font-weight: 600; color: var(--heading); word-break: break-all; }
.cover-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cover-opts { font-size: 12.5px; }
.cover-opts summary { cursor: pointer; color: var(--muted); }
.cover-opts label { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cover-opts select { font-size: 12.5px; }
.cover-check { white-space: normal; }
.cover-out { font-size: 12.5px; }
.cover-out.is-error { color: var(--danger); }
/* Notes are what the app did and what to check — not faults, so not red. */
.cover-notes { margin: 4px 0 0 16px; padding: 0; font-size: 12px; color: var(--gray-80); }
.cover-notes li { margin-bottom: 3px; }
@media (max-width: 860px) { .cover-panels { grid-template-columns: 1fr; } }

/* "Copy Common Attributes from PB": top right, above the tabs; each field it fills says so. */
.copy-row { display: flex; justify-content: flex-end; margin: -4px 0 6px; }
.copied-note { display: block; font-size: 11.5px; color: var(--ok); font-weight: 500; margin-top: 2px; }
.cat-fit { display: block; font-size: 11.5px; color: var(--ok); min-height: 16px; margin-top: 2px; }
.cat-fit.is-short { color: var(--danger); font-weight: 500; }
.cat-fit.is-wait { color: var(--muted); }
.cat-gen { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--mist); }
.cat-gen-state { flex: 1; min-width: 280px; }
.cat-msg { margin: 0 0 8px; }
.cat-msg.is-bad { color: var(--danger); font-weight: 500; }
.cat-msg.is-good { color: var(--ok); font-weight: 500; }
.cat-tick { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 11px; align-items: center; justify-content: center; margin-right: 6px; vertical-align: -3px; }
.cat-views { display: grid; grid-template-columns: max-content max-content; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.cat-busy { display: flex; align-items: center; gap: 10px; color: var(--danger); }
.cat-spin { width: 20px; height: 20px; border: 3px solid var(--mist); border-top-color: var(--saffron); border-radius: 50%;
  animation: cat-spin .8s linear infinite; flex: none; }
@keyframes cat-spin { to { transform: rotate(360deg); } }

/* Certificate of Publication tab */
.cert-preview { margin: 14px 0 8px; max-width: 760px; }
.cert-preview iframe { display: block; width: 100%; aspect-ratio: 11 / 8.5; border: 1px solid var(--mist);
  border-radius: 6px; background: #fffdf0; }
.cert-warn { background: var(--beige); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
.cert-blocked { border-left: 3px solid var(--danger); }
.cert-warn ul { margin: 4px 0 0; padding-left: 18px; }
.cert-head { margin: 16px 0 4px; }
.cert-issued { margin: 0; padding-left: 18px; }
.cert-issued li { margin: 3px 0; }
#certTooLong[hidden] { display: none; }
.form-intro { display: block; margin: 0 0 10px; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 2px 0 4px; }
.lead-note { max-width: 320px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; font-size: 12.5px; }
.lead-filters[hidden], .lead-summary[hidden], .lead-chips[hidden], .table-wrap[hidden], .pager[hidden],
fieldset[hidden] { display: none; }
.lead-filter { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 14px;
  background: #FFE9C7; color: #6B3A00; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.check-grid .check-row { font-weight: 400; white-space: nowrap; }
.f .check-row input[type=checkbox] { width: auto; flex: none; padding: 0; margin: 0; }
.brevo-count { margin: 14px 0 0; }
.brevo-range[hidden] { display: none; }
.lead-range { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lead-range[hidden] { display: none; }
.lead-range input { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.lead-filter button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: inherit; padding: 0 4px; }
.lead-summary table { font-size: 13px; }
.lead-summary td a { text-decoration: none; }
.lead-summary td a:hover { text-decoration: underline; }
.lead-summary tfoot th { border-top: 2px solid var(--mist); }
.lead-today { color: #8A4B00; font-weight: 600; }
.lead-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.lead-contact, .lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.lead-panel { margin: 0 0 14px; padding: 12px; border: 1px solid #FF9717; border-radius: 8px; background: #FFF8EE; display: grid; gap: 8px; font-size: 13px; }
.lead-panel textarea { width: 100%; font: inherit; }
.lead-panel p { margin: 0; }
.lead-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lead-row label { display: flex; gap: 6px; align-items: center; }
.lead-money { padding: 7px 0; font-weight: 600; }
.lead-payments { margin-top: 8px; font-size: 13px; }
.lead-payments td { padding: 3px 10px 3px 0; }
.lead-history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.lead-history li { padding: 6px 0; border-bottom: 1px solid var(--mist); }
.lead-history li > div { margin-top: 2px; white-space: pre-wrap; }
.lead-ev-payment > div { font-weight: 600; }
.lead-ev-no_answer > div { color: var(--gray-40); }

/* Listing sheets: a marketplace's new layout, matched column by column. */
.file-btn { cursor: pointer; }
.layout-work { margin-top: 16px; padding: 16px; background: var(--white, #fff); border-radius: 10px; border: 1px solid var(--mist, #E5E5E5); }
.layout-work h3 { margin: 0 0 6px; font-size: 16px; }
.layout-rows { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 10px 0; font-size: 13px; }
.layout-rows select, .layout-rows input { margin-left: 6px; }
.lw-note { flex: 1; display: flex; align-items: center; }
.lw-note input { flex: 1; }
.layout-preview table { font-size: 12px; }
.layout-preview td, .layout-preview th { padding: 3px 8px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.layout-preview tr.is-heading td { background: var(--beige); }
.layout-preview tr.is-names td { font-weight: 600; }
.layout-preview tr.is-data td { color: var(--gray-40); }
.lw-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; font-size: 13px; }
.lw-toggle { margin-left: auto; font-size: 12.5px; }
.lw-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--beige); color: var(--slate); }
.lw-moved { background: #E8EEF2; }
.lw-renamed, .lw-guessed { background: #FFE9C7; color: #8A4B00; }
.lw-new { background: #FDE2DD; color: #9B2C1B; }
.lw-dropped { background: #FDE2DD; color: #9B2C1B; }
.lw-table .lw-what { min-width: 300px; }
.lw-table select { max-width: 320px; }
.lw-constant { margin-top: 4px; width: 100%; max-width: 320px; }

/* Listing sheets: ticking books in the list, and the download row. */
.col-pick { width: 28px; text-align: center; }
.pick-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px;
  background: var(--beige); border-radius: 8px; font-size: 13px;
}
.pick-bar .cat-found { flex-basis: 100%; margin-top: 4px; }
/* A class that sets display outranks the browser's own rule for [hidden]. */
.pick-bar[hidden], .cat-found[hidden], .layout-work[hidden], .lead-panel[hidden], .f[hidden] { display: none; }
.listing-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-40); }
.listing-intro { display: block; margin: 0 0 10px; }
.decide-chip {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  background: var(--beige); color: var(--slate); font-size: 10.5px; font-weight: 600;
  vertical-align: 1px; white-space: nowrap;
}
.f.is-filled input, .f.is-filled select, .f.is-filled textarea { box-shadow: 0 0 0 2px var(--brand); transition: box-shadow .3s; }

/* The "shorten this" control under a catalogue text box. */
.shorten-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.shorten-row .hint { margin: 0; }
.shorten-row .err-text { color: var(--danger, #b3261e); }

/* What "Download catalogue" found in Drive, or made. */
.cat-found { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.cat-found ul { margin: 6px 0 8px; padding-left: 18px; }
.cat-found li { margin: 4px 0; }
.cat-found .hint { font-size: 12px; color: var(--gray-40); }
.cat-found .err-text { color: var(--danger, #b3261e); }

/* Listing tab: display names, one row per author */
.display-names { display: flex; flex-direction: column; gap: 4px; }
.display-rows { display: grid; gap: 8px; max-width: 560px; }
.display-names > .hint { font-size: 11.5px; }

/* Listing tab: the pictures made for Amazon and Flipkart */
.images-out { margin-top: 10px; }
.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 8px; }
.images-grid figure { margin: 0; font-size: 12px; }
.images-grid img { width: 100%; height: 190px; object-fit: contain; background: var(--beige); border: 1px solid var(--mist); border-radius: 6px; }
.images-out[hidden] { display: none; }

.pictures-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pictures-row .images-out { flex-basis: 100%; }

/* ---------------------------- Listing Batch ---------------------------- */
/* The books listed together (the users' feedback V15, 2026-09-29). */
.batch-head h2 { margin: 0 0 2px; font-size: 19px; }
.batch-id { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.batch-foot { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.batch-file { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
.batch-file input { min-width: 260px; }
.batch-buttons { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.batch-out { margin-top: 10px; font-size: 13px; }
.batch-out.is-error { color: var(--danger); }
.batch-out.is-warn { color: var(--danger); }
/* A book already listed in an earlier batch: the whole row in red, so it is
   taken out before the next batch rather than listed twice. */
#batchTable tr.is-listed td { color: var(--danger); }
.btn-bin { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--danger); padding: 2px 6px; }
.btn-bin:hover { background: #fdecec; border-radius: 4px; }
/* "Add to Batch" on the Listing tab, and the tick that says it is in. */
.batch-add { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.batch-tick { color: var(--ok, #1a7f37); font-weight: 700; }

/* Flipkart in a batch: their file, with the batch's ISBNs as its rows. */
.batch-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 620px; }
.batch-file-head { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.batch-pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.batch-file .hint { flex-basis: 100%; margin: 0; }

/* IngramSpark needs its own template; KDP does not (the users, 2026-09-30). */
#kdpTemplateLabel.is-needed { font-weight: 600; color: var(--ink, #0B0F12); }
