:root{
  --bg:#f3f6fa;--surface:#fff;--surface-2:#f8fafc;--surface-3:#eef3f8;--top:#0f131a;--top-2:#171c24;--text:#0f172a;--muted:#64748b;--muted-2:#94a3b8;--line:#d7dee9;--line-2:#e6ebf2;--blue:#2563eb;--blue-2:#1d4ed8;--blue-soft:#eaf1ff;--green:#0f9f6e;--green-soft:#e8f8f1;--red:#dc3545;--red-soft:#fff0f2;--warn:#b7791f;--warn-soft:#fff7e5;--violet:#6d5dfc;--violet-soft:#f1efff;--radius:6px;--radius-lg:8px;--shadow:0 14px 36px rgba(15,23,42,.08);--shadow-sm:0 5px 14px rgba(15,23,42,.06);--font:Inter,"Segoe UI",Roboto,Arial,sans-serif;--mono:"JetBrains Mono","SFMono-Regular",Consolas,monospace;
}
*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body.crm-ui{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:var(--font);font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}body.crm-ui a{color:inherit;text-decoration:none}body.crm-ui button,body.crm-ui input,body.crm-ui select,body.crm-ui textarea{font:inherit}body.crm-ui img{max-width:100%;height:auto}body.crm-ui strong{font-weight:800}body.crm-ui small,.muted,.small-text{color:var(--muted)}.hidden{display:none!important}.right{text-align:right}.center{text-align:center}.mono{font-family:var(--mono)}

/* Auth screen */
.crm-auth-mode{background:radial-gradient(circle at 50% 0,#f8fbff 0,#eef4fd 42%,#e8eef8 100%)}.auth-shell{min-height:100vh;display:flex;flex-direction:column}.auth-main{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:14vh 20px 28px}.auth-card{width:min(440px,calc(100vw - 36px));background:rgba(255,255,255,.97);border:1px solid #d7dee9;border-radius:10px;box-shadow:0 24px 75px rgba(15,23,42,.12);padding:28px}.auth-card-head{display:flex;align-items:center;gap:14px;margin-bottom:22px}.auth-logo{width:42px;height:42px;border-radius:12px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:900;box-shadow:0 12px 28px rgba(37,99,235,.22)}.auth-card h2{margin:0 0 4px;font-size:25px;line-height:1.12;letter-spacing:-.03em}.auth-card .eyebrow{margin:0 0 5px}.auth-card form{display:grid;gap:14px}.auth-card label{margin:0}.auth-card .button{margin-top:4px}.auth-footer{min-height:58px;border-top:1px solid var(--line);background:rgba(255,255,255,.78);backdrop-filter:blur(12px);display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;color:#526070;padding:14px 20px}.auth-footer strong{color:#111827}.auth-footer span{position:relative}.auth-footer span:before{content:"";display:inline-block;width:4px;height:4px;background:#a4afbd;border-radius:50%;margin:0 10px 2px 0}.crm-auth-mode .flash{position:fixed;left:50%;top:22px;transform:translateX(-50%);z-index:5;width:min(520px,calc(100vw - 30px))}

/* Shell */
.app-shell{min-height:100vh;display:grid;grid-template-rows:50px 1fr}.topbar{height:50px;background:var(--top);border-bottom:1px solid #262d38;color:#f8fafc;display:grid;grid-template-columns:220px minmax(320px,560px) minmax(120px,1fr) auto;align-items:center;gap:12px;padding:0 12px;position:sticky;top:0;z-index:40}.topbar-left{display:flex;align-items:center;gap:10px;min-width:0}.menu-toggle,.top-icon{width:32px;height:32px;border:1px solid #2d3643;background:#141a23;color:#cbd5e1;border-radius:5px;display:grid;place-items:center;cursor:pointer}.menu-toggle:hover,.top-icon:hover{background:#1e2632;color:#fff}.brand{display:flex;align-items:center;gap:8px;min-width:0;color:#fff}.brand-mark{width:22px;height:22px;border-radius:7px;background:#1d4ed8;color:#fff;display:grid;place-items:center;font-size:12px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(255,255,255,.24)}.brand-copy{display:block;min-width:0}.brand-copy strong{display:block;text-transform:uppercase;letter-spacing:.04em;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-search{height:34px;background:#141a23;border:1px solid #303947;border-radius:5px;display:flex;align-items:center;gap:8px;min-width:0;padding:0 9px;color:#96a3b3}.global-search input{border:0;outline:0;background:transparent;color:#fff;min-width:0;width:100%;height:100%;font-size:12px}.global-search input::placeholder{color:#7b8797}.global-search kbd{font-family:var(--mono);font-size:10px;color:#cbd5e1;border:1px solid #374151;background:#0b1118;border-radius:4px;padding:2px 6px;white-space:nowrap}.topbar-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;color:#e5e7eb;font-weight:700;font-size:12px}.topbar-meta span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crumb-sep{color:#94a3b8}.topbar-actions{display:flex;align-items:center;gap:7px;min-width:0}.account-chip{height:34px;display:flex;align-items:center;gap:8px;border:1px solid #2d3643;background:#141a23;color:#fff;border-radius:6px;padding:4px 8px 4px 4px;min-width:0;max-width:210px}.user-avatar,.account-chip>span:first-child{width:26px!important;height:26px!important;min-width:26px;border-radius:50%;background:var(--blue)!important;color:#fff!important;display:grid!important;place-items:center!important;font-weight:900!important;font-size:12px!important}.user-info{display:grid;gap:0;min-width:0}.user-info strong{font-size:12px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-info small{font-size:10px;line-height:1.15;color:#cbd5e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.logout{height:34px;display:inline-flex;align-items:center;border:1px solid #2d3643;border-radius:5px;background:#141a23;color:#fff;font-weight:800;padding:0 10px}.logout:hover{background:#1e2632}.app-body{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 50px)}.sidebar{background:var(--surface);border-right:1px solid var(--line);height:calc(100vh - 50px);position:sticky;top:50px;overflow:auto;padding:14px 10px}.nav{display:grid;gap:3px}.nav-caption{font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:#8a96a6;font-weight:900;margin:13px 7px 6px}.nav a{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:5px;color:#223044;font-weight:700;border:1px solid transparent}.nav a:hover{background:#f4f7fb;border-color:#e8edf4}.nav a.active{background:var(--blue-soft);color:#0f4fd6;border-color:#d9e7ff;box-shadow:inset 3px 0 0 var(--blue)}.nav-ico{width:16px;text-align:center;color:#475569}.main-wrap{min-width:0;display:grid;grid-template-rows:1fr 28px}.main{min-width:0;padding:14px 14px 22px}.content{min-width:0}.footer{height:28px;display:flex;align-items:center;justify-content:center;border-top:1px solid var(--line);background:rgba(255,255,255,.82);color:#697588;font-size:11px;position:sticky;bottom:0}.sidebar-collapsed .app-body{grid-template-columns:58px minmax(0,1fr)}.sidebar-collapsed .sidebar{padding-left:8px;padding-right:8px}.sidebar-collapsed .nav-caption,.sidebar-collapsed .nav a span:not(.nav-ico){display:none}.sidebar-collapsed .nav a{justify-content:center;padding:0}.sidebar-collapsed .nav-ico{width:auto}.sidebar-collapsed .topbar{grid-template-columns:220px minmax(320px,560px) minmax(120px,1fr) auto}

/* Headings and surfaces */
.page-head,.workspace-hero,.module-hero,.purchase-hero,.task-workspace-head,.customer-head,.accounting-head,.page-title-row,.action-title-row{background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow-sm);padding:16px 18px;margin:0 0 12px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.workspace-hero{color:var(--text);background:linear-gradient(180deg,#fff,#fbfdff)}.workspace-hero h2,.page-head h1,.module-hero h1,.purchase-hero h1,.task-workspace-head h1,.customer-head h1,.accounting-head h1,.page-title-row h1,.action-title-row h1{margin:0;font-size:24px;line-height:1.1;letter-spacing:-.03em;color:#0b1324}.workspace-hero .page-subtitle,.page-subtitle,.module-hero p,.purchase-hero p,.task-workspace-head p,.customer-head p,.action-title-row p{margin:6px 0 0;color:#64748b}.eyebrow{margin:0 0 6px;color:#275bbf;text-transform:uppercase;letter-spacing:.12em;font-weight:900;font-size:10px}.panel,.form-section,.filter-panel,.filters-panel,.orders-panel,.customer-list-panel,.task-table-panel,.table-panel,.settings-page,.import-panel,.cache-panel{background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow-sm);padding:14px;margin:0 0 12px;min-width:0}.panel-head,.section-title,.panel-headline,.order-list-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px}.panel h2,.section-title h2,.panel-head h2,.panel-headline h2,.orders-panel h2,.customer-list-panel h2{margin:0;font-size:17px;line-height:1.2}.panel p:last-child{margin-bottom:0}.flash{border:1px solid #bcd7ff;background:#eff6ff;color:#164a9f;padding:10px 12px;border-radius:6px;margin:0 0 12px;font-weight:700}.flash-error,.flash.error{border-color:#ffc9d0;background:#fff1f3;color:#b42334}.flash-success,.flash.success{border-color:#b8ecd8;background:#eefbf5;color:#067647}

/* Grids and KPIs */
.stats-grid,.kpi-grid,.task-kpi-row,.task-kpi-row-pro,.customer-stats,.accounting-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}.stats-grid.compact-stats{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.stat-card,.kpi-card,.task-kpi,.metric-pill{background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow-sm);padding:14px;min-height:82px;overflow:hidden;position:relative}.stat-card:after,.kpi-card:after,.task-kpi:after{content:"";position:absolute;right:-22px;top:-25px;width:70px;height:70px;background:#e6fbf4;border-radius:50%;opacity:.9}.stat-card span,.kpi-card span,.task-kpi span{display:block;text-transform:uppercase;letter-spacing:.06em;color:#58677a;font-weight:900;font-size:10px}.stat-card strong,.kpi-card strong,.task-kpi strong{display:block;margin-top:8px;font-size:23px;line-height:1.08;color:#0f172a;letter-spacing:-.03em}.stat-card small,.kpi-card small,.task-kpi small{display:block;margin-top:6px;color:#64748b}.stat-card.primary,.kpi-card.primary{background:var(--blue);border-color:var(--blue);color:#fff}.stat-card.primary span,.stat-card.primary strong,.stat-card.primary small,.kpi-card.primary span,.kpi-card.primary strong,.kpi-card.primary small{color:#fff}.danger{border-color:#ffc9d0!important;background:#fff4f5!important}.danger strong{color:#d92d3a!important}.warn{border-color:#ffe0a3!important;background:#fff8eb!important}.warn strong{color:#b7791f!important}.success{border-color:#b8ecd8!important;background:#effbf6!important}.success strong{color:#0f9f6e!important}

/* Forms, buttons, tabs */
label{display:block;color:#172033;font-weight:800;font-size:12px;margin:0 0 10px}.stacked-form{display:grid;gap:12px}.form-grid,.filters,.filters-wide,.customer-filters-grid,.task-filters-grid,.task-filters-grid-pro{display:grid;gap:10px}.form-grid.cols-2,.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.cols-3,.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.cols-4,.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.form-grid.cols-5,.cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.wide{grid-column:1/-1}.filters,.toolbar,.clean-toolbar,.marketing-period{display:flex;align-items:end;gap:9px;flex-wrap:wrap}.filter-actions,.toolbar-actions,.quick-actions,.inline-actions,.form-actions,.sticky-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.form-actions,.sticky-actions{justify-content:flex-end}.crm-ui input:not([type="checkbox"]):not([type="radio"]),.crm-ui select,.crm-ui textarea,.copy-input{width:100%;min-width:0;border:1px solid #cfd8e5;border-radius:5px;background:#fff;color:#111827;padding:9px 10px;outline:0;transition:border-color .14s,box-shadow .14s}.crm-ui input:focus,.crm-ui select:focus,.crm-ui textarea:focus{border-color:#8db7ff;box-shadow:0 0 0 3px rgba(37,99,235,.13)}textarea{resize:vertical}.checkbox-line,.check-row,.check-line-pro{display:flex;align-items:flex-start;gap:9px}.checkbox-line input,.check-row input,.check-line-pro input{margin-top:3px}.button,.mini-btn,.crm-ui button:not(.menu-toggle):not(.top-icon){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;border:1px solid #cfd8e5;background:#fff;color:#111827;border-radius:5px;padding:8px 12px;font-weight:800;cursor:pointer;white-space:nowrap}.button:hover,.mini-btn:hover,.crm-ui button:not(.menu-toggle):not(.top-icon):hover{border-color:#b7c3d2;background:#f8fafc}.button.primary,.crm-ui button.primary,.crm-ui .btn-primary{background:var(--blue);border-color:var(--blue);color:#fff}.button.primary:hover,.crm-ui button.primary:hover{background:var(--blue-2)}.button.small,.mini-btn,.small{min-height:28px;padding:6px 9px;font-size:12px}.button.full{width:100%}.button.ghost,.ghost{background:#f8fafc}.crm-tabs,.marketing-tabs,.module-tabs,.accounting-tabs,.settings-tabs,.mini-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:7px;padding:5px;margin:0 0 12px;box-shadow:var(--shadow-sm);width:max-content;max-width:100%}.crm-tabs a,.crm-tabs .tab-link,.marketing-tabs a,.module-tabs a,.accounting-tabs a,.settings-tabs a,.mini-tabs button{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:7px 11px;border-radius:5px;color:#334155;font-weight:900;border:1px solid transparent;background:transparent}.crm-tabs a.active,.crm-tabs .tab-link.active,.marketing-tabs a.active,.module-tabs a.active,.accounting-tabs a.active,.settings-tabs a.active,.mini-tabs button.active,.crm-tabs a:hover,.marketing-tabs a:hover,.module-tabs a:hover,.accounting-tabs a:hover,.settings-tabs a:hover{background:var(--blue-soft);border-color:#d9e7ff;color:#0f4fd6}.marketing-tabs{margin-top:0}.tab-count{margin-left:6px;color:#64748b}

/* Tables */
.table-wrap,.table-scroll,.admin-table-scroll,.orders-scroll{width:100%;overflow:auto;border:1px solid var(--line);border-radius:6px;background:#fff}.table-wrap table,.table-scroll table,.data-table,.compact-table,table{width:100%;border-collapse:separate;border-spacing:0}.table-wrap th,.table-scroll th,.data-table th,.compact-table th,table th{background:#f1f4f8;color:#334155;text-align:left;border-bottom:1px solid var(--line);font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:900;padding:10px 9px;white-space:nowrap}.table-wrap td,.table-scroll td,.data-table td,.compact-table td,table td{border-bottom:1px solid var(--line-2);padding:10px 9px;vertical-align:middle;background:#fff}.table-wrap tr:hover td,.table-scroll tr:hover td,.data-table tr:hover td{background:#fbfdff}.table-wrap tr:last-child td,.table-scroll tr:last-child td,.data-table tr:last-child td{border-bottom:0}.strong-link{color:#075bd8;font-weight:900}.num,.value{font-family:var(--mono);font-weight:800}.empty-state,.empty-row,.task-empty{border:1px dashed #cbd6e3;border-radius:7px;background:#fbfdff;color:#64748b;padding:18px;text-align:center}

/* Orders table hard layout */
.orders-panel{padding:0}.orders-panel>.panel-head,.orders-panel>.order-list-head{padding:14px 14px 0}.orders-panel .table-wrap{border-left:0;border-right:0;border-radius:0}.orders-table,.pro-orders-table{min-width:1550px;table-layout:fixed}.orders-table th:nth-child(1),.orders-table td:nth-child(1){width:130px}.orders-table th:nth-child(2),.orders-table td:nth-child(2){width:150px}.orders-table th:nth-child(3),.orders-table td:nth-child(3){width:110px}.orders-table th:nth-child(4),.orders-table td:nth-child(4){width:90px}.orders-table th:nth-child(5),.orders-table td:nth-child(5){width:160px}.orders-table th:nth-child(6),.orders-table td:nth-child(6){width:140px}.orders-table th:nth-child(7),.orders-table td:nth-child(7){width:105px}.orders-table th:nth-child(8),.orders-table td:nth-child(8){width:360px}.orders-table th:nth-child(9),.orders-table td:nth-child(9),.orders-table th:nth-child(10),.orders-table td:nth-child(10),.orders-table th:nth-child(11),.orders-table td:nth-child(11){width:96px;text-align:right;white-space:nowrap}.orders-table th:nth-child(12),.orders-table td:nth-child(12){width:120px}.orders-table th:nth-child(13),.orders-table td:nth-child(13){width:90px}.orders-table td{overflow:hidden;text-overflow:ellipsis}.orders-table td:nth-child(8){white-space:nowrap}.order-summary{display:flex;align-items:center;gap:8px;justify-content:flex-end;color:#64748b;padding:0 14px 10px}.order-editor-grid,.customer-form-layout,.task-detail-layout,.workspace-grid,.two-column,.crm-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.45fr);gap:12px}.items-table,.pro-items-table,.purchase-lines-panel{overflow:auto}.items-table table{min-width:980px}.order-balance-line{border-radius:6px;padding:11px 14px;margin:0 0 12px;font-weight:800}.order-balance-line.is-debt{background:var(--red-soft);border:1px solid #ffc9d0;color:#b42334}.order-balance-line.is-prepay{background:var(--green-soft);border:1px solid #b8ecd8;color:#067647}

/* Badges and statuses */
.badge,.status-pill,.task-type-pill,.task-overdue-pill,.priority,.brand-chip,.admin-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #d3dce8;border-radius:4px;background:#f8fafc;color:#334155;font-weight:900;font-size:11px;line-height:1;padding:5px 8px;white-space:nowrap}.badge:before,.status-pill:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.75}.status-new,.status-processing,.status-warning{background:#eef6ff;color:#1d4ed8;border-color:#bfdbfe}.status-waiting_payment,.status-pending,.status-sent,.status-shipped{background:#fff7e6;color:#b7791f;border-color:#ffd98a}.status-done,.status-completed,.status-success{background:#e8f8f1;color:#08794f;border-color:#aee7ce}.status-cancelled,.status-canceled,.status-cancel,.status-danger,.status-returned{background:#fff0f2;color:#c5283d;border-color:#ffc5cf}.pay-paid,.badge.pay-paid{background:#e8f8f1;color:#08794f;border-color:#aee7ce}.pay-unpaid,.badge.pay-unpaid{background:#fff0f2;color:#b42334;border-color:#ffc5cf}.pay-prepaid,.pay-partial,.badge.pay-prepaid,.badge.pay-partial{background:#fff7e6;color:#a8640d;border-color:#ffd98a}.pay-refunded,.badge.pay-refunded{background:#f1efff;color:#5b4fe0;border-color:#d9d4ff}.priority.low{background:#f8fafc;color:#475569}.priority.normal,.priority.medium{background:#eef6ff;color:#1d4ed8}.priority.high,.priority.urgent{background:#fff0f2;color:#c5283d}.task-overdue-pill{background:#fff0f2;color:#c5283d;border-color:#ffc5cf}

/* Task/CRM board */
.kanban,.task-board-pro,.task-board-clean{display:grid;grid-template-columns:repeat(4,minmax(230px,1fr));gap:10px}.kanban-col,.task-stage-column{background:#f8fafc;border:1px solid var(--line);border-radius:7px;padding:10px;min-height:260px}.kanban-col h3,.task-stage-column h3{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px;font-size:15px}.task-stage-list{display:grid;gap:9px}.task-card,.task-card-pro{background:#fff;border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow-sm);padding:12px}.task-card strong,.task-title-link{display:block;color:#075bd8;font-size:14px;font-weight:900;margin:5px 0}.task-card-meta,.task-meta,.task-card-related{display:flex;gap:7px;flex-wrap:wrap;color:#64748b;font-size:12px;margin-top:8px}.task-card-actions,.task-actions,.task-status-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.task-progress{height:6px;background:#e7edf5;border-radius:999px;overflow:hidden;margin-top:10px}.task-progress span{display:block;height:100%;background:var(--blue)}.task-detail-main,.task-detail-side{min-width:0}.timeline,.task-comments{display:grid;gap:10px}.timeline-item{border-left:2px solid #dbe4f0;padding:0 0 0 12px;color:#64748b}

/* Product, purchases, accounting, marketing */
.product-photo-preview{max-width:220px;max-height:220px;object-fit:contain;border:1px solid var(--line);border-radius:7px;background:#fff;padding:8px}.module-grid,.permission-grid,.settings-grid,.brand-pills,.admin-quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.module-card,.permission-card,.filter-card,.customer-card-form,.customer-profile-head,.customer-form-main,.customer-form-side,.account-card{background:#fff;border:1px solid var(--line);border-radius:7px;padding:14px;box-shadow:var(--shadow-sm)}.marketing-period{background:#fff;border:1px solid var(--line);border-radius:7px;padding:12px;margin:0 0 12px}.marketing-period label{margin:0}.accounting-tabs{width:auto}.account-list,.finance-control-list{display:grid;gap:10px}.finance-control-list>div,.account-card{display:flex;align-items:center;justify-content:space-between;gap:12px}.purchase-lines-head,.purchase-line{display:grid;grid-template-columns:2.2fr 110px 110px 120px 110px 42px;gap:8px;align-items:center}.purchase-lines-head{font-size:10px;text-transform:uppercase;font-weight:900;color:#64748b;padding:0 6px 6px}.purchase-line{padding:8px;border:1px solid var(--line);border-radius:6px;background:#fff;margin-bottom:8px}.document-total{font-size:22px;font-weight:900}.supplier-hint{color:#64748b}.modal,.modal-backdrop,.order-action-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:80;display:none;align-items:center;justify-content:center;padding:24px}.modal.open,.modal-backdrop.open,.order-action-modal.open{display:flex}.modal-card,.order-modal-box{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 28px 90px rgba(15,23,42,.28);width:min(760px,100%);max-height:88vh;overflow:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:14px}.modal-body{padding:14px}.modal-close{border:0;background:#f1f5f9;border-radius:5px;width:30px;height:30px;cursor:pointer}.product-picker-modal{display:none!important}.product-picker-modal.open{display:flex!important}.purchase-picker-card{background:#fff;border-radius:10px;width:min(1100px,92vw);max-height:86vh;overflow:auto;border:1px solid var(--line)}

/* Pagination */
.pagination{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;padding:12px}.pagination a,.pagination span{min-width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:5px;background:#fff;color:#334155;font-weight:800}.pagination .active,.pagination a.active{background:var(--blue);border-color:var(--blue);color:#fff}

@media(max-width:1200px){.topbar{grid-template-columns:210px minmax(260px,1fr) auto}.topbar-meta{display:none}.stats-grid,.kpi-grid,.task-kpi-row,.customer-stats,.accounting-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kanban,.task-board-pro,.task-board-clean{grid-template-columns:repeat(2,minmax(230px,1fr))}.order-editor-grid,.customer-form-layout,.task-detail-layout,.workspace-grid,.two-column,.crm-layout{grid-template-columns:1fr}}
@media(max-width:860px){.topbar{grid-template-columns:auto minmax(0,1fr) auto;height:auto;min-height:50px}.topbar-left{min-width:150px}.global-search{grid-column:1/-1;order:5;width:100%;margin-bottom:8px}.app-body{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:50px;bottom:0;height:auto;width:240px;transform:translateX(-105%);z-index:60;box-shadow:20px 0 60px rgba(15,23,42,.24);transition:transform .18s}.mobile-sidebar-open .sidebar{transform:translateX(0)}.main{padding:10px}.content{padding:0}.account-chip{max-width:44px;padding-right:4px}.user-info{display:none}.logout{display:none}.stats-grid,.kpi-grid,.task-kpi-row,.customer-stats,.accounting-kpis,.form-grid.cols-2,.form-grid.cols-3,.form-grid.cols-4,.form-grid.cols-5,.cols-2,.cols-3,.cols-4,.cols-5{grid-template-columns:1fr}.kanban,.task-board-pro,.task-board-clean{grid-template-columns:1fr}.page-head,.workspace-hero,.module-hero,.purchase-hero,.task-workspace-head,.customer-head,.accounting-head,.page-title-row,.action-title-row{display:block}.toolbar-actions,.quick-actions,.form-actions{margin-top:10px}.crm-tabs,.marketing-tabs,.module-tabs,.accounting-tabs,.settings-tabs{width:100%;overflow:auto;flex-wrap:nowrap}.crm-tabs a,.marketing-tabs a,.module-tabs a,.accounting-tabs a,.settings-tabs a{white-space:nowrap}}

/* ======================================================================
   LEMBAR CRM UI STABILIZER V4
   Финальный слой поверх всех старых и унаследованных стилей.
   ====================================================================== */
:root{
  --bg:#f4f7fb!important;
  --surface:#ffffff!important;
  --surface-2:#f8fafc!important;
  --surface-3:#eef3f9!important;
  --top:#10141b!important;
  --text:#0f172a!important;
  --muted:#64748b!important;
  --line:#d8e0ec!important;
  --line-2:#e8eef6!important;
  --blue:#2563eb!important;
  --blue-2:#1d4ed8!important;
  --blue-soft:#eaf1ff!important;
  --green:#0f9f6e!important;
  --green-soft:#e8f8f1!important;
  --red:#dc3545!important;
  --red-soft:#fff1f3!important;
  --warn:#b7791f!important;
  --warn-soft:#fff7e6!important;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Roboto,Arial,sans-serif!important;
  --mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace!important;
}
html{background:var(--bg)!important;}
body.crm-ui,
body.crm-ui *{font-family:var(--font)!important;-webkit-font-smoothing:antialiased!important;text-rendering:geometricPrecision!important;}
body.crm-ui{font-size:13px!important;font-weight:400!important;letter-spacing:0!important;color:var(--text)!important;}
body.crm-ui .mono,
body.crm-ui .num,
body.crm-ui .value,
body.crm-ui code,
body.crm-ui kbd{font-family:var(--mono)!important;}
body.crm-ui h1,
body.crm-ui h2,
body.crm-ui h3,
body.crm-ui h4{font-weight:750!important;letter-spacing:-.025em!important;color:#0b1324!important;}
body.crm-ui strong{font-weight:700!important;}
body.crm-ui a{color:inherit!important;text-decoration:none!important;}
body.crm-ui p{line-height:1.5!important;}
body.crm-ui .muted,
body.crm-ui small{color:var(--muted)!important;font-weight:400!important;}

/* Auth screen: профессиональный вход и нижний системный футер */
body.crm-auth-mode{background:radial-gradient(circle at 50% -10%,#ffffff 0,#f4f8ff 34%,#edf3fb 100%)!important;}
body.crm-auth-mode .auth-shell{min-height:100vh!important;display:grid!important;grid-template-rows:1fr auto!important;}
body.crm-auth-mode .auth-main{align-items:flex-start!important;justify-content:center!important;padding:10vh 20px 42px!important;}
body.crm-auth-mode .auth-card{width:min(430px,calc(100vw - 36px))!important;border:1px solid #d9e2ef!important;border-radius:12px!important;background:rgba(255,255,255,.98)!important;box-shadow:0 22px 70px rgba(15,23,42,.10)!important;padding:30px!important;}
body.crm-auth-mode .auth-card-head{gap:14px!important;margin-bottom:24px!important;align-items:center!important;}
body.crm-auth-mode .auth-logo{width:42px!important;height:42px!important;border-radius:12px!important;background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;color:#fff!important;font-size:15px!important;font-weight:800!important;box-shadow:0 12px 28px rgba(37,99,235,.24)!important;}
body.crm-auth-mode .eyebrow{font-size:10px!important;line-height:1!important;font-weight:800!important;letter-spacing:.14em!important;color:#1d4ed8!important;margin:0 0 7px!important;}
body.crm-auth-mode .auth-card h2{font-size:25px!important;line-height:1.12!important;font-weight:760!important;margin:0 0 7px!important;}
body.crm-auth-mode .auth-card p{margin-top:0!important;}
body.crm-auth-mode .auth-card form{gap:14px!important;}
body.crm-auth-mode .auth-card label{font-size:12px!important;font-weight:650!important;color:#172033!important;display:grid!important;gap:7px!important;margin:0!important;}
body.crm-auth-mode .auth-card input{height:39px!important;border-radius:7px!important;border:1px solid #cfd8e5!important;background:#fff!important;padding:0 11px!important;font-size:13px!important;font-weight:400!important;box-shadow:none!important;}
body.crm-auth-mode .auth-card input:focus{border-color:#85adf8!important;box-shadow:0 0 0 3px rgba(37,99,235,.13)!important;}
body.crm-auth-mode .auth-card button.button.primary,
body.crm-auth-mode .auth-card .button.primary,
body.crm-auth-mode .auth-card button[type="submit"]{height:40px!important;min-height:40px!important;width:100%!important;border:1px solid var(--blue)!important;border-radius:7px!important;background:linear-gradient(180deg,#2f6df2,#2563eb)!important;color:#fff!important;font-weight:750!important;box-shadow:0 10px 22px rgba(37,99,235,.22)!important;padding:0 14px!important;}
body.crm-auth-mode .auth-card button.button.primary:hover,
body.crm-auth-mode .auth-card .button.primary:hover,
body.crm-auth-mode .auth-card button[type="submit"]:hover{background:linear-gradient(180deg,#275fe0,#1d4ed8)!important;}
body.crm-auth-mode .auth-card a{color:#1d4ed8!important;font-weight:600!important;}
body.crm-auth-mode .auth-footer{min-height:62px!important;background:rgba(255,255,255,.86)!important;border-top:1px solid #d9e2ef!important;box-shadow:0 -12px 30px rgba(15,23,42,.04)!important;backdrop-filter:blur(12px)!important;padding:10px 20px!important;color:#667085!important;}
body.crm-auth-mode .auth-footer-inner{width:min(1120px,100%)!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;font-size:12px!important;}
body.crm-auth-mode .auth-footer-brand{display:flex!important;align-items:center!important;gap:9px!important;color:#111827!important;font-weight:700!important;}
body.crm-auth-mode .auth-footer-brand strong{font-size:12px!important;font-weight:750!important;}
body.crm-auth-mode .auth-footer-dot{width:24px!important;height:24px!important;border-radius:8px!important;background:#111827!important;color:#fff!important;display:grid!important;place-items:center!important;font-size:11px!important;font-weight:800!important;}
body.crm-auth-mode .auth-footer-copy{color:#667085!important;font-size:12px!important;}
body.crm-auth-mode .auth-footer span:before{display:none!important;content:none!important;}

/* Buttons: перебиваем старый общий button:not(...) */
body.crm-ui .button,
body.crm-ui .mini-btn,
body.crm-ui .btn,
body.crm-ui button:not(.menu-toggle):not(.top-icon){min-height:34px!important;border:1px solid #cfd8e5!important;border-radius:6px!important;background:#fff!important;color:#111827!important;font-weight:650!important;box-shadow:none!important;}
body.crm-ui .button.primary,
body.crm-ui button.button.primary,
body.crm-ui .btn-primary,
body.crm-ui button.primary,
body.crm-ui input[type="submit"].primary{background:var(--blue)!important;border-color:var(--blue)!important;color:#fff!important;font-weight:750!important;box-shadow:0 6px 14px rgba(37,99,235,.18)!important;}
body.crm-ui .button.primary:hover,
body.crm-ui button.button.primary:hover,
body.crm-ui .btn-primary:hover,
body.crm-ui button.primary:hover{background:var(--blue-2)!important;border-color:var(--blue-2)!important;color:#fff!important;}
body.crm-ui .button.small,
body.crm-ui .mini-btn,
body.crm-ui .small{min-height:28px!important;padding:5px 9px!important;font-size:12px!important;}

/* Forms */
body.crm-ui label{font-size:12px!important;font-weight:650!important;color:#172033!important;margin-bottom:10px!important;}
body.crm-ui input:not([type="checkbox"]):not([type="radio"]),
body.crm-ui select,
body.crm-ui textarea{border:1px solid #cfd8e5!important;border-radius:6px!important;background:#fff!important;color:#101828!important;font-size:13px!important;font-weight:400!important;box-shadow:none!important;}
body.crm-ui input:not([type="checkbox"]):not([type="radio"]),
body.crm-ui select{min-height:36px!important;}
body.crm-ui input:focus,
body.crm-ui select:focus,
body.crm-ui textarea:focus{border-color:#8db7ff!important;box-shadow:0 0 0 3px rgba(37,99,235,.13)!important;outline:0!important;}

/* Shell polish */
body.crm-ui .topbar{height:52px!important;grid-template-columns:230px minmax(320px,560px) minmax(110px,1fr) auto!important;background:#0f131a!important;}
body.crm-ui .brand-copy strong{font-size:12px!important;font-weight:800!important;letter-spacing:.055em!important;}
body.crm-ui .account-chip{max-width:230px!important;overflow:hidden!important;}
body.crm-ui .user-info strong{font-size:12px!important;font-weight:750!important;}
body.crm-ui .user-info small{font-size:10px!important;font-weight:600!important;}
body.crm-ui .sidebar{top:52px!important;height:calc(100vh - 52px)!important;}
body.crm-ui .nav a{font-weight:650!important;}
body.crm-ui .footer{height:30px!important;background:rgba(255,255,255,.9)!important;color:#667085!important;font-size:11px!important;}

/* Panels, tabs, KPI */
body.crm-ui .panel,
body.crm-ui .form-section,
body.crm-ui .filter-panel,
body.crm-ui .filters-panel,
body.crm-ui .orders-panel,
body.crm-ui .customer-list-panel,
body.crm-ui .task-table-panel,
body.crm-ui .table-panel,
body.crm-ui .settings-page,
body.crm-ui .import-panel,
body.crm-ui .cache-panel,
body.crm-ui .page-head,
body.crm-ui .workspace-hero,
body.crm-ui .module-hero,
body.crm-ui .purchase-hero,
body.crm-ui .task-workspace-head,
body.crm-ui .customer-head,
body.crm-ui .accounting-head,
body.crm-ui .page-title-row,
body.crm-ui .action-title-row{border:1px solid var(--line)!important;border-radius:8px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.045)!important;}
body.crm-ui .crm-tabs,
body.crm-ui .marketing-tabs,
body.crm-ui .module-tabs,
body.crm-ui .accounting-tabs,
body.crm-ui .settings-tabs,
body.crm-ui .mini-tabs{display:flex!important;align-items:center!important;gap:4px!important;flex-wrap:wrap!important;width:max-content!important;max-width:100%!important;padding:4px!important;margin:0 0 12px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:#fff!important;box-shadow:0 4px 12px rgba(15,23,42,.04)!important;}
body.crm-ui .crm-tabs a,
body.crm-ui .crm-tabs .tab-link,
body.crm-ui .marketing-tabs a,
body.crm-ui .module-tabs a,
body.crm-ui .accounting-tabs a,
body.crm-ui .settings-tabs a,
body.crm-ui .mini-tabs button{min-height:31px!important;padding:7px 11px!important;border-radius:6px!important;border:1px solid transparent!important;background:transparent!important;color:#334155!important;font-size:12px!important;font-weight:700!important;}
body.crm-ui .crm-tabs a.active,
body.crm-ui .crm-tabs .tab-link.active,
body.crm-ui .marketing-tabs a.active,
body.crm-ui .module-tabs a.active,
body.crm-ui .accounting-tabs a.active,
body.crm-ui .settings-tabs a.active,
body.crm-ui .mini-tabs button.active{background:var(--blue-soft)!important;border-color:#cfe0ff!important;color:#0f4fd6!important;box-shadow:0 1px 0 rgba(37,99,235,.08)!important;}
body.crm-ui .stat-card,
body.crm-ui .kpi-card,
body.crm-ui .task-kpi,
body.crm-ui .metric-pill{border-radius:8px!important;box-shadow:0 5px 16px rgba(15,23,42,.045)!important;}
body.crm-ui .stat-card span,
body.crm-ui .kpi-card span,
body.crm-ui .task-kpi span{font-weight:750!important;}
body.crm-ui .stat-card strong,
body.crm-ui .kpi-card strong,
body.crm-ui .task-kpi strong{font-weight:760!important;}

/* Tables: стабильная сетка и отсутствие налезаний */
body.crm-ui .table-wrap,
body.crm-ui .table-scroll,
body.crm-ui .orders-scroll{overflow:auto!important;border:1px solid var(--line)!important;border-radius:7px!important;background:#fff!important;}
body.crm-ui table{font-size:12.5px!important;line-height:1.35!important;}
body.crm-ui table th{font-size:10.5px!important;font-weight:750!important;background:#f1f5f9!important;color:#334155!important;letter-spacing:.055em!important;}
body.crm-ui table td{font-weight:400!important;color:#172033!important;}
body.crm-ui .orders-table,
body.crm-ui .pro-orders-table{min-width:1740px!important;table-layout:fixed!important;}
body.crm-ui .orders-table th,
body.crm-ui .orders-table td{overflow:hidden!important;text-overflow:ellipsis!important;}
body.crm-ui .orders-table th:nth-child(8),
body.crm-ui .orders-table td:nth-child(8){width:430px!important;white-space:normal!important;line-height:1.35!important;}
body.crm-ui .orders-table th:nth-child(9),body.crm-ui .orders-table td:nth-child(9),
body.crm-ui .orders-table th:nth-child(10),body.crm-ui .orders-table td:nth-child(10),
body.crm-ui .orders-table th:nth-child(11),body.crm-ui .orders-table td:nth-child(11){width:110px!important;white-space:nowrap!important;text-align:right!important;}
body.crm-ui .orders-table th:last-child,
body.crm-ui .orders-table td:last-child{width:92px!important;text-align:center!important;}
body.crm-ui .strong-link{font-weight:750!important;color:#0f5bd8!important;}

/* Status colors */
body.crm-ui .badge,
body.crm-ui .status-pill,
body.crm-ui .task-type-pill,
body.crm-ui .task-overdue-pill,
body.crm-ui .priority,
body.crm-ui .brand-chip{font-weight:700!important;border-radius:5px!important;font-size:11px!important;padding:5px 8px!important;}
body.crm-ui .status-new{background:#eef6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important;}
body.crm-ui .status-processing{background:#f1efff!important;color:#5b4fe0!important;border-color:#d9d4ff!important;}
body.crm-ui .status-waiting_payment,
body.crm-ui .status-pending{background:#fff7e6!important;color:#a8640d!important;border-color:#ffd98a!important;}
body.crm-ui .status-ready_to_ship,
body.crm-ui .status-shipped,
body.crm-ui .status-sent{background:#eaf1ff!important;color:#0f4fd6!important;border-color:#cfe0ff!important;}
body.crm-ui .status-done,
body.crm-ui .status-completed,
body.crm-ui .status-success{background:#e8f8f1!important;color:#08794f!important;border-color:#aee7ce!important;}
body.crm-ui .status-cancelled,
body.crm-ui .status-canceled,
body.crm-ui .status-cancel,
body.crm-ui .status-returned,
body.crm-ui .status-danger{background:#fff1f3!important;color:#b42334!important;border-color:#ffc5cf!important;}
body.crm-ui .pay-paid{background:#e8f8f1!important;color:#08794f!important;border-color:#aee7ce!important;}
body.crm-ui .pay-unpaid{background:#fff1f3!important;color:#b42334!important;border-color:#ffc5cf!important;}
body.crm-ui .pay-prepaid,
body.crm-ui .pay-partial,
body.crm-ui .pay-cod{background:#fff7e6!important;color:#a8640d!important;border-color:#ffd98a!important;}

/* Tasks/CRM and marketing legacy guards */
body.crm-ui .kanban-col,
body.crm-ui .task-stage-column,
body.crm-ui .task-card,
body.crm-ui .task-card-pro,
body.crm-ui .marketing-period,
body.crm-ui .module-card,
body.crm-ui .permission-card,
body.crm-ui .filter-card,
body.crm-ui .customer-card-form,
body.crm-ui .customer-profile-head,
body.crm-ui .customer-form-main,
body.crm-ui .customer-form-side,
body.crm-ui .account-card{border:1px solid var(--line)!important;border-radius:8px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.04)!important;}
body.crm-ui .task-title-link,
body.crm-ui .task-card strong{font-weight:750!important;color:#0f5bd8!important;}

@media(max-width:860px){
  body.crm-auth-mode .auth-main{padding-top:7vh!important;}
  body.crm-auth-mode .auth-footer-inner{justify-content:center!important;text-align:center!important;flex-direction:column!important;gap:6px!important;}
  body.crm-ui .topbar{grid-template-columns:auto minmax(0,1fr) auto!important;}
  body.crm-ui .crm-tabs,
  body.crm-ui .marketing-tabs,
  body.crm-ui .module-tabs,
  body.crm-ui .accounting-tabs,
  body.crm-ui .settings-tabs{width:100%!important;overflow:auto!important;flex-wrap:nowrap!important;}
}

/* =========================================================
   LEMBAR CRM UI BUSINESS POLISH V5
   Цель: не подкрасить, а привести рабочие экраны к чистому,
   компактному, профессиональному виду без налезаний.
   ========================================================= */
:root{
  --bg:#f4f7fb!important;
  --surface:#ffffff!important;
  --text:#172033!important;
  --muted:#64748b!important;
  --line:#d8e1ee!important;
  --line-2:#edf2f7!important;
  --blue:#2563eb!important;
  --blue-2:#1d4ed8!important;
  --blue-soft:#eef5ff!important;
  --green:#079669!important;
  --green-soft:#e9fbf3!important;
  --red:#dc3545!important;
  --red-soft:#fff1f3!important;
  --warn:#b7791f!important;
  --warn-soft:#fff8e7!important;
  --radius:10px!important;
  --font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
}
html,body.crm-ui{font-family:var(--font)!important;font-weight:400!important;letter-spacing:0!important;color:var(--text)!important;background:var(--bg)!important;}
body.crm-ui *{letter-spacing:normal;}
body.crm-ui strong,body.crm-ui b{font-weight:650!important;}
body.crm-ui h1,body.crm-ui h2,body.crm-ui h3{font-weight:700!important;letter-spacing:-.02em!important;color:#0f172a!important;}
body.crm-ui h1{font-size:25px!important;line-height:1.15!important;}
body.crm-ui h2{font-size:18px!important;line-height:1.2!important;}
body.crm-ui h3{font-size:15px!important;}
body.crm-ui p{color:#53647a;}
body.crm-ui .main{padding:14px 16px 38px!important;}
body.crm-ui .footer{height:30px!important;background:rgba(255,255,255,.94)!important;border-top:1px solid #d8e1ee!important;color:#667085!important;font-size:11px!important;}
body.crm-ui .topbar{height:52px!important;grid-template-columns:230px minmax(300px,540px) minmax(120px,1fr) auto!important;}
body.crm-ui .sidebar{top:52px!important;height:calc(100vh - 52px)!important;}
body.crm-ui .brand-copy strong{font-weight:750!important;}
body.crm-ui .nav a{font-size:13px!important;font-weight:650!important;border-radius:8px!important;}
body.crm-ui .nav a.active{background:#eaf2ff!important;box-shadow:inset 3px 0 0 var(--blue)!important;}

/* Login footer polish */
body.crm-auth-mode .auth-main{padding-top:13vh!important;}
body.crm-auth-mode .auth-footer{position:fixed!important;left:0!important;right:0!important;bottom:0!important;min-height:64px!important;background:linear-gradient(180deg,rgba(255,255,255,.9),#fff)!important;border-top:1px solid #d8e1ee!important;box-shadow:0 -10px 34px rgba(15,23,42,.05)!important;}
body.crm-auth-mode .auth-footer-inner{width:min(1180px,calc(100vw - 40px))!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;}
body.crm-auth-mode .auth-footer-brand{display:flex!important;align-items:center!important;gap:10px!important;font-weight:650!important;color:#111827!important;}
body.crm-auth-mode .auth-footer-dot{width:28px!important;height:28px!important;border-radius:9px!important;background:#0f172a!important;color:#fff!important;box-shadow:0 8px 20px rgba(15,23,42,.16)!important;}
body.crm-auth-mode .auth-footer-copy{color:#667085!important;font-size:12px!important;}
body.crm-auth-mode .auth-card{border-radius:14px!important;box-shadow:0 26px 70px rgba(15,23,42,.12)!important;}
body.crm-auth-mode .auth-card button[type="submit"]{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;}

/* Универсальные поверхности */
body.crm-ui .panel,
body.crm-ui .form-section,
body.crm-ui .page-title-row,
body.crm-ui .action-title-row,
body.crm-ui .module-hero,
body.crm-ui .customer-head,
body.crm-ui .accounting-head,
body.crm-ui .task-workspace-head,
body.crm-ui .profile-hero{
  border:1px solid var(--line)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.045)!important;
}
body.crm-ui .page-title-row,
body.crm-ui .action-title-row,
body.crm-ui .module-hero,
body.crm-ui .customer-head,
body.crm-ui .accounting-head,
body.crm-ui .task-workspace-head{
  min-height:86px!important;
  padding:18px 18px!important;
  align-items:center!important;
}
body.crm-ui .toolbar-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important;}
body.crm-ui .button,
body.crm-ui .mini-btn,
body.crm-ui button:not(.menu-toggle):not(.top-icon){border-radius:8px!important;font-weight:650!important;min-height:34px!important;white-space:nowrap!important;}
body.crm-ui .button.primary,
body.crm-ui button.primary,
body.crm-ui button.button.primary{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;box-shadow:0 10px 18px rgba(37,99,235,.18)!important;}
body.crm-ui input:not([type="checkbox"]):not([type="radio"]),
body.crm-ui select,
body.crm-ui textarea{border-radius:8px!important;border:1px solid #cad6e5!important;box-shadow:none!important;font-size:13px!important;background:#fff!important;}
body.crm-ui label{font-weight:600!important;font-size:12px!important;color:#243042!important;}

/* Filters: всегда компактно, раскрываются только по клику/open */
body.crm-ui details.panel,
body.crm-ui details.filter-card,
body.crm-ui details.filters-panel,
body.crm-ui details.task-filter-panel{
  padding:0!important;overflow:hidden!important;margin-bottom:12px!important;
}
body.crm-ui details > summary{
  min-height:44px!important;display:flex!important;align-items:center!important;gap:10px!important;cursor:pointer!important;list-style:none!important;padding:0 14px!important;font-weight:650!important;color:#172033!important;background:#fff!important;border-radius:10px!important;
}
body.crm-ui details > summary::-webkit-details-marker{display:none!important;}
body.crm-ui details > summary:before{content:'▸';font-size:13px;color:#0f5bd8;transition:.16s ease;}
body.crm-ui details[open] > summary{border-bottom:1px solid var(--line-2)!important;border-radius:10px 10px 0 0!important;}
body.crm-ui details[open] > summary:before{transform:rotate(90deg);}
body.crm-ui details > form,
body.crm-ui details > .filters,
body.crm-ui details > .customer-filters-grid,
body.crm-ui details > .task-filters-grid{padding:14px!important;}
body.crm-ui .filters,
body.crm-ui .order-filters,
body.crm-ui .customer-filters-grid,
body.crm-ui .task-filters-grid,
body.crm-ui .filters-wide{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;gap:12px!important;align-items:end!important;}
body.crm-ui .filter-actions{display:flex!important;align-items:end!important;gap:8px!important;}

/* KPI cards */
body.crm-ui .stats-grid,
body.crm-ui .task-kpi-row,
body.crm-ui .accounting-kpis{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:12px!important;}
body.crm-ui .stat-card,
body.crm-ui .task-kpi,
body.crm-ui .kpi-card{min-height:88px!important;border-radius:10px!important;padding:15px!important;background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 5px 16px rgba(15,23,42,.04)!important;}
body.crm-ui .stat-card span,
body.crm-ui .task-kpi span{font-size:10.5px!important;font-weight:750!important;text-transform:uppercase!important;letter-spacing:.07em!important;color:#64748b!important;}
body.crm-ui .stat-card strong,
body.crm-ui .task-kpi strong{font-size:24px!important;font-weight:720!important;line-height:1.2!important;}
body.crm-ui .task-kpi.danger,
body.crm-ui .stat-card.danger{background:#fff7f8!important;border-color:#ffc7d0!important;}
body.crm-ui .task-kpi.danger strong{color:#dc3545!important;}

/* Tables common */
body.crm-ui .table-wrap,
body.crm-ui .table-scroll,
body.crm-ui .orders-scroll{overflow:auto!important;border-radius:10px!important;border:1px solid var(--line)!important;background:#fff!important;}
body.crm-ui table{width:100%!important;border-collapse:separate!important;border-spacing:0!important;font-size:13px!important;line-height:1.35!important;}
body.crm-ui table th{height:40px!important;background:#f3f6fa!important;color:#344256!important;text-transform:uppercase!important;font-size:10.5px!important;font-weight:750!important;border-bottom:1px solid var(--line)!important;padding:10px 12px!important;white-space:nowrap!important;}
body.crm-ui table td{padding:12px!important;border-bottom:1px solid #e8eef5!important;vertical-align:middle!important;color:#172033!important;font-weight:400!important;}
body.crm-ui table tr:hover td{background:#fbfdff!important;}
body.crm-ui table small,
body.crm-ui table .small-text{display:block!important;color:#64748b!important;font-size:11.5px!important;margin-top:2px!important;}
body.crm-ui .strong-link{color:#0f5bd8!important;font-weight:700!important;}
body.crm-ui .money-cell{text-align:right!important;white-space:nowrap!important;}
body.crm-ui .money-cell strong{display:block!important;font-weight:700!important;}
body.crm-ui .money-cell small{font-size:11px!important;color:#64748b!important;}
body.crm-ui .money-cell.has-debt{color:#b42334!important;font-weight:650!important;}

/* Orders: compact professional table */
body.crm-ui .pipeline-row{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:10px!important;margin:0 0 12px!important;}
body.crm-ui .pipeline-card{display:block!important;padding:12px 14px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.04)!important;}
body.crm-ui .pipeline-card span{display:block!important;color:#64748b!important;font-size:11px!important;font-weight:700!important;margin-bottom:4px!important;}
body.crm-ui .pipeline-card strong{display:inline-block!important;font-size:20px!important;margin-right:6px!important;font-weight:720!important;color:#0f172a!important;}
body.crm-ui .pipeline-card small{color:#64748b!important;font-size:11.5px!important;}
body.crm-ui .orders-table-clean{min-width:1180px!important;table-layout:fixed!important;}
body.crm-ui .orders-table-clean th:nth-child(1){width:180px!important;}
body.crm-ui .orders-table-clean th:nth-child(2){width:210px!important;}
body.crm-ui .orders-table-clean th:nth-child(3){width:130px!important;}
body.crm-ui .orders-table-clean th:nth-child(4){width:130px!important;}
body.crm-ui .orders-table-clean th:nth-child(5){width:auto!important;}
body.crm-ui .orders-table-clean th:nth-child(6){width:140px!important;}
body.crm-ui .orders-table-clean th:nth-child(7){width:130px!important;}
body.crm-ui .orders-table-clean th:nth-child(8){width:96px!important;}
body.crm-ui .order-main-cell span,
body.crm-ui .customer-main-cell span{display:block;color:#334155;font-size:12px;margin-top:3px;}
body.crm-ui .items-cell{white-space:normal!important;color:#26364c!important;line-height:1.38!important;}
body.crm-ui .order-summary{display:flex!important;gap:14px!important;flex-wrap:wrap!important;color:#64748b!important;}

/* Badges */
body.crm-ui .badge,
body.crm-ui .status-pill,
body.crm-ui .priority,
body.crm-ui .metric-pill,
body.crm-ui .task-type-pill,
body.crm-ui .task-overdue-pill{display:inline-flex!important;align-items:center!important;gap:6px!important;border-radius:999px!important;padding:4px 9px!important;font-size:11.5px!important;font-weight:650!important;line-height:1!important;border:1px solid #cfd8e5!important;background:#f8fafc!important;color:#334155!important;}
body.crm-ui .badge:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.85;}
body.crm-ui .status-done,body.crm-ui .status-completed,body.crm-ui .status-active,body.crm-ui .status-customer-active,body.crm-ui .pay-paid{background:#e9fbf3!important;color:#087857!important;border-color:#a8e8cd!important;}
body.crm-ui .status-canceled,body.crm-ui .status-cancelled,body.crm-ui .status-danger,body.crm-ui .pay-unpaid{background:#fff1f3!important;color:#c72e43!important;border-color:#ffc3cd!important;}
body.crm-ui .status-waiting_payment,body.crm-ui .status-pending,body.crm-ui .status-warning{background:#fff8e6!important;color:#9a5b05!important;border-color:#f7d48b!important;}
body.crm-ui .status-new,body.crm-ui .status-processing,body.crm-ui .status-ready_to_ship,body.crm-ui .status-shipped{background:#eef5ff!important;color:#0f5bd8!important;border-color:#c9dcff!important;}
body.crm-ui .pay-partial{background:#fff8e6!important;color:#9a5b05!important;border-color:#f7d48b!important;}

/* Tasks */
body.crm-ui .task-board-pro{display:grid!important;grid-template-columns:repeat(4,minmax(260px,1fr))!important;gap:12px!important;margin-bottom:12px!important;}
body.crm-ui .task-stage-column{background:#fff!important;border:1px solid var(--line)!important;border-radius:10px!important;box-shadow:0 5px 16px rgba(15,23,42,.04)!important;min-width:0!important;}
body.crm-ui .task-stage-column header{display:flex!important;align-items:center!important;justify-content:space-between!important;border-bottom:1px solid var(--line-2)!important;padding:14px!important;}
body.crm-ui .task-stage-column header h2{margin:0!important;font-size:17px!important;}
body.crm-ui .task-stage-column header small{display:block!important;color:#64748b!important;margin-top:3px!important;}
body.crm-ui .task-stage-column header>span{display:grid!important;place-items:center!important;width:28px!important;height:28px!important;border-radius:50%!important;background:#eef5ff!important;color:#0f5bd8!important;font-weight:700!important;}
body.crm-ui .task-stage-list{padding:12px!important;display:grid!important;gap:10px!important;min-height:110px!important;}
body.crm-ui .task-card-pro{border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;padding:12px!important;box-shadow:0 4px 12px rgba(15,23,42,.035)!important;}
body.crm-ui .task-title-link{display:block!important;color:#0f5bd8!important;font-size:14px!important;font-weight:700!important;margin:8px 0!important;}
body.crm-ui .task-card-meta{display:flex!important;gap:8px!important;flex-wrap:wrap!important;color:#64748b!important;font-size:12px!important;margin-top:8px!important;}
body.crm-ui .task-card-actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-top:10px!important;}
body.crm-ui .task-empty{display:grid!important;place-items:center!important;min-height:66px!important;border:1px dashed #cbd5e1!important;border-radius:10px!important;color:#64748b!important;background:#fbfdff!important;}
body.crm-ui .task-table-panel{display:none!important;}

/* Customers */
body.crm-ui .customer-table{min-width:980px!important;}
body.crm-ui .customer-profile-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:18px!important;}
body.crm-ui .customer-profile-head>div:first-child{display:flex!important;align-items:center!important;gap:14px!important;}
body.crm-ui .customer-avatar,.profile-avatar{width:56px!important;height:56px!important;border-radius:16px!important;display:grid!important;place-items:center!important;background:#2563eb!important;color:#fff!important;font-weight:800!important;font-size:22px!important;box-shadow:0 12px 24px rgba(37,99,235,.22)!important;}
body.crm-ui .customer-profile-head h2{margin:0 0 4px!important;font-size:23px!important;}
body.crm-ui .customer-profile-stats{display:grid!important;grid-template-columns:repeat(3,minmax(90px,1fr))!important;gap:10px!important;min-width:320px!important;}
body.crm-ui .customer-profile-stats span{display:block!important;border:1px solid var(--line)!important;border-radius:10px!important;padding:10px!important;background:#f8fafc!important;color:#64748b!important;font-size:11.5px!important;}
body.crm-ui .customer-profile-stats strong{display:block!important;margin-top:4px!important;color:#0f172a!important;font-size:16px!important;}
body.crm-ui .customer-form-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;gap:14px!important;align-items:start!important;}
body.crm-ui .customer-form-main{display:grid!important;gap:12px!important;}
body.crm-ui .form-grid.cols-3{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;}
body.crm-ui .form-grid.cols-2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
body.crm-ui .form-grid .wide{grid-column:1/-1!important;}
body.crm-ui .form-section .section-title{margin-bottom:12px!important;}
body.crm-ui .form-section h2{font-size:17px!important;}
body.crm-ui .customer-orders-mini a{display:block!important;border:1px solid var(--line)!important;border-radius:8px!important;padding:10px!important;margin-top:8px!important;background:#fbfdff!important;}
body.crm-ui .sticky-actions{position:sticky!important;bottom:30px!important;background:rgba(255,255,255,.94)!important;backdrop-filter:blur(8px)!important;border:1px solid var(--line)!important;border-radius:10px!important;padding:10px!important;justify-content:flex-end!important;box-shadow:0 -8px 20px rgba(15,23,42,.06)!important;}

/* Products */
body.crm-ui .stock-main table{min-width:1180px!important;}
body.crm-ui .stock-main td:nth-child(2){font-weight:650!important;}
body.crm-ui .product-settings-modal .settings-grid,
body.crm-ui .preview-settings-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:14px 0!important;}
body.crm-ui .product-settings-modal label{border:1px solid var(--line)!important;border-radius:10px!important;padding:12px!important;background:#fbfdff!important;display:flex!important;gap:10px!important;align-items:center!important;}

/* Accounting */
body.crm-ui .accounting-kpis{grid-template-columns:repeat(5,minmax(170px,1fr))!important;}
body.crm-ui .accounting-tabs{width:100%!important;overflow:auto!important;flex-wrap:nowrap!important;}
body.crm-ui .accounting-tabs a{white-space:nowrap!important;}
body.crm-ui .accounting-overview{display:grid!important;grid-template-columns:minmax(0,1.5fr) minmax(340px,.8fr)!important;gap:12px!important;}
body.crm-ui .account-card{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:center!important;border:1px solid var(--line)!important;border-radius:10px!important;background:#fbfdff!important;padding:12px!important;margin-bottom:8px!important;}
body.crm-ui .finance-control-list{display:grid!important;gap:8px!important;}
body.crm-ui .finance-control-list div{display:flex!important;justify-content:space-between!important;gap:14px!important;border:1px solid var(--line)!important;border-radius:10px!important;padding:12px!important;background:#fbfdff!important;}

/* Reports */
body.crm-ui .reports-head{align-items:center!important;}
body.crm-ui .report-period-form{display:flex!important;align-items:end!important;gap:8px!important;flex-wrap:wrap!important;margin:0!important;}
body.crm-ui .report-period-form label{display:grid!important;gap:5px!important;margin:0!important;}
body.crm-ui .reports-head + .stats-grid{grid-template-columns:repeat(5,minmax(150px,1fr))!important;}
body.crm-ui .two-column{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;align-items:start!important;}

/* Profile */
body.crm-ui .profile-hero{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:18px!important;}
body.crm-ui .profile-identity{display:flex!important;align-items:center!important;gap:14px!important;}
body.crm-ui .profile-identity h1{margin:0 0 4px!important;}
body.crm-ui .profile-identity p{margin:0!important;color:#64748b!important;}
body.crm-ui .profile-badges{display:flex!important;gap:8px!important;margin-top:9px!important;}
body.crm-ui .info-list{display:grid!important;gap:10px!important;margin:0!important;}
body.crm-ui .info-list div{display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;gap:10px!important;border-bottom:1px solid var(--line-2)!important;padding:9px 0!important;}
body.crm-ui .info-list dt{color:#64748b!important;font-weight:600!important;}
body.crm-ui .info-list dd{margin:0!important;color:#0f172a!important;font-weight:600!important;}
body.crm-ui .copy-input{width:100%!important;background:#f8fafc!important;color:#475569!important;}

/* Modals */
body.crm-ui .modal-backdrop,
body.crm-ui .modal{position:fixed!important;inset:0!important;background:rgba(15,23,42,.42)!important;z-index:120!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:22px!important;}
body.crm-ui .modal-backdrop[hidden],body.crm-ui .modal[hidden]{display:none!important;}
body.crm-ui .modal-card{width:min(720px,calc(100vw - 44px))!important;max-height:calc(100vh - 44px)!important;overflow:auto!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:14px!important;box-shadow:0 34px 90px rgba(15,23,42,.28)!important;padding:22px!important;position:relative!important;}
body.crm-ui .modal-card-wide{width:min(920px,calc(100vw - 44px))!important;}
body.crm-ui .modal-close{position:absolute!important;right:14px!important;top:14px!important;width:34px!important;height:34px!important;border-radius:10px!important;font-size:20px!important;}

@media (max-width:1180px){
  body.crm-ui .task-board-pro{grid-template-columns:repeat(2,minmax(260px,1fr))!important;}
  body.crm-ui .customer-form-layout{grid-template-columns:1fr!important;}
  body.crm-ui .accounting-kpis{grid-template-columns:repeat(2,minmax(210px,1fr))!important;}
  body.crm-ui .reports-head + .stats-grid{grid-template-columns:repeat(2,minmax(180px,1fr))!important;}
}
@media (max-width:860px){
  body.crm-ui .topbar{grid-template-columns:auto 1fr auto!important;}
  body.crm-ui .global-search{display:none!important;}
  body.crm-ui .topbar-meta{display:none!important;}
  body.crm-ui .app-body{grid-template-columns:1fr!important;}
  body.crm-ui .sidebar{position:fixed!important;z-index:80!important;left:0!important;top:52px!important;transform:translateX(-102%);transition:.18s ease!important;width:250px!important;}
  body.crm-ui.mobile-sidebar-open .sidebar{transform:translateX(0)!important;}
  body.crm-ui .task-board-pro,body.crm-ui .two-column{grid-template-columns:1fr!important;}
  body.crm-ui .customer-profile-stats{min-width:0!important;grid-template-columns:1fr!important;}
  body.crm-ui .form-grid.cols-3,body.crm-ui .form-grid.cols-2{grid-template-columns:1fr!important;}
}

/* =========================================================
   LEMBAR CRM UI ORDER EDITOR FIX V6
   Цель: перестать ломать карточку заказа и формы строк.
   ========================================================= */
body.crm-ui{
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
  color:#0f172a !important;
}
body.crm-ui .content{
  max-width: none !important;
}
body.crm-ui .main{
  padding-bottom: 44px !important;
}
body.crm-ui .page-title-row,
body.crm-ui .action-title-row{
  min-height: 76px !important;
  align-items:center !important;
}
body.crm-ui .action-title-row > div:first-child:empty,
body.crm-ui .action-title-row > p:first-child{
  margin:0 !important;
}

/* Список заказов: рабочая таблица без наложений */
body.crm-ui .orders-panel{
  overflow:hidden !important;
}
body.crm-ui .orders-panel .table-wrap{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
}
body.crm-ui .orders-table-clean{
  width:100% !important;
  min-width:1180px !important;
  table-layout:fixed !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body.crm-ui .orders-table-clean th,
body.crm-ui .orders-table-clean td{
  vertical-align:middle !important;
  overflow:hidden !important;
}
body.crm-ui .orders-table-clean th:nth-child(1),
body.crm-ui .orders-table-clean td:nth-child(1){width:160px!important;}
body.crm-ui .orders-table-clean th:nth-child(2),
body.crm-ui .orders-table-clean td:nth-child(2){width:170px!important;}
body.crm-ui .orders-table-clean th:nth-child(3),
body.crm-ui .orders-table-clean td:nth-child(3){width:120px!important;}
body.crm-ui .orders-table-clean th:nth-child(4),
body.crm-ui .orders-table-clean td:nth-child(4){width:120px!important;}
body.crm-ui .orders-table-clean th:nth-child(5),
body.crm-ui .orders-table-clean td:nth-child(5){width:auto!important;}
body.crm-ui .orders-table-clean th:nth-child(6),
body.crm-ui .orders-table-clean td:nth-child(6){width:130px!important;text-align:right!important;}
body.crm-ui .orders-table-clean th:nth-child(7),
body.crm-ui .orders-table-clean td:nth-child(7){width:115px!important;text-align:right!important;}
body.crm-ui .orders-table-clean th:nth-child(8),
body.crm-ui .orders-table-clean td:nth-child(8){width:96px!important;text-align:right!important;}
body.crm-ui .orders-table-clean .order-main-cell,
body.crm-ui .orders-table-clean .customer-main-cell{
  display:table-cell !important;
  white-space:normal !important;
}
body.crm-ui .orders-table-clean .order-main-cell a,
body.crm-ui .orders-table-clean .order-main-cell span,
body.crm-ui .orders-table-clean .order-main-cell small,
body.crm-ui .orders-table-clean .customer-main-cell strong,
body.crm-ui .orders-table-clean .customer-main-cell span,
body.crm-ui .orders-table-clean .customer-main-cell small{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
body.crm-ui .orders-table-clean .items-cell{
  white-space:normal !important;
  line-height:1.35 !important;
  overflow:hidden !important;
  display:table-cell !important;
}
body.crm-ui .orders-table-clean .money-cell strong,
body.crm-ui .orders-table-clean .money-cell small{
  display:block !important;
  white-space:nowrap !important;
}
body.crm-ui .orders-table-clean .money-cell small{
  color:#64748b !important;
  font-size:11px !important;
  font-weight:600 !important;
}
body.crm-ui .orders-table-clean .has-debt{
  color:#dc2626 !important;
  font-weight:800 !important;
}

/* Карточка заказа: редактор должен быть рабочим, а не набором инпутов в столбик */
body.crm-ui .pro-order-editor{
  display:grid !important;
  gap:14px !important;
}
body.crm-ui .pro-order-editor .form-section{
  padding:16px !important;
  overflow:visible !important;
}
body.crm-ui .pro-order-editor .panel-head{
  align-items:center !important;
  margin-bottom:14px !important;
}
body.crm-ui .pro-order-editor .panel-head h2{
  font-size:18px !important;
  letter-spacing:-.02em !important;
}
body.crm-ui .pro-order-editor .form-grid{
  align-items:start !important;
}
body.crm-ui .pro-order-editor label{
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
  min-width:0 !important;
  font-size:12px !important;
  color:#334155 !important;
}
body.crm-ui .pro-order-editor input,
body.crm-ui .pro-order-editor select,
body.crm-ui .pro-order-editor textarea{
  height:auto !important;
  min-height:38px !important;
  font-size:14px !important;
}
body.crm-ui .pro-order-editor textarea{
  min-height:96px !important;
}

body.crm-ui .order-items-section{
  padding:0 !important;
  overflow:hidden !important;
}
body.crm-ui .order-items-section > .panel-head{
  padding:16px 16px 0 !important;
}
body.crm-ui .order-items-section .items-table,
body.crm-ui .order-items-section .pro-items-table{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  padding:0 16px 14px !important;
}
body.crm-ui .order-items-section .item-row{
  display:grid !important;
  grid-template-columns:78px minmax(120px,.7fr) minmax(320px,2.2fr) 74px 90px 100px 92px 112px 38px !important;
  gap:8px !important;
  align-items:center !important;
  min-width:1120px !important;
  padding:8px 0 !important;
  border-bottom:1px solid #e6edf7 !important;
}
body.crm-ui .order-items-section .item-row.item-head{
  position:sticky !important;
  top:0 !important;
  z-index:2 !important;
  background:#f3f7fc !important;
  border-top:1px solid #dbe5f1 !important;
  border-bottom:1px solid #dbe5f1 !important;
  padding:9px 0 !important;
  color:#475569 !important;
  text-transform:uppercase !important;
  letter-spacing:.04em !important;
  font-size:11px !important;
  font-weight:800 !important;
}
body.crm-ui .order-items-section .order-line-row{
  background:#fff !important;
}
body.crm-ui .order-items-section .order-line-row:hover{
  background:#fbfdff !important;
}
body.crm-ui .order-items-section .order-line-row input{
  min-height:36px !important;
  height:36px !important;
  padding:7px 9px !important;
  margin:0 !important;
  font-size:13px !important;
}
body.crm-ui .order-items-section .order-line-row .button.small{
  min-height:34px !important;
  padding:6px 10px !important;
}
body.crm-ui .order-items-section .line-total{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  min-height:36px !important;
  padding:0 8px !important;
  color:#0f172a !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
body.crm-ui .order-items-section .icon-danger{
  width:34px !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 !important;
  border-radius:8px !important;
  color:#b42334 !important;
  border-color:#fecdd3 !important;
  background:#fff5f6 !important;
  font-size:18px !important;
  line-height:1 !important;
}
body.crm-ui .order-total-line{
  display:flex !important;
  justify-content:flex-end !important;
  gap:8px !important;
  padding:12px 16px 16px !important;
  border-top:1px solid #e6edf7 !important;
  background:#fbfdff !important;
  color:#475569 !important;
}
body.crm-ui .order-total-line strong{
  color:#0f172a !important;
  font-size:16px !important;
}

/* Модалка подбора товаров */
body.crm-ui .modal-backdrop[hidden]{display:none!important;}
body.crm-ui .modal-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:1000!important;
  background:rgba(15,23,42,.45)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
}
body.crm-ui .product-picker-modal,
body.crm-ui .crm-modal{
  width:min(1120px,96vw)!important;
  max-height:86vh!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  background:#fff!important;
  border:1px solid #dbe5f1!important;
  border-radius:14px!important;
  box-shadow:0 30px 90px rgba(15,23,42,.3)!important;
}
body.crm-ui .modal-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:18px!important;
  border-bottom:1px solid #e6edf7!important;
}
body.crm-ui .modal-head h2{margin:0!important;font-size:20px!important;}
body.crm-ui .modal-head p{margin:4px 0 0!important;color:#64748b!important;}
body.crm-ui .modal-tools{padding:12px 18px!important;border-bottom:1px solid #e6edf7!important;display:flex!important;gap:10px!important;align-items:center!important;}
body.crm-ui .product-picker-list{overflow:auto!important;padding:0!important;}
body.crm-ui .product-picker-list table{width:100%!important;min-width:880px!important;}
body.crm-ui .modal-close{width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;font-size:20px!important;}

/* Details-фильтры: закрытое состояние компактное */
body.crm-ui details.filters-panel:not([open]),
body.crm-ui details.panel:not([open]){
  padding:0!important;
}
body.crm-ui details.filters-panel:not([open]) > summary,
body.crm-ui details.panel:not([open]) > summary{
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  padding:0 16px!important;
  cursor:pointer!important;
}
body.crm-ui details.filters-panel[open] > summary,
body.crm-ui details.panel[open] > summary{
  margin-bottom:12px!important;
  cursor:pointer!important;
}
body.crm-ui details.filters-panel > summary::marker,
body.crm-ui details.panel > summary::marker{font-size:12px!important;}

@media(max-width:1200px){
  body.crm-ui .order-items-section .item-row{grid-template-columns:78px 120px 320px 70px 84px 94px 86px 104px 38px!important;}
}

/* =========================================================
   Lembar CRM UI V7 - Customers orders focus
   Scope: orders list, order editor, order item rows, product picker.
   ========================================================= */
body.crm-ui .orders-panel{overflow:hidden!important;}
body.crm-ui .orders-table-v7{
  min-width:1280px!important;
  table-layout:fixed!important;
}
body.crm-ui .orders-table-v7 th,
body.crm-ui .orders-table-v7 td{
  padding:12px 12px!important;
  vertical-align:middle!important;
}
body.crm-ui .orders-table-v7 th:nth-child(1),
body.crm-ui .orders-table-v7 td:nth-child(1){width:150px!important;}
body.crm-ui .orders-table-v7 th:nth-child(2),
body.crm-ui .orders-table-v7 td:nth-child(2){width:136px!important;}
body.crm-ui .orders-table-v7 th:nth-child(3),
body.crm-ui .orders-table-v7 td:nth-child(3){width:170px!important;}
body.crm-ui .orders-table-v7 th:nth-child(4),
body.crm-ui .orders-table-v7 td:nth-child(4){width:116px!important;}
body.crm-ui .orders-table-v7 th:nth-child(5),
body.crm-ui .orders-table-v7 td:nth-child(5){width:116px!important;}
body.crm-ui .orders-table-v7 th:nth-child(6),
body.crm-ui .orders-table-v7 td:nth-child(6){width:auto!important;min-width:360px!important;}
body.crm-ui .orders-table-v7 th:nth-child(7),
body.crm-ui .orders-table-v7 td:nth-child(7){width:125px!important;text-align:right!important;}
body.crm-ui .orders-table-v7 th:nth-child(8),
body.crm-ui .orders-table-v7 td:nth-child(8){width:116px!important;text-align:right!important;}
body.crm-ui .orders-table-v7 th:nth-child(9),
body.crm-ui .orders-table-v7 td:nth-child(9){width:94px!important;text-align:right!important;}
body.crm-ui .orders-table-v7 .order-main-cell a,
body.crm-ui .orders-table-v7 .order-main-cell span,
body.crm-ui .orders-table-v7 .order-main-cell small,
body.crm-ui .orders-table-v7 .customer-main-cell strong,
body.crm-ui .orders-table-v7 .customer-main-cell span,
body.crm-ui .orders-table-v7 .customer-main-cell small,
body.crm-ui .orders-table-v7 .order-source-cell strong{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .orders-table-v7 .order-main-cell span,
body.crm-ui .orders-table-v7 .customer-main-cell span,
body.crm-ui .orders-table-v7 .order-main-cell small,
body.crm-ui .orders-table-v7 .customer-main-cell small{
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
  font-weight:500!important;
}
body.crm-ui .orders-table-v7 .order-source-cell{line-height:1.35!important;}
body.crm-ui .orders-table-v7 .order-source-cell strong{
  margin-top:5px!important;
  font-size:12px!important;
  color:#334155!important;
  font-weight:700!important;
}
body.crm-ui .source-pill{
  display:inline-flex!important;
  max-width:118px!important;
  height:22px!important;
  align-items:center!important;
  padding:0 8px!important;
  border-radius:999px!important;
  background:#eef4ff!important;
  color:#1d4ed8!important;
  border:1px solid #bfdbfe!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .source-pill.source-prom{background:#f5f3ff!important;color:#6d28d9!important;border-color:#ddd6fe!important;}
body.crm-ui .source-pill.source-phone{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important;}
body.crm-ui .orders-table-v7 .status-cell{overflow:visible!important;}
body.crm-ui .orders-table-v7 .status-badge,
body.crm-ui .orders-table-v7 .payment-badge{
  max-width:104px!important;
  height:24px!important;
  padding:0 8px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  line-height:1!important;
  font-size:11px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.crm-ui .orders-table-v7 .status-badge::before,
body.crm-ui .orders-table-v7 .payment-badge::before{
  content:""!important;
  width:6px!important;
  height:6px!important;
  border-radius:999px!important;
  background:currentColor!important;
  flex:0 0 auto!important;
}
body.crm-ui .orders-table-v7 .items-cell{
  white-space:normal!important;
  overflow:visible!important;
}
body.crm-ui .order-products-preview{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  min-width:0!important;
}
body.crm-ui .order-products-preview span{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#1e293b!important;
  line-height:1.35!important;
}
body.crm-ui .order-products-preview small{
  align-self:flex-start!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:700!important;
  background:#f1f5f9!important;
  border-radius:999px!important;
  padding:2px 7px!important;
}
body.crm-ui .orders-table-v7 .money-cell{white-space:nowrap!important;}
body.crm-ui .orders-table-v7 .money-cell strong{font-size:13px!important;}
body.crm-ui .orders-table-v7 .button.small{min-width:72px!important;}

/* Order editor item rows: only product picker, no SKU picker button */
body.crm-ui .order-items-section .item-row{
  grid-template-columns:minmax(130px,.75fr) minmax(360px,2.5fr) 72px 88px 102px 94px 118px 38px!important;
  min-width:1040px!important;
  gap:8px!important;
}
body.crm-ui .order-items-section .item-head{
  padding-left:0!important;
  padding-right:0!important;
}
body.crm-ui .order-items-section .order-line-row input[data-sku-input],
body.crm-ui .order-items-section .order-line-row input[data-name-input]{
  font-weight:600!important;
}
body.crm-ui .order-items-section .order-line-row input[data-name-input]{
  color:#0f172a!important;
}
body.crm-ui .order-items-section .order-line-row input::placeholder{color:#94a3b8!important;}
body.crm-ui .order-items-section .inline-actions{display:flex!important;gap:8px!important;align-items:center!important;}
body.crm-ui .order-items-section .inline-actions .primary{box-shadow:0 10px 24px rgba(37,99,235,.2)!important;}

/* Product picker modal V7 */
body.crm-ui .product-picker-backdrop{
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(3px)!important;
}
body.crm-ui .product-picker-modal.product-picker-v7{
  width:min(1040px,calc(100vw - 64px))!important;
  height:min(760px,calc(100vh - 96px))!important;
  max-height:calc(100vh - 96px)!important;
  border-radius:16px!important;
  overflow:hidden!important;
  resize:none!important;
}
body.crm-ui .product-picker-v7 .modal-head{
  flex:0 0 auto!important;
  padding:18px 20px!important;
  background:#fff!important;
}
body.crm-ui .product-picker-v7 .modal-head h2{font-size:22px!important;letter-spacing:-.02em!important;}
body.crm-ui .product-picker-v7 .modal-head p{font-size:13px!important;}
body.crm-ui .product-picker-v7 .modal-close{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  border:1px solid #dbe5f1!important;
  color:#0f172a!important;
  font-size:22px!important;
}
body.crm-ui .product-picker-tools{
  flex:0 0 auto!important;
  padding:14px 20px!important;
  background:#fbfdff!important;
}
body.crm-ui .product-picker-tools input{
  width:100%!important;
  min-height:40px!important;
  border-radius:10px!important;
  font-size:14px!important;
}
body.crm-ui .product-picker-v7 .product-picker-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}
body.crm-ui .product-picker-table{
  min-width:900px!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.crm-ui .product-picker-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  background:#f1f5f9!important;
}
body.crm-ui .product-picker-table th,
body.crm-ui .product-picker-table td{
  padding:12px 14px!important;
  vertical-align:middle!important;
}
body.crm-ui .product-picker-table code{
  font-family:var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace)!important;
  font-size:12px!important;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:7px!important;
  padding:3px 6px!important;
}
body.crm-ui .product-picker-table .picker-name strong{
  display:block!important;
  max-width:520px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .product-picker-table .button.small.primary{min-width:84px!important;}

@media(max-width:1280px){
  body.crm-ui .orders-table-v7{min-width:1200px!important;}
  body.crm-ui .orders-table-v7 th:nth-child(6),
  body.crm-ui .orders-table-v7 td:nth-child(6){min-width:300px!important;}
}

/* =========================================================
   Lembar CRM UI V8 - Orders list cleanup
   - no product preview in orders list
   - source only shows channel label
   - product picker close button stays inside modal head
   ========================================================= */
body.crm-ui .orders-table-v7{
  min-width:1040px!important;
  table-layout:fixed!important;
}
body.crm-ui .orders-table-v7 th:nth-child(1),
body.crm-ui .orders-table-v7 td:nth-child(1){width:165px!important;}
body.crm-ui .orders-table-v7 th:nth-child(2),
body.crm-ui .orders-table-v7 td:nth-child(2){width:105px!important;}
body.crm-ui .orders-table-v7 th:nth-child(3),
body.crm-ui .orders-table-v7 td:nth-child(3){width:auto!important;min-width:190px!important;}
body.crm-ui .orders-table-v7 th:nth-child(4),
body.crm-ui .orders-table-v7 td:nth-child(4){width:122px!important;}
body.crm-ui .orders-table-v7 th:nth-child(5),
body.crm-ui .orders-table-v7 td:nth-child(5){width:122px!important;}
body.crm-ui .orders-table-v7 th:nth-child(6),
body.crm-ui .orders-table-v7 td:nth-child(6){width:136px!important;text-align:right!important;min-width:0!important;}
body.crm-ui .orders-table-v7 th:nth-child(7),
body.crm-ui .orders-table-v7 td:nth-child(7){width:120px!important;text-align:right!important;}
body.crm-ui .orders-table-v7 th:nth-child(8),
body.crm-ui .orders-table-v7 td:nth-child(8){width:94px!important;text-align:right!important;}
body.crm-ui .orders-table-v7 .order-source-cell{
  white-space:nowrap!important;
  overflow:visible!important;
}
body.crm-ui .orders-table-v7 .order-source-cell strong,
body.crm-ui .orders-table-v7 .items-cell,
body.crm-ui .orders-table-v7 .order-products-preview{
  display:none!important;
}
body.crm-ui .source-pill{
  max-width:92px!important;
  min-width:0!important;
  justify-content:center!important;
}
body.crm-ui .orders-table-v7 .status-badge,
body.crm-ui .orders-table-v7 .payment-badge{
  max-width:112px!important;
  width:auto!important;
  justify-content:flex-start!important;
}
body.crm-ui .orders-table-v7 .money-cell strong,
body.crm-ui .orders-table-v7 .money-cell small{
  display:block!important;
  text-align:right!important;
}
body.crm-ui .product-picker-modal.product-picker-v7{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
}
body.crm-ui .product-picker-v7 .modal-head{
  position:relative!important;
  padding-right:64px!important;
}
body.crm-ui .product-picker-v7 .modal-close{
  position:absolute!important;
  top:16px!important;
  right:18px!important;
  z-index:3!important;
  flex:0 0 34px!important;
}
body.crm-ui .product-picker-backdrop.open .product-picker-modal,
body.crm-ui .product-picker-backdrop:not([hidden]) .product-picker-modal{
  display:flex!important;
}
body.crm-ui .product-picker-table .picker-name strong{
  max-width:560px!important;
}
@media(max-width:1280px){
  body.crm-ui .orders-table-v7{min-width:1020px!important;}
}

/* =========================================================
   Lembar CRM UI V9 - balanced customer orders table
   Fixes empty center space after removing product column.
   ========================================================= */
body.crm-ui .orders-panel .orders-scroll{
  overflow-x:auto!important;
  overflow-y:visible!important;
}
body.crm-ui .orders-panel .orders-table-v9-balanced{
  width:100%!important;
  min-width:1120px!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.crm-ui .orders-table-v9-balanced col.col-order{width:150px!important;}
body.crm-ui .orders-table-v9-balanced col.col-source{width:100px!important;}
body.crm-ui .orders-table-v9-balanced col.col-customer{width:clamp(230px,24vw,360px)!important;}
body.crm-ui .orders-table-v9-balanced col.col-status{width:132px!important;}
body.crm-ui .orders-table-v9-balanced col.col-payment{width:132px!important;}
body.crm-ui .orders-table-v9-balanced col.col-total{width:132px!important;}
body.crm-ui .orders-table-v9-balanced col.col-balance{width:118px!important;}
body.crm-ui .orders-table-v9-balanced col.col-action{width:88px!important;}
body.crm-ui .orders-table-v9-balanced th,
body.crm-ui .orders-table-v9-balanced td{
  overflow:hidden!important;
  vertical-align:middle!important;
}
body.crm-ui .orders-table-v9-balanced th:nth-child(1),
body.crm-ui .orders-table-v9-balanced td:nth-child(1),
body.crm-ui .orders-table-v9-balanced th:nth-child(2),
body.crm-ui .orders-table-v9-balanced td:nth-child(2),
body.crm-ui .orders-table-v9-balanced th:nth-child(3),
body.crm-ui .orders-table-v9-balanced td:nth-child(3),
body.crm-ui .orders-table-v9-balanced th:nth-child(4),
body.crm-ui .orders-table-v9-balanced td:nth-child(4),
body.crm-ui .orders-table-v9-balanced th:nth-child(5),
body.crm-ui .orders-table-v9-balanced td:nth-child(5),
body.crm-ui .orders-table-v9-balanced th:nth-child(6),
body.crm-ui .orders-table-v9-balanced td:nth-child(6),
body.crm-ui .orders-table-v9-balanced th:nth-child(7),
body.crm-ui .orders-table-v9-balanced td:nth-child(7),
body.crm-ui .orders-table-v9-balanced th:nth-child(8),
body.crm-ui .orders-table-v9-balanced td:nth-child(8){
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}
body.crm-ui .orders-table-v9-balanced th:nth-child(6),
body.crm-ui .orders-table-v9-balanced td:nth-child(6),
body.crm-ui .orders-table-v9-balanced th:nth-child(7),
body.crm-ui .orders-table-v9-balanced td:nth-child(7){
  text-align:right!important;
}
body.crm-ui .orders-table-v9-balanced th:nth-child(8),
body.crm-ui .orders-table-v9-balanced td:nth-child(8){
  text-align:center!important;
}
body.crm-ui .orders-table-v9-balanced .order-main-cell a,
body.crm-ui .orders-table-v9-balanced .order-main-cell span,
body.crm-ui .orders-table-v9-balanced .order-main-cell small,
body.crm-ui .orders-table-v9-balanced .customer-main-cell strong,
body.crm-ui .orders-table-v9-balanced .customer-main-cell span,
body.crm-ui .orders-table-v9-balanced .customer-main-cell small{
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .orders-table-v9-balanced .order-source-cell{
  text-align:left!important;
}
body.crm-ui .orders-table-v9-balanced .source-pill{
  display:inline-flex!important;
  max-width:84px!important;
  padding:3px 9px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .orders-table-v9-balanced .status-cell{
  text-align:left!important;
  overflow:visible!important;
}
body.crm-ui .orders-table-v9-balanced .status-badge,
body.crm-ui .orders-table-v9-balanced .payment-badge{
  display:inline-flex!important;
  max-width:118px!important;
  padding:4px 9px!important;
  font-size:12px!important;
  line-height:1.15!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .orders-table-v9-balanced .money-cell{
  padding-right:16px!important;
  white-space:nowrap!important;
}
body.crm-ui .orders-table-v9-balanced .money-cell strong,
body.crm-ui .orders-table-v9-balanced .money-cell small{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  text-align:right!important;
}
body.crm-ui .orders-table-v9-balanced .has-debt{
  color:#dc2626!important;
  font-weight:800!important;
}
body.crm-ui .orders-table-v9-balanced .order-action-cell{
  padding-left:8px!important;
  padding-right:8px!important;
  text-align:center!important;
  overflow:visible!important;
}
body.crm-ui .orders-table-v9-balanced .order-action-cell .button.small{
  min-width:70px!important;
  padding:7px 10px!important;
}
@media (min-width:1500px){
  body.crm-ui .orders-panel .orders-table-v9-balanced{min-width:0!important;}
}
@media (max-width:1300px){
  body.crm-ui .orders-panel .orders-table-v9-balanced{min-width:1080px!important;}
  body.crm-ui .orders-table-v9-balanced col.col-customer{width:240px!important;}
}

/* Lembar CRM V10: buyer type conditional fields */
body.crm-ui [hidden],
body.crm-ui .customer-fields[hidden],
body.crm-ui .customer-fields.is-hidden {
    display: none !important;
}
body.crm-ui .customer-fields.is-active {
    display: grid !important;
}
body.crm-ui .order-editor .customer-fields {
    margin-top: 10px;
}
body.crm-ui .order-editor .customer-fields.is-active label {
    animation: none !important;
}

/* Lembar CRM V11: order buyer, customer picker, delivery and NP places polish */
.order-editor-grid-v11 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) !important;
  gap: 16px !important;
  align-items: start !important;
}
.buyer-card-v11,
.settings-card-v11,
.delivery-section-v11 {
  border: 1px solid var(--border, #d8e1ef) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04) !important;
}
.buyer-top-grid { margin-bottom: 14px !important; }
.customer-picker-label { grid-column: span 1 !important; }
.customer-picker-help {
  border: 1px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  font-size: 12px !important;
}
.customer-picker-help strong { color: #0f172a !important; font-size: 12px !important; }
.customer-fields[hidden],
.customer-fields.is-hidden { display: none !important; }
.customer-fields.is-active { display: grid !important; }
.settings-note-v11 {
  margin-top: 12px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.delivery-section-v11 .panel-head {
  align-items: center !important;
  gap: 12px !important;
}
.delivery-section-v11 .panel-head .button,
.delivery-section-v11 .panel-head button {
  white-space: nowrap !important;
}
.delivery-main-grid-v11 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.delivery-description-field { grid-column: span 2 !important; }
.button.disabled,
.button.disabled:hover {
  opacity: .58 !important;
  cursor: not-allowed !important;
  background: #eef2f7 !important;
  color: #64748b !important;
  border-color: #d8e1ef !important;
  box-shadow: none !important;
}
.np-places-card-v11 {
  margin-top: 16px !important;
  border: 1px solid #d8e1ef !important;
  border-radius: 14px !important;
  background: #fbfdff !important;
  overflow: hidden !important;
}
.np-places-head-v11 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid #e5edf7 !important;
  background: #f8fafc !important;
}
.np-places-head-v11 > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.np-places-head-v11 strong { font-size: 15px !important; color: #0f172a !important; }
.np-places-head-v11 span { font-size: 12px !important; color: #64748b !important; }
.np-places-list-v11 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
.np-place-row-v11 {
  display: grid !important;
  grid-template-columns: 94px minmax(90px, .8fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(120px, 1fr) 86px !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #edf2f7 !important;
}
.np-place-row-v11:last-child { border-bottom: 0 !important; }
.np-place-title {
  align-self: center !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 13px !important;
}
.np-place-row-v11 label {
  font-size: 11px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #475569 !important;
}
.np-place-row-v11 input[readonly] {
  background: #f8fafc !important;
  color: #64748b !important;
}
.danger-light {
  background: #fff1f2 !important;
  color: #be123c !important;
  border-color: #fecdd3 !important;
}
.np-places-summary-v11 {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  padding: 12px 16px !important;
  border-top: 1px solid #e5edf7 !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 12px !important;
}
.np-places-summary-v11 strong {
  color: #0f172a !important;
}
.delivery-status-card-v11 {
  margin-top: 12px !important;
  grid-column: 1 / -1 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}
@media (max-width: 1280px) {
  .order-editor-grid-v11 { grid-template-columns: 1fr !important; }
  .delivery-main-grid-v11 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .np-place-row-v11 { grid-template-columns: 80px repeat(3, minmax(90px, 1fr)); }
  .np-place-row-v11 label:nth-of-type(n+4), .np-place-row-v11 .button { grid-column: auto !important; }
}
@media (max-width: 820px) {
  .delivery-main-grid-v11,
  .buyer-top-grid,
  .order-editor-grid-v11 { grid-template-columns: 1fr !important; }
  .customer-picker-label,
  .delivery-description-field { grid-column: auto !important; }
  .np-places-head-v11, .np-places-summary-v11 { flex-direction: column !important; align-items: stretch !important; }
  .np-place-row-v11 { grid-template-columns: 1fr !important; }
}

/* Lembar CRM V12: searchable customer and Nova Poshta selectors */
.customer-search-field,
.np-combo-field {
    position: relative;
}
.customer-search-field input[type="search"] {
    width: 100%;
}
.crm-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 80;
    max-height: 320px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--border, #d6dfec);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    padding: 6px;
}
.crm-suggest[hidden] {
    display: none !important;
}
.crm-suggest-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text, #0f172a);
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.crm-suggest-item:hover,
.crm-suggest-item:focus {
    background: #eef4ff;
    outline: none;
}
.crm-suggest-item strong {
    font-weight: 700;
    line-height: 1.25;
}
.crm-suggest-item span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.25;
    text-align: right;
    max-width: 45%;
}
.customer-suggest-item {
    flex-direction: column;
    gap: 3px;
}
.customer-suggest-item span {
    max-width: none;
    text-align: left;
}
.crm-suggest-empty {
    padding: 10px 12px;
    color: #64748b;
    font-size: 13px;
}
.field-hint {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}
.field-hint.is-error {
    color: #dc2626;
}
.order-editor .customer-picker-help,
.order-editor .customer-picker-help * {
    display: none !important;
}
.delivery-main-grid-v11 .np-combo-field {
    min-width: 0;
}
@media (max-width: 900px) {
    .crm-suggest {
        position: fixed;
        left: 14px;
        right: 14px;
        top: auto;
        bottom: 14px;
        max-height: 55vh;
    }
}

/* =========================================================
   Lembar CRM UI V13 - clean searchable dropdowns in order card
   Focus: customer search, Nova Poshta city/warehouse selectors, picker modal.
   ========================================================= */
body.crm-ui .order-editor .customer-search-field,
body.crm-ui .order-editor .np-combo-field{
  position:relative!important;
  z-index:5!important;
  min-width:0!important;
}
body.crm-ui .order-editor .customer-search-field:focus-within,
body.crm-ui .order-editor .np-combo-field:focus-within{
  z-index:4000!important;
}
body.crm-ui .order-editor .customer-search-field input[type="search"],
body.crm-ui .order-editor .np-combo-field input{
  width:100%!important;
  box-sizing:border-box!important;
}
body.crm-ui .order-editor .crm-suggest{
  position:absolute!important;
  top:calc(100% + 7px)!important;
  left:0!important;
  right:0!important;
  z-index:5000!important;
  width:100%!important;
  min-width:100%!important;
  max-width:none!important;
  max-height:270px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:6px!important;
  border:1px solid #cbd8ea!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 18px 45px rgba(15,23,42,.20)!important;
  box-sizing:border-box!important;
}
body.crm-ui .order-editor .crm-suggest[hidden]{display:none!important;}
body.crm-ui .order-editor .crm-suggest::-webkit-scrollbar{width:8px!important;height:8px!important;}
body.crm-ui .order-editor .crm-suggest::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:999px!important;}
body.crm-ui .order-editor .crm-suggest-item{
  appearance:none!important;
  width:100%!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  padding:9px 10px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#0f172a!important;
  text-align:left!important;
  cursor:pointer!important;
  box-shadow:none!important;
  white-space:normal!important;
  line-height:1.25!important;
}
body.crm-ui .order-editor .crm-suggest-item + .crm-suggest-item{margin-top:2px!important;}
body.crm-ui .order-editor .crm-suggest-item:hover,
body.crm-ui .order-editor .crm-suggest-item:focus{
  background:#eef4ff!important;
  outline:0!important;
}
body.crm-ui .order-editor .crm-suggest-item .suggest-title,
body.crm-ui .order-editor .crm-suggest-item strong{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:750!important;
  text-align:left!important;
}
body.crm-ui .order-editor .crm-suggest-item .suggest-meta,
body.crm-ui .order-editor .crm-suggest-item span:not(.suggest-title){
  display:block!important;
  max-width:220px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:600!important;
  text-align:right!important;
  white-space:nowrap!important;
}
body.crm-ui .order-editor .customer-suggest{
  max-height:285px!important;
}
body.crm-ui .order-editor .customer-suggest .customer-suggest-item{
  display:block!important;
  padding:10px 12px!important;
}
body.crm-ui .order-editor .customer-suggest .suggest-title{
  white-space:nowrap!important;
}
body.crm-ui .order-editor .customer-suggest .suggest-meta{
  max-width:100%!important;
  margin-top:3px!important;
  text-align:left!important;
  white-space:nowrap!important;
  font-size:12px!important;
}
body.crm-ui .order-editor .np-suggest{
  max-height:300px!important;
}
body.crm-ui .order-editor .np-suggest .np-suggest-item{
  grid-template-columns:minmax(0,1fr) 54px!important;
  align-items:start!important;
}
body.crm-ui .order-editor .np-suggest .suggest-title{
  white-space:normal!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  line-height:1.3!important;
}
body.crm-ui .order-editor .np-suggest .suggest-meta{
  justify-self:end!important;
  width:auto!important;
  max-width:54px!important;
  padding:2px 6px!important;
  border:1px solid #dbe5f1!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  text-align:center!important;
  color:#334155!important;
}
body.crm-ui .delivery-main-grid-v11 .np-combo-field .np-suggest{
  width:min(560px, calc(100vw - 360px))!important;
  min-width:100%!important;
}
body.crm-ui .delivery-main-grid-v11 .np-combo-field:nth-child(4) .np-suggest{
  left:auto!important;
  right:0!important;
}
body.crm-ui .order-editor .crm-suggest-empty,
body.crm-ui .order-editor .crm-suggest-note{
  padding:10px 12px!important;
  color:#64748b!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.35!important;
  text-align:left!important;
}
body.crm-ui .order-editor .crm-suggest-note{
  margin-top:4px!important;
  border-top:1px solid #edf2f7!important;
  color:#2563eb!important;
}
body.crm-ui .order-editor .field-hint{
  display:block!important;
  margin-top:6px!important;
  min-height:16px!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.35!important;
}
body.crm-ui .order-editor .field-hint.is-error{color:#dc2626!important;}
body.crm-ui .order-editor .customer-search-status{color:#718096!important;}

/* Product picker modal: keep header, close button and table inside one clean dialog. */
body.crm-ui .product-picker-backdrop{
  z-index:6000!important;
  align-items:center!important;
  justify-content:center!important;
  padding:34px!important;
}
body.crm-ui .product-picker-modal.product-picker-v7{
  width:min(1040px, calc(100vw - 88px))!important;
  height:min(720px, calc(100vh - 110px))!important;
  max-height:calc(100vh - 110px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 28px 90px rgba(15,23,42,.34)!important;
}
body.crm-ui .product-picker-v7 .modal-head{
  position:relative!important;
  flex:0 0 auto!important;
  padding:18px 64px 16px 20px!important;
}
body.crm-ui .product-picker-v7 .modal-close{
  position:absolute!important;
  top:14px!important;
  right:16px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
}
body.crm-ui .product-picker-v7 .product-picker-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}
@media (max-width:900px){
  body.crm-ui .delivery-main-grid-v11 .np-combo-field .np-suggest,
  body.crm-ui .order-editor .crm-suggest{
    position:absolute!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    max-height:250px!important;
  }
  body.crm-ui .product-picker-backdrop{padding:12px!important;}
  body.crm-ui .product-picker-modal.product-picker-v7{width:calc(100vw - 24px)!important;height:calc(100vh - 24px)!important;max-height:calc(100vh - 24px)!important;}
}

/* Lembar CRM V14: modal lookup controls for order customer and Nova Poshta pickers */
body.crm-ui .lookup-control{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:8px!important;
  align-items:center!important;
  width:100%!important;
}
body.crm-ui .np-picker-field .lookup-control{grid-template-columns:minmax(0,1fr) auto!important;}
body.crm-ui .lookup-control input[readonly]{
  background:#fff!important;
  cursor:pointer!important;
}
body.crm-ui .lookup-control .button.small{
  min-height:38px!important;
  white-space:nowrap!important;
}
body.crm-ui .lookup-control .button.ghost{
  width:38px!important;
  min-width:38px!important;
  padding:0!important;
  font-size:18px!important;
  line-height:1!important;
}
body.crm-ui .customer-search-field .crm-suggest,
body.crm-ui .np-combo-field .crm-suggest{
  display:none!important;
}
body.crm-ui .crm-picker-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:3000!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:72px 22px 22px!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(6px)!important;
}
body.crm-ui .crm-picker-backdrop[hidden]{display:none!important;}
body.crm-ui .crm-picker-modal{
  width:min(760px,calc(100vw - 44px))!important;
  max-height:calc(100vh - 110px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  border-radius:18px!important;
  box-shadow:0 30px 90px rgba(15,23,42,.36)!important;
}
body.crm-ui .crm-picker-modal-wide{width:min(920px,calc(100vw - 44px))!important;}
body.crm-ui .crm-picker-head{
  flex:0 0 auto!important;
  padding:18px 20px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:linear-gradient(180deg,#fff,#f8fafc)!important;
}
body.crm-ui .crm-picker-head h2{
  margin:0!important;
  font-size:20px!important;
  line-height:1.2!important;
  letter-spacing:-.02em!important;
  color:#0f172a!important;
}
body.crm-ui .crm-picker-head p{
  margin:4px 0 0!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.35!important;
}
body.crm-ui .crm-picker-head .modal-close{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  padding:0!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:22px!important;
  line-height:1!important;
  box-shadow:none!important;
}
body.crm-ui .crm-picker-body{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:16px 20px 20px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
}
body.crm-ui .crm-picker-search{
  width:100%!important;
  height:44px!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  padding:0 14px!important;
  background:#fff!important;
  font-size:14px!important;
  color:#0f172a!important;
  outline:none!important;
}
body.crm-ui .crm-picker-search:focus{
  border-color:#2563eb!important;
  box-shadow:0 0 0 4px rgba(37,99,235,.12)!important;
}
body.crm-ui .crm-picker-status{
  min-height:20px!important;
  padding:0 2px!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.45!important;
}
body.crm-ui .crm-picker-status.is-error{color:#dc2626!important;}
body.crm-ui .crm-picker-status.is-ok{color:#475569!important;}
body.crm-ui .crm-picker-results{
  flex:1 1 auto!important;
  min-height:210px!important;
  max-height:52vh!important;
  overflow:auto!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  background:#f8fafc!important;
  padding:8px!important;
}
body.crm-ui .crm-picker-results::-webkit-scrollbar{width:9px!important;height:9px!important;}
body.crm-ui .crm-picker-results::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:999px!important;}
body.crm-ui .crm-picker-row{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:3px!important;
  text-align:left!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#fff!important;
  padding:11px 12px!important;
  margin:0 0 7px!important;
  cursor:pointer!important;
  color:#0f172a!important;
}
body.crm-ui .crm-picker-row:hover,
body.crm-ui .crm-picker-row:focus{
  border-color:#2563eb!important;
  background:#eff6ff!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.10)!important;
  outline:none!important;
}
body.crm-ui .picker-row-title{
  display:block!important;
  font-size:14px!important;
  font-weight:750!important;
  color:#0f172a!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
body.crm-ui .picker-row-meta{
  display:block!important;
  font-size:12px!important;
  color:#64748b!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
body.crm-ui .crm-picker-empty{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:160px!important;
  color:#64748b!important;
  text-align:center!important;
  font-size:14px!important;
  line-height:1.45!important;
  border:1px dashed #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  padding:18px!important;
}
@media (max-width:760px){
  body.crm-ui .crm-picker-backdrop{padding:14px!important;align-items:stretch!important;}
  body.crm-ui .crm-picker-modal{width:100%!important;max-height:calc(100vh - 28px)!important;}
  body.crm-ui .lookup-control{grid-template-columns:minmax(0,1fr)!important;}
  body.crm-ui .lookup-control .button.small{width:100%!important;}
}

/* Lembar CRM V15: safe stock actions and readable order history */
body.crm-ui .order-stock-modal-v15,
body.crm-ui .order-history-modal-v15{
  width:min(760px,calc(100vw - 44px))!important;
  max-height:calc(100vh - 96px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  border-radius:18px!important;
}
body.crm-ui .order-stock-modal-v15 .modal-body,
body.crm-ui .order-history-modal-v15 .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:18px!important;
}
body.crm-ui .action-guard-v15{
  display:grid!important;
  gap:8px!important;
  padding:14px 16px!important;
  border:1px solid #fecaca!important;
  border-radius:14px!important;
  background:#fff1f2!important;
  color:#991b1b!important;
}
body.crm-ui .action-guard-v15 strong{
  font-size:15px!important;
  line-height:1.3!important;
}
body.crm-ui .action-guard-v15 span,
body.crm-ui .action-guard-v15 li{
  font-size:13px!important;
  line-height:1.45!important;
}
body.crm-ui .action-guard-v15 ul{
  margin:0!important;
  padding-left:18px!important;
}
body.crm-ui .action-ready-v15{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:12px 14px!important;
  margin-bottom:12px!important;
  border:1px solid #bbf7d0!important;
  border-radius:14px!important;
  background:#f0fdf4!important;
  color:#166534!important;
}
body.crm-ui .action-ready-v15 strong{font-size:14px!important;}
body.crm-ui .action-ready-v15 span{font-size:13px!important;color:#15803d!important;}
body.crm-ui .action-items-table-v15{
  width:100%!important;
  table-layout:auto!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  overflow:hidden!important;
}
body.crm-ui .action-items-table-v15 th,
body.crm-ui .action-items-table-v15 td{
  padding:10px 12px!important;
  vertical-align:top!important;
}
body.crm-ui .modal-actions-v15{
  display:flex!important;
  justify-content:flex-end!important;
  padding-top:14px!important;
  margin-top:14px!important;
  border-top:1px solid #e2e8f0!important;
}
body.crm-ui button[disabled],
body.crm-ui .button[disabled]{
  opacity:.55!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}
body.crm-ui .order-history-body-v15{
  background:#f8fafc!important;
}
body.crm-ui .history-list-v15{
  display:grid!important;
  gap:10px!important;
}
body.crm-ui .history-entry-v15{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
}
body.crm-ui .history-entry-time-v15{
  padding-top:8px!important;
  color:#64748b!important;
  text-align:right!important;
}
body.crm-ui .history-entry-time-v15 strong,
body.crm-ui .history-entry-time-v15 span{
  display:block!important;
  font-size:12px!important;
  line-height:1.35!important;
}
body.crm-ui .history-entry-time-v15 strong{color:#334155!important;font-weight:700!important;}
body.crm-ui .history-entry-card-v15{
  position:relative!important;
  padding:12px 14px!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.05)!important;
}
body.crm-ui .history-entry-card-v15:before{
  content:""!important;
  position:absolute!important;
  left:-19px!important;
  top:18px!important;
  width:9px!important;
  height:9px!important;
  border-radius:999px!important;
  background:#2563eb!important;
  box-shadow:0 0 0 4px #dbeafe!important;
}
body.crm-ui .history-entry-message-v15{
  color:#0f172a!important;
  font-size:14px!important;
  line-height:1.45!important;
  white-space:normal!important;
}
body.crm-ui .history-entry-meta-v15{
  margin-top:6px!important;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
}
@media (max-width:760px){
  body.crm-ui .history-entry-v15{grid-template-columns:1fr!important;gap:6px!important;}
  body.crm-ui .history-entry-time-v15{text-align:left!important;padding-top:0!important;}
  body.crm-ui .history-entry-card-v15:before{display:none!important;}
  body.crm-ui .action-ready-v15{align-items:flex-start!important;flex-direction:column!important;}
}

/* Lembar CRM V16: unified modal shell polish
   Fixes floating close buttons and normalizes all order/customer/product dialogs. */
body.crm-ui .modal-backdrop,
body.crm-ui .order-action-modal,
body.crm-ui .product-picker-backdrop,
body.crm-ui .crm-picker-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:5000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:28px!important;
  background:rgba(15,23,42,.56)!important;
  backdrop-filter:blur(3px)!important;
}
body.crm-ui .modal-backdrop[hidden],
body.crm-ui .order-action-modal[hidden],
body.crm-ui .product-picker-backdrop[hidden],
body.crm-ui .crm-picker-backdrop[hidden]{display:none!important;}

body.crm-ui .order-action-modal .order-modal-box,
body.crm-ui .product-picker-backdrop .product-picker-modal,
body.crm-ui .crm-picker-backdrop .crm-picker-modal,
body.crm-ui .modal-backdrop .modal-card,
body.crm-ui .modal-backdrop .crm-modal{
  position:relative!important;
  width:min(760px,calc(100vw - 56px))!important;
  max-height:calc(100vh - 72px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  background:#fff!important;
  border:1px solid #d9e2ef!important;
  border-radius:18px!important;
  box-shadow:0 34px 90px rgba(15,23,42,.36)!important;
  padding:0!important;
}
body.crm-ui .product-picker-backdrop .product-picker-modal{width:min(1120px,calc(100vw - 72px))!important;height:min(760px,calc(100vh - 92px))!important;}
body.crm-ui .crm-picker-backdrop .crm-picker-modal{width:min(760px,calc(100vw - 56px))!important;}
body.crm-ui .crm-picker-backdrop .crm-picker-modal-wide{width:min(940px,calc(100vw - 56px))!important;}
body.crm-ui .order-action-modal .order-history-modal-v15{width:min(780px,calc(100vw - 56px))!important;}

body.crm-ui .order-action-modal .modal-head,
body.crm-ui .product-picker-modal .modal-head,
body.crm-ui .crm-picker-modal .modal-head,
body.crm-ui .crm-picker-modal .crm-picker-head,
body.crm-ui .modal-card .modal-head,
body.crm-ui .crm-modal .modal-head{
  position:relative!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:20px 22px!important;
  min-height:0!important;
  border-bottom:1px solid #e2e8f0!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
}
body.crm-ui .order-action-modal .modal-head h2,
body.crm-ui .product-picker-modal .modal-head h2,
body.crm-ui .crm-picker-modal .modal-head h2,
body.crm-ui .modal-card .modal-head h2,
body.crm-ui .crm-modal .modal-head h2{
  margin:0!important;
  padding:0!important;
  color:#0f172a!important;
  font-size:20px!important;
  font-weight:800!important;
  line-height:1.2!important;
  letter-spacing:-.02em!important;
}
body.crm-ui .order-action-modal .modal-head p,
body.crm-ui .product-picker-modal .modal-head p,
body.crm-ui .crm-picker-modal .modal-head p,
body.crm-ui .modal-card .modal-head p,
body.crm-ui .crm-modal .modal-head p{
  margin:5px 0 0!important;
  padding:0!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.45!important;
}

body.crm-ui .order-action-modal .modal-head .modal-close,
body.crm-ui .product-picker-modal .modal-head .modal-close,
body.crm-ui .crm-picker-modal .modal-head .modal-close,
body.crm-ui .modal-card .modal-head .modal-close,
body.crm-ui .crm-modal .modal-head .modal-close,
body.crm-ui .crm-picker-head .modal-close{
  position:static!important;
  inset:auto!important;
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#334155!important;
  font-size:24px!important;
  font-weight:600!important;
  line-height:1!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
body.crm-ui .order-action-modal .modal-head .modal-close:hover,
body.crm-ui .product-picker-modal .modal-head .modal-close:hover,
body.crm-ui .crm-picker-modal .modal-head .modal-close:hover,
body.crm-ui .modal-card .modal-head .modal-close:hover,
body.crm-ui .crm-modal .modal-head .modal-close:hover,
body.crm-ui .crm-picker-head .modal-close:hover{
  border-color:#94a3b8!important;
  background:#f8fafc!important;
  color:#0f172a!important;
}

body.crm-ui .order-action-modal .modal-body,
body.crm-ui .product-picker-modal .modal-body,
body.crm-ui .crm-picker-modal .crm-picker-body,
body.crm-ui .crm-picker-modal .modal-body,
body.crm-ui .modal-card .modal-body,
body.crm-ui .crm-modal .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:18px 22px!important;
  background:#fff!important;
}
body.crm-ui .order-action-modal .modal-actions-v15,
body.crm-ui .order-action-modal .modal-footer,
body.crm-ui .product-picker-modal .modal-footer,
body.crm-ui .crm-picker-modal .modal-footer{
  flex:0 0 auto!important;
  margin:0!important;
  padding:16px 22px!important;
  border-top:1px solid #e2e8f0!important;
  background:#f8fafc!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:10px!important;
}

body.crm-ui .order-action-modal .action-guard-v15{
  padding:16px 18px!important;
  border-radius:14px!important;
  border:1px solid #fecaca!important;
  background:#fff1f2!important;
}
body.crm-ui .order-action-modal .action-guard-v15 strong{display:block!important;margin-bottom:4px!important;color:#991b1b!important;}
body.crm-ui .order-action-modal .action-guard-v15 span{display:block!important;color:#991b1b!important;}
body.crm-ui .order-action-modal .action-guard-v15 ul{margin:10px 0 0!important;padding-left:18px!important;}

body.crm-ui .order-action-modal .order-history-body-v15{background:#f8fafc!important;padding:18px 22px!important;}
body.crm-ui .order-action-modal .history-list-v15{display:grid!important;gap:12px!important;}
body.crm-ui .order-action-modal .history-entry-v15{grid-template-columns:104px minmax(0,1fr)!important;gap:14px!important;}
body.crm-ui .order-action-modal .history-entry-time-v15{padding-top:12px!important;text-align:right!important;color:#64748b!important;}
body.crm-ui .order-action-modal .history-entry-card-v15{border-radius:14px!important;border:1px solid #e2e8f0!important;background:#fff!important;padding:13px 15px!important;}
body.crm-ui .order-action-modal .history-entry-message-v15{font-size:14px!important;line-height:1.45!important;color:#0f172a!important;}
body.crm-ui .order-action-modal .history-entry-meta-v15{font-size:12px!important;color:#64748b!important;margin-top:6px!important;}

body.crm-ui .crm-picker-modal .crm-picker-body{display:grid!important;gap:12px!important;}
body.crm-ui .crm-picker-modal .crm-picker-search{width:100%!important;min-height:42px!important;border-radius:10px!important;}
body.crm-ui .crm-picker-modal .crm-picker-status{font-size:13px!important;color:#64748b!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:10px!important;padding:10px 12px!important;}
body.crm-ui .crm-picker-modal .crm-picker-status.error{color:#991b1b!important;background:#fff1f2!important;border-color:#fecaca!important;}
body.crm-ui .crm-picker-modal .crm-picker-results{display:grid!important;gap:8px!important;overflow:auto!important;max-height:420px!important;padding-right:2px!important;}
body.crm-ui .crm-picker-modal .crm-picker-item{width:100%!important;text-align:left!important;border:1px solid #e2e8f0!important;background:#fff!important;border-radius:12px!important;padding:12px 14px!important;box-shadow:none!important;color:#0f172a!important;}
body.crm-ui .crm-picker-modal .crm-picker-item:hover{border-color:#93c5fd!important;background:#eff6ff!important;}

@media (max-width:760px){
  body.crm-ui .modal-backdrop,
  body.crm-ui .order-action-modal,
  body.crm-ui .product-picker-backdrop,
  body.crm-ui .crm-picker-backdrop{padding:12px!important;align-items:flex-start!important;}
  body.crm-ui .order-action-modal .order-modal-box,
  body.crm-ui .product-picker-backdrop .product-picker-modal,
  body.crm-ui .crm-picker-backdrop .crm-picker-modal{width:100%!important;max-height:calc(100vh - 24px)!important;}
  body.crm-ui .order-action-modal .modal-head,
  body.crm-ui .product-picker-modal .modal-head,
  body.crm-ui .crm-picker-modal .modal-head,
  body.crm-ui .crm-picker-modal .crm-picker-head{padding:16px!important;}
  body.crm-ui .order-action-modal .modal-body,
  body.crm-ui .crm-picker-modal .crm-picker-body{padding:14px 16px!important;}
  body.crm-ui .order-action-modal .history-entry-v15{grid-template-columns:1fr!important;}
  body.crm-ui .order-action-modal .history-entry-time-v15{text-align:left!important;padding-top:0!important;}
}

/* === Lembar CRM V17: customers + suppliers polish === */
.customer-orders-clean .section-title,
.supplier-list-panel .section-title,
.supplier-card-form .section-title,
.supplier-related-panels .section-title {
  align-items: flex-start;
  gap: 12px;
}
.customer-orders-clean .section-title h2,
.supplier-list-panel .section-title h2,
.supplier-card-form .section-title h2 {
  margin: 0;
}
.customer-orders-clean .section-title p,
.supplier-list-panel .section-title p,
.supplier-card-form .section-title p,
.supplier-related-panels .section-title p {
  margin: 4px 0 0;
  color: var(--muted, #64748b);
  font-size: 13px;
  line-height: 1.35;
}
.customer-order-list {
  display: grid;
  gap: 10px;
}
.customer-order-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border, #d8e1ee);
  border-radius: 12px;
  background: #fff;
  color: var(--text, #0f172a);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.customer-order-card:hover {
  border-color: #9bb8ef;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  transform: translateY(-1px);
}
.order-card-main,
.order-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.order-card-main strong { color: #075fd8; }
.order-card-main em {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-style: normal;
}
.order-card-meta b { white-space: nowrap; }
.customer-order-card small { color: #dc2626; }
.empty-state.compact {
  border: 1px dashed var(--border, #d8e1ee);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 4px;
  text-align: center;
  background: #f8fafc;
  color: var(--muted, #64748b);
}
.empty-state.compact strong { color: var(--text, #0f172a); }
.customer-table .metric-pill,
.supplier-table .metric-pill,
.metric-pill.compact {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.suppliers-hero,
.supplier-card-hero {
  margin-bottom: 12px;
}
.suppliers-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.supplier-filter[open] {
  padding-bottom: 14px;
}
.supplier-filters-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(220px, .7fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}
.supplier-filters-grid label,
.supplier-card-form label {
  display: grid;
  gap: 7px;
}
.supplier-table {
  table-layout: fixed;
  width: 100%;
}
.supplier-table th:nth-child(1){width:19%}
.supplier-table th:nth-child(2){width:16%}
.supplier-table th:nth-child(3){width:12%}
.supplier-table th:nth-child(4){width:20%}
.supplier-table th:nth-child(5){width:7%}
.supplier-table th:nth-child(6){width:7%}
.supplier-table th:nth-child(7){width:7%}
.supplier-table th:nth-child(8){width:9%}
.supplier-table th:nth-child(9){width:10%}
.supplier-table th:nth-child(10){width:8%}
.supplier-table td {
  vertical-align: middle;
}
.supplier-table td small,
.supplier-table td .muted {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
}
.badge.supplier-status-active { background:#ecfdf5; color:#047857; border-color:#a7f3d0; }
.badge.supplier-status-preferred { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.badge.supplier-status-new { background:#f8fafc; color:#334155; border-color:#cbd5e1; }
.badge.supplier-status-paused { background:#fffbeb; color:#b45309; border-color:#fde68a; }
.badge.supplier-status-blocked { background:#fef2f2; color:#dc2626; border-color:#fecaca; }

.supplier-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}
.supplier-form-main,
.supplier-form-side {
  display: grid;
  gap: 14px;
}
.supplier-card-form .form-section,
.supplier-help-card,
.supplier-side-stat {
  border: 1px solid var(--border, #d8e1ee);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.supplier-card-form .form-grid {
  gap: 12px;
}
.supplier-card-form .wide {
  grid-column: 1 / -1;
}
.supplier-card-form input,
.supplier-card-form select,
.supplier-card-form textarea {
  min-width: 0;
}
.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.supplier-selected-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.soft-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d8e1ee;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}
.soft-chip small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.supplier-help-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #475569;
  display: grid;
  gap: 8px;
  line-height: 1.4;
}
.supplier-side-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.supplier-side-stat span { color:#64748b; font-size:12px; font-weight:700; text-transform:uppercase; }
.supplier-side-stat strong { font-size:24px; }
.supplier-textareas textarea { width:100%; resize:vertical; }
.supplier-related-panels { margin-top: 14px; }
.supplier-picker-dialog { max-width: 720px; }
.supplier-picker-search { margin-bottom: 12px; }
.supplier-picker-results {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 4px;
}
.supplier-picker-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #d8e1ee;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
}
.supplier-picker-item small {
  color: #64748b;
  font-weight: 700;
}
.supplier-picker-item:hover,
.supplier-picker-item.active {
  border-color: #9bb8ef;
  background: #eff6ff;
}
.supplier-picker-item.active small { color:#1d4ed8; }

@media (max-width: 1180px) {
  .supplier-form-layout { grid-template-columns: 1fr; }
  .supplier-filters-grid { grid-template-columns: 1fr; }
}

/* === Lembar CRM V18: real modal shell + customer orders polish ===
   Fixes supplier picker being rendered as page content and cleans customer order chips/cards. */
body.crm-ui .crm-modal[hidden]{display:none!important;}
body.crm-ui .crm-modal:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:7000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:28px!important;
  background:rgba(15,23,42,.56)!important;
  backdrop-filter:blur(3px)!important;
  width:auto!important;
  max-height:none!important;
  overflow:hidden!important;
  flex-direction:row!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body.crm-ui .crm-modal__backdrop{
  position:absolute!important;
  inset:0!important;
  background:transparent!important;
}
body.crm-ui .crm-modal__dialog{
  position:relative!important;
  z-index:1!important;
  width:min(780px,calc(100vw - 56px))!important;
  max-height:calc(100vh - 72px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #d9e2ef!important;
  border-radius:18px!important;
  box-shadow:0 34px 90px rgba(15,23,42,.36)!important;
}
body.crm-ui .supplier-picker-dialog{width:min(920px,calc(100vw - 56px))!important;}
body.crm-ui .crm-modal__head{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:20px 22px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:linear-gradient(180deg,#fff,#f8fafc)!important;
}
body.crm-ui .crm-modal__head h2{
  margin:0!important;
  color:#0f172a!important;
  font-size:20px!important;
  font-weight:800!important;
  letter-spacing:-.02em!important;
  line-height:1.2!important;
}
body.crm-ui .crm-modal__head p{
  margin:5px 0 0!important;
  color:#64748b!important;
  font-size:13px!important;
  line-height:1.45!important;
}
body.crm-ui .crm-modal__close{
  position:static!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#334155!important;
  font-size:24px!important;
  font-weight:600!important;
  line-height:1!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
body.crm-ui .crm-modal__close:hover{background:#f8fafc!important;border-color:#94a3b8!important;color:#0f172a!important;}
body.crm-ui .crm-modal__body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:18px 22px!important;
  background:#fff!important;
}
body.crm-ui .crm-modal__foot{
  flex:0 0 auto!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:10px!important;
  padding:16px 22px!important;
  border-top:1px solid #e2e8f0!important;
  background:#f8fafc!important;
}
body.crm-ui .supplier-picker-search{
  width:100%!important;
  height:42px!important;
  margin:0 0 12px!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  padding:0 12px!important;
  font-size:14px!important;
}
body.crm-ui .supplier-picker-results{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  max-height:440px!important;
  overflow:auto!important;
  padding-right:4px!important;
}
body.crm-ui .supplier-picker-item{
  width:100%!important;
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  text-align:left!important;
  padding:10px 12px!important;
  border:1px solid #dbe5f1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#0f172a!important;
  box-shadow:none!important;
  font-weight:650!important;
}
body.crm-ui .supplier-picker-item:hover{border-color:#93c5fd!important;background:#eff6ff!important;}
body.crm-ui .supplier-picker-item.active{border-color:#86efac!important;background:#ecfdf5!important;color:#087857!important;}
body.crm-ui .supplier-picker-item small{
  flex:0 0 auto!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:650!important;
}
body.crm-ui .supplier-selected-chips{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin-top:12px!important;
}
body.crm-ui .soft-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  border:1px solid #dbe5f1!important;
  background:#f8fafc!important;
  border-radius:999px!important;
  padding:6px 10px!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:650!important;
}
body.crm-ui .soft-chip small{
  color:#64748b!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
  font-size:10px!important;
}

body.crm-ui .customer-table .metric-pill,
body.crm-ui .customer-table .customer-orders-count-pill,
body.crm-ui .supplier-table .metric-pill,
body.crm-ui .metric-pill.compact{
  min-width:34px!important;
  width:auto!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  padding:0 11px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #cbd5e1!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#0f172a!important;
  box-shadow:none!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1!important;
  text-decoration:none!important;
}
body.crm-ui .customer-table .customer-orders-count-pill:hover{
  border-color:#93c5fd!important;
  background:#eff6ff!important;
  color:#075fd8!important;
}
body.crm-ui .customer-table td,
body.crm-ui .supplier-table td{vertical-align:middle!important;}
body.crm-ui .customer-order-list{display:grid!important;gap:10px!important;}
body.crm-ui .customer-order-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px 12px!important;
  align-items:center!important;
  padding:12px 14px!important;
  border:1px solid #dbe5f1!important;
  border-radius:14px!important;
  background:#fff!important;
  text-decoration:none!important;
  color:#0f172a!important;
  box-shadow:0 8px 20px rgba(15,23,42,.04)!important;
}
body.crm-ui .customer-order-card:hover{border-color:#93c5fd!important;background:#f8fbff!important;box-shadow:0 12px 28px rgba(15,23,42,.08)!important;transform:none!important;}
body.crm-ui .customer-order-card .order-card-main,
body.crm-ui .customer-order-card .order-card-meta{display:contents!important;}
body.crm-ui .customer-order-card .order-card-main strong{
  min-width:0!important;
  color:#075fd8!important;
  font-weight:800!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .customer-order-card .order-card-main em{
  grid-column:1!important;
  color:#64748b!important;
  font-size:12px!important;
  font-style:normal!important;
  line-height:1.25!important;
}
body.crm-ui .customer-order-card .order-card-meta .badge{
  grid-column:2!important;
  grid-row:1!important;
  justify-self:end!important;
  white-space:nowrap!important;
}
body.crm-ui .customer-order-card .order-card-meta b{
  grid-column:2!important;
  grid-row:2!important;
  justify-self:end!important;
  white-space:nowrap!important;
  color:#0f172a!important;
  font-weight:900!important;
}
body.crm-ui .customer-order-card > small{
  grid-column:1 / -1!important;
  color:#dc2626!important;
  font-weight:750!important;
}
@media (max-width:760px){
  body.crm-ui .crm-modal:not([hidden]){padding:12px!important;align-items:flex-start!important;}
  body.crm-ui .crm-modal__dialog{width:100%!important;max-height:calc(100vh - 24px)!important;}
  body.crm-ui .customer-order-card{grid-template-columns:1fr!important;}
  body.crm-ui .customer-order-card .order-card-meta .badge,
  body.crm-ui .customer-order-card .order-card-meta b{grid-column:1!important;grid-row:auto!important;justify-self:start!important;}
}

/* === Lembar CRM V19: Bitrix-like tasks workspace === */
body.crm-ui .tasks24-shell{display:grid!important;gap:14px!important;}
body.crm-ui .tasks24-hero{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;padding:20px 22px!important;border:1px solid #d8e2ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 10px 24px rgba(15,23,42,.04)!important;}
body.crm-ui .tasks24-hero h1{margin:2px 0 4px!important;font-size:30px!important;line-height:1.08!important;letter-spacing:-.03em!important;color:#0f172a!important;font-weight:850!important;}
body.crm-ui .tasks24-hero p:not(.eyebrow){margin:0!important;color:#64748b!important;font-size:14px!important;max-width:780px!important;}
body.crm-ui .tasks24-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important;}
body.crm-ui .tasks24-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
body.crm-ui .tasks24-kpi{position:relative!important;overflow:hidden!important;padding:15px 16px!important;border:1px solid #d8e2ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.035)!important;min-height:92px!important;}
body.crm-ui .tasks24-kpi:after{content:""!important;position:absolute!important;right:-18px!important;top:-20px!important;width:74px!important;height:74px!important;border-radius:999px!important;background:#e8fff6!important;}
body.crm-ui .tasks24-kpi.danger{background:#fff7f7!important;border-color:#fecaca!important;}
body.crm-ui .tasks24-kpi.success{background:#f7fffb!important;border-color:#bbf7d0!important;}
body.crm-ui .tasks24-kpi span{display:block!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:#64748b!important;font-size:11px!important;font-weight:850!important;}
body.crm-ui .tasks24-kpi strong{display:block!important;margin-top:8px!important;color:#0f172a!important;font-size:25px!important;line-height:1!important;font-weight:900!important;}
body.crm-ui .tasks24-kpi.danger strong{color:#dc2626!important;}
body.crm-ui .tasks24-kpi.success strong{color:#059669!important;}
body.crm-ui .tasks24-kpi small{display:block!important;margin-top:8px!important;color:#64748b!important;font-size:12px!important;}
body.crm-ui .tasks24-role-tabs{display:flex!important;align-items:center!important;gap:6px!important;padding:5px!important;border:1px solid #d8e2ee!important;border-radius:13px!important;background:#fff!important;width:max-content!important;max-width:100%!important;overflow:auto!important;}
body.crm-ui .tasks24-role-tabs a{display:inline-flex!important;align-items:center!important;height:34px!important;padding:0 13px!important;border-radius:10px!important;text-decoration:none!important;color:#475569!important;font-size:13px!important;font-weight:800!important;white-space:nowrap!important;}
body.crm-ui .tasks24-role-tabs a.active{background:#eaf2ff!important;color:#075fd8!important;box-shadow:inset 0 0 0 1px #bfdbfe!important;}
body.crm-ui .tasks24-toolbar{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;}
body.crm-ui .tasks24-view-tabs{display:flex!important;align-items:center!important;gap:5px!important;padding:5px!important;border:1px solid #d8e2ee!important;border-radius:13px!important;background:#fff!important;}
body.crm-ui .tasks24-view-tabs a{display:inline-flex!important;align-items:center!important;height:34px!important;padding:0 13px!important;border-radius:10px!important;text-decoration:none!important;color:#475569!important;font-size:13px!important;font-weight:850!important;}
body.crm-ui .tasks24-view-tabs a.active{background:#2563eb!important;color:#fff!important;box-shadow:0 8px 16px rgba(37,99,235,.24)!important;}
body.crm-ui .tasks24-filter{margin:0!important;min-width:320px!important;max-width:760px!important;border:1px solid #d8e2ee!important;border-radius:13px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.035)!important;}
body.crm-ui .tasks24-filter summary{height:44px!important;display:flex!important;align-items:center!important;gap:8px!important;padding:0 15px!important;cursor:pointer!important;font-weight:850!important;color:#0f172a!important;list-style:none!important;}
body.crm-ui .tasks24-filter summary::-webkit-details-marker{display:none!important;}
body.crm-ui .tasks24-filter summary:before{content:"▸"!important;color:#2563eb!important;font-size:12px!important;}
body.crm-ui .tasks24-filter[open] summary:before{content:"▾"!important;}
body.crm-ui .tasks24-filter-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;padding:0 14px 14px!important;}
body.crm-ui .tasks24-filter-grid label{display:grid!important;gap:5px!important;font-size:12px!important;font-weight:800!important;color:#334155!important;}
body.crm-ui .tasks24-filter-grid .filter-actions{grid-column:1/-1!important;display:flex!important;gap:8px!important;justify-content:flex-end!important;}
body.crm-ui .tasks24-board{display:grid!important;grid-template-columns:repeat(4,minmax(260px,1fr))!important;gap:12px!important;align-items:start!important;}
body.crm-ui .tasks24-column{min-height:420px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;box-shadow:0 10px 24px rgba(15,23,42,.04)!important;overflow:hidden!important;}
body.crm-ui .tasks24-column>header{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:10px!important;padding:16px 16px 12px!important;border-bottom:1px solid #e8eef6!important;background:#fbfdff!important;}
body.crm-ui .tasks24-column>header h2{margin:0!important;font-size:17px!important;color:#0f172a!important;letter-spacing:-.015em!important;}
body.crm-ui .tasks24-column>header small{display:block!important;margin-top:4px!important;color:#64748b!important;font-size:12px!important;font-weight:600!important;}
body.crm-ui .tasks24-column>header b{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:28px!important;height:28px!important;border-radius:999px!important;background:#eef4ff!important;color:#075fd8!important;font-weight:900!important;}
body.crm-ui .tasks24-column.task-status-progress>header b{background:#fff7ed!important;color:#c2410c!important;}
body.crm-ui .tasks24-column.task-status-done>header b{background:#ecfdf5!important;color:#047857!important;}
body.crm-ui .tasks24-column.task-status-canceled>header b{background:#f1f5f9!important;color:#475569!important;}
body.crm-ui .tasks24-card-list{display:grid!important;gap:10px!important;padding:12px!important;}
body.crm-ui .tasks24-empty{display:flex!important;align-items:center!important;justify-content:center!important;min-height:72px!important;border:1px dashed #cbd5e1!important;border-radius:13px!important;color:#64748b!important;font-weight:750!important;background:#f8fafc!important;}
body.crm-ui .tasks24-card{display:grid!important;gap:9px!important;padding:13px!important;border:1px solid #d9e4f1!important;border-radius:14px!important;background:#fff!important;box-shadow:0 10px 22px rgba(15,23,42,.05)!important;}
body.crm-ui .tasks24-card.is-overdue{border-color:#fecaca!important;background:#fffafa!important;}
body.crm-ui .tasks24-card-top,.tasks24-card-foot{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important;}
body.crm-ui .tasks24-card-title{font-size:15px!important;line-height:1.25!important;font-weight:900!important;color:#075fd8!important;text-decoration:none!important;}
body.crm-ui .tasks24-card-title:hover{text-decoration:underline!important;}
body.crm-ui .tasks24-card p{margin:0!important;color:#475569!important;font-size:13px!important;line-height:1.45!important;}
body.crm-ui .tasks24-card-meta{display:grid!important;grid-template-columns:auto 1fr!important;gap:4px 9px!important;padding:8px!important;border-radius:10px!important;background:#f8fafc!important;font-size:12px!important;}
body.crm-ui .tasks24-card-meta span{color:#64748b!important;}
body.crm-ui .tasks24-card-meta strong{color:#0f172a!important;font-weight:800!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body.crm-ui .tasks24-card-related{font-size:12px!important;color:#475569!important;line-height:1.35!important;padding:7px 9px!important;border-radius:10px!important;background:#f8fbff!important;border:1px solid #e2e8f0!important;}
body.crm-ui .tasks24-tags{display:flex!important;gap:6px!important;flex-wrap:wrap!important;}
body.crm-ui .tasks24-tags span{display:inline-flex!important;height:23px!important;align-items:center!important;padding:0 8px!important;border-radius:999px!important;background:#f1f5f9!important;color:#475569!important;font-size:11px!important;font-weight:750!important;}
body.crm-ui .tasks24-status{display:inline-flex!important;align-items:center!important;height:26px!important;padding:0 9px!important;border-radius:999px!important;border:1px solid #cbd5e1!important;background:#fff!important;font-size:12px!important;font-weight:850!important;white-space:nowrap!important;}
body.crm-ui .tasks24-status.task-status-open{color:#075fd8!important;background:#eff6ff!important;border-color:#bfdbfe!important;}
body.crm-ui .tasks24-status.task-status-progress{color:#c2410c!important;background:#fff7ed!important;border-color:#fed7aa!important;}
body.crm-ui .tasks24-status.task-status-done{color:#047857!important;background:#ecfdf5!important;border-color:#a7f3d0!important;}
body.crm-ui .tasks24-status.task-status-canceled{color:#475569!important;background:#f8fafc!important;border-color:#cbd5e1!important;}
body.crm-ui .task-type-pill,.task-overdue-pill,.priority{display:inline-flex!important;align-items:center!important;height:24px!important;padding:0 8px!important;border-radius:999px!important;font-size:11px!important;font-weight:850!important;line-height:1!important;white-space:nowrap!important;}
body.crm-ui .task-type-pill{background:#eff6ff!important;color:#075fd8!important;border:1px solid #bfdbfe!important;}
body.crm-ui .task-overdue-pill{background:#fff1f2!important;color:#e11d48!important;border:1px solid #fecdd3!important;}
body.crm-ui .priority{background:#f8fafc!important;color:#475569!important;border:1px solid #cbd5e1!important;}
body.crm-ui .priority-urgent,.priority-high{background:#fff1f2!important;color:#e11d48!important;border-color:#fecdd3!important;}
body.crm-ui .priority-low{background:#f1f5f9!important;color:#475569!important;}
body.crm-ui .priority-normal{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important;}
body.crm-ui .task-progress{width:100%!important;height:7px!important;border-radius:999px!important;background:#e2e8f0!important;overflow:hidden!important;}
body.crm-ui .task-progress span{display:block!important;height:100%!important;background:#2563eb!important;border-radius:999px!important;}
body.crm-ui .tasks24-list-panel,.tasks24-deadlines{border-radius:16px!important;}
body.crm-ui .tasks24-table td strong{display:block!important;color:#0f172a!important;font-weight:850!important;}
body.crm-ui .tasks24-table td small{display:block!important;margin-top:3px!important;color:#64748b!important;font-size:12px!important;}
body.crm-ui .tasks24-timeline{display:grid!important;gap:8px!important;}
body.crm-ui .tasks24-time-row{display:grid!important;grid-template-columns:140px minmax(0,1fr) 190px 130px!important;gap:12px!important;align-items:center!important;padding:11px 13px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important;text-decoration:none!important;color:#0f172a!important;}
body.crm-ui .tasks24-time-row:hover{background:#f8fbff!important;border-color:#93c5fd!important;}
body.crm-ui .tasks24-time-row.overdue{background:#fffafa!important;border-color:#fecaca!important;}
body.crm-ui .tasks24-time-row span{color:#64748b!important;font-size:12px!important;font-weight:850!important;}
body.crm-ui .tasks24-time-row strong{font-size:14px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body.crm-ui .tasks24-time-row em{font-style:normal!important;color:#475569!important;font-size:13px!important;}
body.crm-ui .tasks24-time-row b{font-size:12px!important;color:#075fd8!important;}
body.crm-ui .tasks24-create-modal{width:min(1120px,calc(100vw - 48px))!important;max-height:calc(100vh - 56px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
body.crm-ui .tasks24-create-form{display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;gap:0!important;min-height:0!important;overflow:auto!important;}
body.crm-ui .tasks24-form-main{display:grid!important;gap:14px!important;padding:18px!important;border-right:1px solid #e2e8f0!important;}
body.crm-ui .tasks24-form-side{display:grid!important;gap:12px!important;align-content:start!important;padding:18px!important;background:#f8fafc!important;}
body.crm-ui .tasks24-create-form label{display:grid!important;gap:6px!important;color:#334155!important;font-size:12px!important;font-weight:850!important;}
body.crm-ui .tasks24-check-create{display:grid!important;gap:9px!important;padding:13px!important;border:1px solid #d8e2ee!important;border-radius:13px!important;background:#fbfdff!important;}
body.crm-ui .tasks24-check-create h3{margin:0!important;font-size:15px!important;color:#0f172a!important;}
body.crm-ui .tasks24-create-form .crm-modal__foot{grid-column:1/-1!important;position:sticky!important;bottom:0!important;background:#fff!important;border-top:1px solid #e2e8f0!important;padding:13px 18px!important;display:flex!important;justify-content:flex-end!important;gap:8px!important;}
body.crm-ui .check-option{display:flex!important;grid-template-columns:none!important;align-items:center!important;gap:8px!important;padding:10px!important;border:1px solid #d8e2ee!important;border-radius:10px!important;background:#fff!important;}
body.crm-ui .check-option input{width:auto!important;height:auto!important;}
body.crm-ui .task-detail-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:16px!important;padding:18px 20px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;margin-bottom:14px!important;}
body.crm-ui .task-detail-head h1{margin:0!important;font-size:28px!important;line-height:1.1!important;}
body.crm-ui .task-detail-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 390px!important;gap:14px!important;}
body.crm-ui .task-description-box{padding:14px!important;border:1px solid #e2e8f0!important;border-radius:13px!important;background:#f8fafc!important;color:#0f172a!important;line-height:1.55!important;}
body.crm-ui .task-side-grid{display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;gap:9px 12px!important;align-items:start!important;}
body.crm-ui .task-side-grid span{color:#64748b!important;font-size:12px!important;font-weight:800!important;}
body.crm-ui .task-side-grid strong{color:#0f172a!important;font-size:13px!important;min-width:0!important;overflow-wrap:anywhere!important;}
@media (max-width:1180px){body.crm-ui .tasks24-board{grid-template-columns:repeat(2,minmax(260px,1fr))!important;}body.crm-ui .tasks24-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}body.crm-ui .task-detail-layout{grid-template-columns:1fr!important;}}
@media (max-width:760px){body.crm-ui .tasks24-hero,.tasks24-toolbar{display:grid!important;}body.crm-ui .tasks24-kpis{grid-template-columns:1fr!important;}body.crm-ui .tasks24-board{grid-template-columns:1fr!important;}body.crm-ui .tasks24-filter{min-width:0!important;width:100%!important;}body.crm-ui .tasks24-filter-grid{grid-template-columns:1fr!important;}body.crm-ui .tasks24-create-modal{width:calc(100vw - 20px)!important;}body.crm-ui .tasks24-create-form{grid-template-columns:1fr!important;}body.crm-ui .tasks24-form-main{border-right:0!important;border-bottom:1px solid #e2e8f0!important;}body.crm-ui .tasks24-time-row{grid-template-columns:1fr!important;}body.crm-ui .task-detail-head{display:grid!important;}}

/* === Lembar CRM V20: Tasks workspace cleanup === */
body.crm-ui .tasks24-shell{
  gap:12px!important;
}
body.crm-ui .tasks24-hero.tasks24-hero-compact{
  min-height:0!important;
  padding:16px 18px!important;
  align-items:center!important;
}
body.crm-ui .tasks24-hero.tasks24-hero-compact h1{
  font-size:26px!important;
  margin:0 0 3px!important;
}
body.crm-ui .tasks24-hero.tasks24-hero-compact p:not(.eyebrow){
  font-size:13px!important;
  max-width:760px!important;
}
body.crm-ui .tasks24-kpis{
  gap:10px!important;
}
body.crm-ui .tasks24-kpi{
  min-height:76px!important;
  padding:12px 14px!important;
}
body.crm-ui .tasks24-kpi strong{
  font-size:22px!important;
  margin-top:6px!important;
}
body.crm-ui .tasks24-kpi small{
  margin-top:5px!important;
}
body.crm-ui .tasks24-controls{
  display:grid!important;
  gap:10px!important;
  padding:10px!important;
  border:1px solid #d8e2ee!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(15,23,42,.035)!important;
}
body.crm-ui .tasks24-controls-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
body.crm-ui .tasks24-controls .tasks24-role-tabs,
body.crm-ui .tasks24-controls .tasks24-view-tabs{
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  box-shadow:none!important;
  background:#f8fafc!important;
}
body.crm-ui .tasks24-controls .tasks24-role-tabs a,
body.crm-ui .tasks24-controls .tasks24-view-tabs a{
  height:32px!important;
  padding:0 12px!important;
}
body.crm-ui .tasks24-controls .tasks24-view-tabs a.active{
  box-shadow:none!important;
}
body.crm-ui .tasks24-toolbar{display:none!important;}
body.crm-ui .tasks24-filter{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  box-shadow:none!important;
  background:#fbfdff!important;
}
body.crm-ui .tasks24-filter summary{
  height:38px!important;
  padding:0 12px!important;
  justify-content:space-between!important;
}
body.crm-ui .tasks24-filter summary span{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  font-weight:850!important;
}
body.crm-ui .tasks24-filter summary em{
  font-style:normal!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:650!important;
}
body.crm-ui .tasks24-filter-grid{
  grid-template-columns:1.2fr repeat(4,minmax(150px,1fr)) auto!important;
  align-items:end!important;
  gap:10px!important;
  padding:10px 12px 12px!important;
  border-top:1px solid #e2e8f0!important;
}
body.crm-ui .tasks24-filter-grid .filter-actions{
  grid-column:auto!important;
  display:flex!important;
  gap:8px!important;
  justify-content:flex-end!important;
  white-space:nowrap!important;
}
body.crm-ui .tasks24-board{
  grid-template-columns:repeat(4,minmax(250px,1fr))!important;
  gap:10px!important;
}
body.crm-ui .tasks24-column{
  min-height:360px!important;
  border-radius:14px!important;
}
body.crm-ui .tasks24-column>header{
  padding:13px 14px 10px!important;
}
body.crm-ui .tasks24-column>header h2{
  font-size:16px!important;
}
body.crm-ui .tasks24-card-list{
  padding:10px!important;
}
body.crm-ui .tasks24-card{
  padding:12px!important;
  gap:8px!important;
  box-shadow:0 8px 18px rgba(15,23,42,.04)!important;
}
body.crm-ui .tasks24-card-title{
  font-size:14px!important;
}
body.crm-ui .tasks24-card-meta{
  grid-template-columns:100px minmax(0,1fr)!important;
}
body.crm-ui #task-create-modal.modal-backdrop,
body.crm-ui #task-create-modal.modal-backdrop:not([hidden]){
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
}
body.crm-ui #task-create-modal[hidden]{display:none!important;}
body.crm-ui .tasks24-create-modal{
  width:min(1040px,calc(100vw - 56px))!important;
  max-height:calc(100vh - 64px)!important;
  border-radius:16px!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
body.crm-ui .tasks24-create-modal .crm-modal__head{
  flex:0 0 auto!important;
  padding:16px 18px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:#fff!important;
}
body.crm-ui .tasks24-create-modal .crm-modal__head h2{
  margin:0!important;
  font-size:22px!important;
  line-height:1.15!important;
}
body.crm-ui .tasks24-create-modal .crm-modal__head p{
  margin:5px 0 0!important;
  color:#64748b!important;
  font-size:13px!important;
}
body.crm-ui .tasks24-create-form{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
body.crm-ui .tasks24-create-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:16px!important;
  background:#f5f8fc!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr)!important;
  gap:12px!important;
  align-items:start!important;
}
body.crm-ui .tasks24-create-section{
  display:grid!important;
  gap:12px!important;
  padding:14px!important;
  border:1px solid #d8e2ee!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(15,23,42,.035)!important;
}
body.crm-ui .tasks24-create-section-main{
  grid-row:span 2!important;
}
body.crm-ui .tasks24-create-section .section-title{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding-bottom:8px!important;
  border-bottom:1px solid #e8eef6!important;
}
body.crm-ui .tasks24-create-section .section-title h3{
  margin:0!important;
  font-size:16px!important;
  color:#0f172a!important;
}
body.crm-ui .tasks24-create-section .section-title span{
  color:#64748b!important;
  font-size:12px!important;
  font-weight:650!important;
}
body.crm-ui .tasks24-create-form label{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:800!important;
}
body.crm-ui .tasks24-create-form label small{
  margin-top:-1px!important;
  font-size:11px!important;
  color:#64748b!important;
}
body.crm-ui .tasks24-create-form input:not([type="checkbox"]),
body.crm-ui .tasks24-create-form select,
body.crm-ui .tasks24-create-form textarea{
  min-height:38px!important;
  border-radius:8px!important;
  border-color:#cfd8e5!important;
  font-size:13px!important;
  font-weight:500!important;
  background:#fff!important;
}
body.crm-ui .tasks24-create-form textarea{
  line-height:1.45!important;
  resize:vertical!important;
}
body.crm-ui .tasks24-create-form select[multiple]{
  min-height:116px!important;
  padding:8px!important;
}
body.crm-ui .tasks24-create-form select[multiple] option{
  padding:6px 7px!important;
  border-radius:6px!important;
}
body.crm-ui .tasks24-create-form .form-grid.cols-2,
body.crm-ui .tasks24-create-form .cols-2{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
body.crm-ui .tasks24-people-grid{
  align-items:start!important;
}
body.crm-ui .tasks24-options-row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
body.crm-ui .tasks24-create-form .check-option{
  min-height:44px!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:10px 11px!important;
  border-radius:10px!important;
  background:#f8fafc!important;
}
body.crm-ui .tasks24-create-form .check-option input{
  margin:0!important;
}
body.crm-ui .tasks24-create-form .crm-modal__foot{
  flex:0 0 auto!important;
  grid-column:auto!important;
  position:static!important;
  padding:13px 18px!important;
  border-top:1px solid #e2e8f0!important;
  background:#fff!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
@media (max-width:1320px){
  body.crm-ui .tasks24-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  body.crm-ui .tasks24-filter-grid .filter-actions{grid-column:1/-1!important;}
}
@media (max-width:1180px){
  body.crm-ui .tasks24-create-body{grid-template-columns:1fr!important;}
  body.crm-ui .tasks24-create-section-main{grid-row:auto!important;}
}
@media (max-width:760px){
  body.crm-ui .tasks24-controls-head{display:grid!important;}
  body.crm-ui .tasks24-controls .tasks24-role-tabs,
  body.crm-ui .tasks24-controls .tasks24-view-tabs{overflow:auto!important;width:100%!important;}
  body.crm-ui .tasks24-create-modal{width:calc(100vw - 18px)!important;max-height:calc(100vh - 24px)!important;}
  body.crm-ui .tasks24-create-body{padding:10px!important;}
  body.crm-ui .tasks24-create-form .form-grid.cols-2,
  body.crm-ui .tasks24-create-form .cols-2,
  body.crm-ui .tasks24-options-row{grid-template-columns:1fr!important;}
}

/* === Lembar CRM V21: Tasks rebuilt workspace, no guessing === */
body.crm-ui .tasks-pro-shell{display:grid!important;gap:12px!important;min-width:0!important;}
body.crm-ui .tasks-pro-hero{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;padding:18px 20px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;box-shadow:0 10px 24px rgba(15,23,42,.045)!important;}
body.crm-ui .tasks-pro-title{min-width:0!important;}
body.crm-ui .tasks-pro-title h1{margin:2px 0 5px!important;font-size:28px!important;line-height:1.05!important;letter-spacing:-.035em!important;color:#0f172a!important;font-weight:900!important;}
body.crm-ui .tasks-pro-title p:not(.eyebrow){margin:0!important;max-width:820px!important;color:#64748b!important;font-size:14px!important;line-height:1.45!important;}
body.crm-ui .tasks-pro-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important;}
body.crm-ui .tasks-pro-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;}
body.crm-ui .tasks-pro-kpi{position:relative!important;overflow:hidden!important;padding:13px 15px!important;min-height:82px!important;border:1px solid #d8e2ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.035)!important;}
body.crm-ui .tasks-pro-kpi:after{content:""!important;position:absolute!important;right:-18px!important;top:-20px!important;width:72px!important;height:72px!important;border-radius:999px!important;background:#e8fff6!important;}
body.crm-ui .tasks-pro-kpi.danger{background:#fff7f7!important;border-color:#fecaca!important;}
body.crm-ui .tasks-pro-kpi.success{background:#f7fffb!important;border-color:#bbf7d0!important;}
body.crm-ui .tasks-pro-kpi span{display:block!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:#64748b!important;font-size:11px!important;font-weight:850!important;}
body.crm-ui .tasks-pro-kpi strong{display:block!important;margin-top:7px!important;color:#0f172a!important;font-size:24px!important;line-height:1!important;font-weight:900!important;}
body.crm-ui .tasks-pro-kpi.danger strong{color:#dc2626!important;}
body.crm-ui .tasks-pro-kpi.success strong{color:#059669!important;}
body.crm-ui .tasks-pro-kpi small{display:block!important;margin-top:7px!important;color:#64748b!important;font-size:12px!important;}
body.crm-ui .tasks-pro-toolbar{display:grid!important;gap:10px!important;padding:10px!important;border:1px solid #d8e2ee!important;border-radius:15px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.035)!important;}
body.crm-ui .tasks-pro-toolbar-line{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;}
body.crm-ui .tasks-pro-tabs{display:flex!important;align-items:center!important;gap:5px!important;width:auto!important;max-width:100%!important;margin:0!important;padding:5px!important;border:1px solid #d8e2ee!important;border-radius:13px!important;background:#f8fafc!important;overflow:auto!important;box-shadow:none!important;}
body.crm-ui .tasks-pro-tabs a{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:32px!important;padding:0 12px!important;border-radius:10px!important;text-decoration:none!important;white-space:nowrap!important;color:#475569!important;font-size:13px!important;font-weight:850!important;}
body.crm-ui .tasks-pro-tabs a.active{background:#eaf2ff!important;color:#075fd8!important;box-shadow:inset 0 0 0 1px #bfdbfe!important;}
body.crm-ui .tasks-pro-view-tabs a.active{background:#2563eb!important;color:#fff!important;box-shadow:0 8px 16px rgba(37,99,235,.22)!important;}
body.crm-ui .tasks-pro-filter{width:100%!important;min-width:0!important;max-width:none!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fbfdff!important;box-shadow:none!important;margin:0!important;}
body.crm-ui .tasks-pro-filter summary{height:40px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:0 12px!important;list-style:none!important;cursor:pointer!important;color:#0f172a!important;font-weight:850!important;}
body.crm-ui .tasks-pro-filter summary::-webkit-details-marker{display:none!important;}
body.crm-ui .tasks-pro-filter summary span:before{content:"▸"!important;margin-right:8px!important;color:#2563eb!important;font-size:12px!important;}
body.crm-ui .tasks-pro-filter[open] summary span:before{content:"▾"!important;}
body.crm-ui .tasks-pro-filter summary em{font-style:normal!important;color:#64748b!important;font-size:12px!important;font-weight:650!important;}
body.crm-ui .tasks-pro-filter-grid{display:grid!important;grid-template-columns:minmax(240px,1.3fr) repeat(4,minmax(150px,1fr)) auto!important;align-items:end!important;gap:10px!important;padding:12px!important;border-top:1px solid #e2e8f0!important;}
body.crm-ui .tasks-pro-filter-grid label{display:grid!important;gap:5px!important;margin:0!important;color:#334155!important;font-size:12px!important;font-weight:800!important;}
body.crm-ui .tasks-pro-filter-grid input,body.crm-ui .tasks-pro-filter-grid select{height:38px!important;border-radius:9px!important;}
body.crm-ui .tasks-pro-filter-grid .filter-actions{display:flex!important;gap:8px!important;justify-content:flex-end!important;white-space:nowrap!important;}
body.crm-ui .tasks-pro-board{display:grid!important;grid-template-columns:repeat(4,minmax(250px,1fr))!important;gap:10px!important;align-items:start!important;}
body.crm-ui .tasks-pro-column{min-height:370px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;box-shadow:0 10px 24px rgba(15,23,42,.04)!important;overflow:hidden!important;}
body.crm-ui .tasks-pro-column>header{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;padding:14px 15px 11px!important;border-bottom:1px solid #e8eef6!important;background:#fbfdff!important;}
body.crm-ui .tasks-pro-column>header h2{margin:0!important;font-size:17px!important;line-height:1.2!important;color:#0f172a!important;}
body.crm-ui .tasks-pro-column>header small{display:block!important;margin-top:4px!important;color:#64748b!important;font-size:12px!important;font-weight:600!important;}
body.crm-ui .tasks-pro-column>header b{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:28px!important;height:28px!important;border-radius:999px!important;background:#eef4ff!important;color:#075fd8!important;font-weight:900!important;}
body.crm-ui .tasks-pro-column.task-status-progress>header b{background:#fff7ed!important;color:#c2410c!important;}
body.crm-ui .tasks-pro-column.task-status-done>header b{background:#ecfdf5!important;color:#047857!important;}
body.crm-ui .tasks-pro-column.task-status-canceled>header b{background:#f1f5f9!important;color:#475569!important;}
body.crm-ui .tasks-pro-card-list{display:grid!important;gap:10px!important;padding:11px!important;}
body.crm-ui .tasks-pro-empty{display:flex!important;align-items:center!important;justify-content:center!important;min-height:72px!important;border:1px dashed #cbd5e1!important;border-radius:13px!important;color:#64748b!important;background:#f8fafc!important;font-weight:750!important;}
body.crm-ui .tasks-pro-card{display:grid!important;gap:9px!important;padding:13px!important;border:1px solid #d9e4f1!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.045)!important;}
body.crm-ui .tasks-pro-card.is-overdue{border-color:#fecaca!important;background:#fffafa!important;}
body.crm-ui .tasks-pro-card-top,.tasks-pro-card-foot{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important;}
body.crm-ui .tasks-pro-card-title{font-size:15px!important;line-height:1.28!important;font-weight:900!important;color:#075fd8!important;text-decoration:none!important;}
body.crm-ui .tasks-pro-card-title:hover{text-decoration:underline!important;}
body.crm-ui .tasks-pro-card p{margin:0!important;color:#475569!important;font-size:13px!important;line-height:1.45!important;}
body.crm-ui .tasks-pro-card-meta{display:grid!important;grid-template-columns:98px minmax(0,1fr)!important;gap:4px 9px!important;padding:9px!important;border-radius:10px!important;background:#f8fafc!important;font-size:12px!important;margin:0!important;}
body.crm-ui .tasks-pro-card-meta dt{color:#64748b!important;margin:0!important;}
body.crm-ui .tasks-pro-card-meta dd{color:#0f172a!important;font-weight:800!important;margin:0!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body.crm-ui .tasks-pro-related{font-size:12px!important;color:#475569!important;line-height:1.35!important;padding:7px 9px!important;border-radius:10px!important;background:#f8fbff!important;border:1px solid #e2e8f0!important;}
body.crm-ui .tasks-pro-progress{height:6px!important;border-radius:999px!important;background:#e2e8f0!important;overflow:hidden!important;}
body.crm-ui .tasks-pro-progress span{display:block!important;height:100%!important;background:#2563eb!important;border-radius:999px!important;}
body.crm-ui .tasks-pro-tags{display:flex!important;gap:6px!important;flex-wrap:wrap!important;}
body.crm-ui .tasks-pro-tags span{display:inline-flex!important;height:23px!important;align-items:center!important;padding:0 8px!important;border-radius:999px!important;background:#f1f5f9!important;color:#475569!important;font-size:11px!important;font-weight:750!important;}
body.crm-ui .tasks-pro-card-foot{font-size:12px!important;color:#64748b!important;}
body.crm-ui .tasks-pro-status{display:inline-flex!important;align-items:center!important;height:26px!important;padding:0 9px!important;border-radius:999px!important;border:1px solid #cbd5e1!important;background:#fff!important;font-size:12px!important;font-weight:850!important;white-space:nowrap!important;}
body.crm-ui .tasks-pro-status.task-status-open{color:#075fd8!important;background:#eff6ff!important;border-color:#bfdbfe!important;}
body.crm-ui .tasks-pro-status.task-status-progress{color:#c2410c!important;background:#fff7ed!important;border-color:#fed7aa!important;}
body.crm-ui .tasks-pro-status.task-status-done{color:#047857!important;background:#ecfdf5!important;border-color:#a7f3d0!important;}
body.crm-ui .tasks-pro-status.task-status-canceled{color:#475569!important;background:#f8fafc!important;border-color:#cbd5e1!important;}
body.crm-ui .tasks-pro-time-list{display:grid!important;gap:8px!important;}
body.crm-ui .tasks-pro-time-row{display:grid!important;grid-template-columns:160px minmax(0,1fr) 160px 120px!important;gap:12px!important;align-items:center!important;text-decoration:none!important;color:#0f172a!important;padding:11px 12px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important;}
body.crm-ui .tasks-pro-time-row.overdue{border-color:#fecaca!important;background:#fffafa!important;}
body.crm-ui .tasks-pro-time-row span,body.crm-ui .tasks-pro-time-row em{color:#64748b!important;font-style:normal!important;}
body.crm-ui .tasks-pro-time-row strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body.crm-ui .tasks-pro-table td strong{display:block!important;}
body.crm-ui .tasks-pro-table td small{display:block!important;margin-top:3px!important;color:#64748b!important;}
body.crm-ui #task-create-modal.tasks-pro-modal-backdrop{z-index:9000!important;align-items:center!important;justify-content:center!important;padding:28px!important;background:rgba(15,23,42,.58)!important;backdrop-filter:blur(3px)!important;}
body.crm-ui #task-create-modal.tasks-pro-modal-backdrop[hidden]{display:none!important;}
body.crm-ui #task-create-modal.tasks-pro-modal-backdrop:not([hidden]){display:flex!important;}
body.crm-ui .tasks-pro-modal{width:min(1120px,calc(100vw - 56px))!important;max-height:calc(100vh - 70px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border:1px solid #d9e2ef!important;border-radius:18px!important;background:#fff!important;box-shadow:0 34px 90px rgba(15,23,42,.38)!important;}
body.crm-ui .tasks-pro-modal-head{flex:0 0 auto!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;padding:18px 20px!important;border-bottom:1px solid #e2e8f0!important;background:#fff!important;}
body.crm-ui .tasks-pro-modal-head h2{margin:0!important;color:#0f172a!important;font-size:24px!important;line-height:1.15!important;font-weight:900!important;letter-spacing:-.025em!important;}
body.crm-ui .tasks-pro-modal-head p{margin:5px 0 0!important;color:#64748b!important;font-size:13px!important;line-height:1.45!important;}
body.crm-ui .tasks-pro-modal-close{flex:0 0 auto!important;width:38px!important;height:38px!important;border:1px solid #cbd5e1!important;border-radius:10px!important;background:#fff!important;color:#0f172a!important;font-size:22px!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;}
body.crm-ui .tasks-pro-modal-close:hover{background:#f8fafc!important;border-color:#94a3b8!important;}
body.crm-ui .tasks-pro-create-form{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;}
body.crm-ui .tasks-pro-create-body{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(380px,.85fr)!important;gap:12px!important;padding:16px!important;background:#f5f8fc!important;align-items:start!important;}
body.crm-ui .tasks-pro-section{display:grid!important;gap:12px!important;padding:14px!important;border:1px solid #d8e2ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.035)!important;}
body.crm-ui .tasks-pro-section-task{grid-row:span 3!important;}
body.crm-ui .tasks-pro-section-title{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:12px!important;padding-bottom:8px!important;border-bottom:1px solid #e8eef6!important;}
body.crm-ui .tasks-pro-section-title h3{margin:0!important;color:#0f172a!important;font-size:16px!important;font-weight:900!important;}
body.crm-ui .tasks-pro-section-title span{color:#64748b!important;font-size:12px!important;font-weight:650!important;}
body.crm-ui .tasks-pro-create-form label{display:grid!important;gap:6px!important;margin:0!important;color:#334155!important;font-size:12px!important;font-weight:850!important;}
body.crm-ui .tasks-pro-create-form input:not([type="checkbox"]),body.crm-ui .tasks-pro-create-form select,body.crm-ui .tasks-pro-create-form textarea{width:100%!important;min-height:38px!important;border:1px solid #cfd8e5!important;border-radius:9px!important;background:#fff!important;color:#0f172a!important;font-size:13px!important;font-weight:500!important;box-shadow:none!important;}
body.crm-ui .tasks-pro-create-form textarea{line-height:1.45!important;resize:vertical!important;}
body.crm-ui .tasks-pro-create-form .form-grid.cols-2,body.crm-ui .tasks-pro-create-form .cols-2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
body.crm-ui .tasks-pro-people-panes{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;}
body.crm-ui .tasks-pro-people-panes>div>strong{display:block!important;margin:0 0 7px!important;color:#334155!important;font-size:12px!important;font-weight:900!important;}
body.crm-ui .tasks-pro-check-list{display:grid!important;gap:4px!important;max-height:142px!important;overflow:auto!important;padding:8px!important;border:1px solid #e2e8f0!important;border-radius:10px!important;background:#f8fafc!important;}
body.crm-ui .tasks-pro-check-list label{display:flex!important;align-items:center!important;gap:8px!important;min-height:30px!important;padding:5px 7px!important;border-radius:8px!important;background:#fff!important;border:1px solid #edf2f7!important;font-size:13px!important;color:#0f172a!important;font-weight:700!important;}
body.crm-ui .tasks-pro-check-list input{margin:0!important;}
body.crm-ui .tasks-pro-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
body.crm-ui .tasks-pro-options label{display:flex!important;align-items:center!important;gap:9px!important;min-height:44px!important;padding:10px 11px!important;border-radius:10px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;color:#334155!important;font-size:13px!important;}
body.crm-ui .tasks-pro-options input{margin:0!important;}
body.crm-ui .tasks-pro-modal-foot{flex:0 0 auto!important;display:flex!important;justify-content:flex-end!important;gap:8px!important;padding:14px 20px!important;border-top:1px solid #e2e8f0!important;background:#fff!important;}
@media (max-width:1320px){body.crm-ui .tasks-pro-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}body.crm-ui .tasks-pro-filter-grid .filter-actions{grid-column:1/-1!important;}}
@media (max-width:1180px){body.crm-ui .tasks-pro-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}body.crm-ui .tasks-pro-board{grid-template-columns:repeat(2,minmax(260px,1fr))!important;}body.crm-ui .tasks-pro-create-body{grid-template-columns:1fr!important;}body.crm-ui .tasks-pro-section-task{grid-row:auto!important;}}
@media (max-width:760px){body.crm-ui .tasks-pro-hero,body.crm-ui .tasks-pro-toolbar-line{display:grid!important;}body.crm-ui .tasks-pro-actions{justify-content:flex-start!important;}body.crm-ui .tasks-pro-kpis,body.crm-ui .tasks-pro-board{grid-template-columns:1fr!important;}body.crm-ui .tasks-pro-tabs{width:100%!important;}body.crm-ui .tasks-pro-filter-grid,body.crm-ui .tasks-pro-create-form .form-grid.cols-2,body.crm-ui .tasks-pro-create-form .cols-2,body.crm-ui .tasks-pro-people-panes,body.crm-ui .tasks-pro-options{grid-template-columns:1fr!important;}body.crm-ui .tasks-pro-modal{width:calc(100vw - 18px)!important;max-height:calc(100vh - 24px)!important;}body.crm-ui .tasks-pro-create-body{padding:10px!important;}body.crm-ui .tasks-pro-time-row{grid-template-columns:1fr!important;}}

/* V22 task checklist builder and CRM link explanation */
body.crm-ui #task-create-modal.tasks-pro-modal-backdrop:not([hidden]){
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
}
body.crm-ui #task-create-modal .tasks-pro-modal{
  width:min(1120px,calc(100vw - 48px))!important;
  max-height:calc(100vh - 48px)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
body.crm-ui #task-create-modal .tasks-pro-create-form{
  min-height:0!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
}
body.crm-ui #task-create-modal .tasks-pro-create-body{
  min-height:0!important;
  overflow:auto!important;
  padding:16px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(360px,.9fr)!important;
  gap:14px!important;
  align-items:start!important;
}
body.crm-ui #task-create-modal .tasks-pro-section{
  margin:0!important;
  border:1px solid #dbe5f0!important;
  border-radius:14px!important;
  background:#fff!important;
  padding:14px!important;
  box-shadow:none!important;
}
body.crm-ui #task-create-modal .tasks-pro-section-task{
  grid-row:span 3!important;
}
body.crm-ui .tasks-checklist-builder{
  margin-top:12px!important;
  border:1px solid #dbe5f0!important;
  border-radius:14px!important;
  background:#f8fafc!important;
  overflow:hidden!important;
}
body.crm-ui .tasks-checklist-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:12px 12px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:#fff!important;
}
body.crm-ui .tasks-checklist-head strong{
  display:block!important;
  font-size:15px!important;
  line-height:1.2!important;
  color:#0f172a!important;
}
body.crm-ui .tasks-checklist-head span{
  display:block!important;
  margin-top:3px!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:600!important;
}
body.crm-ui .tasks-checklist-name{
  display:grid!important;
  gap:6px!important;
  margin:12px 12px 8px!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:800!important;
}
body.crm-ui .tasks-checklist-name input{
  height:38px!important;
  border-radius:10px!important;
  background:#fff!important;
}
body.crm-ui .tasks-checklist-items{
  display:grid!important;
  gap:8px!important;
  padding:0 12px 12px!important;
}
body.crm-ui .tasks-checklist-item{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 34px!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px!important;
  border:1px solid #dbe5f0!important;
  border-radius:12px!important;
  background:#fff!important;
}
body.crm-ui .tasks-checklist-item:before{
  content:counter(checklist-item)!important;
  counter-increment:checklist-item!important;
  display:none!important;
}
body.crm-ui .tasks-checklist-items{counter-reset:checklist-item!important;}
body.crm-ui .tasks-checklist-drag{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  border-radius:9px!important;
  background:#eef4ff!important;
  color:#2563eb!important;
  font-size:13px!important;
}
body.crm-ui .tasks-checklist-item input{
  height:36px!important;
  min-width:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding:0 2px!important;
}
body.crm-ui .tasks-checklist-item input:focus{
  outline:none!important;
}
body.crm-ui .tasks-checklist-item button[data-remove-checklist-item]{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:32px!important;
  height:32px!important;
  border:1px solid #e2e8f0!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#64748b!important;
  font-size:18px!important;
  line-height:1!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-checklist-item button[data-remove-checklist-item]:hover{
  color:#dc2626!important;
  border-color:#fecaca!important;
  background:#fff7f7!important;
}
body.crm-ui .tasks-checklist-note{
  margin:0!important;
  padding:0 12px 12px!important;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.35!important;
}
body.crm-ui .tasks-crm-link-help{
  margin:0 0 12px!important;
  padding:10px 12px!important;
  border:1px solid #bfdbfe!important;
  border-radius:12px!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
  font-size:12.5px!important;
  line-height:1.45!important;
}
body.crm-ui #task-create-modal .tasks-pro-modal-foot{
  position:sticky!important;
  bottom:0!important;
  z-index:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  padding:12px 16px!important;
  border-top:1px solid #e2e8f0!important;
  background:#fff!important;
}
@media (max-width: 980px){
  body.crm-ui #task-create-modal .tasks-pro-create-body{grid-template-columns:1fr!important;}
  body.crm-ui #task-create-modal .tasks-pro-section-task{grid-row:auto!important;}
}

/* V23 tasks: clean checklist and task detail card */
body.crm-ui #task-create-modal .tasks-checklist-builder{
  margin-top:12px!important;
  border:1px solid #dbe5f0!important;
  border-radius:14px!important;
  background:#fff!important;
  overflow:hidden!important;
}
body.crm-ui #task-create-modal .tasks-checklist-head{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:10px 12px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:#f8fafc!important;
}
body.crm-ui #task-create-modal .tasks-checklist-head strong{
  display:block!important;
  margin:0!important;
  color:#0f172a!important;
  font-size:15px!important;
  font-weight:900!important;
}
body.crm-ui #task-create-modal .tasks-checklist-head span,
body.crm-ui #task-create-modal .tasks-checklist-name,
body.crm-ui #task-create-modal .tasks-checklist-note,
body.crm-ui #task-create-modal .tasks-checklist-drag{
  display:none!important;
}
body.crm-ui #task-create-modal .tasks-checklist-items{
  display:grid!important;
  gap:8px!important;
  padding:12px!important;
  counter-reset:none!important;
}
body.crm-ui #task-create-modal .tasks-checklist-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 34px!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px!important;
  border:1px solid #dbe5f0!important;
  border-radius:12px!important;
  background:#fff!important;
}
body.crm-ui #task-create-modal .tasks-checklist-item:before{display:none!important;content:none!important;}
body.crm-ui #task-create-modal .tasks-checklist-item input{
  height:36px!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  padding:0 4px!important;
  box-shadow:none!important;
  font-size:13px!important;
}
body.crm-ui #task-create-modal .tasks-checklist-item button[data-remove-checklist-item]{
  width:32px!important;
  height:32px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #e2e8f0!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#64748b!important;
  font-size:18px!important;
  line-height:1!important;
}

body.crm-ui .task-view-pro-shell{display:grid!important;gap:14px!important;}
body.crm-ui .task-view-pro-hero{
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important;
  padding:18px 20px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.045)!important;
}
body.crm-ui .task-view-pro-title{min-width:0!important;}
body.crm-ui .task-view-pro-title h1{margin:2px 0 8px!important;font-size:28px!important;line-height:1.1!important;letter-spacing:-.03em!important;color:#0f172a!important;font-weight:900!important;}
body.crm-ui .task-view-pro-pills{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;}
body.crm-ui .task-view-pro-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 350px!important;gap:14px!important;align-items:start!important;}
body.crm-ui .task-view-pro-main{display:grid!important;gap:14px!important;min-width:0!important;}
body.crm-ui .task-view-pro-side{display:grid!important;gap:14px!important;min-width:0!important;}
body.crm-ui .task-view-pro-card{
  padding:16px!important;border:1px solid #d8e2ee!important;border-radius:16px!important;background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;min-width:0!important;
}
body.crm-ui .task-view-pro-card-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;margin-bottom:12px!important;}
body.crm-ui .task-view-pro-card-head h2{margin:0!important;font-size:18px!important;line-height:1.2!important;color:#0f172a!important;font-weight:900!important;}
body.crm-ui .task-view-pro-card-head p{margin:4px 0 0!important;color:#64748b!important;font-size:13px!important;}
body.crm-ui .task-view-pro-card-head strong{display:inline-flex!important;align-items:center!important;height:30px!important;padding:0 10px!important;border-radius:999px!important;background:#eff6ff!important;color:#075fd8!important;font-size:13px!important;}
body.crm-ui .task-view-description{min-height:74px!important;padding:13px 14px!important;border:1px solid #e2e8f0!important;border-radius:13px!important;background:#f8fafc!important;color:#0f172a!important;font-size:14px!important;line-height:1.55!important;}
body.crm-ui .task-view-progress{height:8px!important;border-radius:999px!important;background:#e2e8f0!important;overflow:hidden!important;margin-bottom:12px!important;}
body.crm-ui .task-view-progress span{display:block!important;height:100%!important;border-radius:999px!important;background:#2563eb!important;}
body.crm-ui .task-view-empty{display:flex!important;align-items:center!important;justify-content:center!important;min-height:72px!important;border:1px dashed #cbd5e1!important;border-radius:13px!important;background:#f8fafc!important;color:#64748b!important;font-weight:750!important;}
body.crm-ui .task-view-check-list{display:grid!important;gap:8px!important;}
body.crm-ui .task-view-check-list h3{margin:6px 0 0!important;color:#475569!important;font-size:13px!important;font-weight:900!important;text-transform:none!important;}
body.crm-ui .task-view-check-row{margin:0!important;}
body.crm-ui .task-view-check-row label{display:flex!important;align-items:center!important;gap:10px!important;min-height:42px!important;padding:9px 11px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important;color:#0f172a!important;font-size:14px!important;font-weight:700!important;}
body.crm-ui .task-view-check-row input{margin:0!important;width:16px!important;height:16px!important;}
body.crm-ui .task-view-check-row input:checked + span{text-decoration:line-through!important;color:#64748b!important;}
body.crm-ui .task-view-check-add{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;margin-top:12px!important;padding-top:12px!important;border-top:1px solid #e2e8f0!important;}
body.crm-ui .task-view-check-add input{height:40px!important;border:1px solid #cfd8e5!important;border-radius:10px!important;background:#fff!important;padding:0 12px!important;}
body.crm-ui .task-view-side-card h2{margin:0 0 12px!important;font-size:17px!important;font-weight:900!important;color:#0f172a!important;}
body.crm-ui .task-view-side-list{display:grid!important;grid-template-columns:118px minmax(0,1fr)!important;gap:9px 10px!important;margin:0!important;}
body.crm-ui .task-view-side-list dt{margin:0!important;color:#64748b!important;font-size:12px!important;font-weight:800!important;}
body.crm-ui .task-view-side-list dd{margin:0!important;color:#0f172a!important;font-size:13px!important;font-weight:800!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.crm-ui .task-view-status-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;}
body.crm-ui .task-view-status-actions form{margin:0!important;}
body.crm-ui .task-view-comments{display:grid!important;gap:9px!important;}
body.crm-ui .task-view-comment{padding:11px 12px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fbfdff!important;}
body.crm-ui .task-view-comment>div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:6px!important;}
body.crm-ui .task-view-comment strong{color:#0f172a!important;font-size:13px!important;}
body.crm-ui .task-view-comment span{color:#64748b!important;font-size:12px!important;}
body.crm-ui .task-view-comment p{margin:0!important;color:#334155!important;line-height:1.45!important;}
body.crm-ui .task-view-comment-form{display:grid!important;gap:8px!important;margin-top:12px!important;}
body.crm-ui .task-view-comment-form textarea{width:100%!important;border-radius:12px!important;border:1px solid #cfd8e5!important;resize:vertical!important;}
body.crm-ui .task-view-comment-form .button{justify-self:start!important;}
@media (max-width:1180px){body.crm-ui .task-view-pro-layout{grid-template-columns:1fr!important;}body.crm-ui .task-view-pro-hero{display:grid!important;}}
@media (max-width:680px){body.crm-ui .task-view-check-add{grid-template-columns:1fr!important;}body.crm-ui .task-view-side-list{grid-template-columns:1fr!important;}}

/* V24 tasks: participant picker + numbered actionable checklist */
body.crm-ui #task-create-modal .tasks-pro-participants-section .tasks-pro-section-title span{
  display:block!important;
}
body.crm-ui .tasks-user-fields{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
body.crm-ui .tasks-user-field{
  min-width:0!important;
  border:1px solid #dbe5f0!important;
  border-radius:14px!important;
  background:#fff!important;
  overflow:hidden!important;
}
body.crm-ui .tasks-user-field-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:48px!important;
  padding:10px 12px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:#f8fafc!important;
}
body.crm-ui .tasks-user-field-head strong{
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:900!important;
}
body.crm-ui .tasks-user-selected{
  min-height:54px!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  padding:10px 12px!important;
}
body.crm-ui .tasks-user-selected .muted{
  display:inline-flex!important;
  align-items:center!important;
  min-height:32px!important;
  color:#64748b!important;
  font-size:13px!important;
}
body.crm-ui .tasks-user-chip{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  max-width:100%!important;
  min-height:30px!important;
  padding:5px 8px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#0f172a!important;
  font-size:12.5px!important;
  font-weight:800!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-user-chip span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .tasks-user-chip b{
  color:#2563eb!important;
  font-size:14px!important;
  line-height:1!important;
}
body.crm-ui .tasks-user-picker-backdrop[hidden]{display:none!important;}
body.crm-ui .tasks-user-picker-modal{
  width:min(720px, calc(100vw - 36px))!important;
  max-height:min(760px, calc(100vh - 36px))!important;
}
body.crm-ui .tasks-user-picker-body{
  display:grid!important;
  gap:10px!important;
  padding:14px 16px!important;
  overflow:hidden!important;
  min-height:0!important;
}
body.crm-ui .tasks-user-picker-search{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
  color:#334155!important;
  font-size:12px!important;
  font-weight:800!important;
}
body.crm-ui .tasks-user-picker-search input{
  height:40px!important;
  width:100%!important;
  border:1px solid #cfd8e5!important;
  border-radius:11px!important;
  padding:0 12px!important;
  background:#fff!important;
}
body.crm-ui .tasks-user-picker-count{
  color:#64748b!important;
  font-size:12px!important;
  font-weight:750!important;
}
body.crm-ui .tasks-user-picker-list{
  max-height:410px!important;
  display:grid!important;
  gap:7px!important;
  overflow:auto!important;
  padding:2px 4px 2px 0!important;
}
body.crm-ui .tasks-user-option{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:9px 11px!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#fff!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-user-option:hover{
  border-color:#93c5fd!important;
  background:#f8fbff!important;
}
body.crm-ui .tasks-user-option input{
  width:16px!important;
  height:16px!important;
  margin:0!important;
  flex:0 0 auto!important;
}
body.crm-ui .tasks-user-option span{
  min-width:0!important;
  color:#0f172a!important;
  font-size:14px!important;
  font-weight:850!important;
}
body.crm-ui #task-create-modal .tasks-checklist-items{
  counter-reset:task-check-create!important;
}
body.crm-ui #task-create-modal .tasks-checklist-item{
  grid-template-columns:30px minmax(0,1fr) 34px!important;
  counter-increment:task-check-create!important;
}
body.crm-ui #task-create-modal .tasks-checklist-item:before{
  content:attr(data-index)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:26px!important;
  height:26px!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#075fd8!important;
  font-size:12px!important;
  font-weight:900!important;
}
body.crm-ui .task-view-check-list{
  counter-reset:task-check-view!important;
}
body.crm-ui .task-view-check-row{
  counter-increment:task-check-view!important;
}
body.crm-ui .task-view-check-row label{
  display:grid!important;
  grid-template-columns:34px 18px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
}
body.crm-ui .task-view-check-row label:before{
  content:counter(task-check-view)'.'!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:28px!important;
  height:28px!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  color:#475569!important;
  font-size:12px!important;
  font-weight:900!important;
}
body.crm-ui .task-view-check-row .task-check-title{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:normal!important;
}
body.crm-ui .task-view-check-row input:checked + .task-check-title{
  text-decoration:line-through!important;
  color:#64748b!important;
}
body.crm-ui .task-view-check-row em{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:3px 8px!important;
  border-radius:999px!important;
  background:#f8fafc!important;
  color:#64748b!important;
  border:1px solid #e2e8f0!important;
  font-style:normal!important;
  font-size:12px!important;
  font-weight:850!important;
  white-space:nowrap!important;
}
body.crm-ui .task-view-check-row input:checked ~ em{
  background:#ecfdf5!important;
  border-color:#a7f3d0!important;
  color:#047857!important;
}
@media (max-width: 760px){
  body.crm-ui .tasks-user-fields{grid-template-columns:1fr!important;}
  body.crm-ui .task-view-check-row label{grid-template-columns:30px 18px minmax(0,1fr)!important;}
  body.crm-ui .task-view-check-row em{grid-column:3!important;justify-self:start!important;}
}

/* V25 tasks: force legacy participant checkbox lists into compact picker fallback */
body.crm-ui .tasks-participants-v25-upgraded .tasks-pro-check-list,
body.crm-ui .tasks-participants-v25-upgraded > .tasks-pro-people-panes{
  display:none!important;
}
body.crm-ui .tasks-participants-v25-upgraded .tasks-user-fields{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
body.crm-ui #task-user-picker-modal-v25[hidden]{display:none!important;}
body.crm-ui #task-user-picker-modal-v25 .tasks-user-picker-list{
  max-height:420px!important;
  overflow:auto!important;
}
@media (max-width: 760px){
  body.crm-ui .tasks-participants-v25-upgraded .tasks-user-fields{grid-template-columns:1fr!important;}
}

/* V26 tasks: participants are selected inline, not through a separate modal */
body.crm-ui #task-create-modal .tasks-participants-v26 .tasks-pro-section-title span{
  color:#64748b!important;
}
body.crm-ui .tasks-people-inline-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
}
body.crm-ui .tasks-people-combo{
  position:relative!important;
  min-width:0!important;
  border:1px solid #dbe5f0!important;
  border-radius:14px!important;
  background:#fff!important;
  padding:10px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
}
body.crm-ui .tasks-people-combo-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:8px!important;
}
body.crm-ui .tasks-people-combo-head strong{
  color:#0f172a!important;
  font-size:13.5px!important;
  font-weight:900!important;
}
body.crm-ui .tasks-people-combo-head span{
  color:#64748b!important;
  font-size:11.5px!important;
  font-weight:850!important;
  white-space:nowrap!important;
}
body.crm-ui .tasks-people-selected{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  min-height:34px!important;
  align-items:center!important;
  padding:6px 0 8px!important;
}
body.crm-ui .tasks-people-selected .muted{
  color:#94a3b8!important;
  font-size:12.5px!important;
  font-weight:750!important;
}
body.crm-ui .tasks-people-chip{
  display:inline-flex!important;
  align-items:center!important;
  max-width:100%!important;
  gap:6px!important;
  height:28px!important;
  padding:0 8px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:850!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-people-chip span{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui .tasks-people-chip b{
  color:#2563eb!important;
  font-size:14px!important;
  line-height:1!important;
}
body.crm-ui .tasks-people-search{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 36px!important;
  align-items:center!important;
  gap:6px!important;
}
body.crm-ui .tasks-people-search input{
  height:38px!important;
  width:100%!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  padding:0 11px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:13px!important;
  outline:none!important;
}
body.crm-ui .tasks-people-search input:focus{
  border-color:#2563eb!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.12)!important;
}
body.crm-ui .tasks-people-search button{
  height:38px!important;
  width:36px!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#334155!important;
  font-size:15px!important;
  font-weight:900!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-people-combo.is-open .tasks-people-search button{
  border-color:#2563eb!important;
  color:#2563eb!important;
}
body.crm-ui .tasks-people-dropdown{
  position:absolute!important;
  left:10px!important;
  right:10px!important;
  top:calc(100% - 2px)!important;
  z-index:40!important;
  max-height:260px!important;
  overflow:auto!important;
  padding:8px!important;
  border:1px solid #cbd5e1!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 18px 38px rgba(15,23,42,.18)!important;
}
body.crm-ui .tasks-people-dropdown[hidden]{display:none!important;}
body.crm-ui .tasks-people-option{
  width:100%!important;
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  min-height:46px!important;
  padding:7px 9px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:#fff!important;
  text-align:left!important;
  cursor:pointer!important;
}
body.crm-ui .tasks-people-option:hover{
  background:#f8fbff!important;
  border-color:#bfdbfe!important;
}
body.crm-ui .tasks-people-option.is-selected{
  background:#eff6ff!important;
  border-color:#93c5fd!important;
}
body.crm-ui .tasks-people-avatar{
  width:30px!important;
  height:30px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  background:#eaf2ff!important;
  color:#2563eb!important;
  font-weight:900!important;
}
body.crm-ui .tasks-people-option-main{
  min-width:0!important;
  display:grid!important;
  gap:1px!important;
}
body.crm-ui .tasks-people-option-main strong{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:900!important;
}
body.crm-ui .tasks-people-option-main small{
  color:#64748b!important;
  font-size:11.5px!important;
  font-weight:700!important;
}
body.crm-ui .tasks-people-option-state{
  color:#2563eb!important;
  font-size:11.5px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body.crm-ui .tasks-people-option.is-selected .tasks-people-option-state{
  color:#047857!important;
}
body.crm-ui .tasks-people-empty{
  padding:12px!important;
  text-align:center!important;
  color:#64748b!important;
  font-size:13px!important;
  font-weight:750!important;
}
body.crm-ui .tasks-people-empty[hidden]{display:none!important;}
body.crm-ui #task-user-picker-modal,
body.crm-ui #task-user-picker-modal-v25{
  display:none!important;
}
@media (max-width:860px){
  body.crm-ui .tasks-people-inline-grid{grid-template-columns:1fr!important;}
}

/* V27 tasks: clean Bitrix-like participants selector */
body.crm-ui #task-create-modal .tasks-participants-v27{
  padding:14px!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-pro-section-title{
  margin-bottom:10px!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-pro-section-title span{
  color:#64748b!important;
  font-size:12px!important;
  font-weight:700!important;
}
body.crm-ui #task-create-modal .tasks-people-rows{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-combo,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-combo{
  position:relative!important;
  display:grid!important;
  grid-template-columns:118px minmax(0,1fr)!important;
  align-items:start!important;
  gap:10px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-label,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-label{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-height:38px!important;
  padding-top:1px!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-label strong,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-label strong{
  color:#0f172a!important;
  font-size:12.5px!important;
  font-weight:850!important;
  line-height:1.2!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-label span,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-label span{
  min-width:20px!important;
  height:20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  background:#eef4ff!important;
  color:#2563eb!important;
  font-size:11px!important;
  font-weight:900!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-control,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-control{
  position:relative!important;
  min-width:0!important;
  min-height:38px!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  padding:5px 8px!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  transition:border-color .15s ease, box-shadow .15s ease!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-combo.is-open .tasks-people-control,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-combo.is-open .tasks-people-control{
  border-color:#2563eb!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.10)!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-selected,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-selected{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  min-height:0!important;
  padding:0!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-chip,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-chip{
  height:26px!important;
  max-width:210px!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  padding:0 7px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  cursor:pointer!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-chip span,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-chip span{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-chip b,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-chip b{
  color:#2563eb!important;
  font-size:14px!important;
  font-weight:900!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 input[data-people-search],
body.crm-ui #task-create-modal .tasks-people-rows input[data-people-search]{
  flex:1 1 120px!important;
  min-width:118px!important;
  height:26px!important;
  border:0!important;
  background:transparent!important;
  outline:none!important;
  padding:0!important;
  color:#0f172a!important;
  font-size:13px!important;
  box-shadow:none!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 input[data-people-search]::placeholder,
body.crm-ui #task-create-modal .tasks-people-rows input[data-people-search]::placeholder{
  color:#94a3b8!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-search,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-search{
  display:contents!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 [data-people-toggle],
body.crm-ui #task-create-modal .tasks-people-rows [data-people-toggle]{
  display:none!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-dropdown,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-dropdown{
  position:absolute!important;
  left:0!important;
  right:0!important;
  top:calc(100% + 6px)!important;
  z-index:120!important;
  max-height:220px!important;
  overflow:auto!important;
  padding:6px!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 16px 36px rgba(15,23,42,.18)!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-dropdown[hidden],
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-dropdown[hidden]{
  display:none!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option{
  width:100%!important;
  min-height:42px!important;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr) 26px!important;
  align-items:center!important;
  gap:9px!important;
  padding:6px 8px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:#fff!important;
  text-align:left!important;
  cursor:pointer!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option:hover,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option:hover{
  border-color:#dbeafe!important;
  background:#f8fbff!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option.is-selected,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option.is-selected{
  border-color:#bfdbfe!important;
  background:#eff6ff!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-avatar,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-avatar{
  width:28px!important;
  height:28px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#eef4ff!important;
  color:#2563eb!important;
  font-size:12px!important;
  font-weight:900!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option-main,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option-main{
  min-width:0!important;
  display:grid!important;
  gap:1px!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option-main strong,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option-main strong{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#0f172a!important;
  font-size:12.5px!important;
  font-weight:850!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option-main small,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option-main small{
  color:#64748b!important;
  font-size:11px!important;
  font-weight:650!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option-state,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option-state{
  width:24px!important;
  height:24px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  background:#eef4ff!important;
  color:#2563eb!important;
  font-size:14px!important;
  font-weight:900!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-option.is-selected .tasks-people-option-state,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-option.is-selected .tasks-people-option-state{
  background:#dcfce7!important;
  color:#047857!important;
}
body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-empty,
body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-empty{
  padding:10px!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:700!important;
  text-align:center!important;
}
@media (max-width: 920px){
  body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-combo,
  body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-combo{
    grid-template-columns:1fr!important;
    gap:5px!important;
  }
  body.crm-ui #task-create-modal .tasks-participants-v27 .tasks-people-label,
  body.crm-ui #task-create-modal .tasks-people-rows .tasks-people-label{
    min-height:0!important;
    justify-content:flex-start!important;
  }
}


/* Products v28: catalog tree, product editor and platform mapping */
.product-hero .eyebrow,.product-editor-hero .eyebrow{display:block;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#2563eb;margin-bottom:4px}.products-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:14px;align-items:start}.product-tree-panel{position:sticky;top:72px;max-height:calc(100vh - 120px);overflow:auto}.product-tree-list{display:flex;flex-direction:column;gap:3px}.product-tree-item{display:flex;align-items:center;gap:8px;padding:8px 10px 8px calc(10px + var(--level,0)*18px);border:1px solid transparent;border-radius:10px;color:#0f172a;text-decoration:none;font-weight:700;font-size:13px}.product-tree-item:hover{background:#f8fafc;border-color:#dbe7f5}.product-tree-item.active{background:#eaf2ff;border-color:#9fc0ff;color:#0b55d9}.tree-marker{color:#2563eb;font-size:11px}.products-main{min-width:0}.product-filter-panel{margin-bottom:12px}.products-table th,.products-table td{vertical-align:middle}.product-name-cell{display:flex;align-items:center;gap:10px;min-width:280px}.product-thumb{width:42px;height:42px;border:1px solid #d9e3f0;border-radius:10px;background:#f8fafc;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 42px}.product-thumb img{width:100%;height:100%;object-fit:cover}.category-path-mini{display:inline-block;max-width:280px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#475569}.product-edit-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;align-items:start}.product-edit-main,.product-edit-side{display:flex;flex-direction:column;gap:14px}.product-section{padding:18px}.product-section h3{margin:0 0 12px;font-size:15px}.platform-box{border:1px solid #d9e3f0;background:#f8fafc;border-radius:14px;padding:14px}.product-photo-preview{width:100%;max-height:260px;object-fit:contain;border:1px solid #d9e3f0;border-radius:14px;background:#fff}.product-photo-empty{height:180px;border:1px dashed #b8c8dc;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#64748b;background:#f8fafc}.checkbox-line{display:flex!important;align-items:center;gap:8px;font-weight:700}.checkbox-line input{width:auto!important}.product-category-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:14px;align-items:start}.product-category-side{display:flex;flex-direction:column;gap:14px}.product-tree-manager{min-height:520px}.product-tabs{margin-bottom:12px}.product-import-panel{max-width:760px}.small-link{font-size:12px;font-weight:800;color:#2563eb;text-decoration:none}.empty-state{border:1px dashed #cbd5e1;border-radius:12px;padding:20px;text-align:center;color:#64748b;background:#f8fafc}.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.form-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:1200px){.products-layout,.product-edit-layout,.product-category-layout{grid-template-columns:1fr}.product-tree-panel{position:static;max-height:420px}.form-grid.cols-4,.form-grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.form-grid.cols-4,.form-grid.cols-3{grid-template-columns:1fr}.product-name-cell{min-width:220px}}

/* Products v29: collapsible category tree and bulk delete */
.product-tree-folders{gap:4px}.product-tree-folder{border:1px solid transparent;border-radius:12px}.product-tree-folder>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:9px 10px 9px calc(10px + var(--level,0)*18px);border-radius:12px;font-size:13px;font-weight:850;color:#0f172a}.product-tree-folder>summary::-webkit-details-marker{display:none}.product-tree-folder>summary:hover{background:#f8fafc;border-color:#dbe7f5}.product-tree-folder>summary .tree-marker::before{content:'▸';display:inline-block;color:#2563eb;font-size:12px;transition:transform .16s ease}.product-tree-folder[open]>summary .tree-marker::before{transform:rotate(90deg)}.product-tree-folder[open]>summary{background:#f8fbff}.product-tree-children{display:flex;flex-direction:column;gap:3px;padding:2px 0 5px}.product-tree-self{color:#475569!important;font-weight:750!important;font-size:12px!important}.product-tree-self.active{color:#0b55d9!important}.product-list-title{margin-bottom:10px}.product-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dbe7f5;background:#f8fafc;border-radius:14px;padding:10px 12px;margin:0 0 10px}.product-check-all{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:#334155}.product-check-all input,.product-select-col input{width:16px!important;height:16px!important}.product-bulk-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.button.danger{border-color:#fecaca;background:#fee2e2;color:#b91c1c}.button.danger:hover{border-color:#fca5a5;background:#fecaca;color:#991b1b}.button.danger.ghost{background:#fff;color:#b91c1c}.product-select-col{width:38px;text-align:center}.products-table tr.is-selected{background:#fff7ed}@media(max-width:900px){.product-bulkbar{align-items:flex-start;flex-direction:column}.product-bulk-actions{width:100%}.product-bulk-actions .button{flex:1 1 auto}}

/* Products v31: working catalog table */
.product-filter-live .product-live-filters {
    grid-template-columns: minmax(320px, 1.5fr) minmax(180px, .8fr) minmax(220px, 1fr) minmax(160px, .7fr) auto;
    align-items: end;
}
.product-filter-live .product-search-label input { font-weight: 600; }
.product-filter-reset { align-self: end; white-space: nowrap; }
.products-table-editable { table-layout: auto; }
.products-table-editable th, .products-table-editable td { vertical-align: middle; }
.products-table-editable th:nth-child(2) { min-width: 420px; }
.products-table-editable th:nth-child(6) { min-width: 150px; }
.products-table-editable th:nth-child(7) { min-width: 170px; }
.products-table-editable .product-name-cell-wide { gap: 12px; align-items: flex-start; }
.product-name-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.product-variant-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.product-variant-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid #d7e3f6;
    border-radius: 999px;
    background: #f8fbff;
    color: #30445f;
    font-size: 12px;
    font-weight: 650;
}
.products-table-editable input.inline-money,
.products-table-editable input.inline-num,
.products-table-editable select.inline-status {
    width: 100%;
    max-width: 122px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd8ea;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
    color: #0f172a;
}
.products-table-editable input.mini { max-width: 86px; }
.products-table-editable small { display: block; margin-top: 5px; color: #64748b; line-height: 1.3; }
.product-stock-cell, .product-price-cell, .product-status-cell { min-width: 132px; }
.product-status-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.product-status-cell .inline-status { max-width: 116px; min-height: 31px; font-size: 12px; font-weight: 700; }
.products-table-editable tr.has-inline-changes td { background: #fffdf3; }
.products-table-editable tr.is-selected td { background: #eff6ff; }
.product-bulkbar {
    position: sticky;
    top: 58px;
    z-index: 5;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    padding: 10px 12px;
}
.product-bulk-actions { gap: 8px; flex-wrap: wrap; }
.status-muted { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
@media (max-width: 1200px) {
    .product-filter-live .product-live-filters { grid-template-columns: 1fr 1fr; }
    .products-table-editable th:nth-child(2) { min-width: 320px; }
}

/* Products v32: clean working table without duplicate product text */
.products-bulk-form { overflow: visible; }
.product-worktable {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e1eaf5;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.product-worktable-head,
.product-workrow {
    display: grid;
    grid-template-columns: 34px minmax(360px, 1.45fr) minmax(190px, .72fr) minmax(130px, .48fr) minmax(260px, .82fr) minmax(120px, .42fr);
    gap: 14px;
    align-items: center;
}
.product-worktable-head {
    padding: 10px 14px;
    background: #f2f6fb;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid #dce6f2;
}
.product-workrow {
    padding: 14px;
    min-height: 96px;
    border-bottom: 1px solid #e8eef6;
}
.product-workrow:last-child { border-bottom: 0; }
.product-workrow:hover { background: #fbfdff; }
.product-work-product { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.product-work-product .product-thumb { margin-top: 2px; text-decoration: none; color: #94a3b8; font-weight: 800; }
.product-thumb-empty { font-size: 14px; }
.product-main-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.28;
    font-size: 14px;
}
.product-brand-line { font-size: 12px; color: #475569; }
.product-brand-line span { color: #64748b; font-weight: 700; }
.product-work-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.product-work-meta div { min-width: 0; }
.product-work-meta span,
.product-work-stock label,
.product-work-prices label { display: block; color: #64748b; font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.product-work-meta strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
    font-size: 12px;
}
.product-work-stock small { display: block; margin-top: 6px; color: #64748b; line-height: 1.25; }
.product-work-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.product-worktable input.inline-money,
.product-worktable input.inline-num,
.product-worktable select.inline-status {
    width: 100%;
    max-width: none;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd8ea;
    border-radius: 8px;
    background: #fff;
    font-weight: 750;
    color: #0f172a;
}
.product-status-cell { min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.product-status-cell .badge { white-space: nowrap; }
.product-status-cell .inline-status { width: 100%; min-height: 34px; font-size: 12px; }
.product-variant-chips { margin-top: 2px; }
.product-variant-chips span { max-width: 100%; }
.product-filter-live .product-live-filters { grid-template-columns: minmax(280px, 1.3fr) minmax(160px,.65fr) minmax(200px,.9fr) minmax(150px,.6fr) auto; }
.product-bulkbar { margin-bottom: 12px; }
.product-bulk-actions .button { min-height: 38px; }
@media (max-width: 1450px) {
    .product-worktable-head,
    .product-workrow { grid-template-columns: 34px minmax(300px, 1.25fr) minmax(170px, .65fr) minmax(120px, .46fr) minmax(230px, .75fr) minmax(110px, .4fr); gap: 10px; }
    .products-layout { grid-template-columns: 290px minmax(0,1fr); }
}
@media (max-width: 1180px) {
    .product-worktable-head { display: none; }
    .product-workrow { grid-template-columns: 34px minmax(0,1fr); align-items: start; }
    .product-work-meta,
    .product-work-stock,
    .product-work-prices,
    .product-status-cell { grid-column: 2; }
    .product-work-prices { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
.product-worktable.no-select .product-worktable-head,
.product-worktable.no-select .product-workrow { grid-template-columns: minmax(360px,1.45fr) minmax(190px,.72fr) minmax(130px,.48fr) minmax(260px,.82fr) minmax(120px,.42fr); }
@media (max-width:1180px){.product-worktable.no-select .product-workrow{grid-template-columns:minmax(0,1fr)}.product-worktable.no-select .product-work-meta,.product-worktable.no-select .product-work-stock,.product-worktable.no-select .product-work-prices,.product-worktable.no-select .product-status-cell{grid-column:1}}

/* Products v33: no overlapping toolbar, clear row editing state */
.products-bulk-form{overflow:visible!important;padding-bottom:16px!important;}
.product-work-toolbar,
.product-bulkbar.product-work-toolbar{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  display:grid!important;
  grid-template-columns:minmax(210px,.75fr) minmax(260px,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  margin:0 0 14px!important;
  padding:12px!important;
  background:#f8fafc!important;
  border:1px solid #dbe7f5!important;
  border-radius:14px!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.product-save-hint{
  min-height:34px;
  display:flex;
  align-items:center;
  padding:7px 10px;
  border:1px solid #dbe7f5;
  border-radius:10px;
  background:#fff;
  color:#64748b;
  font-size:12px;
  font-weight:750;
}
.product-save-hint.has-changes{border-color:#f59e0b;background:#fffbeb;color:#92400e;}
.product-save-hint.is-saved{border-color:#86efac;background:#f0fdf4;color:#166534;}
.product-bulk-actions{justify-content:flex-end;}
.product-worktable{clear:both;position:relative;z-index:1;}
.product-workrow{background:#fff;}
.product-workrow.has-inline-changes{background:#fffaf0!important;box-shadow:inset 3px 0 0 #f59e0b;}
.product-workrow.has-inline-changes input,
.product-workrow.has-inline-changes select{border-color:#f59e0b!important;background:#fffdf7!important;}
.product-workrow.is-selected{background:#eff6ff!important;}
.product-work-prices{align-items:start;}
.product-work-prices label{margin:0!important;}
.product-work-prices .price-row-note{
  grid-column:1/-1;
  margin:0;
  color:#64748b;
  font-size:11px;
  line-height:1.25;
}
.row-save-state{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.product-workrow.has-inline-changes .row-save-state{border-color:#fed7aa;background:#fff7ed;color:#c2410c;}
.product-workrow.has-inline-changes .row-save-state::before{content:'Не сохранено';}
.product-workrow.has-inline-changes .row-save-state{font-size:0;}
.product-workrow.has-inline-changes .row-save-state::before{font-size:11px;}
.status-mini-label{display:block;margin:0 0 -3px!important;color:#64748b!important;font-size:10px!important;font-weight:900!important;text-transform:uppercase;letter-spacing:.04em;}
.product-status-cell{gap:6px!important;}
.product-status-cell .badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;}
.product-worktable-head{position:relative;z-index:1;}
.product-worktable input.inline-money:focus,
.product-worktable input.inline-num:focus,
.product-worktable select.inline-status:focus{outline:2px solid rgba(37,99,235,.18);border-color:#2563eb!important;}
@media(max-width:1500px){
  .product-work-toolbar,.product-bulkbar.product-work-toolbar{grid-template-columns:1fr!important;align-items:stretch!important;}
  .product-bulk-actions{justify-content:flex-start;}
}
@media(max-width:1180px){
  .product-work-toolbar .button{width:100%;}
}

/* Lembar System Pack v49: safer product worktable and mobile comfort */
.danger-actions-dropdown{position:relative;display:inline-block;}
.danger-actions-dropdown>summary{list-style:none;cursor:pointer;min-height:38px;display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #fecaca;border-radius:10px;background:#fff;color:#991b1b;font-weight:850;}
.danger-actions-dropdown>summary::-webkit-details-marker{display:none;}
.danger-actions-dropdown[open]>summary{background:#fef2f2;}
.danger-actions-menu{position:absolute;right:0;top:calc(100% + 8px);min-width:240px;padding:10px;border:1px solid #fecaca;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.16);z-index:20;display:grid;gap:8px;}
.danger-actions-menu .button{width:100%;justify-content:center;}
.product-workrow{cursor:default;}
.product-select-col input{width:18px;height:18px;cursor:pointer;}
.product-workrow.is-selected{box-shadow:inset 3px 0 0 #2563eb;}
.product-workrow.has-inline-changes.is-selected{box-shadow:inset 3px 0 0 #f59e0b, inset 6px 0 0 #2563eb;}
.product-filter-live input[name="q"]{font-size:15px;}
.product-filter-live.is-loading{opacity:.72;}
.product-filter-live.is-loading:after{content:'Фильтр применяется...';display:block;margin-top:8px;color:#64748b;font-size:12px;font-weight:800;}
@media(max-width:760px){
  .products-layout{grid-template-columns:1fr!important;}
  .product-tree-panel{order:2;}
  .products-main{order:1;}
  .product-work-toolbar,.product-bulkbar.product-work-toolbar{position:sticky!important;bottom:8px!important;z-index:30!important;box-shadow:0 15px 45px rgba(15,23,42,.18)!important;}
  .danger-actions-menu{left:0;right:auto;}
}


/* Lembar System Pack v50: system control center */
.system-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:16px;align-items:start;}
.status-pill.ok{background:#e9fbf3!important;color:#087857!important;border-color:#a8e8cd!important;}
.status-pill.warn{background:#fff8e6!important;color:#9a5b05!important;border-color:#f7d48b!important;}
.status-pill.danger{background:#fff1f3!important;color:#c72e43!important;border-color:#ffc3cd!important;}
.actions-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end;}
@media(max-width:1100px){.system-grid{grid-template-columns:1fr}.actions-row{justify-content:flex-start}}

/* Binotel / telephony workspace */
.crm-ui .admin-process{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.crm-ui .admin-process div{background:#fff;border:1px solid var(--line);border-radius:7px;padding:14px;box-shadow:0 5px 14px rgba(15,23,42,.04)}
.crm-ui .admin-process strong{display:block;font-size:15px;margin-bottom:6px;color:#0f172a}
.crm-ui .admin-process span{display:block;color:#64748b;font-size:12px;line-height:1.45}
@media(max-width:1200px){.crm-ui .admin-process{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.crm-ui .admin-process{grid-template-columns:1fr}}

/* Marketing professional dashboard */
body.crm-ui .marketing-hero{margin-bottom:12px;}
body.crm-ui .marketing-kpis{grid-template-columns:repeat(4,minmax(170px,1fr));}
body.crm-ui .marketing-dashboard-grid{grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr);align-items:start;}
body.crm-ui .marketing-health-list{display:grid;gap:10px;}
body.crm-ui .marketing-health-item{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #d9e3f0;background:#f8fafc;border-radius:12px;padding:12px 14px;font-weight:800;}
body.crm-ui .marketing-health-item strong{font-size:22px;color:#0f172a;}
body.crm-ui .marketing-health-item.ok{border-color:#b8ecd8;background:#f0fdf7;}
body.crm-ui .marketing-health-item.warn{border-color:#fde68a;background:#fffbeb;}
body.crm-ui .marketing-health-item.danger{border-color:#ffc9d0;background:#fff1f2;}
body.crm-ui .marketing-integration-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px;}
body.crm-ui .marketing-integration-card{border:1px solid #d9e3f0;background:#fff;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px;min-height:148px;}
body.crm-ui .marketing-integration-card.ok{border-color:#b8ecd8;background:linear-gradient(180deg,#ffffff,#f4fff9);}
body.crm-ui .marketing-integration-card.warn{border-color:#fde68a;background:linear-gradient(180deg,#ffffff,#fffbeb);}
body.crm-ui .marketing-integration-card.danger{border-color:#ffc9d0;background:linear-gradient(180deg,#ffffff,#fff1f2);}
body.crm-ui .marketing-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
body.crm-ui .marketing-card-top span{display:block;color:#64748b;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px;}
body.crm-ui .marketing-card-top strong{font-size:16px;color:#0f172a;}
body.crm-ui .marketing-card-top b{font-size:12px;border:1px solid #d9e3f0;border-radius:999px;padding:5px 8px;background:#fff;color:#334155;white-space:nowrap;}
body.crm-ui .marketing-integration-card p{margin:0;color:#475569;font-size:13px;line-height:1.35;}
body.crm-ui .marketing-code-box{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background:#f8fafc;border:1px solid #d9e3f0;border-radius:10px;padding:10px 12px;color:#0f172a;font-size:12px;line-height:1.5;word-break:break-all;}
body.crm-ui .marketing-checklist{display:grid;gap:10px;}
body.crm-ui .marketing-checklist > div{border:1px solid #d9e3f0;background:#f8fafc;border-radius:12px;padding:12px 14px;}
body.crm-ui .marketing-checklist strong{display:block;color:#0f172a;font-size:14px;margin-bottom:3px;}
body.crm-ui .marketing-checklist span{display:block;color:#64748b;font-size:12px;line-height:1.35;}
body.crm-ui .stat-inline{display:flex;align-items:center;gap:8px;color:#64748b;font-size:12px;font-weight:750;}
body.crm-ui .stat-inline strong{font-size:16px;color:#0f172a;}
body.crm-ui .marketing-result-table td:nth-child(3),body.crm-ui .marketing-result-table td:nth-child(5),body.crm-ui .marketing-result-table td:nth-child(6),body.crm-ui .marketing-result-table td:nth-child(7){white-space:nowrap;text-align:right;}
@media(max-width:1200px){body.crm-ui .marketing-kpis,body.crm-ui .marketing-integration-grid{grid-template-columns:repeat(2,minmax(0,1fr));}body.crm-ui .marketing-dashboard-grid{grid-template-columns:1fr;}}
@media(max-width:720px){body.crm-ui .marketing-kpis,body.crm-ui .marketing-integration-grid{grid-template-columns:1fr;}}


/* User profile v55 */
body.crm-ui .user-avatar-image{object-fit:cover;border-radius:50%;display:block}
body.crm-ui .profile-avatar-image{object-fit:cover;padding:0!important;overflow:hidden}
body.crm-ui .profile-avatar-large{width:112px!important;height:112px!important;border-radius:28px!important}
body.crm-ui .profile-shell-v2{display:grid;gap:12px}
body.crm-ui .profile-stats-v2{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.crm-ui .profile-main-grid{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr);gap:12px}
body.crm-ui .profile-edit-card{padding:18px!important}
body.crm-ui .profile-edit-card .panel-head p{margin:5px 0 0}
body.crm-ui .profile-edit-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:24px;align-items:start}
body.crm-ui .profile-photo-box{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}
body.crm-ui .profile-upload-button{cursor:pointer;margin:0}
body.crm-ui .profile-fields{margin:0!important}
body.crm-ui .profile-fields .wide{grid-column:1/-1}
body.crm-ui .info-list dd{overflow-wrap:anywhere}
@media(max-width:900px){body.crm-ui .profile-main-grid,body.crm-ui .profile-edit-grid{grid-template-columns:1fr}body.crm-ui .profile-stats-v2{grid-template-columns:1fr!important}body.crm-ui .profile-photo-box{align-items:flex-start}}

/* Nova Poshta: per-TTN sender location override */
.np-sender-location-card {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border, #dfe5ea);
  border-radius: 12px;
  background: #f8faf9;
}
.np-sender-location-card label {
  display: grid;
  gap: 7px;
  max-width: 760px;
  font-weight: 600;
}
.np-sender-location-card select {
  width: 100%;
}

/* Core branding image 3.78.0 */
.brand-mark{overflow:hidden}.brand-mark img,.auth-logo img,.auth-footer-dot img{width:100%;height:100%;object-fit:contain;display:block}
.auth-logo{overflow:hidden}.auth-footer-dot{overflow:hidden;display:inline-grid;place-items:center}

/* Products catalogue alignment 3.87.0
   Restores a stable six-column worktable without changing catalogue logic. */
body.crm-ui .products-layout{
  grid-template-columns:280px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:start!important;
}
body.crm-ui .products-main{min-width:0!important;}
body.crm-ui .products-bulk-form{min-width:0!important;overflow:visible!important;}
body.crm-ui .product-worktable{width:100%!important;min-width:0!important;overflow:hidden!important;}
body.crm-ui .product-worktable-head,
body.crm-ui .product-workrow{
  display:grid!important;
  grid-template-columns:28px minmax(280px,1.35fr) minmax(145px,.62fr) minmax(115px,.46fr) minmax(225px,.86fr) minmax(145px,.54fr)!important;
  column-gap:10px!important;
  row-gap:8px!important;
  align-items:center!important;
}
body.crm-ui .product-worktable-head{
  padding:10px 12px!important;
  min-height:48px!important;
}
body.crm-ui .product-worktable-head>div{
  min-width:0!important;
  white-space:normal!important;
  line-height:1.2!important;
}
body.crm-ui .product-workrow{
  padding:14px 12px!important;
  min-height:126px!important;
}
body.crm-ui .product-select-col,
body.crm-ui .product-work-product,
body.crm-ui .product-work-meta,
body.crm-ui .product-work-stock,
body.crm-ui .product-work-prices,
body.crm-ui .product-status-cell{
  min-width:0!important;
  grid-column:auto!important;
}
body.crm-ui .product-work-product{align-self:start!important;}
body.crm-ui .product-main-title{font-size:13px!important;line-height:1.3!important;}
body.crm-ui .product-work-meta{gap:7px!important;align-self:start!important;}
body.crm-ui .product-work-stock{align-self:start!important;}
body.crm-ui .product-work-prices{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  align-self:start!important;
}
body.crm-ui .product-work-prices .price-row-note{
  grid-column:1/-1!important;
  margin:0!important;
  font-size:10px!important;
  line-height:1.25!important;
  color:#64748b!important;
}
body.crm-ui .product-status-cell{
  align-self:start!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  align-items:stretch!important;
}
body.crm-ui .product-status-cell .badge{
  align-self:flex-start!important;
  max-width:100%!important;
}
body.crm-ui .product-status-cell .inline-status{
  width:100%!important;
  max-width:none!important;
}
body.crm-ui .row-save-state{align-self:flex-start!important;}
body.crm-ui .product-work-toolbar,
body.crm-ui .product-bulkbar.product-work-toolbar{
  grid-template-columns:minmax(190px,.8fr) minmax(250px,1fr) auto!important;
}
@media(max-width:1500px){
  body.crm-ui .products-layout{grid-template-columns:250px minmax(0,1fr)!important;}
  body.crm-ui .product-worktable-head,
  body.crm-ui .product-workrow{
    grid-template-columns:28px minmax(240px,1.28fr) minmax(130px,.58fr) minmax(105px,.44fr) minmax(205px,.82fr) minmax(135px,.5fr)!important;
    column-gap:8px!important;
  }
  body.crm-ui .product-work-toolbar,
  body.crm-ui .product-bulkbar.product-work-toolbar{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:1220px){
  body.crm-ui .products-layout{grid-template-columns:1fr!important;}
  body.crm-ui .product-tree-panel{position:static!important;max-height:360px!important;}
  body.crm-ui .product-worktable-head{display:none!important;}
  body.crm-ui .product-workrow{
    grid-template-columns:28px minmax(0,1fr)!important;
    padding:14px!important;
  }
  body.crm-ui .product-work-product,
  body.crm-ui .product-work-meta,
  body.crm-ui .product-work-stock,
  body.crm-ui .product-work-prices,
  body.crm-ui .product-status-cell{grid-column:2!important;}
  body.crm-ui .product-status-cell{max-width:320px!important;}
}

/* LEMBAR login visual refresh — scoped to the real login page only */
body.crm-auth-mode:has(.auth-card-login){background:#f5f7fb!important;color:#111827!important;}
body.crm-auth-mode .auth-main:has(.auth-card-login){position:relative!important;isolation:isolate!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;padding:48px 24px 104px!important;}
body.crm-auth-mode .login-page{position:relative;z-index:1;width:100%;min-height:calc(100vh - 152px);display:flex;align-items:center;justify-content:center;font-family:Inter,Manrope,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
body.crm-auth-mode .login-page:before{content:"";position:fixed;z-index:-2;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 38%,rgba(255,255,255,.96) 0,rgba(247,249,252,.82) 42%,rgba(245,247,251,.98) 78%),linear-gradient(135deg,#f7f9fc 0,#f4f7fb 100%);}
body.crm-auth-mode .login-page:after{content:"";position:fixed;z-index:-1;inset:0;pointer-events:none;opacity:.36;background-image:linear-gradient(rgba(148,163,184,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,.12) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(to bottom,transparent,black 24%,black 70%,transparent);}
body.crm-auth-mode .login-decor{position:fixed;z-index:-1;display:block;pointer-events:none;}
body.crm-auth-mode .login-decor-blue{left:-132px;top:12%;width:370px;height:370px;border-radius:92px;transform:rotate(24deg);background:linear-gradient(145deg,rgba(37,99,235,.12),rgba(96,165,250,.035));border:1px solid rgba(37,99,235,.08);box-shadow:0 42px 100px rgba(37,99,235,.06);}
body.crm-auth-mode .login-decor-green{left:13%;bottom:17%;width:72px;height:72px;border-radius:24px;transform:rotate(-16deg);background:linear-gradient(145deg,rgba(34,197,94,.17),rgba(74,222,128,.05));border:1px solid rgba(22,163,74,.09);}
body.crm-auth-mode .login-decor-soft{right:-74px;top:20%;width:250px;height:250px;border-radius:70px;transform:rotate(32deg);background:linear-gradient(145deg,rgba(148,163,184,.11),rgba(226,232,240,.02));border:1px solid rgba(148,163,184,.09);}
body.crm-auth-mode .auth-card.auth-card-login{position:relative;width:min(468px,calc(100vw - 40px))!important;padding:40px!important;border:1px solid #e2e8f0!important;border-radius:20px!important;background:rgba(255,255,255,.98)!important;box-shadow:0 30px 80px rgba(15,23,42,.11),0 8px 24px rgba(15,23,42,.045)!important;backdrop-filter:blur(16px);}
body.crm-auth-mode .login-card-head{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:17px;margin:0 0 30px;}
body.crm-auth-mode .auth-card-login .login-logo{position:relative;width:54px!important;height:54px!important;border-radius:16px!important;background:linear-gradient(145deg,#2563eb,#1d4ed8)!important;color:#fff!important;font-size:19px!important;font-weight:850!important;letter-spacing:-.04em;box-shadow:0 14px 30px rgba(37,99,235,.25)!important;}
body.crm-auth-mode .auth-card-login .login-logo span{position:relative;z-index:1;}
body.crm-auth-mode .auth-card-login .login-logo i{position:absolute;right:7px;bottom:7px;width:8px;height:8px;border:2px solid rgba(255,255,255,.95);border-radius:50%;background:#22c55e;box-shadow:0 0 0 2px rgba(29,78,216,.75);}
body.crm-auth-mode .login-heading{min-width:0;}
body.crm-auth-mode .auth-card-login .eyebrow{margin:0 0 7px!important;color:#2563eb!important;font-size:10px!important;font-weight:800!important;line-height:1!important;letter-spacing:.16em!important;}
body.crm-auth-mode .auth-card-login h2{margin:0 0 7px!important;color:#0f172a!important;font-size:29px!important;font-weight:780!important;line-height:1.12!important;letter-spacing:-.035em!important;}
body.crm-auth-mode .auth-card-login .login-subtitle{margin:0!important;color:#64748b!important;font-size:13px!important;font-weight:450!important;line-height:1.55!important;}
body.crm-auth-mode .auth-card-login .login-form{display:grid!important;gap:19px!important;}
body.crm-auth-mode .auth-card-login .login-field{display:grid!important;gap:8px!important;margin:0!important;color:#334155!important;font-size:12px!important;font-weight:700!important;}
body.crm-auth-mode .auth-card-login .login-label{padding-left:2px;}
body.crm-auth-mode .auth-card-login .login-input-shell{position:relative;display:block;height:54px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.025);transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;}
body.crm-auth-mode .auth-card-login .login-input-shell:focus-within{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.11),0 8px 20px rgba(37,99,235,.06);}
body.crm-auth-mode .auth-card-login .login-input-icon{position:absolute;z-index:1;left:16px;top:50%;transform:translateY(-50%);color:#94a3b8;pointer-events:none;transition:color .18s ease;}
body.crm-auth-mode .auth-card-login .login-input-shell:focus-within .login-input-icon{color:#2563eb;}
body.crm-auth-mode .auth-card-login .login-input-shell input{width:100%!important;height:52px!important;margin:0!important;padding:0 50px 0 48px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:#0f172a!important;font-size:14px!important;font-weight:500!important;line-height:52px!important;outline:0!important;box-shadow:none!important;}
body.crm-auth-mode .auth-card-login .login-input-shell input[type=email]{padding-right:16px!important;}
body.crm-auth-mode .auth-card-login .login-input-shell input::placeholder{color:#94a3b8;opacity:1;font-weight:400;}
body.crm-auth-mode .auth-card-login .login-password-toggle,body.crm-auth-mode .auth-card-login button.login-password-toggle{position:absolute!important;z-index:2;right:8px;top:50%;transform:translateY(-50%);display:grid!important;place-items:center!important;width:38px!important;height:38px!important;min-height:38px!important;padding:0!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#64748b!important;box-shadow:none!important;cursor:pointer;transition:color .18s ease,background .18s ease!important;}
body.crm-auth-mode .auth-card-login .login-password-toggle:hover{background:#f1f5f9!important;color:#2563eb!important;}
body.crm-auth-mode .auth-card-login .login-password-toggle:focus-visible{outline:2px solid #2563eb!important;outline-offset:1px;}
body.crm-auth-mode .auth-card-login .icon-eye-off{display:none;}
body.crm-auth-mode .auth-card-login .login-password-toggle[aria-pressed=true] .icon-eye{display:none;}
body.crm-auth-mode .auth-card-login .login-password-toggle[aria-pressed=true] .icon-eye-off{display:block;}
body.crm-auth-mode .auth-card-login .login-submit,body.crm-auth-mode .auth-card-login button.login-submit{position:relative;height:54px!important;min-height:54px!important;margin:3px 0 0!important;border:1px solid #2563eb!important;border-radius:12px!important;background:#2563eb!important;color:#fff!important;font-size:14px!important;font-weight:750!important;letter-spacing:.01em;box-shadow:0 12px 24px rgba(37,99,235,.24)!important;transition:transform .18s ease,background .18s ease,box-shadow .18s ease!important;}
body.crm-auth-mode .auth-card-login .login-submit:hover{transform:translateY(-1px);background:#1d4ed8!important;border-color:#1d4ed8!important;box-shadow:0 16px 30px rgba(37,99,235,.28)!important;}
body.crm-auth-mode .auth-card-login .login-submit:active{transform:translateY(0);}
body.crm-auth-mode .auth-card-login .login-submit:focus-visible{outline:3px solid rgba(37,99,235,.2)!important;outline-offset:3px;}
body.crm-auth-mode .auth-card-login .login-submit:disabled{cursor:wait;opacity:.82;transform:none!important;box-shadow:0 8px 18px rgba(37,99,235,.18)!important;}
body.crm-auth-mode .auth-card-login .login-submit-spinner{display:none;width:17px;height:17px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:login-spin .7s linear infinite;}
body.crm-auth-mode .auth-card-login .login-submit.is-loading .login-submit-spinner{display:block;}
body.crm-auth-mode .auth-card-login .login-register-link{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:max-content;margin:0 auto;color:#2563eb!important;font-size:13px;font-weight:650!important;line-height:1.3;transition:color .18s ease,gap .18s ease;}
body.crm-auth-mode .auth-card-login .login-register-link:hover{gap:10px;color:#1d4ed8!important;}
body.crm-auth-mode .auth-card-login .login-register-link:focus-visible{outline:2px solid #2563eb;outline-offset:4px;border-radius:4px;}
body.crm-auth-mode:has(.auth-card-login) .auth-footer{background:rgba(247,249,252,.88)!important;border-top:1px solid rgba(203,213,225,.72)!important;box-shadow:none!important;backdrop-filter:blur(14px)!important;}
body.crm-auth-mode:has(.auth-card-login) .auth-footer-inner{font-family:Inter,Manrope,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:#64748b!important;}
body.crm-auth-mode:has(.auth-card-login) .auth-footer-brand{color:#475569!important;font-weight:600!important;}
body.crm-auth-mode:has(.auth-card-login) .auth-footer-dot{width:25px!important;height:25px!important;border-radius:8px!important;background:#0f172a!important;box-shadow:none!important;}
body.crm-auth-mode:has(.auth-card-login) .auth-footer-copy{color:#64748b!important;}
@keyframes login-spin{to{transform:rotate(360deg)}}
@media(max-width:760px){body.crm-auth-mode .auth-main:has(.auth-card-login){padding:28px 18px 28px!important;overflow:visible!important;}body.crm-auth-mode .login-page{min-height:auto;padding:22px 0;}body.crm-auth-mode .login-decor-soft{display:none;}body.crm-auth-mode .login-decor-blue{left:-210px;top:6%;opacity:.65;}body.crm-auth-mode .login-decor-green{left:auto;right:-24px;bottom:18%;opacity:.7;}body.crm-auth-mode:has(.auth-card-login) .auth-footer{position:static!important;}body.crm-auth-mode:has(.auth-card-login) .auth-footer-inner{flex-direction:column!important;justify-content:center!important;text-align:center!important;gap:7px!important;}}
@media(max-width:480px){body.crm-auth-mode .auth-main:has(.auth-card-login){padding:16px 14px 18px!important;}body.crm-auth-mode .auth-card.auth-card-login{width:100%!important;padding:28px 22px!important;border-radius:18px!important;}body.crm-auth-mode .login-card-head{grid-template-columns:48px minmax(0,1fr);gap:14px;margin-bottom:26px;}body.crm-auth-mode .auth-card-login .login-logo{width:48px!important;height:48px!important;border-radius:14px!important;}body.crm-auth-mode .auth-card-login h2{font-size:25px!important;}body.crm-auth-mode .auth-card-login .login-subtitle{font-size:12.5px!important;}body.crm-auth-mode .login-page:after{display:none;}body.crm-auth-mode .login-decor{display:none;}}
@media(max-height:720px) and (min-width:761px){body.crm-auth-mode .auth-main:has(.auth-card-login){padding-top:28px!important;padding-bottom:84px!important;}body.crm-auth-mode .auth-card.auth-card-login{padding:30px 36px!important;}body.crm-auth-mode .login-card-head{margin-bottom:23px;}body.crm-auth-mode .auth-card-login .login-form{gap:15px!important;}}

/* Login visual polish: stronger branded background, real logo and footer panel */
body.crm-login-page{background:#f5f7fb!important;}
body.crm-login-page .login-page:before{background:radial-gradient(circle at 26% 32%,rgba(96,165,250,.17) 0,rgba(147,197,253,.075) 24%,transparent 48%),radial-gradient(circle at 76% 23%,rgba(59,130,246,.095) 0,transparent 34%),radial-gradient(circle at 54% 60%,rgba(255,255,255,.98) 0,rgba(247,249,252,.90) 44%,rgba(245,247,251,.98) 82%),linear-gradient(135deg,#f7f9fc 0,#f3f7fc 52%,#f6f8fb 100%)!important;}
body.crm-login-page .login-page:after{opacity:.58!important;background-image:linear-gradient(rgba(100,116,139,.15) 1px,transparent 1px),linear-gradient(90deg,rgba(100,116,139,.15) 1px,transparent 1px)!important;background-size:44px 44px!important;mask-image:linear-gradient(to bottom,transparent 2%,black 22%,black 76%,transparent 98%)!important;}
body.crm-login-page .login-decor-blue{left:-116px!important;top:10%!important;width:390px!important;height:390px!important;border-radius:96px!important;background:linear-gradient(145deg,rgba(37,99,235,.22),rgba(96,165,250,.085))!important;border-color:rgba(37,99,235,.14)!important;box-shadow:0 48px 110px rgba(37,99,235,.11)!important;}
body.crm-login-page .login-decor-green{width:78px!important;height:78px!important;background:linear-gradient(145deg,rgba(22,163,74,.29),rgba(74,222,128,.10))!important;border-color:rgba(22,163,74,.16)!important;box-shadow:0 24px 52px rgba(22,163,74,.10)!important;}
body.crm-login-page .login-decor-soft{right:-48px!important;top:17%!important;width:286px!important;height:286px!important;border-radius:76px!important;background:linear-gradient(145deg,rgba(59,130,246,.145),rgba(148,163,184,.075))!important;border-color:rgba(59,130,246,.10)!important;box-shadow:0 42px 90px rgba(71,85,105,.075)!important;}
body.crm-login-page .auth-card-login .login-logo{width:52px!important;height:52px!important;padding:0!important;border:0!important;border-radius:13px!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;}
body.crm-login-page .auth-card-login .login-logo img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;}
body.crm-login-page .auth-card-login .eyebrow{font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif!important;font-size:12px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.12em!important;text-transform:uppercase!important;color:#2563eb!important;}
body.crm-login-page .auth-footer{height:68px!important;min-height:68px!important;padding:0 28px!important;background:rgba(247,249,252,.80)!important;border-top:1px solid rgba(148,163,184,.24)!important;box-shadow:0 -10px 34px rgba(15,23,42,.025)!important;backdrop-filter:blur(18px) saturate(130%)!important;-webkit-backdrop-filter:blur(18px) saturate(130%)!important;}
body.crm-login-page .auth-footer-inner{width:min(1240px,100%)!important;height:100%!important;margin:0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:28px!important;color:#64748b!important;font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif!important;font-size:12px!important;}
body.crm-login-page .auth-footer-brand{display:flex!important;align-items:center!important;gap:10px!important;color:#64748b!important;font-weight:450!important;white-space:nowrap;}
body.crm-login-page .auth-footer-brand strong{color:#334155!important;font-weight:700!important;}
body.crm-login-page .auth-footer-dot{width:30px!important;height:30px!important;min-width:30px!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;}
body.crm-login-page .auth-footer-dot img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;}
body.crm-login-page .auth-footer-copy{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;color:#64748b!important;font-size:12px!important;white-space:nowrap;}
body.crm-login-page .auth-footer-copy strong{color:#475569!important;font-weight:650!important;}
body.crm-login-page .auth-footer-separator{display:block;width:1px;height:14px;background:rgba(100,116,139,.30);}
@media(max-width:760px){body.crm-login-page .login-page:after{opacity:.42!important;background-size:40px 40px!important;}body.crm-login-page .login-decor-blue{opacity:.78!important;}body.crm-login-page .login-decor-green{opacity:.88!important;}body.crm-login-page .auth-footer{height:auto!important;min-height:76px!important;padding:14px 18px!important;}body.crm-login-page .auth-footer-inner{height:auto!important;flex-direction:column!important;justify-content:center!important;gap:8px!important;text-align:center!important;}body.crm-login-page .auth-footer-brand,body.crm-login-page .auth-footer-copy{justify-content:center!important;white-space:normal!important;}body.crm-login-page .auth-footer-separator{height:12px;}}
@media(max-width:480px){body.crm-login-page .login-decor{display:none!important;}body.crm-login-page .login-page:before{background:radial-gradient(circle at 50% 18%,rgba(96,165,250,.14),transparent 42%),linear-gradient(180deg,#f7f9fc,#f3f7fb)!important;}body.crm-login-page .auth-footer-copy{flex-wrap:wrap!important;gap:7px!important;}body.crm-login-page .auth-footer-separator{display:none!important;}}

/* =========================================================
   LEMBAR CRM authenticated app shell refresh
   Scoped away from auth/login pages.
   ========================================================= */
body.crm-ui:not(.crm-auth-mode){
  --shell-bg:#f5f7fb;
  --shell-surface:#ffffff;
  --shell-text:#0f172a;
  --shell-muted:#64748b;
  --shell-line:#e2e8f0;
  --shell-blue:#2563eb;
  --shell-blue-hover:#1d4ed8;
  overflow-x:hidden;
  background:var(--shell-bg)!important;
  color:var(--shell-text)!important;
  font-family:Inter,Manrope,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif!important;
}
body.crm-ui:not(.crm-auth-mode) .app-shell{
  display:grid!important;
  grid-template-columns:232px minmax(0,1fr)!important;
  grid-template-rows:minmax(100vh,auto)!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  background:var(--shell-bg)!important;
}
body.crm-ui:not(.crm-auth-mode) .app-workspace{
  min-width:0;
  min-height:100vh;
  min-height:100dvh;
  display:grid;
  grid-template-rows:64px minmax(0,1fr);
  background:var(--shell-bg);
}
body.crm-ui:not(.crm-auth-mode) .sidebar{
  position:sticky!important;
  top:0!important;
  z-index:70!important;
  width:232px!important;
  height:100vh!important;
  height:100dvh!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:0 10px 14px!important;
  background:var(--shell-surface)!important;
  border:0!important;
  border-right:1px solid var(--shell-line)!important;
  box-shadow:none!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand{
  flex:0 0 64px;
  min-width:0;
  display:flex!important;
  align-items:center;
  gap:11px;
  margin:0 4px;
  padding:0 7px;
  border-bottom:1px solid rgba(226,232,240,.82);
  color:var(--shell-text)!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-mark{
  width:34px;
  height:34px;
  min-width:34px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:9px;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-mark img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-copy{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:5px;
  white-space:nowrap;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-copy strong{
  color:#0f172a!important;
  font-size:13px!important;
  font-weight:750!important;
  letter-spacing:.075em!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-copy small{
  color:#2563eb!important;
  font-size:10px!important;
  font-weight:750!important;
  letter-spacing:.11em!important;
}
body.crm-ui:not(.crm-auth-mode) .nav{
  min-height:0;
  display:block!important;
  flex:1 1 auto;
  overflow-x:hidden;
  overflow-y:auto;
  padding:8px 2px 4px;
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}
body.crm-ui:not(.crm-auth-mode) .nav::-webkit-scrollbar{width:5px}
body.crm-ui:not(.crm-auth-mode) .nav::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
body.crm-ui:not(.crm-auth-mode) .nav-caption{
  margin:17px 10px 7px!important;
  color:#94a3b8!important;
  font-size:10px!important;
  font-weight:750!important;
  line-height:1.2!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a{
  position:relative;
  width:100%;
  height:42px!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  margin:2px 0;
  padding:0 11px!important;
  overflow:hidden;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#475569!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1!important;
  transition:background-color .14s ease,color .14s ease,transform .14s ease!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a:hover{
  background:#f1f6ff!important;
  color:#1d4ed8!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a.active{
  background:#eff6ff!important;
  color:#1d4ed8!important;
  box-shadow:none!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a.active:before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:0 4px 4px 0;
  background:#2563eb;
}
body.crm-ui:not(.crm-auth-mode) .nav-ico{
  width:19px!important;
  height:19px!important;
  min-width:19px;
  display:grid!important;
  place-items:center;
  color:#64748b!important;
  line-height:1!important;
}
body.crm-ui:not(.crm-auth-mode) .nav-ico svg{
  display:block;
  width:18px;
  height:18px;
}
body.crm-ui:not(.crm-auth-mode) .nav a:hover .nav-ico,
body.crm-ui:not(.crm-auth-mode) .nav a.active .nav-ico{color:#2563eb!important}

body.crm-ui:not(.crm-auth-mode) .topbar{
  position:sticky!important;
  top:0!important;
  z-index:60!important;
  width:100%;
  height:64px!important;
  min-height:64px!important;
  display:grid!important;
  grid-template-columns:auto minmax(300px,440px) minmax(0,1fr)!important;
  align-items:center!important;
  gap:18px!important;
  padding:0 20px!important;
  color:var(--shell-text)!important;
  background:rgba(255,255,255,.96)!important;
  border:0!important;
  border-bottom:1px solid var(--shell-line)!important;
  box-shadow:0 2px 8px rgba(15,23,42,.025)!important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
body.crm-ui:not(.crm-auth-mode) .topbar-left{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
}
body.crm-ui:not(.crm-auth-mode) .menu-toggle,
body.crm-ui:not(.crm-auth-mode) .top-icon{
  width:38px!important;
  height:38px!important;
  min-width:38px;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid #e2e8f0!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#64748b!important;
  box-shadow:none!important;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease!important;
}
body.crm-ui:not(.crm-auth-mode) .menu-toggle:hover,
body.crm-ui:not(.crm-auth-mode) .top-icon:hover{
  border-color:#cbd5e1!important;
  background:#f8fafc!important;
  color:#2563eb!important;
}
body.crm-ui:not(.crm-auth-mode) .menu-toggle:focus-visible,
body.crm-ui:not(.crm-auth-mode) .top-icon:focus-visible{
  outline:0!important;
  border-color:#2563eb!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.13)!important;
}
body.crm-ui:not(.crm-auth-mode) .topbar-section{
  max-width:170px;
  overflow:hidden;
  color:#334155;
  font-size:12px;
  font-weight:650;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.crm-ui:not(.crm-auth-mode) .global-search{
  width:100%!important;
  height:42px!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  margin:0!important;
  padding:0 11px!important;
  color:#94a3b8!important;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:10px!important;
  box-shadow:none!important;
  transition:border-color .14s ease,box-shadow .14s ease,background-color .14s ease!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search:focus-within{
  background:#fff!important;
  border-color:#2563eb!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.11)!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search input{
  width:100%!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  color:#0f172a!important;
  font-size:13px!important;
  box-shadow:none!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search input::placeholder{color:#94a3b8!important}
body.crm-ui:not(.crm-auth-mode) .global-search kbd{
  flex:none;
  padding:3px 7px!important;
  color:#64748b!important;
  background:#fff!important;
  border:1px solid #dbe3ed!important;
  border-radius:6px!important;
  font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif!important;
  font-size:10px!important;
  font-weight:650!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
body.crm-ui:not(.crm-auth-mode) .topbar-actions{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-self:end;
  gap:8px!important;
}
body.crm-ui:not(.crm-auth-mode) .account-chip{
  width:auto!important;
  max-width:230px!important;
  height:42px!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:4px 8px 4px 4px!important;
  overflow:hidden!important;
  color:#0f172a!important;
  background:transparent!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  box-shadow:none!important;
  transition:background-color .14s ease,border-color .14s ease!important;
}
body.crm-ui:not(.crm-auth-mode) .account-chip:hover{
  background:#f8fafc!important;
  border-color:#e2e8f0!important;
}
body.crm-ui:not(.crm-auth-mode) .user-avatar,
body.crm-ui:not(.crm-auth-mode) .account-chip>span:first-child{
  width:32px!important;
  height:32px!important;
  min-width:32px!important;
  color:#fff!important;
  background:#2563eb!important;
  font-size:11px!important;
  font-weight:750!important;
}
body.crm-ui:not(.crm-auth-mode) img.user-avatar{object-fit:cover!important}
body.crm-ui:not(.crm-auth-mode) .user-info{display:grid!important;gap:2px!important}
body.crm-ui:not(.crm-auth-mode) .user-info strong{
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.1!important;
}
body.crm-ui:not(.crm-auth-mode) .user-info small{
  color:#64748b!important;
  font-size:10px!important;
  font-weight:500!important;
  line-height:1.1!important;
}
body.crm-ui:not(.crm-auth-mode) .logout{
  height:38px!important;
  min-height:38px!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  padding:0 10px!important;
  color:#64748b!important;
  background:transparent!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  font-size:12px!important;
  font-weight:600!important;
  transition:background-color .14s ease,color .14s ease!important;
}
body.crm-ui:not(.crm-auth-mode) .logout:hover{
  color:#1d4ed8!important;
  background:#eff6ff!important;
}

body.crm-ui:not(.crm-auth-mode) .main-wrap{
  min-width:0!important;
  min-height:calc(100vh - 64px)!important;
  min-height:calc(100dvh - 64px)!important;
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  background:var(--shell-bg)!important;
}
body.crm-ui:not(.crm-auth-mode) .main{
  min-width:0!important;
  background:var(--shell-bg)!important;
}
body.crm-ui:not(.crm-auth-mode) .footer{
  position:static!important;
  width:100%;
  height:50px!important;
  min-height:50px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:20px!important;
  padding:0 20px!important;
  color:#64748b!important;
  background:rgba(255,255,255,.82)!important;
  border:0!important;
  border-top:1px solid #e2e8f0!important;
  font-size:11px!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
body.crm-ui:not(.crm-auth-mode) .footer-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  justify-self:start;
  white-space:nowrap;
}
body.crm-ui:not(.crm-auth-mode) .footer-brand img{
  width:24px;
  height:24px;
  object-fit:contain;
}
body.crm-ui:not(.crm-auth-mode) .footer-brand strong,
body.crm-ui:not(.crm-auth-mode) .footer-copy{
  color:#475569!important;
  font-weight:700!important;
}
body.crm-ui:not(.crm-auth-mode) .footer-time{justify-self:center;white-space:nowrap}
body.crm-ui:not(.crm-auth-mode) .footer-copy{justify-self:end;white-space:nowrap}

body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .app-shell{
  grid-template-columns:68px minmax(0,1fr)!important;
}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar{
  width:68px!important;
  padding-left:8px!important;
  padding-right:8px!important;
}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar-brand{
  justify-content:center;
  margin:0;
  padding:0;
}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar-brand-copy,
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav-caption,
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav a>span:not(.nav-ico){display:none!important}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav{padding-left:0;padding-right:0}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav a{
  justify-content:center!important;
  padding:0!important;
}
body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav a.active:before{
  top:9px;
  bottom:9px;
}

@media(max-width:1180px) and (min-width:861px){
  body.crm-ui:not(.crm-auth-mode) .topbar{
    grid-template-columns:auto minmax(240px,360px) minmax(0,1fr)!important;
    gap:12px!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  body.crm-ui:not(.crm-auth-mode) .topbar-section{display:none}
  body.crm-ui:not(.crm-auth-mode) .account-chip{max-width:190px!important}
  body.crm-ui:not(.crm-auth-mode) .logout span{display:none}
}
@media(max-width:860px){
  body.crm-ui:not(.crm-auth-mode) .app-shell{
    display:block!important;
    min-width:0!important;
  }
  body.crm-ui:not(.crm-auth-mode) .app-shell:before{
    content:"";
    position:fixed;
    inset:0;
    z-index:75;
    pointer-events:none;
    opacity:0;
    background:rgba(15,23,42,.34);
    transition:opacity .18s ease;
  }
  body.crm-ui:not(.crm-auth-mode).mobile-sidebar-open .app-shell:before{
    pointer-events:auto;
    opacity:1;
  }
  body.crm-ui:not(.crm-auth-mode) .app-workspace{
    width:100%;
    min-width:0;
    grid-template-rows:64px minmax(0,1fr);
  }
  body.crm-ui:not(.crm-auth-mode) .sidebar,
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    z-index:80!important;
    width:min(286px,84vw)!important;
    height:100vh!important;
    height:100dvh!important;
    padding:0 10px 14px!important;
    transform:translateX(-104%);
    transition:transform .18s ease!important;
    box-shadow:20px 0 60px rgba(15,23,42,.18)!important;
  }
  body.crm-ui:not(.crm-auth-mode).mobile-sidebar-open .sidebar{
    transform:translateX(0)!important;
  }
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar-brand{
    justify-content:flex-start;
    margin:0 4px;
    padding:0 7px;
  }
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .sidebar-brand-copy{
    display:flex!important;
  }
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav-caption{
    display:block!important;
  }
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav a{
    justify-content:flex-start!important;
    padding:0 11px!important;
  }
  body.crm-ui:not(.crm-auth-mode).sidebar-collapsed .nav a>span:not(.nav-ico){
    display:inline!important;
  }
  body.crm-ui:not(.crm-auth-mode) .topbar{
    height:64px!important;
    min-height:64px!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:10px!important;
    padding:0 12px!important;
  }
  body.crm-ui:not(.crm-auth-mode) .topbar-left{min-width:0!important}
  body.crm-ui:not(.crm-auth-mode) .topbar-section{
    max-width:min(42vw,180px);
    display:block;
  }
  body.crm-ui:not(.crm-auth-mode) .global-search{display:none!important}
  body.crm-ui:not(.crm-auth-mode) .topbar-actions{gap:3px!important}
  body.crm-ui:not(.crm-auth-mode) .top-icon{display:none!important}
  body.crm-ui:not(.crm-auth-mode) .account-chip{
    width:40px!important;
    max-width:40px!important;
    height:40px!important;
    padding:4px!important;
    border-color:transparent!important;
  }
  body.crm-ui:not(.crm-auth-mode) .user-info{display:none!important}
  body.crm-ui:not(.crm-auth-mode) .logout{
    width:38px!important;
    padding:0!important;
    justify-content:center!important;
  }
  body.crm-ui:not(.crm-auth-mode) .logout span{display:none!important}
  body.crm-ui:not(.crm-auth-mode) .main-wrap{
    min-height:calc(100vh - 64px)!important;
    min-height:calc(100dvh - 64px)!important;
  }
  body.crm-ui:not(.crm-auth-mode) .footer{
    min-height:56px!important;
    height:auto!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:6px 12px!important;
    padding:9px 12px!important;
  }
  body.crm-ui:not(.crm-auth-mode) .footer-brand{white-space:normal}
  body.crm-ui:not(.crm-auth-mode) .footer-time{
    grid-column:1/-1;
    grid-row:2;
    justify-self:start;
  }
}
@media(max-width:480px){
  body.crm-ui:not(.crm-auth-mode) .topbar-section{display:none}
  body.crm-ui:not(.crm-auth-mode) .footer{
    grid-template-columns:1fr!important;
    justify-items:center!important;
    gap:5px!important;
    padding:11px 12px!important;
    text-align:center;
  }
  body.crm-ui:not(.crm-auth-mode) .footer-brand,
  body.crm-ui:not(.crm-auth-mode) .footer-time,
  body.crm-ui:not(.crm-auth-mode) .footer-copy{
    grid-column:1!important;
    grid-row:auto!important;
    justify-self:center!important;
  }
}
/* LEMBAR app shell color contrast: dark navigation + light workspace */
body.crm-ui:not(.crm-auth-mode) .sidebar{
  background:#0f172a!important;
  border-right-color:rgba(255,255,255,.06)!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand{
  border-bottom-color:rgba(255,255,255,.06)!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-copy strong{
  color:#ffffff!important;
}
body.crm-ui:not(.crm-auth-mode) .sidebar-brand-copy small{
  color:#60a5fa!important;
}
body.crm-ui:not(.crm-auth-mode) .nav{
  scrollbar-color:#334155 transparent;
}
body.crm-ui:not(.crm-auth-mode) .nav::-webkit-scrollbar-thumb{
  background:#334155;
}
body.crm-ui:not(.crm-auth-mode) .nav-caption{
  color:#7f8ea3!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a{
  color:#e2e8f0!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a:hover{
  background:#1e293b!important;
  color:#ffffff!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a.active{
  background:rgba(37,99,235,.18)!important;
  color:#ffffff!important;
}
body.crm-ui:not(.crm-auth-mode) .nav-ico{
  color:#94a3b8!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a:hover .nav-ico{
  color:#cbd5e1!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a.active .nav-ico{
  color:#60a5fa!important;
}
body.crm-ui:not(.crm-auth-mode) .nav a.active:before{
  background:#2563eb!important;
}

body.crm-ui:not(.crm-auth-mode) .topbar{
  color:#f8fafc!important;
  background:#111827!important;
  border-bottom-color:rgba(255,255,255,.06)!important;
  box-shadow:0 3px 10px rgba(15,23,42,.12)!important;
}
body.crm-ui:not(.crm-auth-mode) .topbar-section{
  color:#f8fafc!important;
}
body.crm-ui:not(.crm-auth-mode) .menu-toggle,
body.crm-ui:not(.crm-auth-mode) .top-icon{
  color:#cbd5e1!important;
  background:rgba(255,255,255,.04)!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.crm-ui:not(.crm-auth-mode) .menu-toggle:hover,
body.crm-ui:not(.crm-auth-mode) .top-icon:hover{
  color:#ffffff!important;
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(255,255,255,.14)!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search{
  color:#64748b!important;
  background:#f8fafc!important;
  border-color:transparent!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search:focus-within{
  background:#ffffff!important;
  border-color:#93b4f8!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search input{
  color:#0f172a!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search input::placeholder{
  color:#94a3b8!important;
}
body.crm-ui:not(.crm-auth-mode) .global-search kbd{
  color:#334155!important;
  background:#e2e8f0!important;
  border-color:#cbd5e1!important;
}
body.crm-ui:not(.crm-auth-mode) .account-chip{
  color:#ffffff!important;
  background:transparent!important;
}
body.crm-ui:not(.crm-auth-mode) .account-chip:hover{
  background:rgba(255,255,255,.06)!important;
  border-color:rgba(255,255,255,.08)!important;
}
body.crm-ui:not(.crm-auth-mode) .user-info strong{
  color:#ffffff!important;
}
body.crm-ui:not(.crm-auth-mode) .user-info small{
  color:#94a3b8!important;
}
body.crm-ui:not(.crm-auth-mode) .logout{
  color:#cbd5e1!important;
  background:transparent!important;
}
body.crm-ui:not(.crm-auth-mode) .logout:hover{
  color:#ffffff!important;
  background:rgba(255,255,255,.08)!important;
}
body.crm-ui:not(.crm-auth-mode) .footer{
  color:#64748b!important;
  background:rgba(255,255,255,.86)!important;
  border-top-color:#e2e8f0!important;
}
/* LEMBAR workspace dashboard refresh — scoped to workspace only */
body.crm-ui .workspace-dashboard{
  display:grid;
  gap:14px;
  min-width:0;
  font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif;
}
body.crm-ui .workspace-dashboard .workspace-dashboard-hero{
  min-height:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin:0!important;
  padding:4px 2px 6px!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body.crm-ui .workspace-dashboard-heading{min-width:0}
body.crm-ui .workspace-dashboard-heading .eyebrow{
  margin:0 0 6px!important;
  color:#2563eb!important;
  font-size:10px!important;
  font-weight:750!important;
  letter-spacing:.12em!important;
}
body.crm-ui .workspace-dashboard-heading h2{
  margin:0!important;
  color:#0f172a!important;
  font-size:24px!important;
  font-weight:700!important;
  line-height:1.18!important;
  letter-spacing:-.025em!important;
}
body.crm-ui .workspace-dashboard-heading .page-subtitle{
  margin:5px 0 0!important;
  color:#64748b!important;
  font-size:13.5px!important;
}
body.crm-ui .workspace-dashboard-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  margin:0!important;
  flex-wrap:wrap;
}
body.crm-ui .workspace-dashboard-actions .button{
  height:40px!important;
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  padding:0 13px!important;
  border-radius:10px!important;
  font-size:13px!important;
  font-weight:650!important;
}
body.crm-ui .workspace-dashboard-actions .button svg{
  width:16px;
  height:16px;
  flex:none;
}

body.crm-ui .workspace-dashboard .workspace-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi{
  min-width:0;
  min-height:112px!important;
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  grid-template-rows:auto auto 1fr!important;
  align-items:center!important;
  column-gap:11px!important;
  row-gap:2px!important;
  padding:15px!important;
  overflow:hidden;
  color:#0f172a!important;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi:hover{
  transform:translateY(-1px);
  border-color:#cbd5e1!important;
  box-shadow:0 9px 22px rgba(15,23,42,.07)!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi:after{display:none!important}
body.crm-ui .workspace-dashboard .workspace-kpi-icon{
  grid-column:1!important;
  grid-row:1/3!important;
  width:38px!important;
  height:38px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:11px!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi-icon svg{
  width:19px;
  height:19px;
}
body.crm-ui .workspace-dashboard .workspace-kpi-label{
  grid-column:2!important;
  grid-row:1!important;
  display:block!important;
  color:#64748b!important;
  font-size:10px!important;
  font-weight:750!important;
  line-height:1.25!important;
  letter-spacing:.065em!important;
  text-transform:uppercase!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi strong{
  grid-column:2!important;
  grid-row:2!important;
  display:block!important;
  margin:1px 0 0!important;
  color:#0f172a!important;
  font-size:26px!important;
  font-weight:700!important;
  line-height:1.05!important;
  letter-spacing:-.025em!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi small{
  grid-column:1/3!important;
  grid-row:3!important;
  align-self:end;
  display:block!important;
  margin:7px 0 0!important;
  color:#64748b!important;
  font-size:11.5px!important;
  line-height:1.3!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi-orders .workspace-kpi-icon{color:#2563eb!important;background:rgba(37,99,235,.10)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-overdue .workspace-kpi-icon{color:#dc2626!important;background:rgba(220,38,38,.09)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-stock .workspace-kpi-icon{color:#b45309!important;background:rgba(245,158,11,.13)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-sales .workspace-kpi-icon{color:#059669!important;background:rgba(16,185,129,.11)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-overdue strong{color:#dc2626!important}
body.crm-ui .workspace-dashboard .workspace-kpi-stock strong{color:#b76e08!important}
body.crm-ui .workspace-dashboard .workspace-kpi-sales strong{color:#059669!important}

body.crm-ui .workspace-dashboard-grid{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,2.25fr) minmax(300px,1fr);
  gap:14px;
  align-items:start;
}
body.crm-ui .workspace-dashboard .workspace-orders-card,
body.crm-ui .workspace-dashboard .workspace-quick-task,
body.crm-ui .workspace-dashboard .workspace-support-card{
  min-width:0;
  margin:0!important;
  padding:0!important;
  overflow:hidden;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
}
body.crm-ui .workspace-dashboard .workspace-card-head{
  min-height:55px;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0!important;
  padding:0 15px!important;
  border-bottom:1px solid #edf1f6;
}
body.crm-ui .workspace-dashboard .workspace-card-head h2,
body.crm-ui .workspace-dashboard .workspace-quick-task h2{
  margin:0!important;
  color:#0f172a!important;
  font-size:17px!important;
  font-weight:700!important;
  line-height:1.2!important;
}
body.crm-ui .workspace-dashboard .workspace-card-head>a{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#2563eb!important;
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}
body.crm-ui .workspace-dashboard .workspace-orders-scroll,
body.crm-ui .workspace-dashboard .workspace-support-scroll{
  width:100%;
  overflow-x:auto;
}
body.crm-ui .workspace-dashboard .workspace-orders-table{
  width:100%!important;
  min-width:720px!important;
  table-layout:auto!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-table th{
  padding:10px 12px!important;
  color:#64748b!important;
  background:#f8fafc!important;
  border-bottom:1px solid #e2e8f0!important;
  font-size:10px!important;
  font-weight:750!important;
  letter-spacing:.055em!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-table td{
  padding:13px 12px!important;
  color:#334155!important;
  background:#fff!important;
  border-bottom:1px solid #edf1f6!important;
  font-size:12.5px!important;
  vertical-align:middle!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-table tbody tr:last-child td{border-bottom:0!important}
body.crm-ui .workspace-dashboard .workspace-orders-table tbody tr:hover td{background:#fbfdff!important}
body.crm-ui .workspace-dashboard .workspace-order-number{
  display:block;
  margin:0 0 3px;
  color:#0f172a!important;
  font-size:12.5px;
  font-weight:700!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-table td small{
  display:block!important;
  margin:0!important;
  color:#94a3b8!important;
  font-size:10.5px!important;
}
body.crm-ui .workspace-dashboard .workspace-order-total{
  color:#0f172a!important;
  font-weight:700!important;
  white-space:nowrap;
}
body.crm-ui .workspace-dashboard .workspace-order-status{
  padding:5px 8px!important;
  border:0!important;
  border-radius:999px!important;
  font-size:10.5px!important;
  font-weight:700!important;
}
body.crm-ui .workspace-dashboard .workspace-order-status:before{width:5px!important;height:5px!important}
body.crm-ui .workspace-dashboard .status-new{color:#1d4ed8!important;background:#eff6ff!important}
body.crm-ui .workspace-dashboard .status-waiting_payment{color:#a16207!important;background:#fffbeb!important}
body.crm-ui .workspace-dashboard .status-processing,
body.crm-ui .workspace-dashboard .status-reserved,
body.crm-ui .workspace-dashboard .status-packing{color:#6d28d9!important;background:#f5f3ff!important}
body.crm-ui .workspace-dashboard .status-done,
body.crm-ui .workspace-dashboard .status-completed{color:#047857!important;background:#ecfdf5!important}
body.crm-ui .workspace-dashboard .status-cancelled,
body.crm-ui .workspace-dashboard .status-canceled{color:#b91c1c!important;background:#fef2f2!important}
body.crm-ui .workspace-dashboard .workspace-payment{
  display:inline-flex;
  align-items:center;
  color:#64748b;
  font-size:11.5px;
  font-weight:600;
  white-space:nowrap;
}
body.crm-ui .workspace-dashboard .payment-paid{color:#047857!important}
body.crm-ui .workspace-dashboard .payment-unpaid{color:#b91c1c!important}
body.crm-ui .workspace-dashboard .payment-refunded{color:#b45309!important}
body.crm-ui .workspace-dashboard .workspace-open-order{
  min-height:30px!important;
  height:30px!important;
  padding:0 9px!important;
  border-color:#dbe3ed!important;
  border-radius:8px!important;
  color:#334155!important;
  background:#fff!important;
  font-size:11.5px!important;
  white-space:nowrap;
}
body.crm-ui .workspace-dashboard .workspace-open-order:hover{
  color:#1d4ed8!important;
  border-color:#bfdbfe!important;
  background:#eff6ff!important;
}
body.crm-ui .workspace-dashboard .workspace-empty{margin:0!important;padding:18px!important}

body.crm-ui .workspace-dashboard-side{min-width:0}
body.crm-ui .workspace-dashboard .workspace-quick-task{
  padding:17px!important;
}
body.crm-ui .workspace-dashboard .workspace-quick-task-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 17px;
}
body.crm-ui .workspace-dashboard .workspace-quick-task-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  color:#2563eb;
  background:#eff6ff;
  border-radius:10px;
}
body.crm-ui .workspace-dashboard .workspace-quick-task-icon svg{width:18px;height:18px}
body.crm-ui .workspace-dashboard .workspace-task-form{
  display:grid!important;
  gap:13px!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form label{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
  color:#475569!important;
  font-size:11.5px!important;
  font-weight:650!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form input,
body.crm-ui .workspace-dashboard .workspace-task-form select{
  width:100%!important;
  height:43px!important;
  min-height:43px!important;
  margin:0!important;
  padding:0 11px!important;
  border:1px solid #cbd5e1!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:12.5px!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form input:focus,
body.crm-ui .workspace-dashboard .workspace-task-form select:focus{
  border-color:#2563eb!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.11)!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form button{
  width:100%!important;
  height:43px!important;
  min-height:43px!important;
  margin:2px 0 0!important;
  border-radius:9px!important;
  font-size:13px!important;
  font-weight:700!important;
}

body.crm-ui .workspace-support-grid{
  min-width:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
body.crm-ui .workspace-dashboard .workspace-support-card table{
  width:100%!important;
  min-width:520px;
}
body.crm-ui .workspace-dashboard .workspace-support-card td{
  padding:11px 12px!important;
  border-bottom:1px solid #edf1f6!important;
}
body.crm-ui .workspace-dashboard .workspace-support-card tr:last-child td{border-bottom:0!important}
body.crm-ui .workspace-dashboard .workspace-support-card td small{
  display:block!important;
  margin-top:3px;
  color:#94a3b8!important;
}

@media(max-width:1100px){
  body.crm-ui .workspace-dashboard .workspace-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.crm-ui .workspace-dashboard-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  body.crm-ui .workspace-support-grid{grid-template-columns:1fr}
}
@media(max-width:680px){
  body.crm-ui .workspace-dashboard{gap:12px}
  body.crm-ui .workspace-dashboard .workspace-dashboard-hero{
    display:grid!important;
    gap:14px!important;
    padding:2px 0 4px!important;
  }
  body.crm-ui .workspace-dashboard-actions{justify-content:flex-start!important}
  body.crm-ui .workspace-dashboard-actions .button{flex:1 1 auto;justify-content:center!important;padding:0 10px!important}
  body.crm-ui .workspace-dashboard .workspace-kpi-grid{grid-template-columns:1fr!important;gap:10px!important}
  body.crm-ui .workspace-dashboard .workspace-kpi{min-height:106px!important}
  body.crm-ui .workspace-dashboard .workspace-card-head{padding:0 13px!important}
  body.crm-ui .workspace-dashboard .workspace-quick-task{padding:15px!important}
}
/* LEMBAR workspace analytics layer — SVG chart and live visual summaries */
body.crm-ui .workspace-dashboard .workspace-kpi{
  isolation:isolate;
}
body.crm-ui .workspace-dashboard .workspace-kpi>span,
body.crm-ui .workspace-dashboard .workspace-kpi>strong,
body.crm-ui .workspace-dashboard .workspace-kpi>small{
  position:relative;
  z-index:1;
}
body.crm-ui .workspace-dashboard .workspace-kpi:after{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  display:block!important;
  width:112px!important;
  height:112px!important;
  right:-45px!important;
  top:-53px!important;
  border-radius:50%!important;
  opacity:1!important;
  pointer-events:none;
}
body.crm-ui .workspace-dashboard .workspace-kpi-orders:after{background:radial-gradient(circle,rgba(37,99,235,.15),rgba(37,99,235,0) 70%)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-overdue:after{background:radial-gradient(circle,rgba(220,38,38,.12),rgba(220,38,38,0) 70%)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-stock:after{background:radial-gradient(circle,rgba(245,158,11,.16),rgba(245,158,11,0) 70%)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-sales:after{background:radial-gradient(circle,rgba(16,185,129,.15),rgba(16,185,129,0) 70%)!important}
body.crm-ui .workspace-dashboard .workspace-kpi-accent{
  position:absolute!important;
  z-index:2!important;
  left:15px;
  right:15px;
  bottom:0;
  width:auto!important;
  height:3px;
  overflow:hidden;
  border-radius:999px 999px 0 0;
  background:#f1f5f9;
}
body.crm-ui .workspace-dashboard .workspace-kpi-accent i{
  display:block;
  width:68%;
  height:100%;
  border-radius:inherit;
}
body.crm-ui .workspace-dashboard .workspace-kpi-accent-red i{width:44%;background:linear-gradient(90deg,#ef4444,#fb7185)}
body.crm-ui .workspace-dashboard .workspace-kpi-accent-blue i{width:76%;background:linear-gradient(90deg,#2563eb,#38bdf8)}
body.crm-ui .workspace-dashboard .workspace-kpi-accent-amber i{width:53%;background:linear-gradient(90deg,#d97706,#fbbf24)}
body.crm-ui .workspace-dashboard .workspace-kpi-accent-green i{width:82%;background:linear-gradient(90deg,#059669,#34d399)}

body.crm-ui .workspace-dashboard-main{
  min-width:0;
  display:grid;
  gap:14px;
}
body.crm-ui .workspace-dashboard .workspace-analytics-card,
body.crm-ui .workspace-dashboard .workspace-crm-state{
  min-width:0;
  margin:0!important;
  overflow:hidden;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  border-radius:14px!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
}
body.crm-ui .workspace-dashboard .workspace-analytics-card{
  padding:0!important;
}
body.crm-ui .workspace-analytics-head{
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 16px 11px;
  border-bottom:1px solid #edf1f6;
}
body.crm-ui .workspace-analytics-head h2,
body.crm-ui .workspace-crm-state-head h2{
  margin:0!important;
  color:#0f172a!important;
  font-size:17px!important;
  font-weight:700!important;
  line-height:1.2!important;
}
body.crm-ui .workspace-analytics-head p,
body.crm-ui .workspace-crm-state-head p{
  margin:4px 0 0!important;
  color:#64748b!important;
  font-size:11.5px!important;
}
body.crm-ui .workspace-analytics-meta{
  display:flex;
  align-items:center;
  gap:12px;
  color:#64748b;
  font-size:11px;
  white-space:nowrap;
}
body.crm-ui .workspace-analytics-meta span{
  display:flex;
  align-items:center;
  gap:6px;
}
body.crm-ui .workspace-analytics-meta span i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}
body.crm-ui .workspace-analytics-meta strong{
  min-height:27px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  color:#1d4ed8!important;
  background:#eff6ff;
  border-radius:8px;
  font-size:11px!important;
  font-weight:700!important;
}
body.crm-ui .workspace-chart-wrap{
  width:100%;
  padding:6px 12px 8px;
  background:linear-gradient(180deg,#fff,#fbfdff);
}
body.crm-ui .workspace-order-chart{
  display:block;
  width:100%;
  height:auto;
  max-height:230px;
  overflow:visible;
}
body.crm-ui .workspace-chart-gridline{
  stroke:#e8eef6;
  stroke-width:1;
  stroke-dasharray:4 6;
}
body.crm-ui .workspace-chart-area{
  fill:url(#workspaceChartArea);
}
body.crm-ui .workspace-chart-line{
  fill:none;
  stroke:url(#workspaceChartLine);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 5px 6px rgba(37,99,235,.16));
}
body.crm-ui .workspace-chart-point circle{
  fill:#fff;
  stroke:#2563eb;
  stroke-width:2.5;
}
body.crm-ui .workspace-chart-point text{
  fill:#94a3b8;
  font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif!important;
  font-size:10px;
  font-weight:600;
}
body.crm-ui .workspace-chart-point .workspace-chart-value{
  fill:#334155;
  font-size:10.5px;
  font-weight:700;
}

body.crm-ui .workspace-dashboard .workspace-orders-summary{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:7px 14px;
  background:#fbfdff;
  border-bottom:1px solid #edf1f6;
}
body.crm-ui .workspace-dashboard .workspace-orders-summary>span{
  min-height:25px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:0 8px;
  color:#64748b;
  background:#f1f5f9;
  border-radius:7px;
  font-size:10.5px;
  font-weight:600;
}
body.crm-ui .workspace-dashboard .workspace-orders-summary strong{
  color:#334155!important;
  font-size:11px!important;
  font-weight:750!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-summary .is-danger{color:#b91c1c;background:#fef2f2}
body.crm-ui .workspace-dashboard .workspace-orders-summary .is-danger strong{color:#b91c1c!important}
body.crm-ui .workspace-dashboard .workspace-orders-summary .is-blue{color:#1d4ed8;background:#eff6ff}
body.crm-ui .workspace-dashboard .workspace-orders-summary .is-blue strong{color:#1d4ed8!important}

body.crm-ui .workspace-dashboard-side{
  display:grid;
  gap:14px;
  align-content:start;
}
body.crm-ui .workspace-dashboard .workspace-crm-state{
  padding:16px!important;
}
body.crm-ui .workspace-crm-state-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 16px;
}
body.crm-ui .workspace-live-indicator{
  min-height:25px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 8px;
  color:#047857;
  background:#ecfdf5;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
}
body.crm-ui .workspace-live-indicator i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#10b981;
  box-shadow:0 0 0 4px rgba(16,185,129,.12);
}
body.crm-ui .workspace-crm-metrics{
  display:grid;
  gap:12px;
}
body.crm-ui .workspace-crm-metric{
  display:grid;
  gap:7px;
}
body.crm-ui .workspace-crm-metric-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#475569;
  font-size:11.5px;
}
body.crm-ui .workspace-crm-metric-line>span{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
body.crm-ui .workspace-crm-metric-line>span>i{
  width:8px;
  height:8px;
  flex:none;
  border-radius:3px;
  background:var(--crm-metric-color);
}
body.crm-ui .workspace-crm-metric-line strong{
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:750!important;
}
body.crm-ui .workspace-crm-progress{
  display:block;
  width:100%;
  height:4px;
  overflow:hidden;
  border-radius:999px;
  background:#eef2f7;
}
body.crm-ui .workspace-crm-progress i{
  display:block;
  height:100%;
  min-width:6px;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--crm-metric-color),var(--crm-metric-color-soft));
}
body.crm-ui .workspace-crm-metric-blue{--crm-metric-color:#2563eb;--crm-metric-color-soft:#60a5fa}
body.crm-ui .workspace-crm-metric-amber{--crm-metric-color:#d97706;--crm-metric-color-soft:#fbbf24}
body.crm-ui .workspace-crm-metric-violet{--crm-metric-color:#7c3aed;--crm-metric-color-soft:#a78bfa}
body.crm-ui .workspace-crm-metric-green{--crm-metric-color:#059669;--crm-metric-color-soft:#34d399}
body.crm-ui .workspace-crm-metric-cyan{--crm-metric-color:#0891b2;--crm-metric-color-soft:#22d3ee}

@media(max-width:1100px){
  body.crm-ui .workspace-analytics-head{padding-left:14px;padding-right:14px}
}
@media(max-width:680px){
  body.crm-ui .workspace-analytics-head{
    display:grid;
    gap:10px;
  }
  body.crm-ui .workspace-analytics-meta{
    justify-content:space-between;
    white-space:normal;
  }
  body.crm-ui .workspace-chart-wrap{padding:5px 5px 7px}
  body.crm-ui .workspace-order-chart{min-width:0;max-height:none}
  body.crm-ui .workspace-dashboard .workspace-orders-summary{padding-left:12px;padding-right:12px}
}
/* LEMBAR workspace desktop density pass — composition only */
body.crm-ui .workspace-dashboard{
  gap:12px;
}
body.crm-ui .workspace-dashboard .workspace-dashboard-hero{
  min-height:56px!important;
  height:56px;
  padding:0 2px!important;
}
body.crm-ui .workspace-dashboard-heading .eyebrow{margin-bottom:3px!important}
body.crm-ui .workspace-dashboard-heading h2{font-size:22px!important}
body.crm-ui .workspace-dashboard-heading .page-subtitle{margin-top:2px!important;font-size:12.5px!important}
body.crm-ui .workspace-dashboard-actions .button{
  height:38px!important;
  min-height:38px!important;
}

body.crm-ui .workspace-dashboard .workspace-kpi-grid{gap:12px!important}
body.crm-ui .workspace-dashboard .workspace-kpi{
  min-height:92px!important;
  height:92px!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  column-gap:10px!important;
  padding:11px 13px!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi-icon{
  width:34px!important;
  height:34px!important;
  border-radius:10px!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi-icon svg{width:17px;height:17px}
body.crm-ui .workspace-dashboard .workspace-kpi-label{font-size:9.5px!important}
body.crm-ui .workspace-dashboard .workspace-kpi strong{font-size:24px!important}
body.crm-ui .workspace-dashboard .workspace-kpi small{
  margin-top:3px!important;
  font-size:10.5px!important;
  line-height:1.2!important;
}
body.crm-ui .workspace-dashboard .workspace-kpi-accent{left:13px;right:13px}

body.crm-ui .workspace-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:12px;
}
body.crm-ui .workspace-dashboard-main{
  grid-column:span 8;
  gap:12px;
}
body.crm-ui .workspace-dashboard-side{
  grid-column:span 4;
  gap:12px;
}
body.crm-ui .workspace-dashboard .workspace-analytics-card{
  height:230px;
}
body.crm-ui .workspace-analytics-head{
  min-height:56px;
  height:56px;
  padding:9px 14px 8px;
}
body.crm-ui .workspace-analytics-head p{margin-top:2px!important}
body.crm-ui .workspace-chart-wrap{
  height:174px;
  display:flex;
  align-items:center;
  padding:2px 10px 4px;
}
body.crm-ui .workspace-order-chart{
  width:100%;
  height:164px;
  max-height:164px;
}
body.crm-ui .workspace-chart-empty{
  fill:#94a3b8;
  font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif!important;
  font-size:11px;
  font-weight:600;
}

body.crm-ui .workspace-dashboard .workspace-card-head{
  min-height:48px;
  height:48px;
  padding:0 14px!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-summary{
  min-height:34px;
  height:34px;
  padding:4px 12px;
}
body.crm-ui .workspace-dashboard .workspace-orders-summary>span{
  min-height:22px;
  padding:0 7px;
  font-size:10px;
}
body.crm-ui .workspace-dashboard .workspace-orders-table th{
  padding:8px 11px!important;
}
body.crm-ui .workspace-dashboard .workspace-orders-table td{
  padding:9px 11px!important;
}
body.crm-ui .workspace-dashboard .workspace-order-number{margin-bottom:1px}
body.crm-ui .workspace-dashboard .workspace-orders-table td small{font-size:10px!important}

body.crm-ui .workspace-dashboard .workspace-quick-task{
  max-height:330px;
  padding:14px!important;
}
body.crm-ui .workspace-dashboard .workspace-quick-task-head{
  margin-bottom:11px;
}
body.crm-ui .workspace-dashboard .workspace-quick-task-icon{
  width:32px;
  height:32px;
}
body.crm-ui .workspace-dashboard .workspace-task-form{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form label{
  gap:4px!important;
  font-size:10.5px!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form label:first-of-type,
body.crm-ui .workspace-dashboard .workspace-task-form label:nth-of-type(4),
body.crm-ui .workspace-dashboard .workspace-task-form button{
  grid-column:1/-1;
}
body.crm-ui .workspace-dashboard .workspace-task-form input,
body.crm-ui .workspace-dashboard .workspace-task-form select{
  height:38px!important;
  min-height:38px!important;
  padding-left:9px!important;
  padding-right:9px!important;
  font-size:11.5px!important;
}
body.crm-ui .workspace-dashboard .workspace-task-form button{
  height:39px!important;
  min-height:39px!important;
  margin-top:0!important;
}

body.crm-ui .workspace-dashboard .workspace-crm-state{
  min-height:0;
  padding:14px!important;
}
body.crm-ui .workspace-crm-state-head{margin-bottom:10px}
body.crm-ui .workspace-crm-state-head p{margin-top:2px!important}
body.crm-ui .workspace-crm-metrics{gap:6px}
body.crm-ui .workspace-crm-metric{display:block}
body.crm-ui .workspace-crm-metric-line{min-height:23px;font-size:11px}
body.crm-ui .workspace-crm-metric-line>span>i{width:7px;height:7px;border-radius:50%}
body.crm-ui .workspace-crm-metric-line strong{font-size:11.5px!important}
body.crm-ui .workspace-crm-progress{display:none}

body.crm-ui .workspace-support-grid{gap:12px}
body.crm-ui .workspace-dashboard .workspace-support-card{
  height:156px;
}
body.crm-ui .workspace-dashboard .workspace-support-card .workspace-card-head{
  min-height:44px;
  height:44px;
}
body.crm-ui .workspace-dashboard .workspace-support-card table{
  table-layout:fixed!important;
}
body.crm-ui .workspace-dashboard .workspace-support-card td{
  height:36px;
  padding:5px 10px!important;
  overflow:hidden;
}
body.crm-ui .workspace-dashboard .workspace-support-card td:first-child{width:auto}
body.crm-ui .workspace-dashboard .workspace-support-card td:nth-last-child(2){width:125px}
body.crm-ui .workspace-dashboard .workspace-support-card td:last-child{width:76px}
body.crm-ui .workspace-dashboard .workspace-support-card td strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11.5px!important;
}
body.crm-ui .workspace-dashboard .workspace-support-card td small{
  margin-top:1px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9.5px!important;
}
body.crm-ui .workspace-stock-empty{
  min-height:110px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:12px 14px;
}
body.crm-ui .workspace-stock-empty-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  color:#047857;
  background:#ecfdf5;
  border-radius:10px;
  font-size:16px;
  font-weight:800;
}
body.crm-ui .workspace-stock-empty strong{
  display:block;
  color:#0f172a!important;
  font-size:12px!important;
  font-weight:700!important;
}
body.crm-ui .workspace-stock-empty small{
  display:block;
  margin-top:2px;
  color:#64748b!important;
  font-size:10.5px!important;
}
body.crm-ui .workspace-stock-empty a{
  color:#2563eb!important;
  font-size:10.5px;
  font-weight:650;
  white-space:nowrap;
}

@media(max-width:1100px){
  body.crm-ui .workspace-dashboard-grid{grid-template-columns:1fr}
  body.crm-ui .workspace-dashboard-main,
  body.crm-ui .workspace-dashboard-side{grid-column:1}
  body.crm-ui .workspace-dashboard .workspace-quick-task{max-height:none}
}
@media(max-width:680px){
  body.crm-ui .workspace-dashboard .workspace-dashboard-hero{
    height:auto;
    min-height:0!important;
  }
  body.crm-ui .workspace-dashboard .workspace-kpi{
    height:92px!important;
    min-height:92px!important;
  }
  body.crm-ui .workspace-dashboard .workspace-task-form{grid-template-columns:1fr!important}
  body.crm-ui .workspace-dashboard .workspace-task-form label{grid-column:1!important}
  body.crm-ui .workspace-dashboard .workspace-task-form button{grid-column:1!important}
  body.crm-ui .workspace-dashboard .workspace-analytics-card{height:220px}
  body.crm-ui .workspace-analytics-head{height:auto;min-height:54px}
  body.crm-ui .workspace-chart-wrap{height:156px}
  body.crm-ui .workspace-order-chart{height:150px;max-height:150px}
  body.crm-ui .workspace-dashboard .workspace-support-card{height:auto;min-height:140px}
  body.crm-ui .workspace-stock-empty{
    grid-template-columns:34px minmax(0,1fr);
  }
  body.crm-ui .workspace-stock-empty a{grid-column:2}
}
/* =========================================================
   LEMBAR operational dashboard redesign — workspace only
   ========================================================= */
body.crm-ui .ops-dashboard{
  --ops-blue:#2563eb;
  --ops-cyan:#0891b2;
  --ops-green:#10b981;
  --ops-amber:#f59e0b;
  --ops-red:#ef4444;
  --ops-violet:#7c3aed;
  display:grid;
  gap:14px;
  min-width:0;
  color:#0f172a;
  font-family:Inter,Manrope,"Segoe UI",system-ui,sans-serif;
}
body.crm-ui .ops-dashboard-header{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
body.crm-ui .ops-dashboard-header>div:first-child{min-width:0}
body.crm-ui .ops-dashboard-eyebrow{
  margin:0 0 3px!important;
  color:#2563eb!important;
  font-size:9.5px!important;
  font-weight:800!important;
  letter-spacing:.13em!important;
  text-transform:uppercase;
}
body.crm-ui .ops-dashboard-header h1{
  margin:0!important;
  color:#0f172a!important;
  font-size:24px!important;
  font-weight:720!important;
  line-height:1.12!important;
  letter-spacing:-.03em!important;
}
body.crm-ui .ops-dashboard-header>div:first-child>p:last-child{
  margin:4px 0 0!important;
  color:#64748b!important;
  font-size:12.5px!important;
}
body.crm-ui .ops-dashboard-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
body.crm-ui .ops-dashboard-actions .button,
body.crm-ui .ops-dashboard-actions button{
  min-height:39px!important;
  height:39px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:0 13px!important;
  border-radius:10px!important;
  font-size:12.5px!important;
  font-weight:680!important;
}
body.crm-ui .ops-dashboard-actions .button>span,
body.crm-ui .ops-dashboard-actions button>span{font-size:16px;line-height:1}

body.crm-ui .ops-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
body.crm-ui .ops-kpi{
  position:relative;
  min-width:0;
  min-height:118px;
  overflow:hidden;
  padding:14px 15px 12px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(15,23,42,.045);
  isolation:isolate;
}
body.crm-ui .ops-kpi:after{
  content:"";
  position:absolute;
  z-index:-1;
  right:-42px;
  top:-50px;
  width:130px;
  height:130px;
  border-radius:50%;
  background:radial-gradient(circle,var(--ops-soft),transparent 69%);
}
body.crm-ui .ops-kpi-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:32px;
  margin-bottom:7px;
}
body.crm-ui .ops-kpi-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  color:var(--ops-color);
  background:var(--ops-icon-bg);
  border-radius:10px;
}
body.crm-ui .ops-kpi-icon svg{width:18px;height:18px}
body.crm-ui .ops-kpi-change{
  min-height:23px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  font-size:9.5px;
  font-weight:750;
}
body.crm-ui .ops-kpi-change.is-up{color:#047857;background:#ecfdf5}
body.crm-ui .ops-kpi-change.is-down{color:#b91c1c;background:#fef2f2}
body.crm-ui .ops-kpi-label{
  display:block;
  color:#64748b;
  font-size:9.5px;
  font-weight:780;
  letter-spacing:.065em;
  text-transform:uppercase;
}
body.crm-ui .ops-kpi>strong{
  display:block;
  margin:3px 0 0;
  overflow:hidden;
  color:#0f172a!important;
  font-size:24px!important;
  font-weight:730!important;
  line-height:1.08!important;
  letter-spacing:-.025em!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.crm-ui .ops-kpi>small{
  display:block;
  margin-top:3px;
  color:#64748b!important;
  font-size:10.5px!important;
  white-space:nowrap;
}
body.crm-ui .ops-kpi-sparkline{
  position:absolute;
  right:12px;
  bottom:9px;
  width:112px;
  height:24px;
  opacity:.8;
}
body.crm-ui .ops-kpi-sparkline polyline{
  fill:none;
  stroke:var(--ops-color);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}
body.crm-ui .ops-kpi-blue{--ops-color:#2563eb;--ops-icon-bg:#eff6ff;--ops-soft:rgba(37,99,235,.17)}
body.crm-ui .ops-kpi-cyan{--ops-color:#0891b2;--ops-icon-bg:#ecfeff;--ops-soft:rgba(8,145,178,.15)}
body.crm-ui .ops-kpi-amber{--ops-color:#d97706;--ops-icon-bg:#fffbeb;--ops-soft:rgba(245,158,11,.18)}
body.crm-ui .ops-kpi-red{--ops-color:#dc2626;--ops-icon-bg:#fef2f2;--ops-soft:rgba(239,68,68,.15)}

body.crm-ui .ops-card{
  min-width:0;
  margin:0;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(15,23,42,.045);
}
body.crm-ui .ops-card-head{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 15px 10px;
  border-bottom:1px solid #edf1f6;
}
body.crm-ui .ops-card-head h2,
body.crm-ui .ops-attention-head h2{
  margin:0!important;
  color:#0f172a!important;
  font-size:16.5px!important;
  font-weight:700!important;
  line-height:1.2!important;
}
body.crm-ui .ops-card-head p,
body.crm-ui .ops-attention-head p{
  margin:3px 0 0!important;
  color:#64748b!important;
  font-size:10.5px!important;
}
body.crm-ui .ops-analytics-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(320px,1fr);
  gap:12px;
  align-items:stretch;
}
body.crm-ui .ops-sales-card{
  height:418px;
  overflow:hidden;
}
body.crm-ui .ops-sales-head{height:62px}
body.crm-ui .ops-period-control{
  display:flex;
  align-items:center;
  gap:3px;
  padding:3px;
  background:#f1f5f9;
  border-radius:9px;
}
body.crm-ui .ops-period-control button{
  min-height:28px!important;
  height:28px!important;
  padding:0 9px!important;
  color:#64748b!important;
  background:transparent!important;
  border:0!important;
  border-radius:7px!important;
  font-size:10.5px!important;
  font-weight:700!important;
  box-shadow:none!important;
}
body.crm-ui .ops-period-control button:hover{color:#1d4ed8!important;background:#fff!important}
body.crm-ui .ops-period-control button.active{color:#fff!important;background:#2563eb!important}
body.crm-ui .ops-chart-meta{
  min-height:36px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 15px;
  color:#64748b;
  font-size:10px;
}
body.crm-ui .ops-chart-range{font-weight:650}
body.crm-ui .ops-chart-history-note{
  padding:3px 7px;
  color:#a16207;
  background:#fffbeb;
  border-radius:6px;
  font-weight:650;
}
body.crm-ui .ops-chart-legend{
  display:flex;
  align-items:center;
  gap:6px;
  margin-left:auto;
  white-space:nowrap;
}
body.crm-ui .ops-chart-legend i{width:7px;height:7px;border-radius:50%}
body.crm-ui .ops-chart-legend i.sales{background:#2563eb}
body.crm-ui .ops-chart-legend i.orders{margin-left:5px;background:#0891b2}
body.crm-ui .ops-main-chart-wrap{
  height:318px;
  display:flex;
  align-items:center;
  padding:0 10px 8px;
  background:linear-gradient(180deg,#fff,#fbfdff);
}
body.crm-ui .ops-main-chart{
  display:block;
  width:100%;
  height:292px;
}
body.crm-ui .ops-main-chart [hidden]{display:none!important}
body.crm-ui .ops-chart-gridline{
  stroke:#e7edf5;
  stroke-width:1;
  stroke-dasharray:4 6;
}
body.crm-ui .ops-chart-bar{
  fill:#0891b2;
  opacity:.28;
  rx:2px;
}
body.crm-ui .ops-chart-area{fill:url(#opsSalesArea)}
body.crm-ui .ops-chart-line{
  fill:none;
  stroke:url(#opsSalesLine);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 5px 6px rgba(37,99,235,.16));
  vector-effect:non-scaling-stroke;
}
body.crm-ui .ops-chart-label{
  fill:#94a3b8;
  font-size:9px;
  font-weight:600;
}
body.crm-ui .ops-chart-empty{
  fill:#94a3b8;
  font-size:11px;
  font-weight:650;
}

body.crm-ui .ops-analytics-side{
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  gap:12px;
  min-width:0;
}
body.crm-ui .ops-status-card{min-height:260px;overflow:hidden}
body.crm-ui .ops-donut-layout{
  min-height:196px;
  display:grid;
  grid-template-columns:138px minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:10px 13px 13px;
}
body.crm-ui .ops-donut{
  position:relative;
  width:130px;
  height:130px;
}
body.crm-ui .ops-donut svg{display:block;width:130px;height:130px;transform:rotate(-90deg)}
body.crm-ui .ops-donut-track,
body.crm-ui .ops-donut-segment{
  fill:none;
  stroke-width:13;
}
body.crm-ui .ops-donut-track{stroke:#eef2f7}
body.crm-ui .ops-donut-segment{stroke-linecap:butt}
body.crm-ui .ops-donut>div{
  position:absolute;
  inset:0;
  display:grid;
  place-content:center;
  text-align:center;
  pointer-events:none;
}
body.crm-ui .ops-donut>div strong{
  color:#0f172a!important;
  font-size:24px!important;
  font-weight:730!important;
  line-height:1!important;
}
body.crm-ui .ops-donut>div span{
  margin-top:3px;
  color:#64748b;
  font-size:9.5px;
  font-weight:650;
}
body.crm-ui .ops-status-legend{
  min-width:0;
  display:grid;
  gap:5px;
}
body.crm-ui .ops-status-legend>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  font-size:10px;
}
body.crm-ui .ops-status-legend>div>span{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  overflow:hidden;
  color:#475569;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.crm-ui .ops-status-legend i{width:7px;height:7px;flex:none;border-radius:50%}
body.crm-ui .ops-status-legend strong{color:#0f172a!important;font-size:10.5px!important;font-weight:750!important}
body.crm-ui .ops-today-card{overflow:hidden}
body.crm-ui .ops-today-card .ops-card-head{min-height:46px;padding-top:8px;padding-bottom:7px}
body.crm-ui .ops-today-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;
  background:#edf1f6;
}
body.crm-ui .ops-today-metrics>div{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  background:#fff;
}
body.crm-ui .ops-today-metrics span{color:#64748b;font-size:9.5px;line-height:1.25}
body.crm-ui .ops-today-metrics strong{color:#0f172a!important;font-size:11.5px!important;font-weight:750!important;white-space:nowrap}

body.crm-ui .ops-attention-card{overflow:hidden}
body.crm-ui .ops-attention-head{
  min-height:50px;
  display:flex;
  align-items:center;
  padding:9px 14px 8px;
  border-bottom:1px solid #edf1f6;
}
body.crm-ui .ops-attention-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
body.crm-ui .ops-attention-item{
  min-width:0;
  min-height:92px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  padding:10px 13px;
  border-right:1px solid #edf1f6;
}
body.crm-ui .ops-attention-item:last-child{border-right:0}
body.crm-ui .ops-attention-icon{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  color:var(--attention-color);
  background:var(--attention-bg);
  border-radius:10px;
  font-weight:850;
}
body.crm-ui .ops-attention-item>div{min-width:0}
body.crm-ui .ops-attention-item>div>span{display:block;color:#64748b;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
body.crm-ui .ops-attention-item>div>strong{display:block;margin-top:2px;color:#0f172a!important;font-size:16px!important;font-weight:730!important}
body.crm-ui .ops-attention-item>div>small{display:block;margin-top:2px;overflow:hidden;color:#64748b!important;font-size:9.5px!important;text-overflow:ellipsis;white-space:nowrap}
body.crm-ui .ops-attention-item>a{color:#2563eb!important;font-size:10.5px;font-weight:680;white-space:nowrap}
body.crm-ui .ops-attention-amber{--attention-color:#b45309;--attention-bg:#fffbeb}
body.crm-ui .ops-attention-red{--attention-color:#b91c1c;--attention-bg:#fef2f2}
body.crm-ui .ops-attention-green{--attention-color:#047857;--attention-bg:#ecfdf5}
body.crm-ui .ops-attention-item.is-clear{--attention-color:#047857;--attention-bg:#ecfdf5}

body.crm-ui .ops-lower-grid{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(340px,1fr);
  gap:12px;
  align-items:start;
}
body.crm-ui .ops-latest-orders,
body.crm-ui .ops-activity-card{overflow:hidden}
body.crm-ui .ops-order-list{display:grid}
body.crm-ui .ops-order-row{
  min-height:56px;
  display:grid;
  grid-template-columns:145px minmax(140px,1fr) 130px 105px 20px;
  align-items:center;
  gap:10px;
  padding:7px 13px;
  border-bottom:1px solid #edf1f6;
  transition:background .14s ease;
}
body.crm-ui .ops-order-row:hover{background:#fbfdff}
body.crm-ui .ops-order-row>div strong{display:block;color:#0f172a!important;font-size:11.5px!important;font-weight:720!important}
body.crm-ui .ops-order-row>div small{display:block;margin-top:2px;color:#94a3b8!important;font-size:9.5px!important}
body.crm-ui .ops-order-customer{overflow:hidden;color:#475569;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
body.crm-ui .ops-order-status{
  width:max-content;
  max-width:130px;
  padding:5px 7px!important;
  overflow:hidden;
  border:0!important;
  border-radius:999px!important;
  background:#f1f5f9!important;
  font-size:9.5px!important;
  text-overflow:ellipsis;
}
body.crm-ui .ops-order-status.status-new{color:#1d4ed8!important;background:#eff6ff!important}
body.crm-ui .ops-order-status.status-waiting_payment{color:#a16207!important;background:#fffbeb!important}
body.crm-ui .ops-order-status.status-processing,
body.crm-ui .ops-order-status.status-reserved,
body.crm-ui .ops-order-status.status-packing{color:#6d28d9!important;background:#f5f3ff!important}
body.crm-ui .ops-order-status.status-done,
body.crm-ui .ops-order-status.status-completed{color:#047857!important;background:#ecfdf5!important}
body.crm-ui .ops-order-total{color:#0f172a!important;font-size:11px!important;font-weight:720!important;text-align:right;white-space:nowrap}
body.crm-ui .ops-order-open{color:#2563eb;font-size:15px;text-align:right}
body.crm-ui .ops-card-footer-link{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#2563eb!important;
  background:#fbfdff;
  border-top:1px solid #edf1f6;
  font-size:10.5px;
  font-weight:700;
}
body.crm-ui .ops-activity-feed{display:grid;padding:4px 13px 8px}
body.crm-ui .ops-activity-item{
  position:relative;
  min-height:47px;
  display:grid;
  grid-template-columns:12px minmax(0,1fr);
  align-items:center;
  gap:9px;
}
body.crm-ui .ops-activity-item:not(:last-child):before{
  content:"";
  position:absolute;
  left:5px;
  top:29px;
  bottom:-18px;
  width:1px;
  background:#e2e8f0;
}
body.crm-ui .ops-activity-dot{
  position:relative;
  z-index:1;
  width:11px;
  height:11px;
  border:3px solid #fff;
  border-radius:50%;
  background:var(--activity-color);
  box-shadow:0 0 0 2px var(--activity-soft);
}
body.crm-ui .ops-activity-item strong{display:block;overflow:hidden;color:#334155!important;font-size:10.5px!important;font-weight:650!important;text-overflow:ellipsis;white-space:nowrap}
body.crm-ui .ops-activity-item small{display:block;margin-top:2px;color:#94a3b8!important;font-size:9.5px!important}
body.crm-ui .ops-activity-blue{--activity-color:#2563eb;--activity-soft:#bfdbfe}
body.crm-ui .ops-activity-violet{--activity-color:#7c3aed;--activity-soft:#ddd6fe}
body.crm-ui .ops-activity-green{--activity-color:#10b981;--activity-soft:#a7f3d0}
body.crm-ui .ops-activity-amber{--activity-color:#f59e0b;--activity-soft:#fde68a}
body.crm-ui .ops-empty-state{padding:24px;color:#64748b;font-size:11px;text-align:center}

body.crm-ui .ops-task-drawer{
  position:fixed;
  inset:0;
  z-index:150;
  visibility:hidden;
  pointer-events:none;
}
body.crm-ui .ops-task-drawer[aria-hidden="false"]{visibility:visible;pointer-events:auto}
body.crm-ui .ops-task-drawer-backdrop,
body.crm-ui button.ops-task-drawer-backdrop{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(15,23,42,.38)!important;
  opacity:0;
  transition:opacity .18s ease!important;
}
body.crm-ui .ops-task-drawer[aria-hidden="false"] .ops-task-drawer-backdrop{opacity:1}
body.crm-ui .ops-task-drawer-panel{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:min(420px,100vw);
  display:flex;
  flex-direction:column;
  background:#fff;
  box-shadow:-24px 0 70px rgba(15,23,42,.18);
  transform:translateX(104%);
  transition:transform .2s ease;
}
body.crm-ui .ops-task-drawer[aria-hidden="false"] .ops-task-drawer-panel{transform:translateX(0)}
body.crm-ui .ops-task-drawer-head{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 18px;
  border-bottom:1px solid #e2e8f0;
}
body.crm-ui .ops-task-drawer-head p{margin:0 0 3px!important;color:#2563eb!important;font-size:9.5px!important;font-weight:750!important;text-transform:uppercase;letter-spacing:.08em}
body.crm-ui .ops-task-drawer-head h2{margin:0!important;color:#0f172a!important;font-size:19px!important;font-weight:720!important}
body.crm-ui .ops-task-drawer-head button{
  width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  border:0!important;
  border-radius:9px!important;
  background:#f1f5f9!important;
  color:#64748b!important;
  font-size:21px!important;
  box-shadow:none!important;
}
body.crm-ui .ops-task-form{
  display:grid;
  gap:14px;
  padding:18px;
}
body.crm-ui .ops-task-form label{
  display:grid!important;
  gap:6px!important;
  margin:0!important;
  color:#475569!important;
  font-size:11px!important;
  font-weight:680!important;
}
body.crm-ui .ops-task-form input,
body.crm-ui .ops-task-form select{
  width:100%!important;
  height:43px!important;
  min-height:43px!important;
  margin:0!important;
  padding:0 11px!important;
  border:1px solid #cbd5e1!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0f172a!important;
  font-size:12.5px!important;
}
body.crm-ui .ops-task-form button[type="submit"]{
  width:100%!important;
  height:43px!important;
  min-height:43px!important;
  margin-top:2px!important;
  border-radius:9px!important;
}
body.crm-ui.workspace-task-drawer-open{overflow:hidden!important}

@media(max-width:1180px){
  body.crm-ui .ops-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.crm-ui .ops-analytics-grid{grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr)}
  body.crm-ui .ops-order-row{grid-template-columns:135px minmax(130px,1fr) 120px 95px 18px}
}
@media(max-width:980px){
  body.crm-ui .ops-analytics-grid,
  body.crm-ui .ops-lower-grid{grid-template-columns:1fr}
  body.crm-ui .ops-sales-card{height:auto}
  body.crm-ui .ops-main-chart-wrap{height:auto}
  body.crm-ui .ops-main-chart{height:auto;min-height:245px}
  body.crm-ui .ops-attention-grid{grid-template-columns:1fr}
  body.crm-ui .ops-attention-item{border-right:0;border-bottom:1px solid #edf1f6}
  body.crm-ui .ops-attention-item:last-child{border-bottom:0}
}
@media(max-width:680px){
  body.crm-ui .ops-dashboard{gap:12px}
  body.crm-ui .ops-dashboard-header{display:grid;gap:12px}
  body.crm-ui .ops-dashboard-actions{justify-content:flex-start}
  body.crm-ui .ops-dashboard-actions .button,
  body.crm-ui .ops-dashboard-actions button{flex:1 1 auto;padding:0 9px!important}
  body.crm-ui .ops-kpi-grid{grid-template-columns:1fr}
  body.crm-ui .ops-kpi{min-height:112px}
  body.crm-ui .ops-sales-head{height:auto;display:grid;gap:10px}
  body.crm-ui .ops-period-control{width:100%}
  body.crm-ui .ops-period-control button{flex:1}
  body.crm-ui .ops-chart-meta{flex-wrap:wrap;height:auto;padding-top:7px;padding-bottom:7px}
  body.crm-ui .ops-chart-legend{width:100%;margin-left:0}
  body.crm-ui .ops-main-chart{min-height:200px}
  body.crm-ui .ops-donut-layout{grid-template-columns:120px minmax(0,1fr);padding-left:8px;padding-right:8px}
  body.crm-ui .ops-donut,
  body.crm-ui .ops-donut svg{width:116px;height:116px}
  body.crm-ui .ops-today-metrics{grid-template-columns:1fr}
  body.crm-ui .ops-attention-item{grid-template-columns:34px minmax(0,1fr)}
  body.crm-ui .ops-attention-item>a{grid-column:2}
  body.crm-ui .ops-order-row{
    grid-template-columns:minmax(0,1fr) auto 18px;
    gap:7px;
    min-height:64px;
  }
  body.crm-ui .ops-order-customer{grid-column:1;grid-row:2}
  body.crm-ui .ops-order-status{grid-column:2;grid-row:1}
  body.crm-ui .ops-order-total{grid-column:2;grid-row:2}
  body.crm-ui .ops-order-open{grid-column:3;grid-row:1/3}
  body.crm-ui .ops-task-drawer-panel{width:100vw}
}