/* CRM list and bounded board only; other modules retain their styles. */
#view-crm.crm58-active #crmRoot{display:none!important}
#view-crm.crm58-active.crm58-tasks-mode #crmRoot{display:block!important}
#view-crm.crm58-tasks-mode #crmRoot>.crm-metrics,#view-crm.crm58-tasks-mode #crmRoot>.crm-toolbar,#view-crm.crm58-tasks-mode #crm253Toolbar{display:none!important}
#view-crm.crm58-tasks-mode :is(#crm58results,#crm58pager,.crm58-controls,#crm58stages,#crm58status){display:none!important}
#crm58{color:#173348;margin:16px 0;font-size:13px}
#crm58 [hidden]{display:none!important}
#crm58 button,#crm58 input,#crm58 select{font:inherit;box-sizing:border-box}
#crm58 button{cursor:pointer;border:1px solid #cddbe4;border-radius:7px;padding:8px 12px;background:#fff;color:#24485f;line-height:1.4}
#crm58 button:disabled{cursor:default;opacity:.45}
#crm58 button:hover:not(:disabled){background:#edf5f5}
#crm58 :is(button,input,select):focus-visible{outline:3px solid #68bdb0;outline-offset:2px}
#crm58 .active{background:#176858!important;border-color:#176858;color:white}
.crm58-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
#crm58 h2{font-size:22px;margin:0 0 5px}.crm58-title p{margin:0;color:#607987;font-size:13px}
.crm58-views{display:flex;gap:6px;flex-shrink:0}
.crm58-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;background:#fff;border:1px solid #d7e3ea;padding:14px;border-radius:10px}
.crm58-controls>label{display:grid;gap:5px}.crm58-controls label>span{font-size:12px;font-weight:600;color:#456071}
.crm58-search{flex:1;min-width:230px}
#crm58 input:not([type=checkbox]),#crm58 select{height:38px;border:1px solid #cad9e3;border-radius:7px;background:white;color:#19374c;padding:7px 10px;max-width:100%}
#crm58 .crm58-check{display:flex;align-items:center;min-height:38px;gap:6px}
#crm58 input[type=checkbox]{width:17px;height:17px;accent-color:#176858}
#crm58stages{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0 9px}
#crm58stages button{display:flex;align-items:center;gap:9px}#crm58stages b{font-size:11px;background:#eaf1f4;padding:2px 6px;border-radius:5px;color:#486476}#crm58stages .active b{background:#368371;color:#fff}
#crm58status{font-size:12px;color:#5d7788;min-height:20px}
#crm58error{color:#9e361d;border:1px solid #efbcac;background:#fff1ec;padding:12px;margin:10px 0;border-radius:8px}
#crm58selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#eef6f5;padding:10px;border:1px solid #b9dcd5;border-radius:8px;margin:10px 0}
#crm58pager{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:12px 0}
#crm58pager>div{display:flex;align-items:center;gap:10px}#crm58pager label{display:inline-flex;align-items:center;gap:6px}#crm58page{width:72px}
.crm58-table-scroll{max-height:58vh;overflow:auto;border:1px solid #d6e2e9;border-radius:10px;background:#fff;overscroll-behavior:contain}
#crm58 table{width:100%;min-width:960px;border-collapse:separate;border-spacing:0}
#crm58 th{position:sticky;top:0;z-index:1;background:#ecf2f6;text-align:left;font-size:12px;padding:12px 10px;border-bottom:1px solid #cddce6;white-space:nowrap}
#crm58 td{padding:10px;border-bottom:1px solid #e6edf1;font-size:13px;vertical-align:middle}
#crm58 td:nth-child(2){min-width:230px;max-width:330px}#crm58 td:nth-child(3),#crm58 td:nth-child(5){max-width:170px;overflow-wrap:anywhere}
#crm58 tbody tr:hover{background:#f6fafb}#crm58 td small{display:block;font-size:11px;color:#637b89;margin-top:3px;overflow-wrap:anywhere}
#crm58 button.crm58-company{border:0;padding:0;background:transparent;color:#163e59;text-align:left;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
#crm58 button.crm58-company:hover{text-decoration:underline}#crm58 td select{min-width:120px}
.crm58-task-count{display:inline-flex;justify-content:center;min-width:27px;padding:4px;background:#f0f4f6;border-radius:6px}.crm58-task-count.has-tasks{background:#fff0cd;color:#7e5811;font-weight:700}
.crm58-empty{padding:48px 16px;background:#fff;border:1px solid #d9e4eb;border-radius:10px;text-align:center;color:#607b8a}
.crm58-board-note{font-size:12px;color:#607b8a}
.crm58-board{display:flex;gap:12px;overflow:auto;max-height:62vh;align-items:stretch;padding-bottom:12px;overscroll-behavior:contain}
.crm58-column{flex:0 0 260px;background:#eef3f7;border:1px solid #d7e2e9;border-radius:9px;padding:10px;max-height:59vh;overflow:auto}
.crm58-column h3{font-size:13px;position:sticky;top:-10px;background:#eef3f7;z-index:1;padding:10px 0;margin:-10px 0 8px;display:flex;justify-content:space-between}.crm58-column h3 small{color:#698290}
.crm58-card{position:relative;background:white;border:1px solid #d7e3ea;border-radius:8px;padding:12px;margin:0 0 8px;display:grid;gap:8px}
.crm58-card>label{position:absolute;top:10px;right:8px}.crm58-card>.crm58-company{padding-right:25px!important;min-height:28px}.crm58-card small,.crm58-card>span{font-size:11px;color:#647e8c}
@media(max-width:800px){.crm58-title{align-items:flex-start;flex-direction:column}.crm58-controls>label{flex:1;min-width:150px}.crm58-search{flex-basis:100%!important}#crm58pager>div{width:100%;justify-content:space-between}.crm58-views{flex-wrap:wrap}.crm58-table-scroll{max-height:56vh}}

/* SPARKER CRM AUTOMATIC FOLLOW-UP V59 */
.crm59-pill{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;border:1px solid;font-size:10px;font-weight:800;white-space:nowrap}
.crm59-pill.waiting{background:#fff7df;border-color:#e7cc8f;color:#795600}.crm59-pill.replied{background:#eaf7ef;border-color:#b8ddc5;color:#22683c}.crm59-pill.completed{background:#edf3f8;border-color:#c8d7e2;color:#385c73}.crm59-pill.stopped{background:#f4f4f4;border-color:#d8d8d8;color:#6d6d6d}
.crm59-board-follow{display:grid;gap:3px}.crm59-board-follow small{margin:0!important}.crm59-none{color:#8a9aa4}
.crm59-settings textarea{width:100%;box-sizing:border-box;border:1px solid #cedae1;border-radius:8px;padding:10px;font:inherit;font-size:11px;line-height:1.5;resize:vertical;color:#203d50;background:#fff}
.crm59-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#eef6f5;border:1px solid #bedbd5;border-radius:8px;padding:10px}.crm59-summary b{font-size:12px}.crm59-summary span{font-size:10px;color:#58756f}
.crm59-help{margin:0;color:#687f8b;font-size:10px;line-height:1.55}.crm59-help code{background:#eef3f6;padding:2px 4px;border-radius:4px}
.crm59-detail{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 10px;padding:11px 12px;border:1px solid #d7e3e9;border-radius:9px;background:#f8fbfc}.crm59-detail>div:first-child{min-width:0}.crm59-detail span,.crm59-detail strong,.crm59-detail small{display:block}.crm59-detail span{font-size:8px;font-weight:950;letter-spacing:.8px;color:#6d808b}.crm59-detail strong{margin-top:4px;font-size:12px;color:#183b4e}.crm59-detail small{margin-top:3px;font-size:9px;color:#6f848f;overflow-wrap:anywhere}.crm59-detail>div:last-child{display:flex;gap:6px;flex-wrap:wrap}.crm59-detail.waiting{background:#fffaf0;border-color:#ead8ae}.crm59-detail.replied{background:#eef9f2;border-color:#c1dfca}.crm59-detail.completed{background:#f2f6f9}.crm59-detail.stopped{background:#f6f6f6}.crm59-detail.empty{border-style:dashed}
#crm58 table{min-width:1110px}.crm59-settings input:disabled{background:#f2f5f7;color:#657985}.crm59-settings .c20switch input{width:auto!important}
@media(max-width:720px){.crm59-detail{align-items:stretch;flex-direction:column}.crm59-summary{align-items:flex-start;flex-direction:column}}

/* CRM sector creation */
#crm58 .crm58-sector-add{align-self:flex-end;height:38px;background:#fff7e8;border-color:#efc56d;color:#8a5700;font-weight:800}
#crm58 .crm58-sector-add:hover{background:#ffefcc!important}
.crm58-sector-form input{font-size:11px!important}


/* CRM sent-date filtering and sorting V61 */
#crm58 .crm61-dates{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:12px 14px;border:1px solid #d7e3ea;border-radius:10px;margin-top:10px;background:#fff}
#crm58 .crm61-dates label{display:grid;gap:5px}#crm58 .crm61-dates label>span{font-size:12px;font-weight:600;color:#456071}
#crm58 .crm61-date-help{align-self:center;color:#607987;font-size:11px}
#crm58 button.crm61-sort{border:0;background:transparent;padding:0;font-weight:700;color:inherit;text-align:left}#crm58 .crm61-sort span{color:#176858}
#crm58 .crm61-date{white-space:nowrap}#crm58 table{min-width:1260px}
#view-crm.crm58-tasks-mode .crm61-dates{display:none!important}
@media(max-width:800px){#crm58 .crm61-dates label{flex:1;min-width:145px}#crm58 .crm61-date-help{width:100%}}


/* CRM delete actions V62 */
#crm58 .crm62-actions{display:flex;gap:6px;align-items:center}
#crm58 button.crm62-delete,#crmModal #crmDeleteCurrent{color:#aa3428;border:1px solid #e7b9b1;background:#fff7f5}
#crm58 button.crm62-delete:hover:not(:disabled),#crmModal #crmDeleteCurrent:hover:not(:disabled){background:#fde8e2}
#crmModal #crmDeleteCurrent:disabled{opacity:.5;cursor:default}
.crm59-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.crm59-dashboard article{border:1px solid #d7e3e9;border-radius:9px;background:#fff;padding:10px}.crm59-dashboard span{display:block;font-size:8px;color:#6d808b;font-weight:900}.crm59-dashboard strong{display:block;margin-top:5px;font-size:18px;color:#183b4e}


/* Missing CRM contact information V63 */
#crm58 #crm63missing{min-width:230px}
#crm58 #crm63help{flex-basis:100%;color:#607987;font-size:11px;line-height:1.5}
#crm58 .crm63-missing-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
#crm58 .crm63-missing-badges>span{display:inline-flex;border:1px solid #ebd1a3;border-radius:5px;padding:2px 6px;background:#fff8e9;color:#825700;font-size:10px;font-weight:600;line-height:1.5}
@media(max-width:800px){#crm58 #crm63missing{min-width:0;width:100%}}

/* V75 follow-up explanation and bounded dialog */
#c20modal .modal-card.crm59-modal{max-height:calc(100vh - 36px);display:flex;flex-direction:column;overflow:hidden}
#c20modal .crm59-modal #c20mb{overflow:auto;min-height:0;padding:16px}
.crm59-recent-scroll{max-width:100%;overflow:auto;max-height:48vh}
.crm59-recent table{width:100%;min-width:1120px;border-collapse:collapse}
.crm59-recent th,.crm59-recent td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid #dbe5ec;font-size:12px}
.crm59-recent td strong,.crm59-recent td small{display:block;overflow-wrap:anywhere}
.crm59-recent td small{margin-top:4px;color:#647887}
.crm59-recent .crm75-reason{min-width:200px;max-width:310px;overflow-wrap:anywhere}
