.crm-view-root,.crm-dialog-root{display:contents}
.crm-sheet-dialog{width:min(1000px,calc(100vw - 30px))}.crm-sheet-body{padding:0 24px 24px;line-height:1.7;font-size:13px}.crm-sheet-body input[type=file]{display:block;margin:10px 0}.crm-sheet-result{margin-top:18px}.crm-sheet-result>.crm-button{margin:12px 8px 0 0}.crm-sheet-result .crm-table-wrap{max-height:40vh}.crm-sheet-file{color:var(--muted);overflow-wrap:anywhere}
@media(max-width:768px){.crm-wide-table.crm-wide-table .crm-action-cell{position:static}.crm-wide-table.crm-wide-table>tbody>tr:not(.crm-expanded-row)>td:first-child{position:static}.crm-wide-table.crm-wide-table th:first-child{left:auto}}
.crm-stats.crm-stats{gap:8px}.crm-stats.crm-stats article{padding:12px 14px;gap:8px;display:flex;align-items:center;flex-wrap:wrap;min-height:0}.crm-stats.crm-stats strong{font-size:22px}.crm-stats.crm-stats .crm-scope-note{gap:6px}.crm-stats.crm-stats .crm-scope-note b{font-size:13px}.crm-stats.crm-stats .crm-scope-note small{width:100%}
.crm-linked-panel{margin-top:16px;border:1px solid var(--line);border-radius:8px;background:#f4f8fc}.crm-linked-panel .crm-expanded-content{width:100%}
.crm-stats{gap:8px}.crm-stats article{padding:12px 14px;gap:8px;display:flex;align-items:center;flex-wrap:wrap}.crm-stats strong{font-size:22px}.crm-stats .crm-scope-note{gap:6px}.crm-stats .crm-scope-note b{font-size:13px}.crm-stats .crm-scope-note small{width:100%}
.crm-grid-help{font-size:12px;color:var(--muted);margin:0 0 12px}.crm-wide-wrap{max-height:65vh;overflow:auto;position:relative;scrollbar-gutter:stable}.crm-wide-table{table-layout:fixed;width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}.crm-wide-table th{position:sticky;top:0;z-index:3;border-bottom:1px solid var(--line);height:40px}.crm-wide-table>tbody>tr:not(.crm-expanded-row)>td{min-width:130px;max-width:240px;border-right:1px solid var(--line-soft);height:65px;padding:10px}.crm-wide-table th:first-child,.crm-wide-table>tbody>tr:not(.crm-expanded-row)>td:first-child{position:sticky;left:0;z-index:2;min-width:180px;max-width:180px;background:#fff;box-shadow:3px 0 5px #183a5b0a}.crm-wide-table th:first-child{z-index:5;background:#f7f9fc}.crm-wide-table .crm-action-cell{min-width:240px;max-width:240px;z-index:2}.crm-wide-table th.crm-action-cell{z-index:5;background:#f7f9fc}.crm-wide-table .crm-row-actions{flex-wrap:wrap;gap:3px;white-space:normal}.crm-wide-table .crm-button{padding:6px 8px}.crm-cell-value{white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-height:6em}.crm-wide-table td[data-field=contact]{min-width:230px}.crm-editing-row td{background:#f0f7ff!important}.crm-editing-row label{display:block;margin:0}.crm-editing-row label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.crm-editing-row input,.crm-editing-row textarea{width:100%;min-width:100px;box-sizing:border-box;border:1px solid #aec8e8;background:white;color:var(--ink);padding:8px;font:inherit;border-radius:4px}.crm-editing-row textarea{height:70px;max-height:180px;min-height:40px;resize:vertical}.crm-editing-row input:focus,.crm-editing-row textarea:focus{outline:2px solid #4d95ec;outline-offset:1px}.crm-row-error{color:#a42738;font-size:12px;white-space:normal;margin-top:8px}.crm-row-error[hidden]{display:none}.crm-wide-table .crm-expanded-row>td{padding:0;max-width:none;background:#f4f8fc}.crm-expanded-content{position:sticky;left:0;width:min(1100px,calc(100vw - 350px));max-width:100%;box-sizing:border-box;padding:20px;border-left:4px solid var(--blue)}.crm-expanded-content .crm-table{min-width:900px}.crm-source-json{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.crm-wide-table #crm-row-editor{display:flex;gap:6px}@media(max-width:768px){.crm-expanded-content{width:calc(100vw - 65px)}.crm-wide-table .crm-action-cell{min-width:200px}.crm-wide-table .crm-row-actions{flex-direction:row}.crm-wide-wrap{max-height:70vh}}
.crm-row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}.crm-row-actions a{text-decoration:none;display:inline-flex}.crm-table .crm-action-cell{position:sticky;right:0;background:var(--surface,#fff);min-width:180px;box-shadow:-3px 0 5px #183a5b08}.crm-field-group{grid-column:1/-1;min-width:0;border:1px solid var(--line);border-radius:9px;padding:14px;margin:0}.crm-field-group legend{padding:0 7px;color:var(--blue);font-size:12px;font-weight:600}.crm-field-group-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.crm-source-fields dd{overflow-wrap:anywhere;font-size:12px}
@media(max-width:550px){.crm-field-group-body{grid-template-columns:1fr}.crm-row-actions{flex-direction:column;align-items:stretch}.crm-table .crm-action-cell{min-width:105px}}
.crm-navigation{display:flex;gap:6px;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid var(--line)}
.crm-navigation a{padding:9px 14px;color:var(--muted);font-size:13px;text-decoration:none;border-radius:8px}
.crm-navigation a[aria-current=page]{background:var(--blue-soft);color:var(--blue);font-weight:700}
.crm-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 0 6px}.crm-heading h2{font-size:26px;margin:7px 0 9px;letter-spacing:-.025em}.crm-heading p{color:var(--muted);font-size:13px;line-height:1.7;margin:0}.crm-eyebrow{font-size:10px;letter-spacing:.16em;font-weight:700;color:var(--cyan)}
.crm-button{border:1px solid #d4dfeb;background:#fff;border-radius:8px;padding:9px 14px;color:var(--ink);cursor:pointer;font-size:12px;line-height:1.4;white-space:nowrap}.crm-button:hover{border-color:var(--blue);color:var(--blue)}.crm-button.primary{background:var(--blue);border-color:var(--blue);color:#fff}.crm-button.subtle{background:transparent;border-color:transparent;color:var(--blue)}.crm-button:disabled{opacity:.45;cursor:not-allowed}.crm-button[hidden]{display:none}.crm-actions{display:flex;gap:8px;flex-wrap:wrap}.crm-button:focus-visible,.crm-tabs button:focus-visible,.crm-navigation a:focus-visible{outline:3px solid #9dc8fa;outline-offset:3px}
.crm-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.crm-stats article{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:20px 22px;display:grid;gap:14px}.crm-stats article>span{font-size:12px;color:var(--muted)}.crm-stats strong{font-size:30px;font-weight:700;letter-spacing:-.04em}.crm-stats .crm-scope-note{background:#edf4f9;gap:8px}.crm-scope-note b{font-size:16px}.crm-scope-note small{color:var(--muted);font-size:11px}.crm-amber{color:var(--amber)}
.crm-panel{padding:20px;min-width:0}.crm-tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px;flex-wrap:wrap}.crm-tabs button{border:0;border-radius:7px;padding:9px 15px;background:transparent;color:var(--muted);font-size:13px;cursor:pointer}.crm-tabs button.selected{background:var(--blue-soft);color:var(--blue);font-weight:700}
.crm-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-bottom:18px}.crm-filters label{display:grid;gap:6px;min-width:105px;max-width:195px;flex:1}.crm-filters label.crm-search{min-width:225px;max-width:310px;flex:2}.crm-filters label>span{color:var(--muted);font-size:11px}.crm-filters input,.crm-filters select{height:36px;padding:7px 9px;border:1px solid #d9e2ec;border-radius:7px;background:#fff;color:var(--ink);min-width:0;font-size:12px;max-width:100%}
.crm-quick-filters summary{cursor:pointer;padding:7px;font-size:12px;color:#526579}.crm-quick-filters>div{display:flex;gap:8px;flex-wrap:wrap;padding:8px 0}.crm-quick-filters[open]{flex-basis:100%;order:2}
.crm-column-filter{border:0;background:transparent;color:#71849a;cursor:pointer;padding:5px;vertical-align:middle}.crm-column-filter:hover,.crm-column-filter:focus-visible{color:#2563eb;background:#e8f0ff;border-radius:4px}
.crm-filter-builder{border:1px solid #dbe3ee;border-radius:8px;padding:16px;margin:8px 0;background:#f9fbff;max-width:850px}.crm-filter-builder-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.crm-filter-builder button{cursor:pointer}.crm-filter-builder-heading>button,.crm-filter-rule>button{background:transparent;border:0;font-size:20px;color:#61758d}.crm-filter-builder label{font-size:13px}.crm-filter-builder input,.crm-filter-builder select{height:32px;border:1px solid #d6dfeb;border-radius:5px;padding:4px 8px;background:white;min-width:0;max-width:100%;color:#34465b}.crm-filter-rule{display:grid;grid-template-columns:minmax(130px,1fr) minmax(110px,.8fr) minmax(140px,1.4fr) 28px;gap:8px;margin:8px 0}.crm-filter-rules{max-height:260px;overflow:auto;margin-top:12px}.crm-filter-no-value{font-size:12px;padding:7px;color:#7e8ca0}.crm-filter-builder .crm-muted{font-size:11px;line-height:1.7}.crm-filter-error{color:#b42318;font-size:12px;margin:6px 0 0}.crm-filter-error:empty{display:none}.crm-filter-summary{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:11px;color:#64748b;margin:6px 0}.crm-filter-summary:empty{display:none}.crm-filter-chip{cursor:pointer;border:1px solid #dbe6f6;background:#edf4ff;color:#285a95;padding:4px 8px;border-radius:5px;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){.crm-filter-rule{grid-template-columns:1fr 1fr 28px}.crm-filter-rule>[data-filter-value],.crm-filter-rule>.crm-filter-no-value{grid-row:2;grid-column:1/3}.crm-filter-rule>button{grid-column:3;grid-row:1}}
.crm-table-wrap{overflow:auto;max-width:100%;border:1px solid var(--line-soft);border-radius:8px}.crm-table{width:100%;border-collapse:collapse;text-align:left;min-width:830px;font-size:12px}.crm-table th{font-size:11px;background:#f7f9fc;font-weight:600;color:var(--muted);white-space:nowrap;padding:12px}.crm-table td{border-top:1px solid var(--line-soft);padding:13px 12px;line-height:1.55;max-width:210px;overflow-wrap:anywhere;vertical-align:top}.crm-table tr:hover td{background:#f9fbfe}.crm-table small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.crm-table a,.crm-profile a,.crm-timeline-meta a{color:var(--blue);text-decoration:none}.crm-table .crm-customer-name{font-size:13px;font-weight:600}.crm-table .crm-contact-cell{max-width:190px}.crm-pagination{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:15px;color:var(--muted);font-size:12px}.crm-pagination>div{display:flex;gap:8px}
.crm-empty{text-align:center;padding:44px 20px;color:var(--muted);font-size:13px}.crm-empty b{font-size:15px;color:var(--ink);font-weight:500}.crm-empty p{line-height:1.7}.crm-badge{display:inline-block;padding:3px 8px;border-radius:5px;background:#edf2f7;color:#627189;font-size:10px;white-space:nowrap}.crm-badge.warning{background:#fff4df;color:#9d640e;margin-top:5px}.crm-notice{background:#fff8e9;color:#895c18;font-size:12px;border:1px solid #f3e2b8;padding:12px 15px;border-radius:8px;line-height:1.7;margin:0 0 12px}.crm-page-error,.crm-form-error{background:#fff0f0;color:#a42738;padding:12px 16px;border-radius:8px;font-size:13px;line-height:1.7}.crm-form-error{margin:0 22px}.crm-form-error[hidden],.crm-page-error[hidden]{display:none}
.crm-back{color:var(--muted);font-size:12px;text-decoration:none}.crm-customer-status{display:flex;gap:18px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:12px}.crm-customer-status b{font-weight:500;color:var(--ink)}.crm-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.crm-section-title h3{font-size:15px;margin:0 0 6px}.crm-section-title span{font-size:11px;color:var(--muted)}
.crm-profile{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:0 0 20px}.crm-profile dt,.crm-raw dt{font-size:11px;color:var(--muted);margin-bottom:7px}.crm-profile dd,.crm-raw dd{font-size:13px;margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.crm-notes{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px;border-top:1px solid var(--line);padding-top:16px}.crm-notes h4{font-size:11px;color:var(--muted);margin:0 0 8px;font-weight:500}.crm-notes p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.8;margin:0;max-height:240px;overflow:auto}
.crm-timeline-item{display:grid;grid-template-columns:15px 1fr;gap:12px;padding:0 0 22px;position:relative}.crm-timeline-dot{width:9px;height:9px;border-radius:50%;background:#4f93d8;margin-top:4px}.crm-timeline-item:not(:last-child):before{content:"";position:absolute;top:18px;left:4px;width:1px;bottom:5px;background:var(--line)}.crm-timeline-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:11px;color:var(--muted)}.crm-timeline-meta b{color:var(--ink)}.crm-timeline-item p{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:9px 0}.crm-timeline-item small{color:var(--cyan);font-size:11px}
.crm-panel summary{cursor:pointer;font-size:12px;color:var(--muted);padding:4px 0}.crm-audit p{display:flex;gap:16px;font-size:11px;color:var(--muted);flex-wrap:wrap}.crm-audit b{font-weight:500;color:var(--ink)}.crm-muted{color:var(--muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}.crm-import-issues{color:var(--amber);font-size:12px;line-height:1.9}.crm-raw{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding-top:10px}
.crm-dialog{width:min(780px,calc(100vw - 32px));max-height:88vh;border:1px solid #dce5ee;border-radius:14px;padding:0;box-shadow:0 25px 100px #12213b33;color:var(--ink)}.crm-dialog::backdrop{background:#14223970;backdrop-filter:blur(2px)}.crm-dialog header{display:flex;justify-content:space-between;align-items:center;padding:21px 24px;border-bottom:1px solid var(--line);margin-bottom:18px}.crm-dialog header small{color:var(--muted);font-size:10px}.crm-dialog h3{margin:5px 0 0;font-size:20px}.crm-close{border:0;background:transparent;color:var(--muted);font-size:25px;padding:4px 8px;cursor:pointer}.crm-form-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:4px 24px 24px;max-height:58vh;overflow:auto}.crm-form-fields label{display:grid;gap:8px;min-width:0}.crm-form-fields .wide{grid-column:1/-1}.crm-form-fields label>span{font-size:12px;color:var(--muted)}.crm-form-fields input,.crm-form-fields select,.crm-form-fields textarea{width:100%;min-width:0;padding:10px 11px;border:1px solid #d4dfeb;border-radius:7px;background:#fff;color:var(--ink);font:inherit;font-size:13px}.crm-form-fields textarea{resize:vertical;line-height:1.7}.crm-form-fields input:focus,.crm-form-fields select:focus,.crm-form-fields textarea:focus{outline:2px solid #bad6f7;outline-offset:1px;border-color:var(--blue)}.crm-dialog footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:16px 24px;border-top:1px solid var(--line);background:#f8fafc}.crm-dialog footer>span{margin-right:auto;font-size:11px;color:var(--muted)}
@media(max-width:1000px){.crm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-heading h2{font-size:22px}.crm-profile{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-notes{grid-template-columns:1fr}.crm-heading{align-items:flex-start;flex-direction:column;gap:14px}}
@media(max-width:550px){.crm-stats article{padding:15px}.crm-stats strong{font-size:24px}.crm-panel{padding:14px}.crm-profile,.crm-raw,.crm-form-fields{grid-template-columns:1fr}.crm-dialog footer>span{display:none}.crm-filters label.crm-search{min-width:100%;max-width:none}.crm-heading h2{font-size:20px}.crm-customer-status{gap:10px}.crm-pagination{flex-wrap:wrap}}
.crm-inline-editor { margin:16px 0; padding:16px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; }
.crm-inline-editor header,.crm-inline-editor footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.crm-inline-editor .crm-form-fields { display:grid; gap:12px; margin:12px 0; }
.crm-inline-editor h3 { margin:4px 0; }
.crm-conflict-table { width:100%; border-collapse:collapse; font-size:12px; }
.crm-conflict-table td,.crm-conflict-table th { padding:6px; border:1px solid #dbe3ec; white-space:pre-wrap; overflow-wrap:anywhere; max-width:200px; }
.crm-samples-table { min-width:1850px; }
.crm-samples-table input,.crm-samples-table textarea { min-width:130px; width:100%; border:1px solid transparent; padding:8px; font:inherit; background:transparent; }
.crm-samples-table input:focus,.crm-samples-table textarea:focus { border-color:#1677d2; outline:none; background:white; }
.crm-samples-table textarea { min-width:220px; }
.crm-samples-table [data-status] { display:block; font-size:12px; margin-top:6px; }
.crm-sample-contact { white-space:pre-wrap; }
.crm-jdy-table thead th { height:28px; padding:4px 8px; }
.crm-jdy-table thead th[rowspan="2"] { vertical-align:middle; }
.crm-jdy-table thead tr:nth-child(2) th { top:28px; left:auto; z-index:4; font-size:11px; }
.crm-jdy-table .crm-sample-group { background:#edf3f9; text-align:center; }
.crm-create-dialog { width:min(780px,94vw); max-width:94vw; height:92dvh; max-height:92dvh; overflow:hidden; padding:0; border:0; border-radius:9px; background:white; color:var(--ink); box-shadow:0 18px 70px #0004; }
.crm-create-dialog::backdrop { background:rgba(15,23,42,.48); }
.crm-create-dialog.is-wide { width:94vw; }
.crm-create-dialog>form { display:flex; flex-direction:column; height:100%; max-height:92dvh; min-width:0; }
.crm-create-dialog header,.crm-create-dialog footer { display:flex; flex-shrink:0; align-items:center; gap:12px; padding:15px 22px; background:white; }
.crm-create-dialog header { justify-content:space-between; border-bottom:1px solid #e5eaf0; }
.crm-create-dialog header h3 { margin:0; font-size:20px; }
.crm-create-dialog header small { display:none; }
.crm-create-dialog footer { border-top:1px solid #e5eaf0; }
.crm-create-dialog footer>span { flex:1; font-size:12px; color:#64748b; }
.crm-create-dialog .crm-form-fields { display:block; flex:1; max-height:none; overflow-y:auto; overflow-x:hidden; padding:18px 24px; min-height:0; min-width:0; }
.crm-create-dialog .crm-field-group { padding:0; margin:0 0 24px; border:0; }
.crm-create-dialog .crm-field-group legend { padding:0; margin-bottom:12px; font-weight:600; }
.crm-create-dialog .crm-field-group-body { display:flex; flex-direction:column; gap:18px; }
.crm-create-dialog .crm-field-group-body>label { width:min(100%,380px); display:flex; flex-direction:column; gap:7px; font-size:13px; }
.crm-create-dialog input,.crm-create-dialog textarea,.crm-create-dialog select { width:100%; padding:8px 10px; box-sizing:border-box; border:1px solid #d1dce9; border-radius:4px; font:inherit; background:white; }
.crm-create-dialog .crm-create-samples { padding:0; margin:0 0 24px; border:0; min-width:0; }
.crm-create-dialog .crm-create-samples table { min-width:1200px; }
.crm-create-dialog .crm-create-samples td { min-width:130px; padding:5px; }
.crm-create-dialog .crm-create-samples label>span { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.crm-create-dialog .crm-form-error { padding:10px 22px; color:#b42318; }
.crm-create-dialog .crm-close { border:0; background:transparent; font-size:22px; cursor:pointer; }
.crm-child-table { min-width:1050px; table-layout:auto; }
.crm-child-table td { white-space:pre-wrap; vertical-align:top; }
.crm-child-table .crm-followup-content { min-width:280px; max-width:500px; overflow-wrap:anywhere; }
.crm-child-edit-row { background:#eef6ff; }
.crm-child-edit-row td { min-width:120px; padding:6px !important; }
.crm-child-edit-row label { display:block; margin:0; }
.crm-child-edit-row label>span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.sidebar-collapsed .crm-expanded-content { width:min(1400px,calc(100vw - 60px)); }
.crm-child-edit-row input,.crm-child-edit-row textarea { box-sizing:border-box; width:100%; min-width:120px; padding:7px; font:inherit; border:1px solid #aac6e5; border-radius:4px; background:white; }
.crm-child-edit-row textarea { min-width:220px; min-height:68px; resize:vertical; }
.crm-child-edit-row form { display:flex; flex-direction:column; gap:4px; }
.crm-child-edit-row .crm-form-error { max-width:230px; }
/* Table-first CRM workspace; scoped to the customer list shell. */
body[data-page="crm"] #page-root { gap:4px; grid-template-columns:minmax(0,1fr) auto; padding:6px 10px; }
body[data-page="crm"] .crm-navigation { grid-column:1; grid-row:1; padding:0; min-width:0; gap:4px; border:0; flex-wrap:wrap; }
body[data-page="crm"] .crm-heading { grid-column:2; grid-row:1; padding:0; min-height:30px; }
body[data-page="crm"] .crm-heading>div:first-child { display:none; }
body[data-page="crm"] .crm-count-strip,body[data-page="crm"] .crm-panel,body[data-page="crm"] .crm-page-error,body[data-page="crm"] .crm-inline-editor { grid-column:1/-1; }
body[data-page="crm"] .crm-count-strip { padding:2px 4px; font-size:11px; }
body[data-page="crm"] .crm-count-strip { display:none; }
body[data-page="crm"] .crm-tabs .crm-add-row { margin-left:auto; color:#1677d2; border:1px solid #d6e1ef; }
body[data-page="crm"] .crm-tabs { padding:0 0 3px; min-height:28px; }
body[data-page="crm"] .crm-actions { gap:5px; }
body[data-page="crm"] .crm-button { padding:5px 8px; min-height:28px; font-size:12px; }
body[data-page="crm"] .crm-grid-tools { padding:2px 0; min-height:30px; }
body[data-page="crm"] .crm-filters input,body[data-page="crm"] .crm-filters select { min-height:28px; height:28px; padding:4px 7px; }
body[data-page="crm"] .crm-wide-table .crm-row-actions { flex-wrap:nowrap; gap:2px; }
body[data-page="crm"] .crm-wide-table .crm-row-actions .crm-button { font-size:11px; padding:3px 5px; }
body[data-page="crm"] .crm-wide-table .crm-cell-value { -webkit-line-clamp:2; }
body[data-page="crm"] #sample-filter,body[data-page="crm"] .crm-samples-table,body[data-page="crm"] #page-root>h2,body[data-page="crm"] #page-root>p,body[data-page="crm"] #page-root>.crm-table-wrap { grid-column:1/-1; }
@media(max-width:1000px){body[data-page="crm"] #page-root{grid-template-columns:minmax(0,1fr)}body[data-page="crm"] .crm-heading{grid-column:1;grid-row:auto}body[data-page="crm"] .crm-navigation{grid-row:auto}}
.crm-count-strip { display:flex; gap:18px; font-size:12px; color:#64748b; padding:3px 0; }
body[data-page="crm"] .page-content,body[data-page="crmFollowups"] .page-content { max-width:none; padding:0; }
body[data-page="crm"] .crm-wide-table>tbody>tr:not(.crm-expanded-row)>td { height:44px; padding:6px 8px; }
.crm-grid-tools { display:flex; align-items:center; gap:12px; padding:5px 0; font-size:12px; color:#64748b; }
body[data-page="crm"] .topbar,body[data-page="crmFollowups"] .topbar { min-height:48px; height:48px; padding:5px 16px; }
body[data-page="crm"] .topbar-heading p,body[data-page="crm"] .topbar-heading small,body[data-page="crmFollowups"] .topbar-heading p,body[data-page="crmFollowups"] .topbar-heading small { display:none; }
body[data-page="crm"] .topbar h1,body[data-page="crmFollowups"] .topbar h1 { font-size:17px; }
body[data-page="crm"] .crm-view-root,body[data-page="crmFollowups"] .crm-view-root { gap:5px; }
body[data-page="crm"] #page-root,body[data-page="crmFollowups"] #page-root { padding:8px 14px; }
body[data-page="crm"] .crm-heading,body[data-page="crmFollowups"] .crm-heading { margin:0; min-height:32px; gap:8px; flex-direction:row; align-items:center; }
body[data-page="crm"] .crm-heading h2,body[data-page="crmFollowups"] .crm-heading h2 { font-size:16px; margin:0; }
body[data-page="crm"] .crm-heading p,body[data-page="crm"] .crm-eyebrow,body[data-page="crmFollowups"] .crm-heading p { display:none; }
body[data-page="crm"] .crm-panel,body[data-page="crmFollowups"] .crm-panel { padding:6px 10px; border-radius:6px; }
body[data-page="crm"] .crm-navigation,body[data-page="crmFollowups"] .crm-navigation { margin:0; gap:12px; }
body[data-page="crm"] .crm-navigation a,body[data-page="crmFollowups"] .crm-navigation a { padding:4px 8px; font-size:12px; }
body[data-page="crm"] .crm-filters,body[data-page="crmFollowups"] .crm-filters { gap:6px; margin:4px 0; }
body[data-page="crm"] .crm-filters label,body[data-page="crmFollowups"] .crm-filters label { min-width:100px; }
body[data-page="crm"] .crm-filters label>span,body[data-page="crmFollowups"] .crm-filters label>span { font-size:11px; }
body[data-page="crm"] .crm-tabs,body[data-page="crmFollowups"] .crm-tabs { margin:0; }
body[data-page="crm"] .crm-tabs button,body[data-page="crmFollowups"] .crm-tabs button { padding:5px 10px; }
body[data-page="crm"] .crm-pagination,body[data-page="crmFollowups"] .crm-pagination { margin:0; padding-top:5px; font-size:12px; }
body[data-page="crm"] .crm-wide-wrap,body[data-page="crmFollowups"] .crm-wide-wrap { height:calc(100dvh - 285px); min-height:280px; overflow:auto; }
.crm-wide-table thead th { position:sticky; top:0; z-index:4; background:#f3f6fa; }
.crm-wide-table td { padding:6px 8px; }
.crm-wide-table .crm-cell-value { max-height:48px; overflow:hidden; }
.crm-wide-table tbody tr { content-visibility:auto; contain-intrinsic-size:auto 44px; }
@media(max-width:800px){body[data-page="crm"] .crm-heading{flex-wrap:wrap}body[data-page="crm"] .crm-wide-wrap{height:55dvh}.crm-count-strip{flex-wrap:wrap;gap:8px}}

/* Flow dates are computed records, never inline edit controls. */
.crm-flow-readonly { background: #f5f8fc; white-space: normal; }
.crm-flow-readonly span { display: block; font-variant-numeric: tabular-nums; }
.crm-flow-readonly a { display: inline-block; margin-top: 6px; font-size: 12px; }
.crm-flow-tone-warning span { color: #925f00; }
.crm-flow-tone-danger span { color: #b42318; font-weight: 600; }
.crm-flow-tone-muted span { color: #667085; }
.crm-flow-notice { padding: 10px 12px; background: #eef5ff; color: #344054; white-space: normal; line-height: 1.6; }
.crm-flow-summary .crm-profile { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
