:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#182641;background:#f4f6fb;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{width:100%;border:1px solid #dce4f0;border-radius:10px;padding:11px 12px;background:#fff;color:#182641;outline:none}input:focus,select:focus,textarea:focus{border-color:#4777f5;box-shadow:0 0 0 3px #4777f51b}textarea{min-height:88px;resize:vertical}label{display:block;font-size:12px;font-weight:700;color:#667994;margin-bottom:6px}.layout{display:flex;min-height:100vh}.sidebar{width:242px;flex-shrink:0;background:#132039;color:#bdcbe0;padding:22px 14px;display:flex;flex-direction:column;gap:8px}.brand{font-size:25px;font-weight:800;color:#fff;letter-spacing:-1px;padding:0 14px 25px}.brand span{color:#74a6ff}.nav{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:14px 16px;background:transparent;border:0;border-radius:11px;color:#bdcbe0;font-weight:600}.nav.active,.nav:hover{background:#2b4268;color:#fff}.sidebar-foot{margin-top:auto;color:#8da3c2;font-size:12px;padding:14px}.main{flex:1;min-width:0}.topbar{background:white;min-height:94px;padding:20px 32px;display:flex;justify-content:space-between;align-items:center;gap:18px;border-bottom:1px solid #e5eaf3}.topbar h1{font-size:25px;margin:0 0 4px}.muted{color:#8492aa}.top-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.content{padding:28px 32px;max-width:1750px;margin:auto}.lang{display:flex;gap:3px;background:#eef2f9;padding:4px;border-radius:12px}.lang button{border:0;border-radius:9px;background:transparent;padding:8px 10px;font-weight:800;color:#7c8ba6}.lang button.active{background:#fff;color:#2459d9;box-shadow:0 1px 6px #1a3b7a1a}.btn{border:1px solid #dce4f0;background:#fff;border-radius:10px;padding:10px 14px;font-weight:700;color:#23385c;white-space:nowrap}.btn:hover{background:#f3f6fc}.btn.primary{background:#3569eb;color:#fff;border-color:#3569eb}.btn.primary:hover{background:#2458db}.btn.danger{color:#bb2947;border-color:#f1cbd4}.btn.small{padding:7px 10px;font-size:12px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.metric,.panel{background:#fff;border:1px solid #e2e9f3;border-radius:15px;box-shadow:0 4px 14px #172d5105}.metric{padding:21px}.metric .value{font-size:29px;font-weight:800;margin-top:8px}.panel{overflow:hidden;margin-bottom:18px}.panel-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px;flex-wrap:wrap}.panel-header h2{margin:0;font-size:18px}.tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tools input{width:220px}.tools select{width:auto;max-width:220px}.bulk{background:#ecf3ff;border-top:1px solid #d9e5fb;border-bottom:1px solid #d9e5fb;padding:13px 20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bulk select{max-width:220px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;min-width:850px}th{background:#f8faff;color:#8291ab;font-size:12px}td,th{padding:14px 16px;border-bottom:1px solid #eef1f6}tr:last-child td{border-bottom:0}td select{padding:9px;min-width:120px;background:#f8faff}td input[type=checkbox],th input[type=checkbox],.checkline input{width:17px;height:17px;accent-color:#3569eb}.pill{display:inline-block;background:#e9f0ff;color:#3764b8;border-radius:30px;padding:5px 10px;font-weight:700;font-size:12px}.pill.good{background:#e3f8eb;color:#13824a}.pill.bad{background:#ffedf0;color:#b63850}.pill.warn{background:#fff3de;color:#9b6514}.link{border:0;background:none;color:#3569eb;font-weight:750;padding:4px}.empty{text-align:center;padding:35px;color:#8190a8}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field{margin-bottom:13px}.form-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.overlay{position:fixed;inset:0;background:#10213b88;display:flex;align-items:center;justify-content:center;padding:15px;z-index:20}.modal{background:white;width:min(700px,100%);max-height:92vh;overflow:auto;border-radius:18px;box-shadow:0 20px 70px #101d3340;padding:24px}.modal h2{margin:0 0 20px}.comments{border-top:1px solid #e7ecf5;margin-top:20px;padding-top:16px}.comment{padding:12px;background:#f6f8fc;border-radius:9px;margin-bottom:8px;white-space:pre-wrap}.comment small{display:block;color:#8291aa;margin-bottom:5px}.login-screen{min-height:100vh;display:grid;place-items:center;background:linear-gradient(130deg,#142139,#315a9b);padding:20px}.login-box{background:white;border-radius:20px;padding:30px;width:min(440px,100%)}.login-box h1{margin:0}.login-box .lang{margin:16px 0}.hint{font-size:12px;color:#8190a8;line-height:1.6}.alert{color:#ba2f47;margin:10px 0}.notice{background:#fff8e9;border:1px solid #f2dfb8;color:#755a2e;padding:12px 15px;border-radius:11px;margin-bottom:18px;font-size:13px}.filters{display:flex;gap:10px;flex-wrap:wrap}.filters>*{max-width:220px}.section-title{font-size:19px;margin:0}.team-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.team-card{padding:18px;border:1px solid #e3eaf4;border-radius:13px;background:#fff}.team-card strong{font-size:16px}.team-card .big{font-size:27px;font-weight:800;margin:12px 0}.team-card .row{display:flex;justify-content:space-between;margin:7px 0;color:#6b7e9b}.mobile-lead{display:none}.toast{position:fixed;bottom:20px;right:20px;background:#19355e;color:white;padding:12px 18px;border-radius:11px;z-index:40;max-width:330px}.checkline{display:flex;gap:8px;align-items:center}.checkline label{margin:0}.nowrap{white-space:nowrap}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:205px}.content{padding:20px}.topbar{padding:18px 20px}}@media(max-width:720px){.layout{display:block}.sidebar{width:100%;padding:10px;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px}.brand{width:100%;padding:7px 10px;font-size:21px}.nav{width:auto;padding:9px 11px;font-size:12px}.sidebar-foot{display:none}.topbar{padding:14px;min-height:0;align-items:flex-start;flex-direction:column}.topbar h1{font-size:21px}.top-actions{width:100%;justify-content:space-between;gap:6px}.content{padding:13px}.cards{gap:9px}.metric{padding:13px}.metric .value{font-size:24px}.panel-header{padding:15px}.tools{width:100%}.tools input{width:100%}.tools select{flex:1}.bulk{padding:12px}.bulk select{max-width:100%;flex:1}.table-wrap{overflow:visible}table{display:none}.mobile-lead{display:block;border-top:1px solid #e8edf6;padding:15px}.mobile-lead .top{display:flex;justify-content:space-between;align-items:center;gap:8px}.mobile-lead .fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.mobile-lead .fields select{min-width:0}.mobile-lead .bottom{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.form-grid{grid-template-columns:1fr}.modal{padding:17px}.team-grid{grid-template-columns:1fr}.notice{font-size:12px}}@media(max-width:390px){.mobile-lead .fields{grid-template-columns:1fr}.lang button{padding:7px}.nav{font-size:11px;padding:8px}}

/* Orbit CRM v3 */
.colored-pill{background:color-mix(in srgb,var(--status-color) 13%,white);color:var(--status-color);border:1px solid color-mix(in srgb,var(--status-color) 35%,white)}
.status-select{border-left:5px solid var(--status-color);background:color-mix(in srgb,var(--status-color) 9%,white);font-weight:700}
th[draggable="true"]{cursor:grab;user-select:none;white-space:nowrap}th[draggable="true"]:active{cursor:grabbing}.drag-handle{opacity:.5;margin-left:5px}.member-list{display:flex;flex-wrap:wrap;gap:9px;padding:10px;border:1px solid #dce4f0;border-radius:10px}.member-list label{display:flex;align-items:center;gap:7px;padding:6px 10px;background:#f4f6fb;border-radius:8px;margin:0}.member-list input{width:auto}.api-settings{padding:0 20px 24px}.api-preview{overflow:auto;background:#132039;color:#e7eefb;padding:18px;border-radius:12px;font-size:12px}input[type=color]{height:45px;padding:4px;max-width:130px}

/* v3.1 — readable leads table, full-color statuses, clearer assignment */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; min-width: 1370px; table-layout: auto; }
.table-wrap th, .table-wrap td { padding: 15px 14px; vertical-align: middle; }
.table-wrap th:nth-child(2), .table-wrap td:nth-child(2) { min-width: 205px; }
.table-wrap th:nth-child(3), .table-wrap td:nth-child(3) { min-width: 175px; }
.table-wrap th:nth-child(4), .table-wrap td:nth-child(4) { min-width: 210px; }
.table-wrap td strong { display: block; min-width: 170px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.table-wrap td { overflow-wrap: anywhere; }
.table-wrap td select { width: 100%; min-width: 175px; max-width: none; }
.table-wrap .owner-select { min-width: 215px; background: #fff; border: 1px solid #c8d7ed; color: #1b3152; font-weight: 650; }
.table-wrap .owner-select:hover { border-color: #4777f5; background: #f5f8ff; }
.table-wrap .status-select, .mobile-lead .status-select {
  background: var(--status-color, #3975ed) !important;
  color: var(--status-text, #fff) !important;
  border: 1px solid transparent !important;
  border-left: 0 !important;
  border-radius: 10px;
  font-weight: 750;
  min-width: 175px;
  padding: 11px 13px;
  box-shadow: 0 2px 5px #14213d15;
}
.table-wrap .status-select option, .mobile-lead .status-select option {
  color: #182641;
  background: #fff;
}
.bulk { gap: 10px 12px; }
.bulk #bulk-owner { min-width: 240px; max-width: 320px; }
.bulk #bulk-assign { min-width: 130px; }
.bulk #bulk-status { min-width: 200px; }
@media(max-width:720px) {
  .mobile-lead .status-select { width: 100%; min-width: 0; }
  .mobile-lead .owner-select { width: 100%; min-width: 0; }
  .bulk #bulk-owner, .bulk #bulk-status { max-width: none; min-width: 0; }
}

.status-delete-section{border:1px solid #f2d6d6;background:#fff8f8;border-radius:12px;padding:14px;margin:16px 0;display:grid;gap:10px}.status-delete-section select{width:100%}

/* Orbit v4: restrained typography and clean spacing */
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:400}
h1,h2,h3,.brand,.metric .value,.panel-header h2,.table-wrap strong,.mobile-lead strong{font-weight:550!important;letter-spacing:-.025em}
.btn,.nav,th,label,.pill,.status-select,.owner-select{font-weight:500!important}
.panel,.metric,.modal,.login-box{box-shadow:0 2px 14px rgba(25,46,80,.035)!important}
.panel,.metric{border-radius:15px}
.btn{border-radius:10px}
.date-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:15px 20px;border-top:1px solid #e8eef6;background:#fafbfd}
.date-toolbar label{color:#66768e;font-size:13px;font-weight:500}
.date-toolbar select,.date-toolbar input{border:1px solid #dce4ef;border-radius:9px;background:#fff;color:#23334b;padding:10px 12px;min-height:40px;font:inherit}
.date-toolbar input{max-width:175px}
.import-help{font-size:14px;line-height:1.7;color:#45546c}
.import-help pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f7fb;border:1px solid #e4eaf3;border-radius:10px;padding:14px;color:#24334c}
.import-help code{background:#f0f4fa;padding:2px 5px;border-radius:4px}
@media(max-width:720px){.date-toolbar{align-items:stretch}.date-toolbar label{align-self:center}.date-toolbar select{width:100%}.date-toolbar input{flex:1;min-width:120px;max-width:none}}

/* v4.1 — fixed, collapsible navigation and full-width workspace */
.layout{display:block;min-height:100vh}
.sidebar{position:fixed;top:0;bottom:0;left:0;height:100dvh;width:242px;z-index:15;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;transition:width .22s ease;}
.main{margin-left:242px;min-width:0;transition:margin-left .22s ease}
.content{max-width:none;width:100%;margin:0}
.sidebar-toggle{position:absolute;top:22px;right:12px;width:34px;height:34px;display:grid;place-items:center;background:#263b5b;color:#e6eeff;border:0;border-radius:9px;font-size:22px;line-height:1;cursor:pointer}
.sidebar-toggle:hover{background:#36547f}
.nav-icon{display:inline-flex;justify-content:center;min-width:19px}
.nav-label{white-space:nowrap}
.sidebar-collapsed .sidebar{width:66px;padding-left:8px;padding-right:8px}
.sidebar-collapsed .main{margin-left:66px}
.sidebar-collapsed .brand{font-size:0;padding:0;height:52px}
.sidebar-collapsed .brand::before{content:'O';font-size:23px;color:#74a6ff;position:absolute;top:18px;left:23px}
.sidebar-collapsed .sidebar-toggle{top:67px;left:15px;right:auto;width:36px}
.sidebar-collapsed .nav:first-of-type{margin-top:52px}
.sidebar-collapsed .nav{justify-content:center;padding:12px 8px}
.sidebar-collapsed .nav-label,.sidebar-collapsed .sidebar-foot{display:none}
@media(min-width:721px) and (max-width:1100px){.sidebar{width:205px}.main{margin-left:205px}.sidebar-collapsed .sidebar{width:66px}.sidebar-collapsed .main{margin-left:66px}}
@media(max-width:720px){
 .layout{display:block}.sidebar{position:sticky;top:0;bottom:auto;height:auto;width:100%;max-height:180px;overflow-y:auto;flex-direction:row;flex-wrap:wrap;padding:8px 48px 8px 10px;transition:none;z-index:15}
 .main,.sidebar-collapsed .main{margin-left:0}
 .sidebar-toggle,.sidebar-collapsed .sidebar-toggle{top:10px;right:10px;left:auto;width:34px;height:34px}
 .sidebar-collapsed .sidebar{height:54px;max-height:54px;width:100%;padding:7px 48px 7px 12px;display:flex;align-items:center}
 .sidebar-collapsed .brand{height:auto;font-size:21px;padding:0 8px;width:auto}
 .sidebar-collapsed .brand::before{content:none}
 .sidebar-collapsed .brand span{font-size:21px}
 .sidebar-collapsed .nav{display:none}
 .sidebar-collapsed .sidebar-foot{display:none}
 .sidebar .brand{padding:7px 10px}
 .sidebar .nav{width:auto}
 .sidebar .nav-label{display:inline}
}

/* v4.2: prevent collapsed sidebar toggle overlapping first navigation item */
@media(min-width:721px){
 .sidebar-collapsed .sidebar{gap:8px}
 .sidebar-collapsed .sidebar-toggle{top:65px;left:15px;right:auto;width:36px;height:36px;z-index:2}
 .sidebar-collapsed .sidebar-toggle + .nav{margin-top:58px}
 .sidebar-collapsed .brand{flex-shrink:0;height:52px}
 .sidebar-collapsed .nav{min-height:44px;flex-shrink:0}
}

/* v4.3: dashboard-style global search and predictable tool layout */
.topbar{gap:16px;min-width:0;flex-wrap:wrap}
.topbar-start{display:flex;align-items:center;gap:22px;min-width:0;flex:1 1 560px}
.topbar-heading{min-width:150px;flex:0 0 auto}
.global-search-wrap{position:relative;min-width:180px;width:min(430px,100%);flex:1}
.global-search-wrap input{width:100%;height:44px;padding:10px 16px 10px 43px;border-radius:11px;border:1px solid #dce4f1;background:#f5f7fb;color:#1b2b46;font:inherit;outline:none;transition:.18s}
.global-search-wrap input:focus{border-color:#5881ed;background:white;box-shadow:0 0 0 3px #5b86ee1b}
.search-glyph{position:absolute;top:7px;left:14px;color:#8090aa;font-size:29px;line-height:1;pointer-events:none}
.crm-list-header{display:flex;gap:15px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.crm-primary-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.crm-primary-actions .btn{white-space:nowrap}
.crm-filter-toolbar{padding:14px 20px;border-top:1px solid #e7ecf5;background:#fbfcff}
.crm-filter-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.crm-filter-toggle{min-width:115px}
.crm-filter-summary{color:#8090a6;font-size:13px;flex:1}
.crm-import-help{font-size:13px}
.crm-filter-content{display:none;padding-top:15px}
.crm-filter-content.is-open{display:block}
.crm-filter-fields{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.crm-filter-fields label{font-size:13px;color:#7788a2}
.crm-filter-fields select{width:auto;min-width:180px;max-width:250px;min-height:42px}
.crm-filter-content .date-toolbar{margin-top:13px;padding:13px 0 0;border-top:1px solid #e7edf6;background:transparent}
.bulk{display:none}
.bulk.has-selection{display:flex}
.table-wrap{max-width:100%;overflow-x:auto}
.panel{min-width:0}
.content{min-width:0;overflow-x:clip}
@media(max-width:1050px){.topbar-start{flex-basis:100%}.global-search-wrap{width:100%;max-width:none}}
@media(max-width:720px){
 .topbar-start{width:100%;display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .topbar-heading{min-width:0}
 .global-search-wrap{width:100%;min-width:0}
 .crm-list-header{align-items:stretch}
 .crm-primary-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .crm-primary-actions .btn:first-child{grid-column:1/-1}
 .crm-primary-actions .btn{font-size:13px;padding:10px 8px}
 .crm-filter-toolbar{padding:12px}
 .crm-filter-fields{display:grid;grid-template-columns:1fr;gap:7px}
 .crm-filter-fields select{width:100%;max-width:none}
 .crm-filter-summary{font-size:12px}
 .bulk.has-selection{display:flex}
}

/* v4.4 employee form — single-column, clear registration fields */
.staff-form{display:flex;flex-direction:column;gap:3px}
.staff-form .field{margin-bottom:13px}
.staff-form .field label{font-size:13px;font-weight:500;color:#64748b;margin-bottom:7px}
.staff-form input,.staff-form select{min-height:46px;border-radius:9px;font-size:14px}
.staff-form .member-list{padding:12px;gap:8px}
.staff-form .member-list label{font-size:13px;margin:0}
.staff-form .form-actions{position:sticky;bottom:-24px;background:#fff;border-top:1px solid #e8edf4;margin-top:9px;padding:16px 0 0;z-index:2}
#head-members-field[hidden]{display:none!important}
.modal:has(.staff-form){width:min(560px,100%);padding:28px 30px;max-height:90dvh}
.modal:has(.staff-form) h2{font-size:22px;font-weight:550;margin-bottom:23px}
@media(max-width:720px){.modal:has(.staff-form){padding:20px;width:100%}.staff-form .form-actions{bottom:-20px}}

/* v4.6: fixed-position edit actions in staff table */
.staff-table-wrap{overflow-x:auto;max-width:100%;position:relative}
.staff-table-wrap .staff-table{min-width:940px;width:100%;table-layout:auto;border-collapse:separate;border-spacing:0}
.staff-table th,.staff-table td{min-width:0!important;white-space:normal}
.staff-table th:first-child,.staff-table td:first-child{min-width:165px!important}
.staff-table th:last-child,.staff-table td:last-child{position:sticky;right:0;z-index:2;width:76px;min-width:76px!important;max-width:76px!important;text-align:center;background:#fff;box-shadow:-10px 0 14px -12px rgba(29,50,83,.35)}
.staff-table th:last-child{z-index:3;background:#f8faff}
.staff-table td strong{min-width:0!important}
.staff-edit-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;border:1px solid #dce5f3;background:#f8faff;color:#3569eb;padding:0;cursor:pointer;transition:background .15s,border-color .15s}
.staff-edit-btn:hover,.staff-edit-btn:focus-visible{background:#e8f0ff;border-color:#8eafff;outline:none}
@media(max-width:720px){.staff-table-wrap .mobile-lead{position:relative;padding-right:65px}.staff-table-wrap .mobile-lead>.staff-edit-btn{position:absolute;right:16px;top:16px}}

/* v4.8 unified centered deletion confirmation */
.confirm-overlay{z-index:1000;position:fixed;inset:0;display:grid;place-items:center;padding:20px;background:rgba(13,24,43,.55);backdrop-filter:blur(3px)}
.confirm-dialog{width:min(440px,100%);max-height:min(90dvh,760px);overflow-y:auto;background:#fff;color:#182641;border:1px solid #e6eaf2;border-radius:20px;padding:28px;box-shadow:0 28px 80px rgba(10,25,48,.24);animation:confirm-enter .18s ease-out}
@keyframes confirm-enter{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.confirm-symbol{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#fff0f1;color:#c33c4c;font-size:24px;font-weight:600;margin-bottom:16px}
.confirm-dialog h2{font-size:21px;font-weight:550;letter-spacing:-.02em;margin:0 0 9px}
.confirm-dialog p{font-size:14px;line-height:1.55;margin:0 0 10px}
.confirm-dialog .confirm-note{color:#8190a4;font-size:12px;margin-bottom:20px}
.confirm-dialog .field{margin:16px 0 8px}
.confirm-error{min-height:18px;color:#c02d42;font-size:13px;margin:8px 0}
.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}
.confirm-actions .btn{font-weight:500;min-width:108px}
.confirm-danger{background:#dc4055!important;border-color:#dc4055!important;color:white!important}
.confirm-danger:hover{background:#c53047!important}
.modal:has(.staff-delete-confirm){width:min(460px,100%);border-radius:20px;padding:28px}
.modal:has(.staff-delete-confirm) h2{font-weight:550}
.modal:has(.staff-delete-confirm) .form-actions .danger{background:#dc4055;color:white;border-color:#dc4055}
@media(max-width:480px){.confirm-overlay{padding:14px}.confirm-dialog{padding:22px;border-radius:16px}.confirm-actions .btn{flex:1;min-width:0}}

/* v4.9: compact account indicator and icon-only sign out */
.top-actions{flex-wrap:nowrap;gap:10px;min-width:0}
.header-login{display:inline-block;max-width:120px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#74839b;font-size:12px;font-weight:500}
.logout-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;padding:0!important;border-radius:10px;color:#647795}
.logout-icon:hover{background:#f0f4fc;color:#315fd0}
@media(max-width:720px){.top-actions{flex-wrap:wrap;justify-content:flex-end}.header-login{max-width:95px}}

/* Status edit controls match staff edit buttons */
.status-edit-btn{flex:0 0 34px;min-width:34px;min-height:34px}

/* v5.1: fixed compact lead action at right edge of horizontally scrolling table */
.leads-table-wrap{position:relative;max-width:100%;overflow-x:auto}
.leads-table{border-collapse:separate;border-spacing:0}
.leads-table .lead-actions-cell{position:sticky;right:0;width:74px!important;min-width:74px!important;max-width:74px!important;text-align:center;background:#fff;z-index:3;padding:10px 12px;box-shadow:-9px 0 15px -13px rgba(26,49,86,.5)}
.leads-table th.lead-actions-cell{background:#f8faff;z-index:5;white-space:nowrap;font-size:11px}
.leads-table .lead-open-btn{margin:0 auto;display:inline-flex;vertical-align:middle}
@media(max-width:720px){.mobile-lead .bottom .lead-open-btn{flex-shrink:0}}

/* v5.2: compact Status and Assigned-to columns (regardless of drag order) */
@media (min-width:721px) {
  .leads-table-wrap .leads-table { min-width: 1080px; width: 100%; table-layout: auto; }
  .leads-table-wrap .leads-table th.lead-status-cell,
  .leads-table-wrap .leads-table td.lead-status-cell { width: 166px; min-width: 166px; max-width: 166px; padding-left: 9px; padding-right: 9px; }
  .leads-table-wrap .leads-table th.lead-manager-cell,
  .leads-table-wrap .leads-table td.lead-manager-cell { width: 178px; min-width: 178px; max-width: 178px; padding-left: 9px; padding-right: 9px; }
  .leads-table-wrap .leads-table td.lead-status-cell .status-select,
  .leads-table-wrap .leads-table td.lead-manager-cell .owner-select { box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: 100%; padding: 9px 27px 9px 10px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .leads-table-wrap .leads-table td.lead-manager-cell .owner-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* v5.3: Existing lead names are immutable */
.crm-locked-name {background:#f4f6fa!important;color:#55657f!important;cursor:not-allowed;}

/* v5.4 local login history */
.login-history-panel{margin-top:22px}.login-history-panel .panel-header{gap:14px;flex-wrap:wrap}.login-history-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.login-history-actions select{width:auto;min-width:160px;padding:10px 12px;border:1px solid #d8e2f2;border-radius:10px;background:#fff;color:#243756}.login-history-notice{padding:12px 18px;color:#64748b;font-size:13px;line-height:1.5}.login-history-table{min-width:760px}.login-history-table th,.login-history-table td{white-space:nowrap}

/* v5.5: permanently fixed, narrow ID column, immediately after selection */
@media (min-width:721px) {
 .leads-table-wrap .leads-table th:first-child,.leads-table-wrap .leads-table td:first-child{position:sticky;left:0;z-index:6;background:#fff;width:48px!important;min-width:48px!important;max-width:48px!important;text-align:center;padding-left:9px;padding-right:9px;box-sizing:border-box}
 .leads-table-wrap .leads-table th:first-child{z-index:8;background:#f8faff}
 .leads-table-wrap .leads-table .lead-id-cell{position:sticky;left:48px;z-index:6;background:#fff;width:70px!important;min-width:70px!important;max-width:70px!important;box-sizing:border-box;padding:10px 8px!important;text-align:center;white-space:nowrap;font-size:12px;color:#73839c;font-variant-numeric:tabular-nums;box-shadow:8px 0 12px -12px rgba(26,49,86,.5)}
 .leads-table-wrap .leads-table th.lead-id-cell{z-index:8;background:#f8faff;font-weight:600}
 .leads-table-wrap .leads-table th.lead-actions-cell{z-index:9}
}
.mobile-lead-id{font-size:11px;color:#8290a6;font-weight:500;white-space:nowrap;margin-left:6px}
@media (max-width:720px){.leads-table-wrap .leads-table .lead-id-cell{display:none}}

/* v6.0 affiliate column */
@media(min-width:721px){.leads-table-wrap .leads-table th.lead-affiliate-cell,.leads-table-wrap .leads-table td.lead-affiliate-cell{width:144px;min-width:144px;max-width:144px;padding-left:10px;padding-right:10px}.affiliate-cell-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.mobile-affiliate{font-size:12px;color:#64748b;margin-top:9px}

/* v6.2 operations */
.lead-audit{margin-top:22px;border-top:1px solid #e3eaf5;padding-top:18px}.audit-entry{padding:10px 0;border-bottom:1px solid #e8edf5;font-size:13px}.audit-entry small{color:#71829b}.import-preview-table{max-height:290px;overflow:auto;margin:15px 0}.import-preview-table table{width:100%}.import-preview .form-grid{margin-top:12px}#callback-alert{white-space:nowrap}@media(max-width:720px){#callback-alert{padding:7px;font-size:12px}}
