// Shared scoped CSS for the Audit Report Builder UI.
// Same visual language as AuditWorkspace (ink/purple hero, line borders, pill chips).
export const RB_CSS = `
.rb-root {
  --ink: #160a33; --ink-2: #2a0f57; --line: #ece8f4; --line-2: #f3f0fa;
  --muted: #79728f; --text: #211a3a; --accent: #6d28d9;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.rb-root *, .rb-root *::before, .rb-root *::after { box-sizing: border-box; }

.rb-back { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; margin-bottom:12px; background:transparent; border:none; border-radius:8px; color:var(--muted); cursor:pointer; font-size:13px; font-weight:600; transition:color .15s, background .15s; }
.rb-back:hover { color:var(--ink); background:#f3f0fa; }

/* Hero */
.rb-hero { position:relative; overflow:hidden; border-radius:18px; margin-bottom:16px;
  background: radial-gradient(120% 170% at 100% 0%, rgba(124,58,237,.42) 0%, rgba(124,58,237,0) 55%), linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color:#fff; box-shadow:0 10px 30px -14px rgba(22,10,51,.55); }
.rb-hero-rule { height:3px; background:linear-gradient(90deg,#d4a017 0%,#f0c14b 40%,rgba(240,193,75,0) 100%); }
.rb-hero-inner { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:22px 24px; flex-wrap:wrap; }
.rb-hero-left { flex:1; min-width:240px; }
.rb-meta-top { display:flex; align-items:center; gap:9px; flex-wrap:wrap; font-size:12px; color:rgba(255,255,255,.7); margin-bottom:9px; }
.rb-code { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11.5px; font-weight:600; color:#f0e9ff; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.18); padding:3px 9px; border-radius:7px; }
.rb-dot { width:3px; height:3px; border-radius:50%; background:rgba(255,255,255,.4); }
.rb-title { margin:0; font-size:22px; line-height:1.15; font-weight:750; letter-spacing:-.02em; color:#fff; }
.rb-chips { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
.rb-chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:550; color:rgba(255,255,255,.82); background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); padding:5px 11px; border-radius:999px; }
.rb-hero-right { display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.rb-status { display:inline-flex; align-items:center; gap:6px; padding:5px 13px; border-radius:999px; background:var(--s-bg); color:var(--s-text); font-size:12px; font-weight:700; }
.rb-status-dot { width:7px; height:7px; border-radius:50%; background:var(--s-dot); }
.rb-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

/* Buttons */
.rb-btn { display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border-radius:9px; border:1px solid #d9d3ea; background:#fff; color:#3b2f63; font-size:12.5px; font-weight:650; cursor:pointer; transition:transform .15s, box-shadow .15s, opacity .15s; white-space:nowrap; }
.rb-btn:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 6px 14px -8px rgba(22,10,51,.4); }
.rb-btn:disabled { opacity:.55; cursor:not-allowed; }
.rb-btn-primary { background:linear-gradient(135deg,#7c3aed 0%,#6d28d9 100%); color:#fff; border-color:transparent; }
.rb-btn-green { background:linear-gradient(135deg,#10b981 0%,#059669 100%); color:#fff; border-color:transparent; }
.rb-btn-amber { background:#fffbeb; color:#92400e; border-color:#fcd34d; }
.rb-btn-red { background:#fef2f2; color:#b91c1c; border-color:#fca5a5; }
.rb-btn-ghost-light { background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.28); }
.rb-btn-sm { padding:5px 10px; font-size:11.5px; border-radius:7px; }

/* Banners */
.rb-banner { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:12px; margin-bottom:14px; font-size:13px; line-height:1.5; }
.rb-banner-warn { background:#fffbeb; border:1px solid #fcd34d; color:#92400e; }
.rb-banner-info { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; }
.rb-banner-ok { background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; }

/* Tabs */
.rb-tabs { display:flex; gap:2px; border-bottom:1px solid var(--line); margin-bottom:18px; overflow-x:auto; }
.rb-tab { position:relative; display:inline-flex; align-items:center; gap:7px; padding:11px 16px; background:transparent; border:none; color:var(--muted); cursor:pointer; font-size:13px; font-weight:600; margin-bottom:-1px; border-bottom:2px solid transparent; white-space:nowrap; transition:color .15s, border-color .15s; }
.rb-tab:hover { color:#5b21b6; }
.rb-tab.is-active { color:#6d28d9; border-bottom-color:#6d28d9; }
.rb-tab-badge { min-width:18px; height:18px; padding:0 6px; display:inline-flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; border-radius:999px; background:#e8e3f5; color:#6b6580; }
.rb-tab.is-active .rb-tab-badge { background:#6d28d9; color:#fff; }
.rb-tab-dirty { width:7px; height:7px; border-radius:50%; background:#f59e0b; }
.rb-panel { animation: rb-fade .2s ease; }
@keyframes rb-fade { from { opacity:0; transform:translateY(4px);} to { opacity:1; transform:none;} }

/* Cards / forms */
.rb-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px 18px; margin-bottom:14px; }
.rb-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.rb-card-title { margin:0; font-size:13.5px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:8px; }
.rb-card-bar { width:4px; height:16px; border-radius:2px; background:linear-gradient(180deg,#7c3aed,#d4a017); }
.rb-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
.rb-field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.rb-field.is-wide { grid-column:1 / -1; }
.rb-label { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); display:flex; align-items:center; gap:6px; }
.rb-edited { font-size:9.5px; font-weight:700; color:#92400e; background:#fef3c7; border-radius:999px; padding:1px 7px; letter-spacing:.04em; text-transform:none; }
.rb-input, .rb-textarea, .rb-select { width:100%; padding:8px 11px; border:1px solid #d9d3ea; border-radius:9px; background:#fff; font-size:13px; color:var(--text); font-family:inherit; outline:none; transition:border-color .15s, box-shadow .15s; }
.rb-input:focus, .rb-textarea:focus, .rb-select:focus { border-color:#7c3aed; box-shadow:0 0 0 3px rgba(124,58,237,.12); }
.rb-input:disabled, .rb-textarea:disabled, .rb-select:disabled { background:#f8f7fb; color:#8b84a0; cursor:not-allowed; }
.rb-textarea { resize:vertical; min-height:70px; line-height:1.5; }
.rb-hint { font-size:11px; color:#a39bb8; }
.rb-link-reset { background:none; border:none; padding:0; color:#6d28d9; font-size:10.5px; font-weight:650; cursor:pointer; text-transform:none; letter-spacing:0; }
.rb-savebar { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:6px; flex-wrap:wrap; }

/* Table */
.rb-table-wrap { background:#fff; border:1px solid var(--line); border-radius:14px; overflow-x:auto; margin-bottom:14px; }
.rb-table { width:100%; border-collapse:collapse; }
.rb-table th { padding:10px; text-align:left; font-size:10px; font-weight:700; color:#6b7280; text-transform:uppercase; letter-spacing:.05em; background:#f8fafc; }
.rb-table td { padding:10px; vertical-align:top; border-top:1px solid #f1f5f9; font-size:12.5px; }
.rb-group-row td { background:#f6f3fd; color:#4c1d95; font-weight:700; font-size:12px; border-top:1px solid #e4ddf5; }
.rb-clause-code { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11px; font-weight:600; color:#4f46e5; white-space:nowrap; }
.rb-req { font-size:11.5px; color:#6b7280; margin-top:3px; line-height:1.45; }
.rb-seg { display:inline-flex; border:1px solid #d9d3ea; border-radius:9px; overflow:hidden; }
.rb-seg button { padding:5px 10px; background:#fff; border:none; border-right:1px solid #e4ddf5; font-size:11px; font-weight:700; color:#6b6580; cursor:pointer; }
.rb-seg button:last-child { border-right:none; }
.rb-seg button:disabled { cursor:not-allowed; opacity:.7; }
.rb-seg button.on { background:var(--b); color:var(--c); box-shadow:inset 0 0 0 1.5px var(--bd); }
.rb-pill { display:inline-block; padding:2px 8px; border-radius:99px; font-size:10px; font-weight:600; white-space:nowrap; }
.rb-docs { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.rb-doc { display:inline-flex; align-items:center; gap:4px; font-size:10.5px; padding:2px 8px; border-radius:99px; border:1px solid #ddd6f3; background:#faf8ff; color:#5b21b6; cursor:pointer; }
.rb-doc.on { background:#6d28d9; color:#fff; border-color:#6d28d9; }
.rb-empty { text-align:center; padding:40px 16px; color:#6b7280; font-size:13px; }

/* Progress */
.rb-progress { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; font-size:12px; color:var(--muted); }
.rb-bar { flex:1; min-width:140px; height:7px; border-radius:99px; background:#ece8f4; overflow:hidden; }
.rb-bar > span { display:block; height:100%; background:linear-gradient(90deg,#7c3aed,#10b981); }
.rb-filterbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }

/* Checks */
.rb-check { display:flex; gap:9px; align-items:flex-start; padding:7px 0; font-size:12.5px; line-height:1.45; cursor:pointer; }
.rb-check input { margin-top:3px; accent-color:#6d28d9; }
.rb-radio-card { display:flex; gap:10px; align-items:flex-start; padding:11px 13px; border:1px solid #e4ddf5; border-radius:11px; margin-bottom:8px; cursor:pointer; font-size:12.5px; line-height:1.5; background:#fff; }
.rb-radio-card.on { border-color:#7c3aed; background:#f6f3fd; }
.rb-radio-card input { margin-top:3px; accent-color:#6d28d9; }

/* Modal */
.rb-modal-bg { position:fixed; inset:0; background:rgba(22,10,51,.5); display:flex; align-items:center; justify-content:center; z-index:1000; padding:16px; }
.rb-modal { width:100%; max-width:520px; background:#fff; border-radius:16px; padding:20px; box-shadow:0 30px 60px -20px rgba(22,10,51,.6); max-height:90vh; overflow:auto; }
.rb-modal h3 { margin:0 0 4px; font-size:16px; }
.rb-modal p { margin:0 0 14px; color:var(--muted); font-size:12.5px; }

/* Preview */
.rb-preview { width:100%; height:78vh; border:1px solid var(--line); border-radius:14px; background:#fff; }

.rb-error { padding:48px 24px; text-align:center; }
.rb-error h3 { margin:0 0 6px; color:#111827; font-size:16px; }
.rb-error p { margin:0 0 16px; color:#6b7280; font-size:13px; }

/* Reports tab (inside audit workspace) */
.rb-rep-list { display:flex; flex-direction:column; gap:10px; }
.rb-rep-item { display:flex; align-items:center; gap:14px; padding:14px 16px; background:#fff; border:1px solid var(--line); border-radius:14px; flex-wrap:wrap; transition:box-shadow .18s; }
.rb-rep-item:hover { box-shadow:0 10px 24px -18px rgba(22,10,51,.4); }
.rb-rep-main { flex:1; min-width:200px; }
.rb-rep-no { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; font-weight:700; color:#4f46e5; }
.rb-rep-sub { font-size:12px; color:var(--muted); margin-top:3px; }

@media (max-width:720px) {
  .rb-hero-inner { flex-direction:column; }
  .rb-hero-right { align-items:stretch; width:100%; }
  .rb-actions { justify-content:flex-start; }
  .rb-title { font-size:20px; }
}
@media (prefers-reduced-motion: reduce) { .rb-root *, .rb-panel { transition:none !important; animation:none !important; } }

/* ── Clauses: group navigator + compact rows ── */
.rb-split { display:grid; grid-template-columns: 250px minmax(0,1fr); gap:14px; align-items:start; }
.rb-nav { position:sticky; top:8px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:10px; max-height:calc(100vh - 24px); overflow:auto; }
.rb-nav-head { padding:4px 6px 10px; border-bottom:1px solid var(--line-2); margin-bottom:8px; }
.rb-nav-title { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.rb-nav-item { display:block; width:100%; text-align:left; padding:8px 9px; margin-bottom:4px; border:1px solid transparent; border-radius:10px; background:transparent; cursor:pointer; transition:background .15s, border-color .15s; }
.rb-nav-item:hover { background:#f6f3fd; }
.rb-nav-item.is-active { background:#f1ecfd; border-color:#c9b8f5; }
.rb-nav-name { font-size:12px; font-weight:650; color:var(--text); line-height:1.3; display:block; }
.rb-nav-sub { font-size:10.5px; color:var(--muted); display:flex; justify-content:space-between; margin-top:3px; }
.rb-nav-bar { height:4px; border-radius:99px; background:#ece8f4; overflow:hidden; margin-top:5px; }
.rb-nav-bar > span { display:block; height:100%; background:#7c3aed; }
.rb-nav-item.is-done .rb-nav-bar > span { background:#10b981; }
.rb-nav-std { font-size:10px; font-weight:700; color:#5b21b6; text-transform:uppercase; letter-spacing:.06em; padding:8px 6px 4px; }
.rb-toolbar-sticky { position:sticky; top:0; z-index:5; background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:10px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.rb-clamp { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.rb-more { background:none; border:none; padding:0; color:#6d28d9; font-size:10.5px; font-weight:650; cursor:pointer; }
.rb-row-done td:first-child { box-shadow: inset 3px 0 0 #10b981; }
.rb-row-nc td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.rb-row-ofi td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.rb-pager { display:flex; justify-content:space-between; gap:8px; margin-top:6px; }
.rb-doc-toggle { background:none; border:none; padding:0; margin-top:5px; color:#6d28d9; font-size:11px; font-weight:650; cursor:pointer; }
.rb-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }
.rb-opt-note { font-size:12px; color:var(--muted); line-height:1.6; margin-top:10px; }
.rb-tag { display:inline-block; padding:2px 8px; border-radius:99px; font-size:10px; font-weight:700; background:#ede9fe; color:#5b21b6; }
@media (max-width: 900px) {
  .rb-split { grid-template-columns: 1fr; }
  .rb-nav { position:static; max-height:none; display:flex; gap:6px; overflow-x:auto; padding:8px; }
  .rb-nav-head, .rb-nav-std { display:none; }
  .rb-nav-item { min-width:170px; margin:0; }
  .rb-picker { grid-template-columns:1fr; }
}

/* ── Photos ── */
.rb-drop { border:2px dashed #cdbff0; border-radius:12px; padding:16px; text-align:center; background:#faf8ff; color:var(--muted); font-size:12.5px; cursor:pointer; transition:background .15s, border-color .15s; }
.rb-drop.is-over { background:#f1ecfd; border-color:#7c3aed; }
.rb-photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px; margin-top:12px; }
.rb-photo { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; display:flex; flex-direction:column; }
.rb-photo-img { height:140px; background:#f6f3fd; display:flex; align-items:center; justify-content:center; }
.rb-photo-img img { max-width:100%; max-height:100%; object-fit:contain; }
.rb-photo-body { padding:8px; display:flex; flex-direction:column; gap:6px; }
.rb-photo-actions { display:flex; gap:4px; justify-content:space-between; }
.rb-photo-meta { font-size:10.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
`;
