/* My Profile → Service Records (service-records.js). */
.sr-page { max-width: 1240px; --sr-line: var(--border, #e2e8f0); --sr-muted: var(--text-2, #5c6b7e); --sr-surface: var(--surface, #fff); }
.sr-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sr-hero h2 { margin: 0 0 2px; display: flex; align-items: center; gap: 10px; }
.sr-hero p.muted { margin: 0; }
.sr-pending-chip { font-size: 0.72rem; font-weight: 700; color: #fff; background: #ff3b30; border-radius: 999px; padding: 2px 9px; }
.sr-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.sr-suppliers, .sr-records, .sr-review { background: var(--sr-surface); border: 1px solid var(--sr-line); border-radius: 14px; padding: 14px; }
.sr-suppliers h3, .sr-records h3 { margin: 0 0 10px; font-size: 0.95rem; }
.sr-sup-list, .sr-rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sr-sup { display: flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; }
.sr-sup.is-active { border-color: var(--accent, #1e4d6b); background: var(--accent-light, #eef6fb); }
.sr-sup-main, .sr-all { flex: 1; min-width: 0; text-align: left; background: transparent; border: 0; padding: 8px 8px; cursor: pointer; font: inherit; display: grid; grid-template-columns: 1fr auto; column-gap: 6px; border-radius: 10px; }
.sr-sup-main:hover, .sr-all:hover { background: var(--bg, #f6f8fa); }
.sr-sup-main small { grid-column: 1 / -1; color: var(--sr-muted); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sup-revoked { opacity: 0.6; }
.sr-revoke { flex-shrink: 0; }
.sr-count { min-width: 1.2rem; height: 1.2rem; padding: 0 0.35rem; box-sizing: border-box; border-radius: 999px; background: #ff3b30; color: #fff; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sr-records-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sr-records-head h3 { margin: 0; }
.sr-filters { display: inline-flex; border: 1px solid var(--sr-line); border-radius: 999px; padding: 2px; }
.sr-filters button { border: 0; background: transparent; font: inherit; font-size: 0.78rem; padding: 4px 12px; border-radius: 999px; cursor: pointer; color: var(--sr-muted); }
.sr-filters button[aria-selected="true"] { background: var(--accent, #1e4d6b); color: #fff; }
.sr-rec { width: 100%; text-align: left; font: inherit; background: transparent; border: 1px solid var(--sr-line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.sr-rec:hover { border-color: var(--accent, #1e4d6b); background: var(--bg, #f8fafc); }
.sr-rec-meta { color: var(--sr-muted); font-size: 0.78rem; }
.sr-chip { display: inline-block; font-size: 0.7rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; vertical-align: 1px; }
.sr-chip-pending { background: #fef3c7; color: #92400e; }
.sr-chip-signed { background: #d1fae5; color: #065f46; }
.sr-empty { padding: 10px 2px; }
.sr-error { color: var(--danger, #b91c1c); }
.sr-review-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sr-review-head h3 { margin: 0; }
.sr-review-head p { margin: 2px 0 0; }
.sr-review-head > div { flex: 1; min-width: 0; }
.sr-review-body { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.sr-preview { min-height: 560px; border: 1px solid var(--sr-line); border-radius: 10px; background: #f1f5f9; display: flex; align-items: stretch; justify-content: center; overflow: hidden; }
.sr-preview > p { align-self: center; }
.sr-pdf { width: 100%; height: 72vh; min-height: 560px; border: 0; }
.sr-side { display: flex; flex-direction: column; gap: 14px; }
.sr-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.82rem; font-weight: 600; }
.sr-field select, .sr-private textarea { font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--sr-line); border-radius: 8px; background: #fff; width: 100%; box-sizing: border-box; }
.sr-sign { width: 100%; justify-content: center; padding: 10px 14px; font-size: 0.95rem; }
.sr-sign-note { margin: -6px 0 0; font-size: 0.74rem; }
.sr-private { border: 1px dashed #cbd5e1; background: #fbfcfe; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sr-private .sr-field { flex-direction: row; justify-content: space-between; align-items: center; }
.sr-lock { font-size: 0.7rem; font-weight: 700; color: #475569; background: #e2e8f0; border-radius: 999px; padding: 2px 8px; }
.sr-private-actions { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; }
.sr-signed-box { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; }
.sr-signed-box p { margin: 2px 0; font-size: 0.84rem; }
.sr-versions ul, .sr-audit ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.78rem; display: flex; flex-direction: column; gap: 5px; }
.sr-versions summary, .sr-audit summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; }
.sr-versions li.is-current { font-weight: 600; }
.sr-ver { font: inherit; border: 1px solid var(--sr-line); background: #fff; border-radius: 6px; padding: 0 6px; cursor: pointer; }
.modal-sr-grant { max-width: 480px; }
.sr-grant-error { color: var(--danger, #b91c1c); font-size: 0.8rem; min-height: 1em; margin: 0; }
.sr-grant-result { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; font-size: 0.82rem; }
.sr-grant-result p { margin: 0 0 6px; }
.sr-copy { display: flex; gap: 6px; align-items: center; }
.sr-copy input { margin: 0 !important; font-size: 0.78rem; }
@media (max-width: 960px) { .sr-layout, .sr-review-body { grid-template-columns: 1fr; } }
/* revoked suppliers: hidden from the panel, their records tagged */
.sr-chip-revoked { background: #f3f4f6; color: #4b5563; font-size: 0.68rem; }
.sr-revoked-note { font-size: 0.78rem; margin: 10px 2px 0; line-height: 1.35; }
/* signature boxes viewer (sr-sign-boxes.js, pdf.js) */
.sr-preview.srb-viewer { display: block; overflow: auto; max-height: 78vh; padding: 12px; }
.srb-help { margin: 0 0 10px; font-size: 0.82rem; }
.srb-page { position: relative; margin: 0 auto 14px; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18); }
.srb-page canvas { display: block; }
.srb-layer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.srb-page-no { position: absolute; right: 8px; bottom: 6px; font-size: 0.7rem; color: #64748b; background: rgba(255,255,255,0.85); padding: 1px 6px; border-radius: 6px; pointer-events: none; }
.srb-box { position: absolute; border: 2px solid #2563eb; background: rgba(37, 99, 235, 0.10); border-radius: 4px; cursor: move; box-sizing: border-box; }
.srb-box.srb-ghost { border-style: dashed; pointer-events: none; }
.srb-box-label { position: absolute; left: 4px; top: 2px; font-size: 0.68rem; font-weight: 700; color: #1d4ed8; pointer-events: none; white-space: nowrap; }
.srb-del { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #dc2626; color: #fff; font-size: 13px; line-height: 20px; padding: 0; cursor: pointer; }
.srb-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #2563eb; border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; }
.sr-boxes { border: 1px solid var(--sr-line); border-radius: 10px; padding: 10px 12px; background: #f8fafc; }
.srb-count { margin: 0; font-size: 0.9rem; }
.srb-count b { color: #1d4ed8; font-size: 1rem; }
.srb-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; }
.srb-group ul { list-style: none; margin: 4px 0 0; padding-left: 10px; display: flex; flex-direction: column; gap: 2px; }
.srb-group li { display: flex; align-items: center; gap: 8px; }
.srb-goto, .srb-link { background: none; border: 0; padding: 0; color: #1d4ed8; cursor: pointer; font: inherit; text-decoration: underline; }
.srb-link { color: #64748b; font-size: 0.8rem; }
.sr-mysig { border: 1px solid var(--sr-line); border-radius: 10px; padding: 10px 12px; }
.sr-mysig-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sr-mysig-img { display: block; max-width: 100%; max-height: 90px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 4px; }
.sr-sig-pad { width: 100%; height: 110px; background: #fff; border: 1px dashed #94a3b8; border-radius: 8px; touch-action: none; cursor: crosshair; }
.sr-sig-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sr-sig-upload { cursor: pointer; }
.sr-sign:disabled { opacity: 0.55; cursor: not-allowed; }
.sr-legacy { color: #92400e; }

/* "Show link" — the supplier's existing update link */
.sr-sup-actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.sr-show-link[disabled] { opacity: 0.45; cursor: not-allowed; }
.modal-sr-link { max-width: 620px; width: 92vw; }
.sr-link-label { display: block; margin: 10px 0 4px; font-size: 0.8rem; font-weight: 600; color: #344054; }
.sr-link-dialog .sr-copy input { flex: 1; min-width: 0; }
.sr-link-note { margin-top: 12px; font-size: 0.8rem; }
[data-sr-copy].is-copied { background: #12b76a !important; border-color: #12b76a !important; color: #fff !important; }

/* GMP e-signatures (manifestation + signature IDs) */
.srb-group li { flex-wrap: wrap; row-gap: 2px; }
.srb-goto { white-space: nowrap; }
.srb-meaning { flex-basis: 100%; margin: 0 0 4px; font-size: 0.76rem; padding: 2px 4px; max-width: 220px; }
.srb-warn { flex-basis: 100%; color: #b54708; font-size: 0.74rem; margin-left: 2px; }
.sr-esigs { margin-top: 8px; border-top: 1px solid rgba(16, 24, 40, 0.08); padding-top: 8px; }
.sr-esigs ul { list-style: none; margin: 4px 0; padding: 0; }
.sr-esigs li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; font-size: 0.82rem; }
.sr-esig-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; background: #fff; border: 1px solid #d0d5dd; border-radius: 6px; padding: 1px 6px; letter-spacing: 0.02em; }
.sr-esig-result { flex-basis: 100%; font-size: 0.78rem; }
.sr-esig-result:empty { display: none; }
.sr-ok { color: #067647; }
.sr-esig-note { font-size: 0.76rem; }
