/* GENR8 Reviews – admin styles (same brand tokens as GENR8 Brochures) */
:root {
  --red: #cc0000;
  --red-dark: #a80000;
  --red-bg: #fdecec;
  --dark: #1a1a1a;
  --tab: #3c3c3b;
  --grey: #6f6f6e;
  --muted: #8e8e8d;
  --line: #e1e1e1;
  --bg: #f4f4f4;
  --white: #fff;
  --star: #f2a900;
  --star-empty: #d9d9d9;
  --ok: #1e7a3c;
  --ok-bg: #e6f4ea;
  --warn: #8a5a00;
  --warn-bg: #fff1d6;
  --bad: #b3261e;
  --bad-bg: #fdecec;
  --info: #1f5f9e;
  --info-bg: #e7f0fa;
  --chart: #3c3c3b;
  --chart-soft: #cfcfce;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--dark);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--red); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0 0 8px; line-height: 1.45; }
.muted { color: var(--grey); font-size: 12px; }
code { background: #eee; padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ---------- top bar ---------- */
.top { background: var(--dark); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; position: sticky; top: 0; z-index: 20; border-bottom: 4px solid var(--red); }
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 900; font-size: 22px; letter-spacing: .04em; }
.wordmark .eight { color: var(--red); }
.app { color: #bbb; margin-left: 6px; padding-left: 12px; border-left: 1px solid #444; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top select { background: #2b2b2b; color: #fff; border: 1px solid #555; border-radius: 4px; padding: 5px 8px; font: inherit; font-size: 13px; }
.user { color: #ddd; font-size: 13px; white-space: nowrap; }
.btn.ghost { background: transparent; color: #fff; border-color: #555; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.nav { background: #fff; border-right: 1px solid var(--line); padding: 16px 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: var(--dark); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.nav a:hover { background: #f4f4f4; }
.nav a.active { background: var(--red-bg); color: var(--red); }
.nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.nav .sep { border-top: 1px solid var(--line); margin: 12px 4px; }
.nav .foot { padding: 8px 12px; line-height: 1.8; }
.nav .foot a { display: inline; padding: 0; margin: 0; font-weight: 600; font-size: 12px; color: var(--red); background: none; }
.main { padding: 24px 28px 60px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--grey); margin-top: 4px; font-size: 13px; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; } .nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; } .nav .sep, .nav .foot { display: none; } .nav a { white-space: nowrap; } .main { padding: 16px; } }

/* ---------- controls ---------- */
.btn { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--dark); border-radius: 4px; padding: 7px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: #999; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--red); }
.btn.small { font-size: 12px; padding: 4px 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.file input { display: none; }
input, select, textarea { font: inherit; font-size: 13px; color: var(--dark); border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; background: #fff; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(204,0,0,.22); border-color: var(--red); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--red); }
label.field, div.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 12px; }
label.field input, label.field select, label.field textarea { font-weight: 400; text-transform: none; letter-spacing: 0; }
label.field .hint, div.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 10px; cursor: pointer; }
label.check input { margin-top: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .two, .three { grid-template-columns: 1fr; } }

/* ---------- cards & tiles ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.card + .card { margin-top: 16px; }
.grid-4 > .card, .grid-3 > .card, .grid-2 > .card { margin-top: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.tile .label { font-size: 12px; color: var(--grey); font-weight: 600; }
.tile .value { font-size: 30px; font-weight: 700; margin: 6px 0 2px; display: flex; align-items: baseline; gap: 8px; }
.tile .value small { font-size: 14px; color: var(--grey); font-weight: 600; }
.tile .foot { font-size: 12px; color: var(--grey); }
.tile a.foot { color: var(--red); text-decoration: none; font-weight: 600; }
.tile.alert { border-color: #f0c36d; background: #fffaf0; }

/* ---------- stars ---------- */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars svg { width: 15px; height: 15px; }
.stars.lg svg { width: 20px; height: 20px; }
.star-on { fill: var(--star); }
.star-off { fill: var(--star-empty); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.pill.pending, .pill.scheduled, .pill.warning { background: var(--warn-bg); color: var(--warn); }
.pill.published, .pill.reviewed, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.rejected, .pill.expired, .pill.error { background: var(--bad-bg); color: var(--bad); }
.pill.sent, .pill.opened, .pill.clicked, .pill.reminded { background: var(--info-bg); color: var(--info); }
.pill.neutral { background: #eee; color: #555; }
.verified { color: var(--ok); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.verified svg { width: 13px; height: 13px; fill: currentColor; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; cursor: pointer; color: var(--grey); margin-bottom: -2px; display: inline-flex; gap: 6px; align-items: center; }
.tab.active { color: var(--dark); border-bottom-color: var(--red); }
.tab .count { background: #eee; color: #555; border-radius: 9px; font-size: 11px; padding: 0 7px; }
.tab.active .count { background: var(--red); color: #fff; }

/* ---------- tables ---------- */
table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.grid th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--grey); padding: 9px 10px; border-bottom: 1px solid var(--line); background: #fafafa; white-space: nowrap; }
.grid td { padding: 9px 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.grid tr.click { cursor: pointer; }
.grid tr.click:hover td { background: #fafafa; }
.grid td.num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid td.actions { text-align: right; white-space: nowrap; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.thumb { width: 40px; height: 40px; object-fit: contain; background: #fff; border: 1px solid #eee; border-radius: 4px; }

/* ---------- review cards ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 340px; }
.toolbar select { width: auto; }
.bulk { background: var(--dark); color: #fff; border-radius: 8px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.bulk .btn { background: #fff; }
.review { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; grid-template-columns: 24px 64px minmax(0, 1fr) auto; gap: 14px; margin-bottom: 10px; }
.review.is-pending { border-left: 4px solid #f0b43c; }
.review.is-rejected { opacity: .8; }
.review .pimg { width: 64px; height: 64px; object-fit: contain; border: 1px solid #eee; border-radius: 6px; background: #fff; }
.review .pname { font-size: 12px; color: var(--grey); margin-bottom: 6px; }
.review .pname b { color: var(--dark); }
.review .rtitle { font-weight: 700; font-size: 15px; margin: 4px 0; }
.review .rbody { line-height: 1.5; margin-bottom: 8px; white-space: pre-wrap; }
.review .meta { font-size: 12px; color: var(--grey); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.review .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 150px; }
.review .side .row { justify-content: flex-end; }
.review .reply { background: #f7f7f7; border-left: 3px solid var(--tab); padding: 8px 12px; margin-top: 10px; font-size: 13px; border-radius: 0 4px 4px 0; }
.review .reply b { font-size: 12px; }
.flag { background: var(--warn-bg); color: var(--warn); font-size: 12px; border-radius: 4px; padding: 4px 8px; margin-bottom: 8px; display: inline-block; }
.flag.bad { background: var(--bad-bg); color: var(--bad); }
.pager { display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 14px; }
.empty { background: #fff; border: 1px dashed #ccc; border-radius: 8px; padding: 40px; text-align: center; color: var(--grey); }
@media (max-width: 800px) { .review { grid-template-columns: 24px minmax(0, 1fr); } .review .pimg { display: none; } .review .side { grid-column: 2; align-items: flex-start; } }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--grey); }
.chart .gridline { stroke: #ececec; stroke-width: 1; }
.chart .baseline { stroke: #cfcfcf; stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--dark); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; }
.tip b { font-weight: 700; }
.dist-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 70px; align-items: center; gap: 10px; margin: 7px 0; font-size: 13px; cursor: default; }
.dist-row .bar { height: 10px; background: #efefef; border-radius: 5px; overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; background: var(--star); border-radius: 5px; min-width: 2px; }
.dist-row .n { text-align: right; color: var(--grey); font-variant-numeric: tabular-nums; }
.dist-row:hover .bar i { background: #d99700; }
.funnel-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 110px; gap: 10px; align-items: center; margin: 9px 0; font-size: 13px; }
.funnel-row .bar { height: 22px; background: #f2f2f2; border-radius: 4px; overflow: hidden; }
.funnel-row .bar i { display: block; height: 100%; background: var(--chart); border-radius: 4px; }
.funnel-row .n { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-row .n small { color: var(--grey); display: block; font-size: 11px; }
.big-rating { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.big-rating .v { font-size: 40px; font-weight: 700; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: 10px; padding: 22px; width: min(560px, 96vw); max-height: 90vh; overflow: auto; }
.modal-box h2 { font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.note { background: #f7f7f7; border-radius: 6px; padding: 10px 12px; font-size: 12px; color: #444; line-height: 1.45; margin: 8px 0 12px; }
.note.legal { background: var(--info-bg); color: #1b3d63; }

/* ---------- star input ---------- */
.star-input { display: inline-flex; gap: 4px; }
.star-input button { background: none; border: 0; padding: 0; cursor: pointer; }
.star-input svg { width: 28px; height: 28px; }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings .snav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.settings .snav a { padding: 7px 10px; border-radius: 5px; color: var(--dark); text-decoration: none; font-size: 13px; }
.settings .snav a:hover { background: #fff; }
.settings section { scroll-margin-top: 80px; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.code { background: #1e1e1e; color: #e6e6e6; border-radius: 6px; padding: 12px 14px; font: 12px/1.5 Consolas, Menlo, monospace; white-space: pre; overflow-x: auto; }
.save-bar { position: sticky; bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.08); padding: 12px 18px; margin-top: 16px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
@media (max-width: 900px) { .settings { grid-template-columns: 1fr; } .settings .snav { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ---------- upload ---------- */
.drop { border: 2px dashed #cfcfcf; border-radius: 8px; padding: 26px; text-align: center; color: var(--grey); background: #fafafa; }
.drop.over { border-color: var(--red); background: var(--red-bg); }
.preview-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; margin: 12px 0; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 60; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.error { background: var(--red); }
.loading { color: var(--grey); padding: 40px; text-align: center; }

/* ======================= Hub additions ======================= */
.top a.btn.ghost { color: #fff; }
.menu { position: relative; }
.menu-btn { background: transparent; border: 1px solid #555; color: #fff; border-radius: 4px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.menu-btn .av { width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--dark); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 230px; padding: 6px; z-index: 30; }
.menu-list .who { padding: 8px 10px 10px; border-bottom: 1px solid #eee; margin-bottom: 4px; font-size: 13px; }
.menu-list .who .muted { display: block; margin-top: 2px; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 5px; color: var(--dark); text-decoration: none; background: none; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: #f4f4f4; }

/* login */
.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 8px; padding: 28px; width: min(420px, 100%); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lead { color: var(--grey); margin-bottom: 20px; font-size: 13px; }
.auth-card .btn.primary { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.form-error { background: var(--bad-bg); color: var(--bad); border-radius: 4px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.demo { margin-top: 22px; border-top: 1px solid #eee; padding-top: 14px; }
.demo .who { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; background: #fafafa; border: 1px solid #eee; border-radius: 6px; padding: 8px 10px; margin-top: 6px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.demo .who:hover { border-color: #ccc; }

/* home */
.home { max-width: 1120px; margin: 0 auto; padding: 36px 24px 60px; }
.hello h1 { font-size: 28px; }
.hello p { color: var(--grey); margin-top: 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin: 26px 0 36px; }
.ptile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s, border-color .15s; }
.ptile:hover { border-color: #cfcfcf; box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.ptile .head { display: flex; gap: 14px; align-items: center; }
.picon { width: 48px; height: 48px; border-radius: 10px; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.picon svg { width: 26px; height: 26px; }
.picon.dim { background: #d9d9d9; }
.ptile h2 { font-size: 18px; margin: 0; }
.ptile .desc { color: #444; font-size: 13px; line-height: 1.5; flex: 1 1 auto; }
.ptile .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 600; border-radius: 10px; padding: 3px 9px; background: #f1f1f1; color: #444; }
.chip.role { background: var(--dark); color: #fff; }
.chip.feat { background: var(--ok-bg); color: var(--ok); }
.chip.beta { background: var(--info-bg); color: var(--info); }
.chip.soon { background: #eee; color: #777; }
.ptile .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; min-width: 0; }
.ptile .foot > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptile .foot .btn { flex: 0 0 auto; }
.ptile .open { padding: 10px 16px; font-size: 14px; }
.ptile.other { background: #fafafa; }
.ptile.other h2 { color: #555; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--grey); margin: 0 0 4px; }
.none-yet { background: #fff; border: 1px dashed #ccc; border-radius: 12px; padding: 30px; text-align: center; color: var(--grey); margin: 26px 0; }

/* admin */
.access { display: flex; gap: 5px; flex-wrap: wrap; }
.access .chip b { font-weight: 800; }
.pl-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.pl-row.off { background: #fafafa; }
.pl-row .row { justify-content: space-between; }
.pl-row .feats { margin: 10px 0 0 28px; }
.pl-row select { width: auto; min-width: 200px; }
.pl-row .muted { margin-top: 2px; }
.temp-password { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.temp-password code { font-size: 20px; padding: 8px 12px; letter-spacing: .08em; user-select: all; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 14px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.pcard dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 10px; margin: 10px 0 0; font-size: 13px; }
.pcard dt { color: var(--grey); }
.pcard dd { margin: 0; }
