/* Poder Visual Merchandising web panel. Palette and shapes follow the Poder app:
   navy frame, light content area, white 16px cards with soft shadows, lavender chips, Poder blue. */
:root {
  --navy: #161B4E;
  --navy-2: #222868;
  --blue: #3933FF;
  --blue-hover: #2B25E0;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #161B4E;
  --muted: #8F92A1;
  --muted-2: #5E6385;
  --line: #ECEDF3;
  --chip: #EBEAFF;
  --on-navy: #B9BCD6;
  --good: #17A673;  --good-soft: #E3F6EE;
  --warn: #D98A12;  --warn-soft: #FDF1DC;
  --bad: #D93F45;   --bad-soft: #FCE6E7;
  /* Mavi bands, red to green */
  --b0: #D93F45; --b1: #E4693A; --b2: #D98A12; --b3: #A99A1C; --b4: #4BAF7A; --b5: #17A673;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 50px rgba(22, 27, 78, 0.18);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--navy); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
[hidden] { display: none !important; }

/* ---- Shell ---- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side .logo { height: 30px; margin: 4px 10px 0; align-self: flex-start; }
.ws { margin: 0 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.07); display: flex; gap: 10px; align-items: center; color: #fff; }
.ws .chip-ic { background: var(--blue); color: #fff; }
.ws small { display: block; color: var(--on-navy); font-size: 11px; }
.ws b { font-size: 13px; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--on-navy); font-weight: 500; }
.nav a i, .nav a svg { width: 18px; text-align: center; font-size: 15px; }
.nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav a.on { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(57,51,255,0.35); }
.nav a .badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #FF5A5F; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.inbox-note { color: inherit; gap: 12px; border-left: 4px solid var(--blue); }
.inbox-note:hover { background: #FAFAFE; }
.side .grow { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,0.07); color: #fff; }
.me .tx { flex: 1; min-width: 0; }
.me b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--on-navy); font-size: 11px; }
.me button { background: none; border: 0; color: var(--on-navy); cursor: pointer; padding: 6px; border-radius: 8px; }
.me button:hover { color: #fff; background: rgba(255,255,255,0.08); }
.lang { display: flex; gap: 4px; margin: 0 6px; }
.lang button { flex: 1; border: 1px solid rgba(255,255,255,0.15); background: none; color: var(--on-navy); border-radius: 8px; padding: 4px 0; font-size: 12px; cursor: pointer; }
.lang button.on { background: #fff; color: var(--navy); border-color: #fff; font-weight: 600; }

.main { display: flex; flex-direction: column; min-width: 0; }
.band { padding: 26px 32px 64px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.band small { color: var(--on-navy); font-size: 12.5px; display: block; margin-bottom: 4px; }
.band h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.band .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.content { flex: 1; background: var(--bg); border-radius: 28px 0 0 0; padding: 0 32px 48px; }
.content > .lift { margin-top: -40px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---- Cards and building blocks ---- */
.card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.card.pad { padding: 18px 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-h h2 { font-size: 15px; font-weight: 600; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.kpi .top { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 12.5px; font-weight: 500; }
.kpi .val { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--muted); }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--good); } .delta.dn { color: var(--bad); }
.chip-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--chip); color: var(--blue); display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.chip-ic.good { background: var(--good-soft); color: var(--good); }
.chip-ic.warn { background: var(--warn-soft); color: var(--warn); }
.chip-ic.bad { background: var(--bad-soft); color: var(--bad); }
.bar { height: 6px; background: #ECEDF3; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 13px; cursor: pointer; background: var(--blue); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--blue-hover); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn.ghost:hover { background: #F6F6FF; }
.btn.light { background: rgba(255,255,255,0.12); color: #fff; }
.btn.light:hover { background: rgba(255,255,255,0.2); }
.btn.quiet { background: #F0F1F5; color: var(--ink); }
.btn.quiet:hover { background: #E6E7EE; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: #F9D5D7; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

/* Status and score pills */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st.good { background: var(--good-soft); color: var(--good); }
.st.busy { background: var(--chip); color: var(--blue); }
.st.warn { background: var(--warn-soft); color: var(--warn); }
.st.bad { background: var(--bad-soft); color: var(--bad); }
.st.todo { background: #F0F1F5; color: var(--muted-2); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: #F0F1F5; color: var(--ink); margin: 1px 0; white-space: nowrap; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: 20px; font-variant-numeric: tabular-nums; color: #fff; }
.b0 { --c: var(--b0); } .b1 { --c: var(--b1); } .b2 { --c: var(--b2); } .b3 { --c: var(--b3); } .b4 { --c: var(--b4); } .b5 { --c: var(--b5); }
.score[class*=" b"] { background: var(--c); }
.score.none { background: #F0F1F5; color: var(--muted); font-weight: 600; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.input, select.input, textarea.input { border: 1.5px solid #E1E3EE; border-radius: 10px; padding: 9px 12px; background: #fff; outline: none; min-width: 0; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--chip); }
textarea.input { resize: vertical; min-height: 80px; }
.band .input { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); color: #fff; }
.band select.input option { color: var(--ink); }
.search { position: relative; }
.search i, .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.search .input { padding-left: 32px; }
.seg { display: inline-flex; background: #F0F1F5; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.drop { display: block; border: 1.5px dashed #C9CBDB; border-radius: 12px; padding: 18px; text-align: center; color: var(--muted-2); cursor: pointer; background: #FAFAFD; }
.drop:hover { border-color: var(--blue); color: var(--blue); }
.drop img { max-height: 160px; max-width: 100%; border-radius: 8px; display: block; margin: 0 auto 8px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 12px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
td { padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: #FAFAFE; }
td .bar { width: 110px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Photo grid */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ph { overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column; }
.ph:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22,27,78,0.10); }
.ph .img { position: relative; aspect-ratio: 4 / 3; background: #E9E4DC; overflow: hidden; }
.ph .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .img .tl { position: absolute; left: 8px; top: 8px; }
.ph .img .tr { position: absolute; right: 8px; top: 8px; }
.ph .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.ph .meta b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph .meta small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk { background: rgba(22,27,78,0.78); color: #fff; font-size: 10.5px; border-radius: 6px; padding: 2px 6px; }

/* Photo detail */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pair .frame { border-radius: 12px; overflow: hidden; background: #E9E4DC; aspect-ratio: 4 / 3; cursor: zoom-in; }
.pair .frame img { width: 100%; height: 100%; object-fit: contain; display: block; background: #1B1F45; }
.pair figcaption { font-size: 12px; color: var(--muted-2); font-weight: 500; }
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ringbox { display: flex; gap: 16px; align-items: center; padding: 18px 20px; }
.ring { position: relative; width: 96px; height: 96px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .v b { font-size: 24px; font-weight: 700; display: block; line-height: 1; }
.ring .v small { font-size: 10.5px; color: var(--muted); }
.crit { padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 4px; }
.crit h3 { font-size: 12px; font-weight: 600; color: var(--muted-2); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.crit .ln { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 4px 12px; align-items: center; padding: 5px 0; }
.crit .ln .lbl { font-size: 13px; }
.crit .ln .lbl small { color: var(--muted); display: block; font-size: 11.5px; }
.crit .ln .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.crit .ln .bar { grid-column: 1 / -1; height: 5px; }
.crit .ln .bar > i { background: var(--c, var(--blue)); }
.crit .ln input.input { width: 76px; padding: 5px 8px; text-align: right; }
.crit .ln.edit { grid-template-columns: minmax(0, 1fr) auto; }
.tips { margin: 0; padding: 0 20px 16px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tips li { display: flex; gap: 10px; font-size: 13px; }
.tips .chip-ic { width: 26px; height: 26px; font-size: 11px; }
.hist { list-style: none; margin: 0; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 0; }
.hist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.hist li:last-child { border-bottom: 0; }

/* Collections */
.colls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.coll { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.coll .cover { height: 150px; background: #E9E4DC center / cover no-repeat; }
.coll .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.coll .info b { font-size: 15px; }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ref { overflow: hidden; display: flex; flex-direction: column; }
.ref .img { aspect-ratio: 16 / 10; background: #E9E4DC center / cover no-repeat; cursor: zoom-in; }
.ref .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }

/* Band strip (rubric) */
.bands { display: flex; border-radius: 10px; overflow: hidden; height: 34px; }
.bands div { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; background: var(--c); }
.dist { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #F0F1F5; }
.dist i { display: block; height: 100%; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* Modal, lightbox, toast */
.overlay { position: fixed; inset: 0; background: rgba(10,12,34,0.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.modal.wide { width: min(760px, 100%); }
.modal header { padding: 20px 22px 6px; display: flex; justify-content: space-between; align-items: center; }
.modal header h2 { font-size: 17px; }
.modal header button { background: #F0F1F5; border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted-2); }
.modal .body { padding: 12px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal footer { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.lightbox { position: fixed; inset: 0; background: rgba(5,6,20,0.92); z-index: 60; display: grid; place-items: center; cursor: zoom-out; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 70; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.toast.bad { background: var(--bad); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .chip-ic { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--chip); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: min(460px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login .logo-wrap { background: var(--navy); border-radius: 14px; padding: 18px; display: grid; place-items: center; }
.login .logo-wrap img { height: 34px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }

@media (max-width: 1100px) { .detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 14px 16px; gap: 12px; }
  .side .grow, .ws { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { padding: 8px 10px; }
  .band { padding: 18px 16px 56px; }
  .content { padding: 0 16px 32px; border-radius: 22px 22px 0 0; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}

/* Overview: branches-by-band donut */
.pie-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pie { width: 180px; height: 180px; flex: none; }
.pie circle[data-band] { cursor: pointer; transition: opacity .15s; }
.pie-n { font-size: 30px; font-weight: 800; fill: var(--ink); }
.pie-l { font-size: 12px; fill: var(--muted-2); }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 260px; max-width: 560px; display: flex; flex-direction: column; }
.pie-legend li { display: grid; grid-template-columns: 12px 64px minmax(0, 1fr) 40px 44px; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: opacity .15s; font-variant-numeric: tabular-nums; }
.pie-legend li:hover { background: #F5F6F8; }
.pie-legend li i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.pie-legend .rng { font-weight: 700; }
.pie-legend .lbl { color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-legend b, .pie-legend .pct { text-align: right; }
.pie-legend .pct { color: var(--muted-2); }
.pie-wrap .dim { opacity: .3; }
@media (prefers-reduced-motion: reduce) { .pie circle[data-band], .pie-legend li { transition: none; } }

/* Login form */
.login .pw { position: relative; display: block; }
.login .pw .input { width: 100%; padding-right: 44px; }
.login .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted-2); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.login .link { border: 0; background: none; padding: 0; color: var(--navy); font: inherit; cursor: pointer; text-decoration: underline; }
.login .link:disabled { color: var(--muted-2); text-decoration: none; cursor: default; }
.login .input[readonly] { background: #F7F7FB; color: var(--muted-2); }
.login .pw-eye:hover { background: var(--chip); color: var(--blue); }
.login form .btn { justify-content: center; height: 44px; }

/* Week fallback notice */
.notice { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--chip); color: var(--ink); font-size: 13px; }
.notice i { color: var(--blue); }

/* Scorer view: what the AI receives for a reference */
.sc-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.sc-facts small { display: block; font-size: 11.5px; color: var(--muted-2); }
.sc-facts b { font-size: 13.5px; }
.sc-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; font-size: 13px; background: var(--chip); }
.sc-note i { margin-top: 2px; color: var(--blue); }
.sc-note.warn { background: #FDF1DC; } .sc-note.warn i { color: #D98A12; }
.sc-note.error { background: #FCE6E7; } .sc-note.error i { color: #D93F45; }
.sc-refnotes { margin-top: 12px; font-size: 13px; }
.sc-refnotes div { margin-top: 4px; color: var(--muted-2); }
.sc-sections { display: flex; flex-direction: column; }
.sc-sec { border-top: 1px solid var(--line); }
.sc-sec summary { display: flex; align-items: center; gap: 10px; padding: 12px 20px; cursor: pointer; list-style: none; }
.sc-sec summary::-webkit-details-marker { display: none; }
.sc-sec summary .n { width: 24px; height: 24px; border-radius: 50%; background: var(--chip); color: var(--blue); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.sc-sec summary b { font-size: 13.5px; }
.sc-sec summary .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
.sc-sec[open] summary { background: #F7F7FB; }
.sc-body { padding: 4px 20px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.sc-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--ink); background: #F7F7FB; border-radius: 10px; padding: 10px 12px; }
.sc-img { margin: 0; width: min(320px, 100%); cursor: zoom-in; }
.sc-img img { width: 100%; border-radius: 10px; display: block; border: 1px solid var(--line); }
.sc-img figcaption { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.sc-pdf { display: inline-flex; gap: 8px; align-items: center; width: fit-content; padding: 8px 12px; border-radius: 10px; background: var(--chip); color: var(--blue); font-weight: 600; font-size: 13px; text-decoration: none; }
.sc-store { display: flex; gap: 10px; align-items: center; padding: 18px; border: 1.5px dashed #C9CBDB; border-radius: 10px; color: var(--muted-2); font-size: 13px; }
@media (max-width: 700px) { .sc-body { padding-left: 20px; } .sc-sec summary .muted { display: none; } }
.sc-try { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sc-try > div { flex: 1; min-width: 240px; }
.sc-try .btn { height: 44px; }
.sc-result { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.sc-result .crit { padding: 0; }

/* Reference check in the reference dialog */
.ref-check { border-top: 1px solid var(--line); padding-top: 12px; }
.rv { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rv-sum { font-size: 13px; font-weight: 600; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rv-box { background: #F7F7FB; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.rv-list b { font-size: 11.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.rv-list ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rv-list li { display: flex; gap: 7px; align-items: baseline; }
.rv-list li i { font-size: 10px; color: var(--muted-2); width: 10px; }
.rv-suggest { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.rv-suggest pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 12.5px; line-height: 1.55; color: var(--ink); }

/* Test runs */
.test-card { border-left: 4px solid var(--blue); }
.test-pick { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.test-pick label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.test-pick label:hover { background: #F7F7FB; }
.test-pick .tp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-cell { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.tr-cell img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.pill { display: inline-block; min-width: 40px; padding: 2px 8px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: 12px; text-align: center; }
.wk.test { background: var(--blue) !important; }
.wk.check { background: var(--good) !important; }
.ph .meta .flow-me { color: var(--blue); font-weight: 600; }

/* Branches: bulk cluster assignment bar */
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--chip); font-size: 13px; }
.bulk select { width: auto; }
.bulk[hidden] { display: none; }
.nowrap { white-space: nowrap; }
.card-h .sub { display: block; margin-top: 2px; }

/* Store Looks grouped by drop */
.drop-group { background: #F7F8FB; }
.drop-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.drop-h h2 { font-size: 15px; margin: 0; }
.drop-h .muted { font-size: 12.5px; }
