.crm-desk { min-width:0; }
.crm-desk .page-head { margin-bottom:14px; }
.crm-desk .page-head h1 { font-size:27px; }
.desk-tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:0 0 18px; overflow-x:auto; }
.desk-tabs .button { border:0; border-radius:0; border-bottom:2px solid transparent; background:transparent; padding:12px 19px; font-size:13px; color:var(--muted); }
.desk-tabs .button[aria-current="page"] { border-bottom-color:var(--accent); color:var(--ink); font-weight:650; }
.desk-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:end; margin:0 0 16px; }
.desk-toolbar label { display:grid; gap:6px; color:var(--muted); font-size:11px; margin:0; min-width:130px; }
.desk-toolbar .desk-search { flex:1 1 230px; }
.desk-toolbar input,.desk-toolbar select { margin:0; min-height:38px; padding:9px 11px; font-size:12px; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:6px; width:100%; }
.desk-toolbar .button { min-height:38px; }
.desk-result-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:13px; }
.desk-result-bar>p { flex:1; color:var(--muted); margin:0; font-size:12px; }
.desk-view-switch { display:flex; gap:2px; padding:3px; border:1px solid var(--line); border-radius:7px; background:var(--panel); }
.desk-view-switch .button { border:0; background:transparent; padding:7px 12px; }
.desk-view-switch [aria-pressed="true"] { background:var(--raised); color:var(--accent); }
.desk-board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(265px,295px); gap:14px; overflow-x:auto; align-items:start; padding:0 0 18px; scrollbar-color:var(--muted) var(--paper); }
.desk-lane { min-width:0; border:1px solid var(--line); border-radius:8px; background:var(--panel); padding:11px; }
.desk-lane>header { display:flex; align-items:center; gap:10px; padding:2px 2px 12px; border-bottom:2px solid var(--accent); margin-bottom:12px; }
.desk-lane>header h2 { flex:1; margin:0; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.desk-count { font-variant-numeric:tabular-nums; background:var(--raised); color:var(--ink); min-width:27px; text-align:center; border-radius:5px; padding:4px 6px; font-size:11px; }
.desk-lane-items { display:grid; gap:9px; }
.desk-lane>.button { width:100%; margin-top:12px; padding:9px; }
.desk-deal { border:1px solid var(--line); border-radius:7px; background:var(--paper); padding:12px; min-width:0; }
.desk-deal-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.desk-deal-meta>span:last-child { font-size:10px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.desk-record-link { display:inline-block; border:0; background:none; text-align:left; padding:0; color:var(--ink); font-weight:600; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.desk-record-link:hover { color:var(--accent); text-decoration:underline; }
.desk-deal>p { font-size:11px; color:var(--muted); line-height:1.5; margin:5px 0 13px; overflow-wrap:anywhere; }
.desk-money { display:block; font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.desk-followup { border-top:1px solid var(--line); margin-top:12px; padding-top:10px; line-height:1.5; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.desk-followup small { display:block; margin-top:3px; font-size:10px; }
.desk-followup.overdue { color:var(--orange); }
.desk-status { display:inline-flex; align-items:center; white-space:nowrap; border:1px solid var(--line); background:var(--raised); color:var(--muted); font-size:10px; font-weight:500; padding:3px 7px; border-radius:5px; }
.desk-status-open { color:var(--accent); border-color:color-mix(in srgb,var(--accent),transparent 65%); background:var(--accent-wash); }
.desk-status-won { color:var(--success); border-color:color-mix(in srgb,var(--success),transparent 65%); }
.desk-status-lost { color:var(--orange); border-color:color-mix(in srgb,var(--orange),transparent 65%); }
.desk-table-scroll { overflow-x:auto; max-width:100%; border:1px solid var(--line); border-radius:8px; background:var(--panel); }
.desk-table { border-collapse:separate; border-spacing:0; width:100%; font-size:12px; }
.desk-table th { text-align:left; white-space:nowrap; height:40px; background:var(--raised); color:var(--muted); font-size:11px; font-weight:550; }
.desk-table td { height:47px; border-top:1px solid var(--line); color:var(--ink); }
.desk-table th,.desk-table td { padding:9px 13px; min-width:145px; max-width:300px; border-right:1px solid var(--line); }
.desk-table th:last-child,.desk-table td:last-child { border-right:0; }
.desk-table td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.desk-table th:first-child,.desk-table td:first-child { position:sticky; left:0; min-width:220px; max-width:270px; z-index:1; border-right:2px solid var(--line); }
.desk-table td:first-child { background:var(--panel); }
.desk-table tbody tr:hover td { background:var(--raised); }
.desk-table .desk-record-link { font-size:12px; }
.desk-empty-cell { color:var(--muted); padding:22px 12px; font-size:12px; line-height:1.6; }
.desk-table td.desk-empty-cell { position:static; text-align:center; height:110px; }
.desk-pagination { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; color:var(--muted); font-size:11px; }
.desk-provenance { color:var(--muted); font-size:11px; line-height:1.6; margin:16px 0; }
.desk-native-heading { display:flex; gap:16px; align-items:center; margin-bottom:20px; }
.crm-desk-detail { min-width:0; }
.crm-desk-detail h1 { overflow-wrap:anywhere; }
.desk-facts { display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:7px; overflow:hidden; margin:20px 0; }
.desk-facts>div { padding:13px; min-width:0; background:var(--panel); }
.desk-facts dt { font-size:10px; color:var(--muted); margin-bottom:7px; }
.desk-facts dd { font-size:12px; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.desk-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 15px; }
.desk-form-grid label { min-width:0; }
.crm-desk-detail input,.crm-desk-detail select,.crm-desk-detail textarea { min-width:0; }
.desk-contact-picker { border:1px solid var(--line); border-radius:7px; margin:18px 0; padding:14px; }
.desk-contact-picker legend { font-size:12px; padding:0 5px; }
.desk-contact-picker>small { color:var(--muted); font-size:10px; }
.desk-contact-picker>p { margin-top:0; line-height:1.6; overflow-wrap:anywhere; }
.desk-contact-search { display:flex; gap:8px; align-items:start; }
.desk-contact-search input { margin:0; flex:1; }
.desk-contact-search .button { flex-shrink:0; }
#crm-desk-contact-results { font-size:11px; margin:10px 0; }
.desk-contact-option,.desk-related { display:flex; gap:12px; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }
.desk-contact-option>span { min-width:0; overflow-wrap:anywhere; }
.desk-contact-option small { display:block; margin-top:4px; color:var(--muted); }
.desk-contact-option .button { flex-shrink:0; }
.desk-history { margin:24px 0; }
.desk-history article { padding:12px 0; border-bottom:1px solid var(--line); }
.desk-history article small { color:var(--muted); font-size:10px; }
.desk-history article p { line-height:1.6; font-size:12px; overflow-wrap:anywhere; }
#crm-desk-form-status { font-size:12px; line-height:1.6; color:var(--orange); }
@media (max-width:700px) {
  .desk-toolbar label { flex:1 1 135px; }
  .desk-toolbar .desk-search { flex-basis:100%; }
  .desk-board { grid-auto-columns:270px; }
  .desk-tabs .button { padding:11px 15px; }
  .desk-form-grid,.desk-facts { grid-template-columns:1fr; }
  .desk-table th:first-child,.desk-table td:first-child { min-width:170px; max-width:200px; }
  .desk-contact-search { flex-wrap:wrap; }
  .desk-native-heading { flex-wrap:wrap; }
}

.desk-status-views { width:fit-content; flex-wrap:wrap; margin:0 0 16px; }
