:root {
  --bg: #f6f5f2; --card: #ffffff; --border: #e5e3de; --border-2: #d5d2cb;
  --text: #1c1c1a; --text-2: #6b6963; --text-3: #9b9891;
  --accent: #185FA5; --accent-bg: #e9f1fa;
  --green: #2e7d32; --green-bg: #eaf3ea;
  --amber: #9a6a10; --amber-bg: #faf0da;
  --red: #b03a3a; --red-bg: #fdf1f1;
  --radius: 10px;
}
.action-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:14px; clear:both; }
.action-row > .btn { display:inline-flex; align-items:center; white-space:normal; line-height:1.4; }
.card p { overflow-wrap:anywhere; }
* { box-sizing: border-box; margin: 0; }
body { font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 20px; font-weight: 600; } h2 { font-size: 16px; font-weight: 600; } h3 { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.app { display: flex; min-height: 100vh; }
.mobile-menu { display:none; }
.sidebar { width: 220px; background: #1d2733; color: #cfd6de; padding: 18px 12px; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; font-weight: 600; font-size: 15px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; flex-shrink: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #cfd6de; font-size: 13.5px; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,0.07); }
.nav a.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.sidebar .foot { margin-top: auto; padding: 10px 12px; font-size: 12px; color: #8b95a1; }
.main { flex: 1; min-width: 0; padding: 24px 28px; max-width: 1060px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.topbar .row { flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; overflow-x: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.stat .value { font-size: 24px; font-weight: 600; }
.stat .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; font-size: 11.5px; padding: 2px 10px; border-radius: 10px; white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.gray { background: #efedea; color: var(--text-2); }
.badge.blue { background: var(--accent-bg); color: var(--accent); }
button, .btn { font-family: inherit; font-size: 13.5px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-2); background: #fff; color: var(--text); cursor: pointer; }
button:hover { background: #f4f2ee; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:hover { background: #134d87; }
button.success { color: var(--green); border-color: #bcd8bd; }
button.danger { color: var(--red); border-color: #ecc9c9; }
button.small { font-size: 12px; padding: 4px 10px; }
input, select, textarea { font-family: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24,95,165,0.12); }
label.field { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.review-group-heading { margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--accent); font-size: 17px; font-weight: 600; }
.event-dates-hint { margin: 10px 0 12px; }
.section { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: #fff; }
.section-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; }
.section-head:hover { background: #faf9f6; }
.section-head .title { flex: 1; font-weight: 500; }
.section-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.exrow { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; }
.exrow input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.exrow .code { color: var(--text-3); font-size: 12px; }
.exrow .sub { font-size: 12px; color: var(--text-3); }
.notewrap { position: relative; margin-top: 8px; }
.notewrap textarea { min-height: 54px; padding-right: 42px; font-size: 13px; }
.micbtn { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.micbtn.rec { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.pra { border: 1px solid #e5b9b9; background: var(--red-bg); border-radius: var(--radius); padding: 13px 16px; margin: 14px 0; }
.pra label { color: var(--red); font-weight: 600; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.pra p { font-size: 12px; color: #8a2f2f; margin: 6px 0 0 26px; }
/* Priority review alert — same card as the other sections, kept pink all around */
.section.pra-box { border-color: #e5b9b9; background: var(--red-bg); margin: 14px 0; }
.pra-box .section-head { cursor: pointer; }
.pra-box .section-head:hover { background: rgba(176,58,58,0.05); }
.pra-box .pra-check { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.pra-box .title { color: var(--red); font-weight: 600; flex: none; }
.pra-box .section-body { border-top: 1px solid #e5b9b9; }
.pra-hint { font-size: 12px; color: #8a2f2f; margin: 0 0 12px 42px; }
/* ---- Review screenshots: attach zone, thumbnails, lightbox ---- */
.attach { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 2px; }
.attach.dragover { outline: 2px dashed var(--accent); outline-offset: 3px; border-radius: 8px; }
.attach-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-add { border-style: dashed; }
.attach-hint { font-size: 11px; }
.thumb { position: relative; width: 100px; height: 100px; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; cursor: pointer; background: #f0eee9; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rm { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 14px; line-height: 1; padding: 0; cursor: pointer; }
.thumb .rm:hover { background: rgba(0,0,0,0.78); }
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.82); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 24px; cursor: zoom-out; }
#lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 6px; box-shadow: 0 12px 44px rgba(0,0,0,0.55); }
#lightbox .lb-close { position: fixed; top: 14px; right: 22px; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 34px; width: 360px; }
.error { background: var(--red-bg); color: var(--red); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin: 10px 0; }
.ok { background: var(--green-bg); color: var(--green); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin: 10px 0; }
.muted { color: var(--text-3); font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chartbox { position: relative; height: 240px; }
.trend-up { color: var(--green); } .trend-down { color: var(--amber); } .trend-flat { color: var(--text-3); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
/* Coaching: one focused report at a time, with an always-visible return path. */
.report-navigation { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
#cr-heading { scroll-margin-top: 16px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.report-return { display: flex; flex-wrap: wrap; gap: 8px; }
.report-tabs [aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.report-tabs button:focus-visible, .report-link:focus-visible { outline: 3px solid #7ba7cf; outline-offset: 2px; }
.report-link { border: 0; border-radius: 3px; padding: 0; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.report-link:hover { background: transparent; color: #134d87; }
.report-hint { margin: 8px 0 12px; line-height: 1.5; }
.report-identity { flex-wrap: wrap; }
.report-team-samples { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.report-sample { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.report-color { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.report-team-data { margin-top: 12px; }
.report-team-data summary { color: var(--accent); cursor: pointer; margin-bottom: 8px; }
.report-detail-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.report-list-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
.report-list-controls .field { flex: 1 1 180px; min-width: 0; max-width: 280px; margin: 0; }
.report-list-controls input, .report-list-controls select { margin-top: 4px; }
.report-table-wrap { width: 100%; overflow-x: auto; }
.report-table-wrap td:first-child { overflow-wrap: anywhere; }
.report-table-wrap button { white-space: nowrap; }
.report-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.report-pagination[hidden] { display: none; }
.report-export-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#gr-tools { margin-bottom: 14px; }
#gr-panel:empty { display: none; }
#gr-shop-list input[type="checkbox"] { width: 18px; height: 18px; }
#gr-shop-list td { overflow-wrap: anywhere; }
.report-filter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.report-filter-grid label { min-width: 0; }
.report-filter-grid input, .report-filter-grid select { width: 100%; margin-top: 4px; }
.report-disclosure { margin: 12px 0; }
.report-disclosure > summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.report-disclosure > div { padding-top: 12px; }
.report-coverage-context { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-bg); border-radius: 6px; margin-bottom: 16px; overflow-wrap: anywhere; }
.report-search-hint { margin: 8px 0; }
.report-team-scroll { max-height: 520px; overflow-y: auto; }
.report-return a { white-space: normal; }
#dash-store-detail:empty, #mc-detail:empty { display: none; }
/* A compact store summary first; only one pending-review list is expanded at a time. */
.pending-controls .field { max-width: 420px; }
.pending-controls select { margin-top: 4px; }
.pending-controls > button { margin-top: 8px; }
.pending-controls .report-hint { margin-bottom: 0; }
.pending-store { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.pending-store-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 16px; cursor: pointer; }
.pending-store-heading:hover { background: var(--accent-bg); border-radius: var(--radius); }
.pending-store-heading input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.pending-store-name { flex: 1 1 230px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pending-store-stat { color: var(--text-2); font-size: 12px; }
.pending-store-stat strong { color: var(--text); font-size: 14px; }
.pending-store-action { color: var(--accent); font-size: 12px; }
.pending-store-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.pending-store-body[hidden] { display: none; }
.pending-store-body table td { overflow-wrap: anywhere; }
#review-detail:empty { display: none; }
#pq-heading { scroll-margin-top: 16px; }
.brief-summary { border-left: 3px solid var(--accent); }
.brief-stat { text-align: left; display: flex; flex-direction: column; gap: 4px; }
.brief-stat:hover { background: var(--accent-bg); }
.brief-kpis .sub { line-height: 1.45; color: var(--text-2); }
.brief-estimators { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
.brief-estimator { padding: 14px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; overflow-wrap: anywhere; }
.brief-estimator-metrics { display: grid; gap: 8px; margin-bottom: 12px; }
.brief-estimator-metrics dt { color: var(--text-2); font-size: 12px; }
.brief-estimator-metrics dd { font-weight: 600; margin-top: 2px; }
.brief-list { margin: 10px 0; }
.brief-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.brief-row > div { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.brief-row p { margin-top: 4px; line-height: 1.45; }
.brief-row:last-child { border-bottom: none; }
.brief-pattern { display: grid; grid-template-columns: minmax(110px,1fr) 2fr minmax(110px,1fr); gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; }
.brief-bar { background: #f1f3f4; height: 12px; border-radius: 3px; }
.brief-bar > span { display: block; background: #7ba7cf; height: 100%; border-radius: 3px; }
.brief-priority { color: var(--red); margin-top: 8px; }
.brief-trend svg { display: block; width: 100%; max-width: 500px; height: auto; }
.report-tabs [aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.brief-table-disclosure { margin-top: 16px; }
@media (max-width:600px) { .brief-pattern { grid-template-columns: 1fr 1fr; } .brief-pattern > span:last-child { grid-column:1 / -1; } .brief-estimators { grid-template-columns:1fr; } }
@media (max-width: 600px) { #cr-body .grid.c2 { grid-template-columns: 1fr; } .report-tabs { width: 100%; } .report-tabs button { flex: 1; padding: 8px; } }
/* Reflow without hiding access to navigation or clipping wide report tables. */
.grid > *, .row > *, .spread > * { min-width:0; }
.login-card { max-width:calc(100vw - 28px); }
img { max-width:100%; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
@media (max-width: 800px) {
  .app { display:block; }
  .sidebar { display:none; }
  .main { padding:14px; width:100%; }
  .mobile-menu { display:block; background:#1d2733; color:#fff; padding:12px 16px; }
  .mobile-menu summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:16px; font-weight:600; }
  .mobile-menu summary span { margin-left:auto; font-size:13px; overflow-wrap:anywhere; }
  .mobile-menu nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding-top:10px; }
  .mobile-menu nav a { color:#fff; padding:12px; min-height:44px; border-radius:6px; overflow-wrap:anywhere; }
  .mobile-menu nav a.active { background:#ffffff20; }
  .report-navigation { position:static; }
  .row, .spread { flex-wrap:wrap; }
  .pra-box .title { flex:1; min-width:0; }
  input, select, textarea, .notewrap textarea { font-size:16px; }
  button, button.small, .btn, select { min-height:44px; }
  .micbtn { width:44px; height:44px; }
  .notewrap textarea { min-height:88px; padding-right:60px; }
  .section-head, .exrow { min-height:44px; }
  .login-wrap { padding:14px 0; }
}
@media (max-width: 600px) {
  .grid.c2, .grid.c4 { grid-template-columns:minmax(0,1fr); }
  .card { padding:16px 12px; }
  .report-filter-grid { grid-template-columns:minmax(0,1fr); }
  .section-head .title, .exrow > span { overflow-wrap:anywhere; }
  .card.spread > .row { width:100%; justify-content:flex-end; }
  .pending-store-name { flex-basis:180px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
/* ---- Glossary: inline info icon + click-to-open popover ---- */
.gloss-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; padding: 0; margin-left: 4px; border-radius: 50%; border: 1px solid var(--border-2); background: #fff; color: var(--text-3); font-size: 10px; font-style: italic; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; }
.gloss-i:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
th .gloss-i { width: 14px; height: 14px; }
#gloss-pop { position: absolute; z-index: 1000; width: 300px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--border-2); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.15); padding: 12px 14px; display: none; }
#gloss-pop .gp-term { font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: var(--text); }
#gloss-pop .gp-def { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
#gloss-pop .gp-more { display: inline-block; margin-top: 8px; font-size: 12px; }


/* ---- Account block at the bottom of the sidebar (name, role, sign out) ---- */
.sidebar .foot { margin-top: auto; padding: 12px 10px 10px; font-size: 12px; color: #8b95a1; border-top: 1px solid rgba(255,255,255,0.10); }
.sidebar .who { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sidebar .who-mark { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.sidebar .who-name { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.25; }
.sidebar .who-role { color: #8b95a1; font-size: 11.5px; text-transform: capitalize; }
.sidebar .signout { display: block; text-align: center; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.28); border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; }
.sidebar .signout:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); }
.sidebar .foot-link { display: block; text-align: center; margin-top: 8px; color: #8b95a1; font-size: 12px; }
.sidebar .foot-link:hover { color: #cfd6de; }
.sidebar .powered { margin-top: 10px; text-align: center; color: #6f7885; font-size: 11px; }
