/* admin domain pages (src/pages/admin): /runs, /shop-links, /cast-links, /themes,
 * /ch/price-review. Class prefix: .adm- */

.adm-intro, .adm-lead { margin: 2px 0 14px; max-width: 960px; line-height: 1.5; color: var(--text-2); }
.adm-note { color: var(--text-2); font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.adm-pad { padding: 12px 16px 0; }
.adm-m0 { margin: 0; }
.adm-strong { font-weight: 650; color: var(--text); }
.adm-nowrap { white-space: nowrap; }
.adm-on { color: var(--success); }
.adm-dim, .adm-loading { opacity: .55; transition: opacity .15s; }
.adm-err { color: var(--danger); }
.adm-warn-text { color: var(--warning); }
.adm-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.adm-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.adm-more { margin: -6px 0 14px; max-width: 960px; }
.adm-more summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; color: var(--accent-text); font-weight: 550; }
.adm-more p { margin: 6px 0 0; line-height: 1.5; }

/* extra badge tones the Python page used */
.badge.adm-azure { background: var(--info-soft); color: var(--info); }
.badge.adm-teal { background: color-mix(in srgb, #0ca678 14%, transparent); color: #0b8a65; }
.badge.adm-orange { background: var(--warning-soft); color: var(--warning); font-weight: 650; }
html[data-theme="dark"] .badge.adm-teal { color: #38d9a9; }

/* section headings on /runs */
.adm-h { font-size: 15px; font-weight: 650; margin: 20px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.adm-h:first-of-type { margin-top: 4px; }
.adm-h-sub { font-size: 13px; font-weight: 450; color: var(--text-3); }
.stat-value.adm-good { color: var(--success); }
.stat-value.adm-warn { color: var(--warning); }
.stat-value.adm-bad { color: var(--danger); }
.adm-wide { min-width: 220px; }

/* runs table */
.adm-runs .dt td { vertical-align: middle; }
.adm-run.adm-has-err td { border-bottom: 0; }
.adm-err-row td { padding-top: 0 !important; }
.adm-err-row td::before { display: none !important; }
.adm-err-sample summary { cursor: pointer; line-height: 1.45; }
.adm-err-sample pre { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; margin: 6px 0 0; max-height: 220px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: var(--radius-sm); }
.adm-run-when { display: block; margin-top: 2px; }
.adm-phone { display: none; }
@media (max-width: 719.98px) {
  .adm-phone { display: block; }
  .adm-desk { display: none !important; }
  .adm-runs .dt tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-runs .dt th:first-child { display: none; }
}
@media (min-width: 720px) { .adm-runs .dt th:first-child { display: none; } .adm-runs .dt td.adm-phone { display: none; } }

/* link queues */
.adm-tabs-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-tabs-row > .tabs { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
.adm-tabs-aside { padding-bottom: 6px; }
.adm-kinds { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; min-width: 0; }
.adm-kinds > .muted { flex: none; }
.adm-kinds .chip-scroll { min-width: 0; flex: 1; }
@media (max-width: 1023px) { .adm-kinds .chip-scroll { margin-left: 0; padding-left: 0; } }
.adm-bulk {
  position: sticky; top: calc(var(--topbar-h) + 4px); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) { .adm-bulk { top: 8px; } }
.adm-bulk-note { flex-basis: 100%; }
@media (min-width: 900px) { .adm-bulk-note { flex-basis: auto; } }
.adm-list { display: flex; flex-direction: column; gap: 10px; }
.adm-list > .card { margin: 0; }
.adm-pair { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 12px 14px; }
.adm-pair > .adm-pair-sides { grid-column: 2; }
.adm-pair > .adm-pair-evidence { grid-column: 1 / -1; }
.adm-pair:not(:has(.adm-pick)) > .adm-pair-sides { grid-column: 1 / -1; }
.adm-pair-sides { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.adm-pair-evidence { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--border); padding-top: 10px; }
@media (min-width: 900px) {
  .adm-pair { grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px); align-items: center; }
  .adm-pair > .adm-pair-evidence { grid-column: 3; border-top: 0; padding-top: 0; border-left: 1px solid var(--border); padding-left: 14px; }
  .adm-pair:not(:has(.adm-pick)) > .adm-pair-sides { grid-column: 1 / 3; }
  .adm-pair-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.adm-side { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-side-name { font-weight: 600; overflow-wrap: anywhere; }
.adm-side .badge { align-self: flex-start; }
.adm-cast-side { flex-direction: row; gap: 10px; align-items: center; }
.adm-side-text { min-width: 0; }
.adm-cast-photo { flex: none; width: 56px; height: 75px; border-radius: 6px; overflow: hidden; }
.adm-cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-nophoto { display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); font-size: 10px; text-align: center; }
.adm-pick { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px 0 -6px -8px; cursor: pointer; align-self: center; }
.adm-pick input, .adm-radio { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.adm-verdicts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.adm-verdict { min-height: 40px; }
.btn.adm-ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.btn.adm-ok:hover { background: var(--success-soft); }
.btn.adm-ok.solid { background: var(--success); color: #fff; border-color: var(--success); }
.btn.adm-ok.solid:hover { filter: brightness(1.06); }
.btn.adm-ok.solid:disabled { filter: none; }
@media (max-width: 719.98px) { .adm-verdicts .btn { flex: 1; justify-content: center; } }

/* toolbars */
.adm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.adm-toolbar > .chip-scroll { min-width: 0; flex: 1 1 320px; }
.adm-toolbar-r { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.adm-warn-btn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 50%, var(--border)); }
.adm-search { display: flex; gap: 6px; flex: 0 1 340px; }
.adm-search .search { flex: 1; }
@media (max-width: 719.98px) { .adm-search { flex-basis: 100%; } }
.adm-prevnext { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 14px 0; }

/* themes */
.adm-dense .dt { font-size: 13px; }
.adm-dense .dt td, .adm-dense .dt th { padding-left: 8px; padding-right: 8px; }
.adm-dense tr.adm-child td:first-child { padding-left: 26px; color: var(--text-2); }
@media (max-width: 719.98px) {
  .adm-dense .dt tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-dense-4 .dt tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-dense tr.adm-child td:first-child { padding-left: 0; }
}
.adm-help { padding: 0; }
.adm-help-sum { cursor: pointer; display: flex; gap: 8px; align-items: center; padding: 12px 16px; font-weight: 600; min-height: 44px; }
.adm-help .card-body p { margin: 0 0 8px; }
.adm-gold-list { display: flex; flex-direction: column; gap: 12px; }
.adm-gold-list > .card { margin: 0; }
.adm-gold-body { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .adm-gold-body { grid-template-columns: 200px minmax(0, 1fr); } .adm-gold-body:not(:has(.adm-banner)) { grid-template-columns: minmax(0, 1fr); } }
.adm-banner { position: relative; align-self: start; }
.adm-banner .zoomable { width: 100%; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.adm-banner img { width: 100%; height: auto; display: block; }
@media (max-width: 899.98px) { .adm-banner { max-width: 260px; } }
.adm-gold-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.adm-gold-head { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: baseline; }
.adm-gold-name { font-size: 15.5px; }
.adm-ext { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 12.5px; }
.adm-texts .kv-row { grid-template-columns: minmax(80px, 20%) 1fr; }
.adm-text { display: flex; flex-direction: column; gap: 4px; font-weight: 450; }
.adm-reveal { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.adm-reveal > summary { cursor: pointer; padding: 8px 12px; min-height: 40px; display: flex; align-items: center; font-weight: 550; color: var(--accent-text); }
.adm-pick-body { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.adm-verdict-item ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.adm-verdict-item li .badge { margin-right: 3px; }
.adm-src { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
mark { background: color-mix(in srgb, #fcc419 45%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }
.adm-en-only { display: none; }
html[data-lang="en"] .adm-en-only { display: inline; }
.adm-judge { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.adm-keys { gap: 2px 14px; }
.adm-key { min-height: 36px; }
.adm-key.adm-child { color: var(--text-2); }
.adm-verdict-row { display: flex; gap: 8px; }
.adm-verdict-row .input { flex: 1; }

/* price review */
.adm-pr-head { flex-wrap: wrap; gap: 6px 12px; }
.adm-pr-facts { margin-bottom: 12px; gap: 10px 20px; }
.adm-pr-facts > div { display: flex; flex-direction: column; gap: 2px; }
.adm-pr-table { max-height: 26rem; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.adm-pr { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-pr th { position: sticky; top: 0; background: var(--surface); z-index: 1; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-pr th.num, .adm-pr td.num { text-align: right; }
.adm-pr td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-pr tbody tr:last-child td { border-bottom: 0; }
.adm-pr-pick { width: 44px; text-align: center; }
.adm-pr-pick input { width: 20px; height: 20px; }
tr.adm-pr-picked td { background: color-mix(in srgb, #fcc419 22%, transparent); }
tr.adm-pr-shortest td { background: var(--success-soft); }
.adm-pr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.adm-pr-actions .small { flex-basis: 100%; line-height: 1.45; }
.adm-pr-split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .adm-pr-split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.adm-pr-img { max-height: 40rem; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.adm-pr-img .zoomable, .adm-pr-img img { width: 100%; height: auto; display: block; }
.adm-pr-reads { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.adm-pr-reader { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 719.98px) {
  .adm-pr { font-size: 12.5px; }
  .adm-pr th, .adm-pr td { padding: 5px 5px; }
  .adm-pr-pick { width: 36px; }
}
.adm-tiles .stat-hint { white-space: normal; }
.tabs + .adm-intro, .tabs + .adm-lead { margin-top: 12px; }
.adm-pr-sec { display: none; }
.adm-legend { flex-basis: 100%; margin: 0; }
@media (max-width: 719.98px) {
  .adm-pr-sectd { display: none; }
  .adm-pr-sec { display: block; }
}
