/* Market and platform administration screens. */
.admin .section:first-child { margin-top: 0; }
.queue-section h2 { font-size: 1.1rem; }
.qcard h3 { margin: 0; font-size: 1rem; }
.qcard > * + * { margin-top: 10px; }
.qcard .form-actions { margin-top: 12px; }
.conn-line { font-size: 1rem; margin: 0; }
.conn-line .rel { display: inline-block; padding: 1px 8px; margin: 0 4px; border-radius: 999px; background: var(--line-2); font-size: .85rem; color: var(--ink-2); }
.return-box { border-top: 1px dashed var(--line); padding-top: 10px; }
.return-box label { margin-top: 2px; }
.act-error:empty { display: none; }

table.diff th[scope=row] { text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink-2); width: 22%; background: #fafbfc; }
table.diff td.before { color: var(--ink-3); background: #fdf5f4; overflow-wrap: anywhere; }
table.diff td.after { background: #f2faf5; overflow-wrap: anywhere; }
dl.facts.proposed { background: #fafbfc; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; }

ul.signals { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: .88rem; }
ul.signals li::before { display: inline-block; width: 1.3em; font-weight: 700; }
ul.signals li.yes { color: var(--ok); }
ul.signals li.yes::before { content: "✓"; }
ul.signals li.no { color: var(--ink-3); }
ul.signals li.no::before { content: "–"; }

ul.plain { list-style: none; padding: 0; margin: 0 0 10px; }
ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line-2); }
ul.plain li:last-child { border-bottom: 0; }

.toolbar { margin-bottom: 14px; }
.filters-inline input[type=search] { min-width: 220px; width: auto; flex: 1; }
.filters-inline select { width: auto; }
.filters-inline { flex: 1; }

.record-head h2 { margin: 6px 0 2px; }
.record-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; margin-top: 12px; }
@media (max-width: 960px) { .record-grid { grid-template-columns: 1fr; } }
.record .card h3 { font-size: 1rem; }
#inv-form input, .invite-admin input { flex: 1; min-width: 180px; width: auto; }

.medium-wrap { max-width: 880px; }
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.type-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 400; margin: 0; cursor: pointer; background: #fff; }
.type-opt.on { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, white); }

.lookup { position: relative; }
.lookup-results { list-style: none; padding: 0; margin: 4px 0 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-height: 260px; overflow: auto; }
.lookup-results:empty { display: none; }
.lookup-results li { border-bottom: 1px solid var(--line-2); }
.lookup-results li:last-child { border-bottom: 0; }
.lookup-results li.muted { padding: 8px 10px; }
.lookup-results button { border: 0; border-radius: 0; width: 100%; text-align: left; background: none; padding: 8px 10px; display: block; }
.lookup-results button:hover, .lookup-results button:focus-visible { background: color-mix(in srgb, var(--primary) 7%, white); }
.picked { margin-top: 4px; }

details.quality summary { cursor: pointer; font-weight: 600; }
details.quality ul { margin-top: 10px; }
.sev { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; margin-right: 6px; }
.sev.warn { background: #fff4d6; color: #7a5200; }
.sev.info { background: var(--line-2); color: var(--ink-2); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.stats b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stats span { font-size: .8rem; color: var(--ink-3); }
.stats .bad { border-color: #f2c4bf; background: #fdf5f4; }
.stats .warn { border-color: #f0dca8; background: #fffaf0; }
table.import-rows tr.has-errors td { background: #fdf7f6; }
table.import-rows tr.undecided td { background: #fffbf0; }
ul.row-errors { margin: 6px 0 0; padding-left: 18px; color: var(--bad); font-size: .85rem; }
.decisions { display: flex; flex-wrap: wrap; gap: 4px; }
button.decide.on { background: var(--primary); border-color: var(--primary); color: #fff; }

table.audit td.json { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; color: var(--ink-2); max-width: 280px; overflow-wrap: anywhere; }
table.audit code { font-size: .8rem; }

.settings fieldset { margin: 0; }
input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid #c9d1d9; border-radius: 8px; background: #fff; }

.market-card h3 { margin: 0 0 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.market-card .admins { border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 10px; }
.market-card h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); margin: 0 0 6px; }
.tag-list input { flex: 1; min-width: 140px; width: auto; }
.tag-list input.archived { color: var(--ink-3); text-decoration: line-through; }
.tag-add input { flex: 1; width: auto; }
.dup-group fieldset { margin-bottom: 10px; }
details.mail summary { cursor: pointer; list-style: none; }
details.mail summary::-webkit-details-marker { display: none; }
pre.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; background: #fafbfc; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: .85rem; margin: 10px 0 0; }

.row-warnings { margin: 6px 0 0; padding-left: 18px; color: #7a5200; font-size: .85rem; }
tr.example td { color: var(--ink-3); }

.dl-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 8px; }
.dl-choices p { margin: 6px 0 0; }
.import-rows .changes { margin-top: 4px; color: var(--ink-2); }
