:root {
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --ink-faint: #7f7f7f;
  --rule: #e7e7e7;
  --rule-strong: #111111;

  --brand: #404f69;
  --brand-soft: #eef0f3;
  --gold: #eeba2b;
  --gold-soft: #fbf1d9;
  --gold-deep: #8a6110;
  --proof-red: #a6362c;
  --approved-green: #2e6b3e;

  /* stage progression: story gets "more inked" as it nears publication */
  --stage-idea: #f4f5f6;
  --stage-assigned: #dde2e8;
  --stage-drafting: #b7c0cc;
  --stage-editing: #8b96a8;
  --stage-published: #404f69;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- Masthead ---------- */

.masthead {
  background: var(--paper-raised);
  border-bottom: 3px solid var(--rule-strong);
}

.masthead-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.masthead-logo {
  height: 44px;
  width: auto;
  display: block;
}

.identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}

.identity-name {
  background: none;
  border: none;
  border-bottom: 1px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 1px;
}

.tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--rule);
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 4px;
  margin-right: 24px;
  font-size: 15px;
  color: var(--ink-faint);
  cursor: pointer;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* ---------- Layout ---------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.view.hidden { display: none; }

/* General-purpose hide utility — covers loginScreen, appShell, and the
   form error/success messages, none of which had a matching rule before.
   The id-scoped selectors guarantee these two win even against
   .login-screen's own display:flex, regardless of rule order. */
.hidden { display: none !important; }
#loginScreen.hidden, #appShell.hidden { display: none; }

/* ---------- Board ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.column {
  border-radius: var(--radius);
  padding: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.column-idea { background: var(--stage-idea); }
.column-assigned { background: var(--stage-assigned); }
.column-drafting { background: var(--stage-drafting); }
.column-editing { background: var(--stage-editing); color: #fff; }
.column-published { background: var(--stage-published); color: #fff; }

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 4px 6px;
}

.column-header h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.column-count {
  font-size: 12px;
  opacity: 0.75;
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
  flex: 1;
}

.column-cards.drag-over {
  outline: 1px dashed var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 10px 12px;
  cursor: grab;
  transition: box-shadow 0.12s ease;
}

.card:hover {
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.1);
}

.card.dragging {
  opacity: 0.5;
}

.card-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.card-eyebrow.due-soon { color: var(--gold-deep); }
.card-eyebrow.overdue { color: var(--proof-red); }

.due-tag.due-soon { color: var(--gold-deep); font-weight: 600; }
.due-tag.overdue { color: var(--proof-red); font-weight: 600; }

.card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
  color: var(--ink);
}

.card-byline {
  font-size: 12px;
  color: var(--ink-faint);
}

.card-byline b {
  color: var(--ink-soft);
  font-weight: 600;
}

.add-card-btn {
  background: none;
  border: 1px dashed var(--rule);
  border-radius: 2px;
  padding: 8px;
  font-size: 13px;
  color: var(--ink-faint);
  cursor: pointer;
  text-align: left;
}

.add-card-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Calendar ---------- */

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  min-width: 170px;
  text-align: center;
}

.icon-btn {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
}

.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.calendar-actions { display: flex; gap: 8px; }

.calendar-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 0 2px 10px;
}

.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.legend-dot.event { background: var(--brand); }
.legend-dot.story { background: var(--gold); }

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 12px;
  color: var(--ink-faint);
  padding: 0 2px 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(96px, auto);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.day-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 6px;
  cursor: pointer;
  background: var(--paper-raised);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-cell:hover { background: #fbfbfb; }

.day-cell.other-month { background: var(--paper); color: var(--rule); }
.day-cell.other-month .day-number { color: #d0d0d0; }

.day-cell.today .day-number {
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
}

.day-number {
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-event, .day-story {
  font-size: 11.5px;
  padding: 2px 5px;
  border-radius: 2px;
  line-height: 1.3;
  text-align: left;
  border: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
}

.day-event {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.day-event.converted {
  background: var(--stage-idea);
  color: var(--ink-faint);
  font-weight: 400;
}

.day-story {
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-weight: 600;
}

.day-story.overdue {
  background: #f6e2df;
  color: var(--proof-red);
}

/* ---------- Buttons ---------- */

.primary-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover { background: #2f3b50; }

.ghost-btn {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}

.ghost-btn:hover { border-color: var(--brand); color: var(--brand); }

.danger-link {
  background: none;
  border: none;
  color: var(--proof-red);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
}

.danger-link:hover { text-decoration: underline; }

/* ---------- Modals ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal.small { max-width: 340px; }

.modal h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

.modal-hint {
  color: var(--ink-faint);
  font-size: 13px;
  margin: 0 0 14px;
}

.modal label,
.panel label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 12px;
}

.modal input[type="text"],
.modal input[type="date"],
.modal input[type="time"],
.modal textarea,
.modal select,
.panel input[type="text"],
.panel input[type="date"],
.panel input[type="time"],
.panel input[type="email"],
.panel textarea,
.panel select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 14px;
}

.modal textarea, .panel textarea { resize: vertical; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-meta {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin: 14px 0 0;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions.space-between {
  justify-content: space-between;
  align-items: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .masthead-inner { flex-wrap: wrap; gap: 10px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Login ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-card .masthead-logo { margin-bottom: 22px; }

.login-card h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 18px;
}

.login-card label {
  width: 100%;
  text-align: left;
  display: block;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 12px;
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 14px;
}

.full-width { width: 100%; margin-top: 18px; }

.form-error {
  color: var(--proof-red);
  font-size: 12.5px;
  margin: 10px 0 0;
  text-align: left;
  width: 100%;
}

.form-success {
  color: #2e6b3e;
  font-size: 12.5px;
  margin: 10px 0 0;
}

/* ---------- Section / panel layout ---------- */

.section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 520px;
}

.panel h3 {
  font-family: var(--serif);
  font-size: 16px;
  margin: 0 0 4px;
}

.hint { color: var(--ink-faint); font-weight: 400; }

/* ---------- Stacked list (requests / users) ---------- */

.stacked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.list-row {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.list-row:hover { box-shadow: 0 1px 4px rgba(17,17,17,0.08); }

.list-row.static { cursor: default; }

.list-row-main { min-width: 0; }

.list-row-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14.5px;
  margin: 0 0 3px;
}

.list-row-sub {
  font-size: 12px;
  color: var(--ink-faint);
}

.list-row-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 2px;
}

.status-badge.pending { background: var(--gold-soft); color: var(--gold-deep); }
.status-badge.approved { background: #dcefe0; color: var(--approved-green); }
.status-badge.rejected { background: #f6e2df; color: var(--proof-red); }

.role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--brand-soft);
  color: var(--brand);
}

.role-select {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 20px 3px 8px;
  border-radius: 2px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-soft);
  cursor: pointer;
}

/* ---------- Analytics ---------- */

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.chart-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px;
}

.chart-card h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
}

.chart-card .chart-wrap {
  position: relative;
  height: 260px;
}

/* ---------- Ad sales ---------- */

.ads-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ads-head .section-title { margin: 0; }

.subtabs { display: flex; gap: 4px; }

.subtab {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.subtab:hover { border-color: var(--brand); color: var(--brand); }
.subtab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.kpi.gold { border-top-color: var(--gold); }
.kpi.alert { border-top-color: var(--proof-red); }
.kpi.good { border-top-color: var(--approved-green); }

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kpi-value {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  margin: 4px 0 2px;
}
.kpi.alert .kpi-value { color: var(--proof-red); }
.kpi-sub { font-size: 12px; color: var(--ink-faint); }

.alert-strip {
  background: var(--gold-soft);
  border: 1px solid #ecd9a4;
  border-left: 4px solid var(--gold);
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 13px;
  color: #5c4308;
  margin-bottom: 10px;
}
.alert-strip button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.note-bar {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0 0 16px;
  line-height: 1.5;
}
.note-bar .warn { color: var(--gold-deep); font-weight: 600; }
.note-bar button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.attention-grid:empty { display: none; }

.attention-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.attention-card h3 {
  font-family: var(--serif);
  font-size: 15px;
  margin: 0 0 8px;
}
.attention-card ul { list-style: none; margin: 0; padding: 0; }
.attention-card li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  cursor: pointer;
}
.attention-card li:first-child { border-top: none; }
.attention-card li:hover b { color: var(--brand); text-decoration: underline; }
.attention-card .when { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.attention-card .when.late { color: var(--proof-red); font-weight: 600; }
.attention-card .more { font-size: 12px; color: var(--ink-faint); margin: 6px 0 0; }

.ads-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.ads-toolbar select,
.search-box {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 13px;
}
.search-box { flex: 1 1 260px; min-width: 200px; }

.ads-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pane-intro { font-size: 13.5px; color: var(--ink-soft); max-width: 640px; margin: 0 0 14px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-raised);
  margin-bottom: 20px;
}

.ads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 900px;
}
.ads-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 9px 12px;
  border-bottom: 2px solid var(--rule-strong);
  white-space: nowrap;
}
.ads-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.ads-table tbody tr { cursor: pointer; }
.ads-table tbody tr:hover { background: #fafafa; }
.ads-table tbody tr:last-child td { border-bottom: none; }
.ads-table.map-table { min-width: 0; }
.ads-table.map-table tbody tr { cursor: default; }
.ads-table.map-table tbody tr:hover { background: none; }
.map-table select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 13px;
}
.map-table .examples { color: var(--ink-faint); font-size: 12px; max-width: 260px; }

.ads-table .sponsor { font-family: var(--serif); font-weight: 700; font-size: 14px; }
.ads-table .sub { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.ads-table a { color: var(--brand); text-decoration: none; }
.ads-table a:hover { text-decoration: underline; }
.ads-table .late { color: var(--proof-red); font-weight: 600; }
.ads-table .soon { color: var(--gold-deep); font-weight: 600; }
.ads-table .num { text-align: right; white-space: nowrap; }

.deal-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.deal-status.prospect { background: #eef0f3; color: #4a5568; }
.deal-status.contacted { background: #dde2e8; color: #33415a; }
.deal-status.negotiating { background: var(--gold-soft); color: var(--gold-deep); }
.deal-status.signed { background: #dcefe0; color: var(--approved-green); }
.deal-status.lost { background: #f6e2df; color: var(--proof-red); }

.flag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  margin-top: 3px;
  white-space: nowrap;
}
.flag.warn { background: var(--gold-soft); color: var(--gold-deep); }
.flag.bad { background: #f6e2df; color: var(--proof-red); }
.flag.good { background: #dcefe0; color: var(--approved-green); }
.flag.quiet { background: var(--brand-soft); color: var(--brand); }

.empty-note {
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  max-width: 640px;
}

/* modal extras */

.modal.wide { max-width: 720px; }

.modal-section {
  font-family: var(--serif);
  font-size: 15px;
  margin: 22px 0 2px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.modal input[type="email"],
.modal input[type="number"],
.modal input[type="search"],
.modal input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 14px;
}
.modal input[type="file"] { font-size: 13px; padding: 6px 8px; }

.revenue-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 8px 0 0;
  min-height: 1em;
}
.revenue-note.warn { color: var(--gold-deep); }

.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-dates button {
  background: var(--brand-soft);
  border: none;
  border-radius: 2px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--brand);
  cursor: pointer;
}
.quick-dates button:hover { background: #dfe3ea; }

.log-list { margin: 8px 0 4px; }
.log-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.log-item .when { font-weight: 600; white-space: nowrap; }
.log-item .method {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 2px;
  padding: 1px 6px;
  margin-left: 6px;
}
.log-item .note { color: var(--ink-soft); margin-top: 2px; white-space: pre-wrap; }
.log-item .by { color: var(--ink-faint); font-size: 11.5px; }
.log-empty { font-size: 13px; color: var(--ink-faint); margin: 8px 0; }
.log-add { margin-top: 10px; }
.log-add .ghost-btn { margin-top: 12px; }

.file-list { margin: 12px 0 8px; }
.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin-bottom: 6px;
  font-size: 13px;
  background: #fcfcfc;
}
.file-item .file-name { font-weight: 600; word-break: break-word; }
.file-item .file-meta { color: var(--ink-faint); font-size: 11.5px; }
.file-item .file-actions { display: flex; gap: 10px; white-space: nowrap; }
.file-item .file-actions a,
.file-item .file-actions button {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
}
.file-item .file-actions .remove { color: var(--proof-red); }

.file-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.file-add select {
  padding: 7px 8px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  font-size: 13px;
}
.file-add input[type="file"] { flex: 1 1 200px; margin-top: 0; width: auto; }

.import-summary { font-size: 14px; margin: 4px 0 10px; }
.issue-list { max-height: 260px; overflow-y: auto; margin-bottom: 8px; }
.issue-row {
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.issue-row b { font-family: var(--serif); }
.issue-row .why { color: var(--gold-deep); }
.issue-row .why.stop { color: var(--proof-red); }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.check-row input { margin: 0; }

/* analytics extras */

.analytics-heading {
  font-family: var(--serif);
  font-size: 18px;
  margin: 28px 0 6px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--rule-strong);
}
.analytics-heading:first-of-type { margin-top: 4px; }
.analytics-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; max-width: 760px; }
.chart-caption { font-size: 11.5px; color: var(--ink-faint); margin: 8px 0 0; }
.chart-card h3 .hint { font-family: var(--sans); font-size: 12px; }

.ghost-box {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  max-width: 760px;
  font-size: 13.5px;
  line-height: 1.55;
}
.ghost-box h4 { font-family: var(--serif); font-size: 15px; margin: 0 0 6px; }
.ghost-box ol { margin: 8px 0 8px 18px; padding: 0; }
.ghost-box code {
  background: var(--brand-soft);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 12.5px;
}
.ghost-box .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.ghost-footer { font-size: 12px; color: var(--ink-faint); margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ghost-footer button, .ghost-footer a {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.test-result { font-size: 13px; margin: 6px 0 0; }
.test-result.ok { color: var(--approved-green); }
.test-result.bad { color: var(--proof-red); }

@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
}

/* ---------- Queue additions ---------- */
.today-toggle { font-size: 12px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.link-btn { background: none; border: none; padding: 0; color: var(--brand); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.login-forgot { text-align: center; margin-top: 12px; }
.checkbox-label { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 10px 0 4px; }
.checkbox-label input { width: auto; }
