/* SX Agency CRM V6.7 — Unified Business Workspace
   Scoped presentation refinements. Never modify Supabase credentials or permissions. */
:root{--sx67-rim:rgba(226,236,250,.16);--sx67-soft:#a3acb9;--sx67-tint:rgba(202,214,232,.08)}
.sx-space-layout .sidebar{padding-top:22px;gap:0}
.sx-space-layout .sidebar .sx-brand{padding-bottom:16px}
.sx-space-layout .sidebar .sx-nav{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:2px 1px 8px;scrollbar-width:thin;scrollbar-color:#454c58 transparent}
.sx-nav-group{display:flex;flex-direction:column;gap:2px;padding:5px 0 10px;border-bottom:1px solid rgba(225,235,249,.08);flex-shrink:0}
.sx-nav-group:last-child{border-bottom:0}
.sx-nav-label{padding:11px 13px 7px;color:#8a95a5;font-size:9px;font-weight:700;letter-spacing:1.45px;white-space:nowrap}
.sx-nav-group button{width:100%;min-height:37px!important;padding:9px 12px!important;gap:12px!important;font-size:11.5px!important;line-height:1.25!important}
.sx-nav-group button svg{width:16px;height:16px}
.sx-nav-group button span{min-width:0;white-space:normal}
.sx-quick-rail{padding:1px 5px 12px}
.sx-quick-add{display:flex;gap:10px;align-items:center;justify-content:center;width:100%;min-height:43px;border:1px solid rgba(242,244,248,.7);border-radius:12px;background:#e9ebee;color:#11141a;font-size:12px;font-weight:700;transition:background .2s}
.sx-quick-add:hover{background:white}
.sx-top-new{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;min-height:37px;padding:7px 12px;border-radius:11px;background:rgba(233,239,248,.13);border:1px solid rgba(239,242,251,.24);color:#edf1f7;font-size:11px;font-weight:650}
.sx-top-new:hover{background:rgba(233,239,248,.2)}
.sx67-quick-intro{margin-top:-8px;margin-bottom:21px}
.sx67-quick-intro p{font-size:13px;color:#abb2bf;margin-top:8px;line-height:1.65}
.sx67-quick-form .field{margin-bottom:15px}
.sx67-quick-form .field label{margin-bottom:7px}
.sx67-quick-form input{min-height:45px}
.sx67-help{font-size:11px;color:#99a2b0;margin:8px 0 18px;line-height:1.6}
.sx67-duplicate-open{display:inline-block;margin:4px 4px 4px 0;padding:5px 8px;border:1px solid rgba(235,211,170,.33);background:rgba(255,255,255,.06);border-radius:7px;color:#f8e1b9;font-size:11px;text-decoration:underline;text-underline-offset:2px}
.sx67-quick-buttons{align-items:center}
.sx67-lead-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:0 0 21px}
.sx67-lead-head .eyebrow{letter-spacing:1.6px;color:#a5acba}
.sx67-lead-head h2{font-size:clamp(22px,3vw,29px);letter-spacing:-.6px;margin:8px 0}
.sx67-lead-head p{color:#a0aaba;font-size:12px}
.sx67-head-actions,.sx67-work-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.sx67-head-actions .btn,.sx67-work-actions .btn{white-space:normal}
.sx67-tabs{display:flex;gap:5px;overflow-x:auto;border-bottom:1px solid rgba(225,236,249,.17);padding-bottom:8px;scrollbar-width:none}
.sx67-tabs button{background:transparent;border:1px solid transparent;border-radius:10px;color:#a3acb9;padding:11px 14px;font-size:12px;font-weight:650;flex:0 0 auto}
.sx67-tabs button:hover{color:#fff;background:rgba(255,255,255,.06)}
.sx67-tabs button.active{background:rgba(219,229,243,.13);color:#f8fafb;border-color:rgba(225,236,251,.2)}
.sx67-tabs button:focus-visible,.sx67-duplicate-open:focus-visible,.sx-lead-shortcuts button:focus-visible,.sx-top-new:focus-visible,.sx-quick-add:focus-visible{outline:2px solid white;outline-offset:2px}
.sx67-workspace-body{padding-top:22px;min-height:220px}
.sx67-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.sx67-record-field{border:1px solid var(--sx67-rim);background:linear-gradient(135deg,rgba(33,39,50,.7),rgba(12,17,25,.5));border-radius:12px;padding:15px 15px 14px;min-width:0}
.sx67-record-field span{display:block;font-size:9px;font-weight:700;color:#9da7b7;letter-spacing:1px;margin-bottom:8px}
.sx67-record-field strong{font-size:13px;font-weight:550;line-height:1.45;color:#f0f3f9;word-break:break-word}
.sx67-record-field a{color:#e9f1fc;text-decoration:underline;text-underline-offset:3px;text-decoration-color:#75859b}
.sx67-next-action{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-top:16px;padding:17px;border:1px solid rgba(216,228,242,.2);border-radius:13px;background:rgba(233,240,250,.055)}
.sx67-next-action .eyebrow{display:block;margin-bottom:7px;font-size:9px}
.sx67-next-action strong{font-size:13px;font-weight:550}
.sx67-pane-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:19px}
.sx67-pane-head h3,.sx67-tasks h3{font-size:16px;font-weight:620;margin-bottom:7px}
.sx67-pane-head p,.sx67-tasks p,.sx67-linked-note{font-size:12px;color:#a5adba;line-height:1.65}
.sx67-activity-form{border:1px solid var(--sx67-rim);background:rgba(209,226,243,.035);border-radius:14px;padding:15px;margin-bottom:20px}
.sx67-activity-form textarea{min-height:92px}
.sx67-edit-form .grid-2{gap:10px 14px}
.sx67-edit-form .field{margin-bottom:6px}
.sx67-edit-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;padding-top:15px;border-top:1px solid var(--sx67-rim)}
.sx67-work-actions{margin-bottom:23px}
.sx67-tasks{border:1px solid var(--sx67-rim);border-radius:14px;padding:15px;margin-bottom:16px;background:rgba(231,241,255,.035)}
.sx67-tasks h3 span{color:#a3abb7;font-size:12px}
.sx67-task-row{display:flex;gap:11px;align-items:center;padding:12px 0;border-bottom:1px solid var(--sx67-rim)}
.sx67-task-row:last-child{border-bottom:none}
.sx67-task-row .check{flex-shrink:0}
.sx67-task-row div{min-width:0;flex:1}
.sx67-task-row strong{display:block;font-size:12px;font-weight:560;overflow-wrap:anywhere}
.sx67-task-row small{display:block;margin-top:6px;font-size:11px;color:#9ba4b2}
.sx67-linked-note{margin:0 0 10px}
.sx67-workspace-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:24px;padding-top:15px;border-top:1px solid var(--sx67-rim)}
.sx-space-layout .modal:has(.sx67-lead-head){width:min(850px,100%);max-height:min(92dvh,940px);padding:28px 31px}
.sx-space-layout .modal:has(.sx67-quick-form){width:min(560px,100%)}
.sx-space-layout .modal:has(.sx67-lead-head) .modal-top{margin-bottom:16px}
.sx-space-layout .modal:has(.sx67-lead-head) .modal-top h2{font-size:11px;font-weight:700;letter-spacing:1.3px;text-transform:uppercase;color:#9ca5b4}
.sx-lead-shortcuts{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.sx-lead-shortcuts button{background:rgba(18,23,32,.75);border:1px solid var(--sx67-rim);border-radius:999px;color:#b2bbca;min-height:37px;padding:8px 12px;font-size:11px;font-weight:610;white-space:nowrap}
.sx-lead-shortcuts button:hover{color:white;border-color:rgba(231,240,254,.42)}
.sx-lead-shortcuts button.selected{background:rgba(226,235,246,.18);color:white;border-color:rgba(229,237,249,.38)}
.sx-lead-shortcuts button.sx-filter-toggle{margin-left:auto;border-radius:10px;display:inline-flex;gap:7px;align-items:center}
.sx-advanced-filters.sx-hidden-filters{display:none!important}
.sx-space-layout .v3-toolbar{padding-bottom:16px}
@media(max-width:770px){
 .sx-space-layout .sidebar .sx-nav{overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column}
 .sx-space-layout .sidebar .sx-nav-group{display:flex;flex-direction:column;width:100%;flex:0 0 auto}
 .sx-space-layout .sidebar .sx-nav-group button{justify-content:flex-start;min-height:43px!important;text-align:left;font-size:12px!important}
 .sx-space-layout .sidebar .sx-quick-rail{display:block;width:100%}
 .sx-space-layout .sx-top-new{padding:7px;min-width:38px;min-height:40px}
 .sx-space-layout .sx-top-new span{display:none}
 .sx67-lead-head{display:block}
 .sx67-lead-head .sx67-head-actions{margin-top:15px}
 .sx67-record-grid{grid-template-columns:minmax(0,1fr);gap:9px}
 .sx67-record-field{padding:13px}
 .sx67-next-action{flex-wrap:wrap}
 .sx67-next-action .btn{width:100%}
 .sx67-head-actions .btn{flex:1 1 auto;min-height:43px}
 .sx67-quick-buttons .btn{flex:1 1 100%}
 .sx-lead-shortcuts{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px;scrollbar-width:none}
 .sx-lead-shortcuts button{flex:0 0 auto;min-height:43px}
 .sx-lead-shortcuts button.sx-filter-toggle{margin-left:0}
 .sx-space-layout .modal:has(.sx67-lead-head){padding:18px!important}
 .sx67-edit-actions{flex-wrap:wrap}
 .sx67-edit-actions .btn{flex:1 1 140px}
 .sx67-work-actions .btn{flex:1 1 130px}
}
@media(prefers-reduced-motion:reduce){.sx-quick-add,.sx-top-new,.sx-nav-group button{transition:none!important}}

.sx-return-lead{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--sx67-rim);background:rgba(11,16,24,.52);border-radius:11px;color:#d7dfec;padding:8px 11px;min-height:37px;font-size:11px;font-weight:600}
.sx-return-lead svg{transform:rotate(180deg)}
.sx-return-lead:hover{background:rgba(216,228,244,.1);color:white}
@media(max-width:770px){.sx-return-lead{min-width:38px;padding:8px;justify-content:center;min-height:40px}.sx-return-lead span{display:none}}
