/* Show Requests — scoped .sr-* */
.sr-tabs { display: flex; gap: .25rem; border-bottom: 1px solid #ece3d4; margin-bottom: 1rem; }
.sr-tab { border: 0; background: none; padding: .6rem 1rem; cursor: pointer; color: #7a6a52; border-bottom: 2px solid transparent; }
.sr-tab.active { color: #3a2c17; border-bottom-color: #caa96f; font-weight: 600; }
.sr-panel.hidden { display: none; }
.sr-muted { color: var(--sb-taupe); }
.sr-ok { color: #2e6b2e; } .sr-err { color: #8a3a3a; }

/* List — filterable table (matches the app-standard Collectors table) */
.sr-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.sr-search { flex: 1; padding: 10px 12px; border: 1px solid var(--sb-border); border-radius: 10px; background: var(--sb-surface); font-size: 14px; color: var(--sb-ink); font-family: inherit; }
.sr-select { padding: 10px 12px; border: 1px solid var(--sb-border); border-radius: 10px; background: var(--sb-surface); font-size: 14px; color: var(--sb-ink); font-family: inherit; }
/* One card per request: tag photo, who/what, and the answer (plus the pieces being sent, when similar) */
.sr-cards { display: flex; flex-direction: column; gap: 12px; }
.sr-card { display: flex; gap: 16px; padding: 14px; background: var(--sb-surface); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); box-shadow: 0 8px 24px rgba(52,37,27,.06); cursor: pointer; transition: background .12s ease; }
.sr-card:hover, .sr-card:focus-visible { background: var(--sb-surface-2); outline: none; }
.sr-card.hidden { display: none; }
.sr-card-photo { flex: none; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--sb-surface-2); border: 1px solid var(--sb-border); display: flex; align-items: center; justify-content: center; color: var(--sb-taupe); font-size: 11px; text-align: center; }
.sr-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-card-body { flex: 1; min-width: 0; }
.sr-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sr-row-name { font-family: var(--sb-serif); font-size: 18px; color: var(--sb-ink); }
.sr-card-meta { font-size: 13px; margin-top: 2px; }
.sr-num { font-variant-numeric: tabular-nums; }
.sr-answer { flex: none; display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; background: #eee; color: #555; }
.sr-answer--waiting { background: #fff3cd; color: #7a5b00; }
.sr-answer--good { background: #e5f2e5; color: #2e6b2e; }
.sr-answer--similar { background: #e5eaf2; color: #2e4a6b; }
.sr-answer--bad { background: #f3e1e1; color: #8a3a3a; }
.sr-answer--neutral { background: #eee; color: #555; }
.sr-sendbox { margin-top: 10px; padding: 10px 12px; background: var(--sb-surface-2); border: 1px solid var(--sb-border); border-radius: 10px; }
.sr-sendbox-title { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--sb-taupe); font-weight: 600; margin-bottom: 8px; }
.sr-sendlist { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sr-sendlist li { display: flex; gap: 8px; align-items: center; max-width: 260px; }
.sr-sendlist .sr-card-photo { width: 56px; height: 56px; border-radius: 8px; }
.sr-sendtag { font-weight: 600; font-size: 13px; color: var(--sb-ink); }
.sr-senddesc { font-size: 12px; color: var(--sb-taupe); }
.sr-empty { color: var(--sb-taupe); font-family: var(--sb-serif); font-size: 20px; padding: 20px 4px; }

/* Detail modal (matches the app-standard Collectors modal) */
.sr-modal { position: fixed; inset: 0; background: rgba(52,37,27,.45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; z-index: 50; }
.sr-modal.hidden { display: none; }
.sr-detail { position: relative; box-sizing: border-box; width: 100%; max-width: 640px; max-height: 90vh; display: flex; flex-direction: column; background: var(--sb-surface); border-radius: var(--sb-radius); padding: 22px 24px; box-shadow: 0 20px 60px rgba(52,37,27,.3); }
/* Header + reply stay put; only the chat scrolls on a long thread. */
.sr-detail > h3, .sr-detail > .sr-muted, .sr-detail > p, .sr-detail > .sr-reply { flex: 0 0 auto; }
.sr-detail h3 { font-family: var(--sb-serif); font-size: 24px; margin: 0 34px 4px 0; color: var(--sb-ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sr-close { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--sb-taupe); cursor: pointer; }
.sr-close:hover { color: var(--sb-ink); }
.sr-chat { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.sr-msg { padding: 8px 12px; border-radius: 10px; background: var(--sb-surface-2); border: 1px solid var(--sb-border); max-width: 85%; }
.sr-msg-store { align-self: flex-end; background: #faf4e9; border-color: var(--sb-gold-2); }
.sr-msg-meta { font-size: 11px; color: var(--sb-taupe); margin-bottom: 2px; }
.sr-msg-body { color: var(--sb-ink); }
.sr-reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.sr-reply textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--sb-border); border-radius: 8px; background: var(--sb-surface); font-family: inherit; color: var(--sb-ink); }
.sr-reply .sr-btn { margin-top: 0; }

/* Status pills */
.sr-status { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #eee; color: #555; white-space: nowrap; }
.sr-status--pending { background: #e5eaf2; color: #2e4a6b; }
.sr-status--complete { background: #e5f2e5; color: #2e6b2e; }
.sr-outcome { display: inline-block; margin-left: 6px; font-size: 12px; color: #6b6257; }

/* Narrow screens (phone): photo shrinks and the answer drops under the name */
@media (max-width: 640px) {
    .sr-card { gap: 12px; padding: 12px; }
    .sr-card-photo { width: 72px; height: 72px; }
    .sr-card-top { flex-direction: column; gap: 6px; }
}
.sr-form { max-width: 46rem; } .sr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1rem; }
.sr-grid label, .sr-block { display: flex; flex-direction: column; font-size: .85rem; color: #7a6a52; gap: .25rem; }
.sr-block { margin-top: .6rem; } .sr-check { flex-direction: row; align-items: center; gap: .4rem; }
.sr-form input, .sr-form textarea { padding: .5rem .6rem; border: 1px solid #d9cdba; border-radius: 8px; background: #fffdf9; }
.sr-product { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.sr-product img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 8px; }
.sr-btn { margin-top: 1rem; padding: .55rem 1rem; border: 0; border-radius: 8px; background: #6b4f2a; color: #fff; cursor: pointer; }

/* Collector picker (New request) — Tom Select combobox + manual fallback */
.sr .hidden { display: none; }
.sr-collector { border: 1px solid #ece3d4; border-radius: 12px; padding: .9rem 1.1rem 1.1rem; margin: 0 0 1rem; }
.sr-collector > legend { padding: 0 .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #6b4f2a; font-weight: 600; }
.sr-manual-hint { margin: 0 0 .5rem; font-size: .82rem; color: #7a6a52; }
.sr-tag-status { display: block; margin-top: .3rem; min-height: 1em; font-size: .8rem; }
.sr-tag-status.is-checking { color: #7a6a52; }
.sr-tag-status.is-ok { color: #2e6b2e; }
.sr-tag-status.is-warn { color: #9a6a1a; }
.sr-tag-status.is-invalid { color: #8a3a3a; font-weight: 600; }
.sr-tag-preview { display: flex; align-items: center; gap: .8rem; margin: 0 0 .8rem; padding: .6rem .8rem; border: 1px solid #caa96f; border-radius: 10px; background: #faf4e9; }
.sr-tag-thumb { width: 3.5rem; height: 3.5rem; flex: none; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid #ece3d4; }
.sr-tag-info { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.sr-tag-name { font-weight: 600; color: #3a2c17; }
.sr-tag-meta { font-size: .8rem; color: #7a6a52; }
.sr-tag-check { margin-left: auto; flex: none; color: #2e6b2e; font-weight: 700; font-size: 1.1rem; }
.sr-link { display: inline-block; margin-top: .55rem; padding: 0; border: 0; background: none; color: #6b4f2a; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.sr-link:hover { color: #3a2c17; }

/* Tom Select theming — chocolate-gold, matches .sr-form inputs */
#sr-collector-pick .ts-wrapper { margin: 0; }
#sr-collector-pick .ts-control { border: 1px solid #d9cdba; border-radius: 8px; background: #fffdf9; padding: .4rem .6rem; min-height: 2.5rem; box-shadow: none; align-items: center; gap: .3rem; }
#sr-collector-pick .ts-control > * { vertical-align: middle; }
#sr-collector-pick .ts-control .item { line-height: 1.5; margin: 0; }
#sr-collector-pick .ts-control input { color: #3a2c17; font-size: .95rem; line-height: 1.5; margin: 0 !important; }
#sr-collector-pick .ts-control input::placeholder { color: #a3937a; }
#sr-collector-pick .ts-wrapper.focus .ts-control { border-color: #caa96f; box-shadow: 0 0 0 3px rgba(202,169,111,.22); }
#sr-collector-pick .ts-control .item { color: #3a2c17; font-weight: 600; }
#sr-collector-pick .ts-dropdown { border: 1px solid #ece3d4; border-radius: 10px; box-shadow: 0 10px 28px rgba(58,44,23,.14); margin-top: .3rem; overflow: hidden; }
#sr-collector-pick .ts-dropdown .option { padding: .5rem .7rem; color: #3a2c17; border-bottom: 1px solid #f3ece0; }
#sr-collector-pick .ts-dropdown .option:last-child { border-bottom: 0; }
#sr-collector-pick .ts-dropdown .option.active { background: #faf4e9; }
#sr-collector-pick .sr-opt { display: flex; flex-direction: column; gap: .1rem; }
#sr-collector-pick .sr-opt-name { font-weight: 600; }
#sr-collector-pick .sr-opt-meta { font-size: .8rem; color: #7a6a52; }
#sr-collector-pick .sr-opt-empty { padding: .55rem .7rem; color: #7a6a52; font-size: .85rem; }
