/* CRM reference layouts. Scoped to CRM pages and CRM modal contents. */
.customers-page .page-heading,.prospects-page .page-heading{margin-bottom:12px}.crm-subtitle{font-size:11px;color:var(--muted);margin:3px 0}.crm-list-panel{padding:14px!important}.crm-customer-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;align-items:end;gap:12px;margin-bottom:17px}.crm-customer-filters label,.crm-form label,.crm-filter-grid label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:var(--ink);min-width:0}.crm-customer-filters input,.crm-form input,.crm-form select,.crm-form textarea,.crm-filter-grid input,.crm-filter-grid select{border:1px solid var(--input-line);border-radius:5px;background:#fff;padding:7px 9px;width:100%;min-width:0;height:35px;color:var(--ink);font:inherit}.crm-form input:read-only,.crm-form input:disabled,.crm-customer-filters input:disabled{background:var(--field);color:var(--ink);opacity:1}.crm-form textarea{height:90px;resize:vertical}.crm-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px}.crm-full{grid-column:1/-1}.crm-form label[hidden]{display:none!important}.crm-request-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}.crm-form fieldset{border:1px solid var(--line);border-radius:8px;padding:16px;margin:0 0 18px}.crm-form legend{font-size:12px;font-weight:700;padding:0 7px;color:var(--ink)}.crm-form .modal-actions{margin-top:18px;gap:8px;flex-wrap:wrap}.crm-form .modal-actions .button{min-height:34px}.crm-error{min-height:16px;margin:10px 0 0;color:#bd2935;font-size:11px}.crm-row-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:130px}.crm-link{background:none;border:0;color:var(--ink);text-decoration:underline;cursor:pointer;font:inherit;font-size:11px;padding:4px 5px}.customers-page .requests-table th,.customers-page .requests-table td{white-space:nowrap}.customers-page .requests-table td:first-child{min-width:150px}.customers-page .requests-table td:nth-child(3),.customers-page .requests-table td:nth-child(5),.customers-page .requests-table td:nth-child(6){direction:ltr;text-align:right}.crm-request-list .requests-table{width:100%;min-width:850px;font-size:11px}.crm-request-list .requests-table td,.crm-request-list .requests-table th{padding:10px 8px}.crm-request-list .button{font-size:10px;padding:4px 10px}.crm-denied{padding:30px!important;text-align:center}.crm-muted{color:var(--muted);font-size:10px}.crm-followup-stats{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:8px 0 16px}.crm-followup-stats .crm-followup-card{min-height:94px;align-items:center;gap:8px;text-align:center;border-radius:10px;padding:12px}.crm-followup-stats .crm-followup-card strong{font-size:27px;color:#18aa57}.crm-followup-stats .crm-followup-card span{font-size:13px;font-weight:600}.crm-followup-stats .crm-followup-card small{font-size:10px;color:var(--muted)}.crm-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px 15px}.crm-filter-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.crm-filter-actions .button{min-height:32px}.crm-filter-actions input[type=file]{display:none}.crm-note-log{border:1px solid var(--line);background:#fff;border-radius:8px;padding:14px;margin-top:18px}.crm-note-log h3{font-size:12px;margin:0 0 12px;color:var(--ink)}.crm-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.crm-section-heading small{color:var(--muted);font-size:10px}.crm-note{padding:10px 0;border-bottom:1px solid var(--line);font-size:11px;line-height:1.8;overflow-wrap:anywhere}.crm-note:last-child{border-bottom:0}.crm-note small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.crm-note p{margin:5px 0}.prospects-page .requests-table td{font-size:10px;vertical-align:middle}.prospects-page .requests-table td:first-child{direction:ltr;white-space:nowrap}.prospects-page .requests-table td:nth-child(8){min-width:150px;max-width:220px}.prospects-page .requests-table td:nth-child(7){min-width:90px}.prospects-page .requests-table .crm-row-actions{min-width:155px}.crm-phone-link{color:var(--ink);text-decoration:none;font-weight:600}.crm-phone-link:hover{text-decoration:underline}.crm-detail-facts dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}.crm-detail-facts dt{font-size:10px;color:var(--muted);margin-bottom:6px}.crm-detail-facts dd{font-size:12px;margin:0;overflow-wrap:anywhere}.crm-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.crm-detail-columns>.panel{padding:16px}.crm-detail-columns .crm-note-log{margin:0;border:0;padding:0}.crm-import-summary{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.crm-import-preview{max-height:46vh;overflow:auto;border:1px solid var(--line);border-radius:6px}.crm-import-preview table{min-width:1050px;width:100%;border-collapse:collapse;font-size:10px}.crm-import-preview th,.crm-import-preview td{padding:9px;border:1px solid var(--line);vertical-align:top;text-align:right}.crm-import-preview th{background:var(--field);position:sticky;top:0}.crm-import-preview .crm-import-error{background:#fff2f2}.crm-import-preview .crm-import-skip{background:#f5f6f9}.crm-import-upload{padding:10px 0;font-size:12px}.crm-import-upload input{display:block;width:100%;margin:15px 0;padding:13px;border:1px dashed var(--line);border-radius:7px;background:var(--field)}.crm-import-upload .modal-actions{margin-top:15px}.crm-import-note{font-size:11px;color:var(--muted);line-height:1.8}
@media(max-width:1050px){.crm-customer-filters{grid-template-columns:2fr 1fr 1fr}.crm-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-detail-facts dl{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-row-actions{min-width:135px}}
@media(max-width:700px){.crm-customer-filters,.crm-form-grid,.crm-request-grid,.crm-followup-stats,.crm-detail-columns{grid-template-columns:1fr}.crm-filter-grid{grid-template-columns:1fr 1fr}.crm-full{grid-column:auto}.crm-customer-filters label:first-child{grid-column:1/-1}.crm-followup-stats .crm-followup-card{min-height:75px}.crm-detail-facts dl{grid-template-columns:1fr 1fr}.crm-form fieldset{padding:12px}.crm-form .modal-actions{justify-content:flex-start}}

.crm-followup-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font:inherit;color:var(--ink);cursor:pointer}.crm-followup-card b{font-size:27px;color:#17a650}.crm-followup-card.active{border-color:var(--primary);background:var(--secondary)}.crm-import-stats{display:flex;gap:15px;flex-wrap:wrap;margin:12px 0;font-size:12px}.crm-import-preview .modal-actions{position:sticky;bottom:0;background:white;padding:12px 0}.crm-import-error{color:#ac202b}.crm-filter-grid input,.crm-filter-grid select{height:34px}.crm-note-preview{display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Reference alignment: customer actions below the right-aligned title; prospect actions stay opposite the title. */
.customers-page .page-heading{flex-direction:column;align-items:stretch;gap:9px;min-height:0;margin-bottom:12px;padding-top:6px}
.customers-page .page-heading h1,.prospects-page .page-heading h1{font-size:24px;margin:0}
.customers-page .crm-subtitle,.prospects-page .crm-subtitle{display:none}
.customers-page .page-actions{justify-content:flex-start;padding-top:0}
.customers-page .page-actions .button{height:38px;font-size:11px;padding:0 13px}
.customers-page .crm-list-panel,.prospects-page .crm-list-panel{padding:0!important;overflow:hidden}
.customers-page .crm-customer-filters{padding:12px;margin-bottom:0;grid-template-columns:2fr 1fr 1fr 1fr auto}
.customers-page .requests-table{table-layout:fixed}
.customers-page .requests-table th,.prospects-page .requests-table th{padding:4px 6px;font-size:10px}
.customers-page .requests-table td{height:60px;padding:8px 6px;font-size:11px;white-space:normal}
.customers-page .requests-table th:nth-child(1){width:24%}.customers-page .requests-table th:nth-child(2){width:12%}.customers-page .requests-table th:nth-child(3){width:8.5%}.customers-page .requests-table th:nth-child(4){width:8.5%}.customers-page .requests-table th:nth-child(5),.customers-page .requests-table th:nth-child(6){width:10%}.customers-page .requests-table th:nth-child(7){width:27%}
.customers-page .requests-table td:nth-child(3),.customers-page .requests-table td:nth-child(5),.customers-page .requests-table td:nth-child(6){white-space:nowrap}
.customers-page .requests-table .button{min-height:40px;font-size:11px;padding:6px 9px}.customers-page .crm-row-actions{justify-content:flex-start;gap:6px}
.prospects-page .page-heading{min-height:36px;align-items:center;margin-bottom:12px}.prospects-page .page-actions{padding-top:0}.prospects-page .page-actions .button{height:36px;font-size:11px}
.prospects-page .crm-followup-stats{margin:0 0 14px;gap:13px}.prospects-page .crm-followup-stats .crm-followup-card{flex-direction:row;justify-content:space-between;min-height:71px;padding:16px;text-align:right}.prospects-page .crm-followup-card span{font-size:12px;font-weight:400}.prospects-page .crm-followup-card b{font-size:23px;color:#326456}
.prospects-page .crm-prospect-filters{padding:14px;background:var(--field);border-bottom:1px solid var(--line);border-radius:10px;margin-bottom:12px}.prospects-page .crm-filter-grid{gap:16px}.prospects-page .crm-filter-grid input,.prospects-page .crm-filter-grid select{height:37px;background:#fff}.prospects-page .crm-filter-actions{margin:14px 0 0}.prospects-page .crm-filter-actions .button{min-height:35px;font-size:10px}
.prospects-page .requests-table td{height:54px;padding:8px 6px}.prospects-page .requests-table .button{min-height:34px;font-size:10px;padding:5px 7px}.prospects-page .crm-row-actions{gap:3px;min-width:185px}
@media(max-width:1050px){.customers-page .crm-customer-filters{grid-template-columns:2fr 1fr 1fr}.customers-page .requests-table{min-width:1050px}}
@media(max-width:700px){.customers-page .crm-customer-filters{grid-template-columns:1fr}.prospects-page .page-heading{align-items:flex-start}.prospects-page .page-actions{max-width:50%}.prospects-page .crm-followup-stats .crm-followup-card{min-height:64px}.customers-page .page-actions .button{height:36px}}
