/* Tuneflock – internal tool look: black #191919, red #ED4036, white, Arial. No external assets. */
:root {
  --black: #191919;
  --black-2: #242424;
  --black-3: #2e2e2e;
  --red: #ED4036;
  --red-dark: #d2362d;
  --red-soft: #fde3e1;
  --white: #ffffff;
  --bg: #f4f4f4;
  --line: #e4e4e4;
  --line-2: #efefef;
  --text: #191919;
  --muted: #6e6e6e;
  --green: #137a3a;
  --green-soft: #e3f5ea;
  --amber: #8a5a00;
  --amber-soft: #fff1cc;
  --blue: #1b4fa0;
  --blue-soft: #e4eefc;
  --grey-soft: #ececec;
  --radius: 10px;
  --sidebar: 228px;
  --topbar: 56px;
  --font: Arial, Helvetica, "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
img, video { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13px; }
.text-red { color: var(--red-dark); }
.text-green { color: var(--green); }
.num { text-align: right; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- top bar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar); z-index: 30;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 26px; display: inline-block; flex: none; }
.brand-name { font-size: 18px; letter-spacing: 0.22em; }
.brand-sub { font-size: 13px; font-weight: 400; color: #bdbdbd; letter-spacing: 0.02em; padding-left: 6px; border-left: 1px solid #444; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill-link:hover { text-decoration: none; filter: brightness(1.05); }

/* ---- sidebar ---- */
.sidebar {
  position: fixed; top: var(--topbar); left: 0; bottom: 0; width: var(--sidebar); z-index: 20;
  background: var(--black); display: flex; flex-direction: column; padding: 14px 0;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 22px; color: #c9c9c9; font-weight: 700; font-size: 14px;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--black-2); color: var(--white); text-decoration: none; }
.nav-item.active { background: var(--black-2); color: var(--white); border-left-color: var(--red); }
.nav-icon { width: 20px; height: 20px; display: inline-block; flex: none; color: #9a9a9a; }
.nav-item:hover .nav-icon { color: var(--white); }
.nav-item.active .nav-icon { color: var(--red); }
.nav-badge { margin-left: auto; background: var(--red); color: var(--white); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding: 14px 22px; color: #777; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-sheep { display: inline-flex; align-items: center; gap: 8px; }
.sidebar-sheep svg { width: 26px; height: 22px; }
.mascot { width: 72px; height: 63px; display: block; margin: 0 auto 10px; }
.sidebar-foot a { color: #999; }

/* ---- content ---- */
.content { margin-left: var(--sidebar); padding: calc(var(--topbar) + 28px) 36px 60px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head-text { min-width: 0; }
.heading-sub { color: var(--muted); font-weight: 400; font-size: 20px; margin-left: 6px; }
.lede { color: var(--muted); font-size: 15px; margin: 6px 0 0; max-width: 820px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; border-left: 4px solid var(--red); background: var(--amber-soft); }
.banner-red { background: var(--red-soft); }
.banner a { font-weight: 700; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-head .hint { margin: 4px 0 0; }
.hint { color: var(--muted); font-size: 13px; }
.sub-head { margin: 18px 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.grid-2 > .card, .grid-2-1 > .card { margin-bottom: 0; min-width: 0; }
.grid-2, .grid-2-1 { margin-bottom: 22px; align-items: start; }
.card { overflow-x: auto; }
.nowrap { white-space: nowrap; }
dd.mono, .status-list dd.mono { word-break: break-all; }

/* ---- tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.tiles-5 { grid-template-columns: repeat(5, 1fr); }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--text); display: block; border-top: 4px solid var(--black); }
.tile:hover { text-decoration: none; border-color: var(--black); }
.tile-hot { border-top-color: var(--red); }
.tile-num { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.tile-hot .tile-num { color: var(--red); }
.tile-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 10px; }
.tile-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; font-weight: 700; font-size: 15px; line-height: 1.2;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-busy { opacity: .55; cursor: progress; }
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: var(--black-3); }
.btn-ghost { background: var(--white); color: var(--black); border-color: #cfcfcf; }
.btn-ghost:hover { border-color: var(--black); }
.btn-danger { background: var(--white); color: var(--red-dark); border-color: #f1b7b2; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-xs { padding: 5px 10px; font-size: 13px; border-width: 1px; }
.file-btn { position: relative; }
.inline-form { display: inline-flex; }

/* ---- pills, tags, chips ---- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: #b3261e; }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-grey { background: var(--grey-soft); color: #555; }
.tag { display: inline-block; background: var(--grey-soft); color: #444; border-radius: 6px; padding: 2px 8px; font-size: 12px; margin: 0 4px 4px 0; }
.tag-date { background: var(--blue-soft); color: var(--blue); }
.tag-virality { background: var(--green-soft); color: var(--green); }
.count-chip { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; color: var(--muted); }
.count-chip strong { color: var(--text); font-size: 16px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--text); background: var(--white); }
.chip:hover { border-color: var(--black); text-decoration: none; }
.chip-active { background: var(--black); color: var(--white); border-color: var(--black); }
.chip-count { color: var(--muted); font-weight: 400; margin-left: 4px; }
.chip-active .chip-count { color: #ccc; }

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line-2); font-weight: 700; }
.table th.num { text-align: right; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafa; }
.table-compact td, .table-compact th { padding: 8px 10px; }
.track-title { font-weight: 700; color: var(--text); }
.col-order { width: 70px; white-space: nowrap; }
.col-actions { text-align: right; white-space: nowrap; }
.col-actions .btn { margin-left: 6px; }
.col-bar { width: 160px; }
.drag-row { cursor: grab; }
.drag-row.dragging { opacity: .4; }
.drag-row.drag-over td { border-top: 2px solid var(--red); }
.drag-handle { color: #bbb; font-size: 16px; margin-right: 8px; letter-spacing: -4px; }
.order-num { font-weight: 700; color: var(--muted); }

/* ---- bars ---- */
.bar { background: var(--line-2); height: 12px; border-radius: 6px; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; background: var(--red); border-radius: 6px; min-width: 2px; }
.bar-sm { height: 8px; width: 120px; }

/* ---- empty states, feed ---- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty p { margin-bottom: 6px; }
.empty strong { color: var(--text); font-size: 17px; }
.empty .btn { margin-top: 14px; }
.small-empty { padding: 18px; font-size: 14px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; background: #bbb; margin-top: 6px; flex: none; }
.feed-publish .feed-dot { background: var(--green); }
.feed-warning .feed-dot, .feed-error .feed-dot { background: var(--red); }
.feed-result .feed-dot { background: var(--blue); }
.feed-msg { font-size: 14px; }
.feed-ts { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---- facts ---- */
.facts { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.facts-tight { gap: 8px 24px; margin: 10px 0; }
.fact { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.fact-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.jobs-strip { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.job-chip { background: var(--grey-soft); border-radius: 6px; padding: 4px 8px; display: inline-flex; gap: 6px; align-items: center; }
.energy { width: 100%; border-radius: 8px; display: block; margin-bottom: 16px; background: var(--black); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-mini { min-width: 90px; }
.field-label { font-size: 13px; font-weight: 700; }
.field-label em { color: var(--red); font-style: normal; font-weight: 400; font-size: 12px; margin-left: 4px; }
.field-help { color: var(--muted); font-size: 13px; }
.form input[type=text], .form input[type=email], .form input[type=url], .form input[type=date], .form input[type=number], .form input[type=password],
.form select, .form textarea, .review-card textarea, .review-card input[type=text] {
  border: 1px solid #cfcfcf; border-radius: 8px; padding: 10px 12px; background: var(--white); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus, .review-card textarea:focus, .review-card input:focus { outline: 2px solid var(--black); outline-offset: 0; border-color: var(--black); }
.form input[type=file] { padding: 8px 0; }
.form textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field { flex: 1; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.form-section { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }
.form-section:first-child { margin-top: 0; }
.card-form { max-width: 980px; }

/* ---- settings ---- */
.setting-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.setting-row:last-of-type { border-bottom: 0; }
.setting-label { font-weight: 700; display: block; }
.setting-help { color: var(--muted); font-size: 13px; margin-top: 2px; }
.setting-input { display: flex; align-items: center; gap: 10px; }
.setting-input input, .setting-input select { flex: 1; }
.setting-state { white-space: nowrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 46px; height: 26px; border-radius: 13px; background: #cfcfcf; position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: left .15s; }
.switch input:checked + .switch-track { background: var(--red); }
.switch input:checked + .switch-track::after { left: 23px; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--black); }
.switch-text { font-weight: 700; font-size: 14px; }
.status-list { margin: 0; }
.status-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); align-items: center; flex-wrap: wrap; }
.status-list > div:last-child { border-bottom: 0; }
.status-list dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.status-list dd { margin: 0; text-align: right; word-break: break-all; }

/* ---- variants ---- */
.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.variant-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); display: flex; flex-direction: column; }
.variant-thumb { position: relative; background: var(--black); aspect-ratio: 9 / 12; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.variant-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { color: #888; font-size: 13px; text-align: center; padding: 20px; }
.play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(237,64,54,.92); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 16px; padding-left: 3px; }
.variant-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.variant-channel { font-weight: 700; font-size: 14px; }
.variant-hook { font-size: 14px; color: #333; min-height: 2.6em; }
.variant-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }

/* ---- review ---- */
.queue-note { color: var(--muted); margin-bottom: 14px; }
.queue-note strong { color: var(--text); }
.review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 18px; }
.review-card { display: flex; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: opacity .25s, transform .25s; }
.review-card.is-gone { opacity: 0; transform: scale(.98); }
.review-card.is-approved { border-color: var(--green); }
.review-card.is-rejected { border-color: #ccc; }
.review-video { width: 216px; flex: none; background: var(--black); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; aspect-ratio: 9 / 16; }
.review-video video, .review-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.review-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.review-channel { font-weight: 700; font-size: 16px; }
.review-track { color: var(--muted); font-size: 14px; }
.review-hook { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; padding: 10px 14px; background: var(--black); color: var(--white); border-radius: 8px; border-left: 4px solid var(--red); }
.review-actions { display: flex; gap: 10px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.review-actions .reject { position: relative; }
.review-actions .reject > summary { list-style: none; display: inline-flex; cursor: pointer; }
.review-actions .reject > summary::-webkit-details-marker { display: none; }
.review-actions .reject[open] > summary { background: var(--line-2); }
.reject-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.reject-form select, .reject-form input[type=text] { border: 1px solid #cfcfcf; border-radius: 8px; padding: 8px 10px; background: #fff; font: inherit; font-size: 14px; }
.reject-form input[type=text] { width: 180px; }
.review-filters { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: -6px 0 14px; }
.review-filter { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.review-filter select { border: 1px solid #cfcfcf; border-radius: 8px; padding: 7px 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 400; color: var(--text); max-width: 280px; }
.review-more { display: flex; justify-content: center; margin-top: 18px; }
.more-options { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.more-options > summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.more-options > summary::-webkit-details-marker { display: none; }
.more-options > summary::before { content: '+'; display: inline-block; width: 16px; color: var(--muted); }
.more-options[open] > summary::before { content: '\2013'; }
.more-options > summary .muted { font-weight: 400; font-size: 13px; }
.more-options > .form-grid { margin-top: 14px; }
/* the platform console's organisation tables: nine columns and three buttons on one laptop screen */
.admin-orgs td, .admin-orgs th { padding: 10px 8px; }
.admin-orgs .admin-owner { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.admin-orgs .inline-form { display: inline-block; margin: 2px 0; }
.admin-orgs td.nowrap { white-space: normal; max-width: 200px; }

/* ---- channels ---- */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 18px; }
.channel-card { margin-bottom: 0; }
.channel-head { display: flex; align-items: center; gap: 14px; }
.channel-flag { font-size: 34px; line-height: 1; }
.channel-title { flex: 1; min-width: 0; }
.channel-persona { color: #333; font-size: 14px; margin: 8px 0; }
.format-mix { display: grid; gap: 6px; margin: 10px 0; }
.mix-row { display: grid; grid-template-columns: 90px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.mix-label { color: var(--muted); text-transform: capitalize; }
.mix-val { text-align: right; font-weight: 700; }
.targets { margin: 8px 0; }
.edit-box { margin-top: 10px; }
.edit-box summary { list-style: none; display: inline-flex; }
.edit-box summary::-webkit-details-marker { display: none; }
.edit-box form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }

/* ---- connectors ---- */
.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.connector-card { margin-bottom: 0; display: flex; flex-direction: column; }
.connector-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.connector-what { color: #333; font-size: 14px; min-height: 3em; }
.connector-facts { margin: 6px 0 14px; display: grid; gap: 4px; font-size: 13px; }
.connector-facts > div { display: flex; gap: 10px; }
.connector-facts dt { color: var(--muted); min-width: 64px; font-weight: 700; }
.connector-facts dd { margin: 0; }
.connector-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.test-result { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: var(--grey-soft); border-left: 4px solid #999; }
.test-result.ok { background: var(--green-soft); border-left-color: var(--green); }
.test-result.fail { background: var(--red-soft); border-left-color: var(--red); }

/* ---- research / results ---- */
.prose p { margin: 0 0 8px; font-size: 14px; }
.prose-bullet { padding-left: 16px; position: relative; }
.prose-bullet::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.report-kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.report-kpi-num { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.report-kpi-delta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.report-kpi-delta.up { color: var(--green); } .report-kpi-delta.down { color: #b3261e; }
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table .report-title { min-width: 0; }
.report-recs { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-recs .report-list { padding-left: 20px; }
.report-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.report-win { color: var(--green); }
.report-lose { color: #b3261e; }
.report-list { margin: 0; padding-left: 18px; font-size: 14px; }
.report-list li { margin-bottom: 6px; }
.report-summary { margin-top: 12px; font-size: 13px; }
.kv { display: inline-block; margin-right: 10px; }
.kv-k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-right: 3px; }

/* ---- toast, modal ---- */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; background: var(--black); color: var(--white); padding: 14px 18px; border-radius: 8px; border-left: 4px solid var(--red); font-weight: 700; max-width: 420px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.ok { border-left-color: #2fbf6a; }
.toast.err { border-left-color: var(--red); background: #3a1512; }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.modal-body { position: relative; background: var(--black); border-radius: 12px; padding: 14px; max-height: 92vh; max-width: 92vw; }
.modal-content video { max-height: 84vh; width: auto; max-width: 86vw; border-radius: 8px; display: block; background: #000; }
.modal-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--red); color: var(--white); font-size: 22px; cursor: pointer; line-height: 1; }

/* ---- bare pages (errors) ---- */
body.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; max-width: 480px; }
.error-box .brand { color: var(--black); justify-content: center; margin-bottom: 20px; }
.error-box .brand-sub { color: var(--muted); border-left-color: var(--line); }
.error-box h1 { font-size: 56px; color: var(--red); }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .tiles, .tiles-5 { grid-template-columns: repeat(2, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .review-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; flex-direction: row; overflow-x: auto; padding: 0; margin-top: var(--topbar); }
  .nav-item { border-left: 0; border-bottom: 3px solid transparent; padding: 12px 14px; white-space: nowrap; }
  .nav-item.active { border-bottom-color: var(--red); }
  .nav-icon, .sidebar-foot { display: none; }
  .content { margin-left: 0; padding: 20px 16px 48px; }
  .form-grid, .setting-row { grid-template-columns: 1fr; }
  .review-card { flex-direction: column; }
  .review-video { width: 100%; max-width: 260px; }
  .brand-sub { display: none; }
  .topbar-right .pill:not(.pill-link) { display: none; }
  .topbar { padding: 0 14px; }
}

/* ---- edit track ---- */
.edit-track { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.edit-track summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.edit-track summary:hover { color: var(--text); }
.edit-track form { margin-top: 12px; }

.delta-up { color: var(--green); font-weight: 700; }
.card-actions { display: flex; gap: 8px; align-items: center; }

/* Settings > AI backgrounds */
.ai-form { display: flex; flex-direction: column; gap: 12px; }
.ai-form textarea { width: 100%; min-height: 120px; font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 13px; padding: 10px; border: 1px solid var(--line-2); border-radius: 8px; }
.ai-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ai-row label { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.ai-row select, .ai-row input { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; font: inherit; }

/* ---- v0.9: organisations, login, the Flock wizard ---- */
.banner-green { background: var(--green-soft); border-left-color: var(--green); }
.banner-blue { background: var(--blue-soft); border-left-color: var(--blue); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-user { display: inline-flex; align-items: center; gap: 10px; color: #ddd; font-size: 13px; padding-left: 10px; border-left: 1px solid #444; }
.topbar-user-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-topbar { background: transparent; color: #ddd; border-color: #555; padding: 5px 10px; font-size: 12px; }
.btn-topbar:hover { border-color: var(--white); color: var(--white); }
.btn-block { width: 100%; justify-content: center; margin-top: 6px; }
.auth-body { flex-direction: column; background: var(--bg, #f3f3f1); padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; align-items: stretch; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--black); font-weight: 700; text-decoration: none; }
.auth-brand:hover { text-decoration: none; }
.auth-sheep { width: 72px; height: 72px; }
.auth-tagline { font-weight: 400; color: var(--muted); font-size: 13px; }
.auth-card { margin: 0; padding: 28px; }
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.auth-foot { text-align: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 4px 0 8px; }
.country-pick { display: grid; grid-template-columns: 28px 1fr 72px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--white); }
.country-pick:focus-within { border-color: var(--black); }
.country-flag { font-size: 20px; }
.country-name { font-size: 14px; }
.country-pick input { width: 72px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; text-align: right; }
.persona-example { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.persona-example:last-of-type { border-bottom: 0; }

/* ---- v0.9 review fixes ---- */
.toast { overflow-wrap: anywhere; max-width: min(640px, calc(100vw - 32px)); }
.status-list dt + dd { margin-bottom: 8px; }
.status-list dt { margin-top: 10px; }
.status-list dd .inline-form { margin-left: 8px; vertical-align: middle; }
.status-list dd .btn, .status-list dd .inline-form .btn { font-family: var(--font); font-size: 14px; }
.status-list dd { word-break: normal; overflow-wrap: anywhere; }
.country-pick .country-name { line-height: 1.2; }
.country-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 820px) {
  .topbar-right { gap: 6px; }
  .topbar-user { padding-left: 6px; }
  .topbar-user-name { display: none; }
  .brand-name { font-size: 15px; letter-spacing: 0.12em; }
  .page-head-text h1 { font-size: 22px; }
  .onboarding-head, .card-head { flex-wrap: wrap; }
  .table-wrap { overflow-x: auto; }
}

/* ---- v0.10: the flock as sheep (engine/web/sheep.py) ---- */
.sheep { display: inline-block; vertical-align: middle; flex: none; }
.flock-filter { align-items: center; }
.flock-filter .chip { display: inline-flex; align-items: center; gap: 4px; }
.flock-count { margin-left: auto; }
.flock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 16px; }
.sheep-card { margin-bottom: 0; padding: 20px 14px 16px; text-align: center; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 3px; overflow: visible; transition: border-color .12s, transform .12s, box-shadow .12s; }
.sheep-card:hover { text-decoration: none; border-color: var(--black); transform: translateY(-2px); }
.sheep-card-avatar { position: relative; margin-bottom: 8px; line-height: 0; }
.sheep-card-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.sheep-card-sub { line-height: 1.3; }
.sheep-card-status { margin-top: 8px; }
.sheep-card-add { border-style: dashed; border-color: #c9c9c9; background: #fafafa; justify-content: center; }
.sheep-card-add:hover { border-color: var(--red); }
.sheep-card-add .sheep-card-avatar .sheep { opacity: .6; }
.sheep-card-add .sheep-card-name { color: var(--red-dark); font-size: 16px; }
.sheep-plus { position: absolute; right: -6px; bottom: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: var(--white); font-size: 24px; font-weight: 700; line-height: 32px; text-align: center; border: 2px solid var(--white); }
.ghost-row { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-bottom: 14px; line-height: 0; }

/* one sheep: the flock rail on the left, the sheep on the right */
.sheep-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 22px; align-items: start; }
.sheep-rail { padding: 10px; margin-bottom: 0; position: sticky; top: calc(var(--topbar) + 20px); max-height: calc(100vh - var(--topbar) - 44px); overflow-y: auto; overflow-x: hidden; }
.sheep-rail-head { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 6px 10px 10px; }
.sheep-rail-head .muted { font-weight: 400; margin-left: 4px; }
.sheep-rail-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); }
.sheep-rail-item:hover { background: #f4f4f4; text-decoration: none; }
.sheep-rail-item.is-selected { background: var(--black); color: var(--white); }
.sheep-rail-item.is-selected .sheep-rail-sub { color: #bbb; }
.sheep-rail-text { display: flex; flex-direction: column; min-width: 0; }
.sheep-rail-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheep-rail-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheep-rail-plus { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed #bbb; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.sheep-rail-add:hover .sheep-rail-plus { border-color: var(--red); color: var(--red); }
.sheep-panel > .card:last-child { margin-bottom: 0; }
.sheep-hero { display: flex; gap: 24px; align-items: center; }
.sheep-hero-avatar { flex: none; line-height: 0; }
.sheep-hero-text { min-width: 0; flex: 1; }
.sheep-hero-text h2 { font-size: 22px; }
.sheep-hero-status { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sheep-bio { margin: 10px 0 0; font-size: 14px; }
.sheep-facts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.wool-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 2px; }
.sheep-heading { display: inline-flex; align-items: center; gap: 10px; }

/* the flock at a glance (dashboard) and the small sheep in the wizard */
.flock-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flock-row a { display: inline-flex; border-radius: 50%; line-height: 0; transition: transform .12s; }
.flock-row a:hover { transform: translateY(-2px); }
.flock-more { font-size: 13px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.flock-glance-text { margin-top: 10px; font-size: 13px; color: var(--muted); }
.country-pick { grid-template-columns: 36px 1fr 72px; }
.country-pick .country-sheep { line-height: 0; }
.country-flag { font-size: 20px; }
.persona-example-head { display: flex; align-items: center; gap: 8px; }
.quote-flock { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 10px 0 4px; }
.quote-flock-sentence { font-weight: 700; margin: 8px 0 0; }
.order-sheep { display: inline-flex; flex-wrap: wrap; gap: 2px; align-items: center; vertical-align: middle; margin-right: 6px; }
@media (max-width: 1100px) {
  .sheep-layout { grid-template-columns: 1fr; }
  .sheep-rail { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .sheep-rail-head { width: 100%; }
  .sheep-rail-item { width: calc(50% - 4px); }
}
@media (max-width: 820px) {
  .sheep-rail-item { width: 100%; }
  .sheep-hero { flex-direction: column; align-items: flex-start; }
  .flock-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
/* ---- v0.10: add a track from a Spotify link, artwork ---- */
.cover { border-radius: 6px; object-fit: cover; background: var(--grey-soft); flex: none; display: inline-block; }
.cover-title { width: 44px; height: 44px; vertical-align: middle; margin-right: 12px; margin-top: -4px; }
.cover-row { width: 40px; height: 40px; margin-right: 10px; }
.track-cell { display: inline-flex; align-items: center; }
.spotify-box { padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.spotify-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spotify-row input[type=url] { flex: 1; min-width: 240px; }
.spotify-row .btn { flex: none; }
.spotify-result { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.spotify-result img { width: 72px; height: 72px; }
.field-help.is-error { color: var(--red-dark); font-weight: 700; }
textarea.is-prefilled { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }   /* lyrics that came from LRCLIB, until the label touches them */
.spotify-fill { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.audio-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.audio-form input[type=file] { padding: 6px 0; }
#no-audio-row { margin-top: 6px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
#no-audio-row input { margin-top: 2px; flex: none; }

/* ---- v0.10: the platform console (a platform admin in its own organisation) ---------------------------------- */
body.platform .topbar { background: linear-gradient(90deg, #1b1d3a 0%, #23264f 60%, #1b1d3a 100%); }
body.platform .topbar .brand-sub { color: #c9cbff; border-left-color: #4b4f8a; }
body.platform .sidebar { background: #16182e; }
body.platform .nav-item.active { background: #262a55; }
body.platform .nav-item.active { border-left-color: #8b8fff; }
body.platform .nav-item.active .nav-icon { color: #8b8fff; }
.nav-section { padding: 14px 18px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8ca8; }
.nav-section + .nav-item { border-top: 0; }
.platform-check { display: grid; gap: 8px; }
.platform-check li { display: flex; align-items: center; gap: 10px; list-style: none; padding: 8px 10px; border: 1px solid var(--border, #e6e6e6); border-radius: 10px; }
.platform-check li.is-done { opacity: 0.65; }
.platform-check .mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #eee; color: #333; flex: none; }
.platform-check li.is-done .mark { background: #d9f3e3; color: #1d7a45; }
.platform-check .what { flex: 1; }
.platform-check .why { display: block; font-size: 12px; color: #6e6e6e; }

/* ---- v0.10: the shepherd (engine/web/shepherd.py): the person behind the flock ------------------------------------ */
.shepherd { display: inline-block; vertical-align: middle; flex: none; }
.flock-scene { display: block; width: 100%; height: auto; max-width: 640px; margin: 2px 0 0; border-radius: 8px; overflow: hidden; }
.scene-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.scene-caption strong { color: var(--text); }
#empty-accounts .scene-caption { justify-content: center; margin-bottom: 2px; }
.auth-marks { display: inline-flex; align-items: flex-end; gap: 2px; }
.auth-shepherd { margin-bottom: 4px; }
.console-shepherd { margin-top: -4px; }
.sidebar-sheep svg.sidebar-shepherd { width: 20px; height: 20px; margin-right: -2px; }
.error-scene { margin: 2px auto 4px; line-height: 0; }

/* ---- v0.10: Continue with Google (engine/web/google_auth.py): a white button with the "G", above the password form */
.btn-google { background: var(--white); color: #1f1f1f; border-color: #dadce0; font-weight: 600; margin-top: 12px; }
.btn-google:hover { background: #f8f9fa; border-color: #9aa0a6; }
.btn-google .google-g { width: 18px; height: 18px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-form input[readonly] { background: var(--bg); color: var(--muted); cursor: default; }

.review-sound { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.review-sound.is-missing { color: var(--red-dark); }
.review-sound a { color: inherit; text-decoration: underline; }
