/* Desktop-only on purpose (BUILD.md: mobile is out of scope for v1).
   Dense rather than airy — this is a queue you work through, not a
   dashboard you admire. */

:root {
  --bg:        #f6f6f4;
  --panel:     #ffffff;
  --ink:       #1c1c1a;
  --muted:     #6b6b64;
  --line:      #e2e1dc;
  --accent:    #1f5f4f;
  --hold:      #b5451b;
  --hold-bg:   #fdf1ec;
  --auto:      #2f6d3f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Helvetica, sans-serif;
}

code {
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eceae4;
  padding: 1px 5px;
  border-radius: 3px;
}

/* -- sign-in ------------------------------------------------------------- */

.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.signin .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px;
  width: 420px;
  text-align: center;
}

.signin h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.signin .sub { margin: 0 0 28px; color: var(--muted); }

.btn.google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.btn.google:hover { background: #fafaf8; border-color: #cfcec8; }

.signin .error {
  background: var(--hold-bg);
  border: 1px solid #f0cdbd;
  color: var(--hold);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 20px;
  text-align: left;
  font-size: 14px;
}

.signin .footnote {
  margin: 26px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

/* -- top bar ------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }

.clients {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: thin;
}

.chip {
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.chip:hover { background: #fafaf8; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip em { font-style: normal; opacity: 0.6; margin-left: 4px; }

.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.who a { color: var(--accent); }

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

.queue { max-width: 900px; margin: 0 auto; padding: 26px 22px 80px; }

.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 26px;
}
.notice h2 { margin: 0 0 10px; font-size: 16px; }
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin-bottom: 0; }
.notice .muted { color: var(--muted); font-size: 14px; }

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab {
  padding: 9px 14px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab em {
  font-style: normal;
  background: #eceae4;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 5px;
}
.tab.on em { background: var(--accent); color: #fff; }

.tabs .spacer { flex: 1; }
.tabs .stat { color: var(--muted); font-size: 13px; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.review {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.review.held { border-left: 3px solid var(--hold); }
.review.auto_eligible { border-left: 3px solid var(--auto); }

.review .meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.review .rating { color: #c98a12; letter-spacing: 1px; }
.review .loc { color: var(--ink); font-weight: 600; }
.review .claim { color: var(--hold); }

.review .body { margin: 0; white-space: pre-wrap; }

.reasons {
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--hold);
}

/* -- the reply panel ------------------------------------------------------ */

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { background: #fafaf8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.post { background: #8a2f12; border-color: #8a2f12; color: #fff; }
.btn.post:hover { filter: brightness(1.1); }
.btn.post.off, .btn:disabled {
  background: #eceae4; border-color: var(--line);
  color: var(--muted); cursor: not-allowed; filter: none;
}
.btn.quiet { color: var(--muted); }
.btn.open { margin-top: 10px; }

.link {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 13px;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}

.panel { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }

.flash { margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.flash.ok  { background: #eef5ef; color: var(--auto);  border: 1px solid #cfe3d3; }
.flash.bad { background: var(--hold-bg); color: var(--hold); border: 1px solid #f0cdbd; }

.gen { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.spin { font-size: 13px; color: var(--muted); }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline; }

.drafts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.draft {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 10px;
  align-items: start;
  background: #faf9f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 14px;
}
.draft.on { border-color: var(--accent); background: #f1f6f3; }
.draft p { margin: 0; }
.src {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 700; color: var(--muted); padding-top: 2px;
}
.src.claude { color: var(--accent); }

.panel textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
  background: #fff;
  color: var(--ink);
}
.panel textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.actions .spacer { flex: 1; }
.claimnote { font-size: 12px; color: var(--muted); }

.posted {
  background: #eef5ef; border: 1px solid #cfe3d3;
  border-radius: 6px; padding: 12px 14px; font-size: 14px;
}
.posted strong { color: var(--auto); }
.quote-reply {
  margin: 8px 0 0; padding-left: 10px;
  border-left: 2px solid #cfe3d3; color: var(--ink);
}

/* -- location + operator -------------------------------------------------- */

.review .city {
  color: var(--ink);
  background: #eceae4;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 12px;
}

.panel .where {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.operator {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.btn.contact {
  text-decoration: none;
  border-color: #c8a15a;
  background: #fdf8ee;
  color: #7a5713;
}
.btn.contact:hover { background: #faf1dd; }
.contacted { font-size: 12px; color: var(--muted); }
.nocontact { font-size: 13px; color: var(--muted); }

.signin .error.warn {
  background: #fdf8ee; border-color: #e4cd9a; color: #7a5713;
}

/* -- refresh + posting state ---------------------------------------------- */

#sync { display: flex; align-items: center; gap: 8px; }

.btn.refresh { padding: 5px 12px; font-size: 13px; }

.syncing {
  font-size: 13px; color: var(--accent); font-weight: 600;
  white-space: nowrap;
}
.syncing::after {
  content: ""; display: inline-block; width: 6px; height: 6px;
  margin-left: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.lastsync { font-size: 12px; color: var(--muted); white-space: nowrap; }

.postingoff {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--hold);
  background: var(--hold-bg); border: 1px solid #f0cdbd;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}

/* -- brand voice ---------------------------------------------------------- */

.brandtag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--accent);
  background: #eef5ef; border: 1px solid #cfe3d3;
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.brandtag.none { color: var(--muted); background: #eceae4; border-color: var(--line); }

.src em {
  display: block; font-style: normal; font-size: 10px;
  color: var(--muted); text-transform: none; letter-spacing: 0;
  margin-top: 2px;
}

/* -- baseline check flags -------------------------------------------------- */

.issues {
  grid-column: 1 / -1;
  margin: 8px 0 0; padding: 0 0 0 16px;
  font-size: 12px; color: var(--hold);
}
.issues li { margin-top: 2px; }

.issues.chosen-issues {
  grid-column: auto;
  margin: 8px 0 0; padding: 8px 12px 8px 28px;
  background: var(--hold-bg);
  border: 1px solid #f0cdbd;
  border-radius: 6px;
  list-style-position: outside;
}

/* -- locations / stats ---------------------------------------------------- */

.brand a { color: inherit; text-decoration: none; }
.loclink { color: var(--ink); text-decoration: underline; text-decoration-color: #c9c7c0; }
.loclink:hover { text-decoration-color: var(--accent); }

.locations { max-width: 1180px; margin: 0 auto; padding: 22px; }

.coverage {
  font-size: 13px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--hold);
  border-radius: 6px; padding: 10px 14px; margin: 0 0 16px;
}
.coverage strong { color: var(--hold); }

table.stats { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.stats th, table.stats td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.stats th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #faf9f6; }
table.stats th.l, table.stats td.l { text-align: left; }
table.stats tr:last-child td { border-bottom: 0; }
table.stats .thin { opacity: 0.35; }
table.stats td em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 8px; }
table.stats .city { background: #eceae4; border-radius: 3px; padding: 0 6px; font-size: 11px; margin-left: 6px; }
table.stats .avg { font-weight: 700; }
table.stats .open { background: var(--hold-bg); color: var(--hold); border-radius: 999px; padding: 1px 8px; font-weight: 700; }

.bar { display: inline-flex; width: 150px; height: 9px; border-radius: 999px; overflow: hidden; background: #eceae4; vertical-align: middle; }
.bar i { display: block; height: 100%; }
.bar .s5 { background: #2f6d3f; }
.bar .s4 { background: #7ba05b; }
.bar .s3 { background: #d9b45b; }
.bar .s2 { background: #cf7a3c; }
.bar .s1 { background: #b5451b; }
.mix { color: var(--muted); font-size: 12px; margin-left: 8px; }

.agetoggle {
  font-size: 12px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; margin-right: 10px; white-space: nowrap;
}
.agetoggle:hover { background: #fafaf8; color: var(--ink); }
.agetoggle.on { background: var(--hold-bg); border-color: #f0cdbd; color: var(--hold); }
