:root{--crm-bg:#f3f5f8;--crm-panel:#fff;--crm-text:#17243a;--crm-muted:#69778b;--crm-border:#dce3ec;--crm-accent:#ee700b;--crm-soft:#edf2f8;--crm-shadow:0 8px 30px #10203808;color-scheme:light}html[data-theme=dark]{--crm-bg:#101722;--crm-panel:#192332;--crm-text:#e9eff8;--crm-muted:#9cacc1;--crm-border:#314055;--crm-soft:#253348;--crm-shadow:none;color-scheme:dark}body{margin:0;background:var(--crm-bg);color:var(--crm-text);font:14px/1.5 "Segoe UI",Arial,sans-serif}*{box-sizing:border-box}#crm-sidebar{position:fixed;inset:0 auto 0 0;width:240px;background:#13233a;color:#dbe5f4;z-index:120;display:flex;flex-direction:column;padding:25px 15px 16px;overflow:auto}#crm-sidebar .crm-brand{font-size:26px;letter-spacing:2px;font-weight:800;color:white;padding:0 13px}#crm-sidebar .crm-brand em{color:#ff8000;font-style:normal}.crm-caption{text-transform:uppercase;font-size:10px;letter-spacing:1.4px;color:#8da2bd;margin:0 13px 25px}#crm-sidebar nav{display:grid;gap:4px}#crm-sidebar a,#crm-sidebar button{display:flex;align-items:center;text-align:left;gap:10px;min-height:40px;border:0;border-radius:7px;background:transparent;color:#bbcadf;text-decoration:none;padding:9px 13px;font:inherit;width:100%;cursor:pointer}#crm-sidebar a:hover,#crm-sidebar button:hover{background:#ffffff0d;color:#fff}#crm-sidebar .active{background:#29415e;color:#fff;box-shadow:inset 3px 0 #ff8000}#crm-sidebar .crm-nav-title{font-size:10px;letter-spacing:1.2px;text-transform:uppercase;color:#7e95b1;margin:22px 13px 7px}.crm-side-bottom{margin-top:auto;padding-top:28px}.crm-local{padding:12px 13px;font-size:11px;color:#99aec8}.crm-local:before{content:'●';color:#62c49e;margin-right:8px}#crm-header{position:fixed;top:0;left:240px;right:0;height:68px;background:var(--crm-panel);border-bottom:1px solid var(--crm-border);display:flex;align-items:center;gap:16px;padding:0 30px;z-index:110;color:var(--crm-text)}#crm-header strong{font-size:14px}#crm-header .crm-user{margin-left:auto;text-align:right;font-size:12px}#crm-header small{display:block;color:var(--crm-muted);font-size:10px}.crm-avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:50%;background:var(--crm-soft);color:var(--crm-text);text-decoration:none;font-weight:bold}.crm-icon{border:1px solid var(--crm-border);background:var(--crm-panel);color:var(--crm-text);width:34px;height:34px;border-radius:8px;cursor:pointer}.crm-layout{padding:96px 32px 40px 272px}.crm-title{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}.crm-title h1{font-size:27px;line-height:1.25;margin:0 0 7px;font-weight:650}.crm-title p,.crm-muted{color:var(--crm-muted);margin:0}.crm-card{padding:24px;background:var(--crm-panel);border:1px solid var(--crm-border);border-radius:12px;box-shadow:var(--crm-shadow);margin-bottom:20px}.crm-card h2{margin:0 0 16px;font-size:17px}.crm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.crm-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-stat{font-size:33px;font-weight:650;margin:8px 0}.crm-button{border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);padding:9px 15px;font:inherit;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.crm-button.danger{background:#c44141;border-color:#c44141;color:#fff}
.crm-button.danger:hover{filter:brightness(1.06)}.crm-button:hover{filter:brightness(.96)}.crm-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.crm-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.crm-fields .wide{grid-column:1/-1}.crm-fields label,.crm-form>label{display:grid;gap:6px;color:var(--crm-muted);font-size:12px}.crm-form>label[hidden],.crm-form [hidden]{display:none!important}.crm-form [data-new-mat]{display:grid;gap:17px}.crm-form [data-new-mat] label,.crm-form>label.check{display:grid;gap:6px;color:var(--crm-muted);font-size:12px;font-weight:400}.crm-form>label.check{grid-template-columns:auto 1fr;align-items:center;gap:8px;font-size:14px;color:var(--crm-text)}.crm-fields input,.crm-fields select,.crm-fields textarea,.crm-form input,.crm-form select,.crm-form textarea,.crm-search{width:100%;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);padding:10px 11px;font:14px "Segoe UI",sans-serif}.crm-fields textarea{min-height:110px;resize:vertical}.crm-form{display:grid;gap:17px}.crm-form input[type=checkbox]{width:16px}.crm-form .check{display:flex;align-items:center;gap:8px}.crm-error{color:#c84136;white-space:pre-line;font-size:13px}.crm-badge{display:inline-block;background:var(--crm-soft);padding:4px 9px;font-size:11px;border-radius:5px;color:var(--crm-text)}.crm-table-wrap{overflow:visible}
.crm-table{width:100%;border-collapse:separate;border-spacing:0}
.crm-table thead th{position:sticky;top:var(--table-sticky-top,0px);z-index:4;background:var(--crm-soft);text-align:left;font-size:11px;color:var(--crm-muted);font-weight:500;padding:12px;border-bottom:1px solid var(--crm-border);box-shadow:0 1px 0 var(--crm-border)}
.crm-table th{text-align:left;font-size:11px;color:var(--crm-muted);font-weight:500;padding:12px;border-bottom:1px solid var(--crm-border)}.crm-table td{padding:14px 12px;border-bottom:1px solid var(--crm-border);vertical-align:middle;font-size:13px}.crm-table a{color:var(--crm-text);text-decoration:none;font-weight:400}.crm-table tr:hover td{background:var(--crm-soft)}.crm-table td small{display:block;color:var(--crm-muted);font-size:11px}.crm-empty{padding:42px;text-align:center;color:var(--crm-muted)}.crm-timeline{border-left:2px solid var(--crm-border);padding-left:20px}.crm-event{position:relative;margin:0 0 22px;white-space:pre-wrap}.crm-event:before{content:'';position:absolute;left:-26px;top:6px;background:var(--crm-accent);width:10px;height:10px;border:2px solid var(--crm-panel);border-radius:50%}.crm-event small{color:var(--crm-muted)}.crm-file{display:block;padding:10px 0;color:var(--crm-text);text-decoration:none;border-bottom:1px solid var(--crm-border)}.crm-login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.crm-login-brand{background:#13233a;color:#fff;padding:12vh 12%;display:flex;flex-direction:column;justify-content:center}.crm-login-brand h1{font-size:45px;letter-spacing:4px;margin:0}.crm-login-brand span{color:#ff8000}.crm-login-brand h2{font-size:32px;font-weight:500;line-height:1.3;margin-top:70px}.crm-login-brand p{color:#aabed6;max-width:380px}.crm-login-form{align-self:center;width:min(400px,85%);margin:auto}.crm-login-form h2{font-size:26px;margin-bottom:5px}.crm-login-form p{color:var(--crm-muted);margin-bottom:25px}#crm-toast{position:fixed;bottom:25px;right:25px;z-index:2000;background:#13233a;color:white;padding:13px 20px;border-radius:8px;max-width:440px;box-shadow:0 5px 20px #0003}.crm-dialog{border:1px solid var(--crm-border);border-radius:12px;padding:25px;max-width:660px;width:calc(100% - 32px);background:var(--crm-panel);color:var(--crm-text)}.crm-dialog::backdrop{background:#0b15276e}.crm-dialog h2{margin:0 0 20px}.crm-hint{padding:12px 15px;background:var(--crm-soft);border-left:3px solid #ee700b;color:var(--crm-muted);font-size:12px;border-radius:3px}.crm-module .sidebar{display:none!important}.crm-module{padding:82px 18px 25px 258px!important}.crm-module .shell,.crm-module .app-shell,.crm-module .app-layout{display:block!important;min-height:0!important}.crm-module .main,.crm-module .workspace{margin-left:0!important;width:100%!important}.crm-module[data-module=workshop] .topbar{display:none!important}.crm-module[data-module=montazh] .topbar{position:static!important;padding-left:18px;min-height:46px;height:46px;border-radius:10px}.crm-module[data-module=montazh] .breadcrumb,.crm-module[data-module=montazh] .mobile-menu,.crm-module[data-module=montazh] .topbar>.avatar,.crm-module[data-module=montazh] .top-date{display:none!important}.crm-module[data-module=managers] .app{max-width:none!important;margin:0!important}.crm-module[data-module=managers] .content{padding:0!important}.crm-module[data-module=managers] .layout{display:block!important}.crm-module .content,.crm-module .page{padding:20px 8px!important}.crm-module .theme-btn,.crm-module [data-action=theme],.crm-module #registryLoginPanel,.crm-module #libraryLoginPanel,.crm-module #adminToggleButton,.crm-module #registryAdminPanel>*,.crm-module #techGitHubTokenInput,.crm-module #libraryGitHubTokenInput,.crm-module #libraryLogoutButton{display:none!important}.crm-module[data-module=managers] .panel,.crm-module[data-module=managers] input,.crm-module[data-module=managers] select,.crm-module[data-module=managers] textarea,.crm-module[data-module=managers] .topbar{background:var(--crm-panel)!important;color:var(--crm-text)!important;border-color:var(--crm-border)!important}.crm-module[data-module=managers] .panel-title,.crm-module[data-module=managers] td,.crm-module[data-module=managers] th{color:var(--crm-text)!important;background:var(--crm-panel)!important}.crm-module[data-module=managers] .button.primary{background:var(--crm-accent)!important;color:white!important}.crm-mobile-menu{display:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #ee700b;outline-offset:2px}@media(max-width:1000px){.crm-grid{grid-template-columns:1fr}.crm-grid.two{grid-template-columns:1fr}#crm-header{padding:0 18px}.crm-layout{padding-right:18px}}@media(max-width:720px){#crm-sidebar{transform:translateX(-100%);transition:transform .2s;width:230px}body.crm-menu-open #crm-sidebar{transform:translateX(0)}#crm-header{left:0;height:60px;padding:0 12px}.crm-mobile-menu{display:block}.crm-layout{padding:82px 14px 25px}.crm-module{padding:70px 6px 16px!important}.crm-fields{grid-template-columns:1fr}.crm-title{align-items:flex-start;flex-direction:column}.crm-title h1{font-size:24px}.crm-card{padding:17px}.crm-login{grid-template-columns:1fr}.crm-login-brand{display:none}#crm-header .crm-user{max-width:130px;white-space:nowrap;overflow:hidden}#crm-header>strong{font-size:12px}.crm-module .content,.crm-module .page{padding:10px 2px!important}}
.crm-module[data-module=managers] .workspace{display:block!important;min-width:0!important}.crm-module[data-module=managers]{--bg:var(--crm-bg);--surface:var(--crm-panel);--surface-2:var(--crm-soft);--ink:var(--crm-text);--muted:var(--crm-muted);--line:var(--crm-border);--accent:var(--crm-accent);--accent-strong:#ce5e03}.crm-module[data-module=managers] .app-shell{padding:8px!important}.crm-module[data-module=managers] .form-grid{min-width:0!important}.crm-module[data-module=managers] .topbar{flex-wrap:wrap!important}.crm-module .crm-brand{display:block!important}
.crm-module[data-module=managers] .segmented label{position:relative}.crm-module[data-module=managers] .segmented input{width:1px!important;height:1px!important;left:0;top:0;clip-path:inset(50%)}#crm-sidebar button{justify-content:flex-start}.crm-module .appearance-panel{display:none!important}.crm-table{min-width:630px}#crm-sidebar #crm-subnav .crm-nav-title{margin-top:14px}#crm-sidebar #crm-subnav button{min-height:31px;padding:6px 13px;font-size:12px}

#crm-sidebar .crm-side-bottom{flex-shrink:0;padding-top:20px}#crm-subnav{flex-shrink:0}#crm-sidebar .crm-side-bottom .crm-nav-title{margin-top:0}#crm-sidebar #crm-shared-nav a{min-height:34px;padding:7px 13px;font-size:12px}.crm-block-picker{display:grid;gap:7px;padding:18px 13px 0;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#8da2bd}.crm-block-picker select{width:100%;min-width:0;background:#20354e;color:#eef4ff;border:1px solid #39516d;border-radius:7px;padding:10px 9px;font:13px "Segoe UI",sans-serif;letter-spacing:0;text-transform:none;cursor:pointer}#crm-sidebar .crm-caption{margin-bottom:12px}

#crm-sidebar .crm-block-picker{padding:0 13px 18px}

/* Preserve the native logo, SVG icons and separate task counters. */
.crm-brand img{display:block;width:100%;max-width:184px;height:auto;object-fit:contain}
#crm-subnav nav button{font-family:inherit;font-size:13px;text-align:left}
#crm-subnav nav button>svg,#crm-subnav .nav-icon{width:18px;height:18px;flex:0 0 18px}
#crm-subnav nav button>span:not(.nav-count):not(.nav-icon){flex:1;min-width:0}
#crm-subnav .nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;margin-left:auto;padding:0 6px;border-radius:11px;background:#344b67;color:#fff;font-size:11px;font-weight:700;line-height:1;flex-shrink:0}
#crm-subnav button.active .nav-count{background:#ff8a00;color:#152438}

.crm-module[data-module=agents] .workspace{display:block!important;min-width:0!important}.crm-module[data-module=agents] .sidebar{display:none!important}#crm-subnav .nav-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.crm-login-logo{display:block;width:min(100%,300px);height:auto;margin-bottom:45px}

/* Two-row workspace navigation. */
body.crm-top-navigation #crm-header{position:relative;left:auto;right:auto;top:auto;height:88px;padding:0 24px;gap:18px;background:#13233a;color:#eef4ff;z-index:20;width:100%}
#crm-header .crm-brand{display:flex!important;align-items:center;flex:0 0 164px;width:164px;padding:0}
#crm-header .crm-brand img{width:164px;height:auto}
#crm-workspaces{display:flex;align-self:stretch;gap:4px;min-width:0;overflow:hidden;flex:1}
#crm-workspaces .crm-workspace{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;flex:0 0 72px;width:72px;min-width:72px;max-width:72px;padding:8px 4px;border:0;border-radius:0;background:transparent;color:#bdcee3;text-decoration:none;font:11px/1.2 "Segoe UI",Arial,sans-serif;cursor:pointer;box-shadow:none;white-space:nowrap}
#crm-workspaces .crm-workspace svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#crm-workspaces .crm-workspace:hover{background:#ffffff0b;color:white}
#crm-workspaces .crm-workspace.active{background:#223b56;color:#fff;box-shadow:inset 0 -3px #f58220}
body.crm-top-navigation #crm-header .crm-user{flex:0 0 auto;margin-left:auto;max-width:180px}
body.crm-top-navigation #crm-header small{color:#a6bad1}
#crm-header .crm-icon,#crm-header .crm-icon:hover,#crm-header .crm-icon:disabled{
  display:inline-flex;align-items:center;justify-content:center;align-self:center;
  box-sizing:border-box;flex:0 0 34px;width:34px;height:34px;min-width:34px;min-height:34px;max-width:34px;max-height:34px;
  margin:0;padding:0;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-panel);color:var(--crm-text);
  font:16px/1 "Segoe UI",Arial,sans-serif;font-weight:400;box-shadow:none;opacity:1
}
body.crm-top-navigation #crm-header .crm-icon,body.crm-top-navigation #crm-header .crm-icon:hover{
  border-color:#3d5674;background:#223b56;color:#eef4ff
}
body.crm-top-navigation #crm-sidebar{position:relative !important;inset:auto !important;top:auto !important;left:auto !important;width:100% !important;height:49px;padding:0 24px;display:block;overflow-x:auto;overflow-y:hidden;transform:none;background:var(--crm-panel);color:var(--crm-text);border-bottom:1px solid var(--crm-border);z-index:19}
body.crm-top-navigation #crm-sidebar [hidden]{display:none!important}
body.crm-top-navigation #crm-sidebar .crm-nav-title{display:none}
body.crm-top-navigation #crm-sidebar nav{display:flex;align-items:stretch;gap:20px;width:max-content;min-width:100%;height:48px}
body.crm-top-navigation #crm-sidebar a,body.crm-top-navigation #crm-sidebar #crm-subnav button,body.crm-top-navigation #crm-sidebar #crm-shared-nav a{display:flex;align-items:center;justify-content:center;gap:7px;width:auto;min-height:48px;flex:0 0 auto;padding:0 2px;border-radius:0;background:transparent;color:var(--crm-muted);font:13px/1.3 "Segoe UI",Arial,sans-serif;text-decoration:none;white-space:nowrap;box-shadow:none}
body.crm-top-navigation #crm-sidebar .active,body.crm-top-navigation #crm-sidebar #crm-subnav button.active,body.crm-top-navigation #crm-sidebar #crm-shared-nav a.active{color:var(--crm-text);box-shadow:inset 0 -3px var(--crm-accent)}
body.crm-top-navigation #crm-sidebar a:hover,body.crm-top-navigation #crm-sidebar button:hover{color:var(--crm-text);background:var(--crm-soft)}
body.crm-top-navigation #crm-subnav .nav-count{background:var(--crm-soft);color:var(--crm-text);min-width:22px;height:20px;margin-left:1px}
body.crm-top-navigation{--table-sticky-top:0px}
body.crm-top-navigation .crm-layout{padding:16px 28px 32px}
body.crm-top-navigation.crm-module{padding:0!important;margin:0}
@media(max-width:900px){body.crm-top-navigation #crm-header{padding:0 14px;gap:10px}#crm-header .crm-brand{flex-basis:115px;width:115px}#crm-header .crm-brand img{width:115px}#crm-workspaces .crm-workspace{min-width:76px;padding:9px 10px}body.crm-top-navigation #crm-header .crm-user{display:none}}
@media(max-width:600px){body.crm-top-navigation{--table-sticky-top:0px}body.crm-top-navigation #crm-header{height:auto;min-height:64px;flex-wrap:nowrap;padding:0 12px;gap:8px;align-items:center}#crm-header .crm-brand{height:auto;margin-right:auto}#crm-header .crm-brand img{width:105px}body.crm-top-navigation .crm-layout,body.crm-top-navigation.crm-module{padding:0 14px 24px!important}}

/* Consistent compact submenus across all native applications. */
#crm-header .crm-brand{flex-direction:column;align-items:flex-start;justify-content:center;margin-right:18px;letter-spacing:0}
#crm-header .crm-brand-tagline{display:block;color:#ff8000;font:10px/1.12 "Segoe UI",Arial,sans-serif;margin-top:3px;white-space:nowrap}
body.crm-top-navigation #crm-sidebar a:hover,body.crm-top-navigation #crm-sidebar button:hover{background:transparent;color:var(--crm-muted)}
body.crm-top-navigation #crm-sidebar .active:hover{color:var(--crm-text)}
body.crm-top-navigation #crm-sidebar a:hover .crm-subnav-label,body.crm-top-navigation #crm-sidebar button:hover .crm-subnav-label{color:#ffb56b}
body.crm-top-navigation #crm-sidebar .crm-subnav-icon{display:block;width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin:0;vertical-align:middle}
body.crm-top-navigation #crm-sidebar .crm-subnav-label{display:block;flex:0 0 auto;line-height:18px;margin:0;padding:0}
body.crm-top-navigation[data-module=managers] .delivery-content,body.crm-top-navigation[data-module=agents] .delivery-content{margin-left:0!important;margin-right:auto!important;padding-left:0;justify-self:start;width:100%}
body.crm-top-navigation #deliveryForm{margin-left:0!important;margin-right:auto!important;justify-self:start;width:100%;text-align:left}
@media(max-width:900px){#crm-header .crm-brand{margin-right:10px}#crm-header .crm-brand-tagline{font-size:7px}}
@media(max-width:600px){#crm-header .crm-brand{height:36px;margin-right:auto}#crm-header .crm-brand img{width:92px}#crm-header .crm-brand-tagline{font-size:6px;margin-top:1px}#crm-workspaces{height:66px}}

/* Shared navigation and table refinements, September 2026. */
body.crm-top-navigation #crm-sidebar a:hover .crm-subnav-icon,body.crm-top-navigation #crm-sidebar button:hover .crm-subnav-icon{color:#ffb56b}
body.crm-top-navigation #deliveryForm{margin-left:60px!important;width:calc(100% - 60px);max-width:720px}
body.crm-top-navigation[data-module=montazh] .page{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important;padding:24px 24px 40px!important}
body.crm-top-navigation[data-module=montazh] .page-heading{margin-top:8px;margin-bottom:22px}
body.crm-top-navigation .table-tools{--surface:var(--crm-panel);--surface-muted:var(--crm-soft);--line:var(--crm-border);--ink:var(--crm-text);--muted:var(--crm-muted);--blue:var(--crm-accent);--blue-soft:var(--crm-soft);--blue-strong:var(--crm-accent)}
body.crm-top-navigation .table-tools table{min-width:100%}
body.crm-top-navigation .table-columns>summary{font-size:11px;min-height:28px;padding:4px 7px;width:auto}
body.crm-top-navigation .table-toolbar{padding:6px 10px}
body.crm-top-navigation .table-scroll-arrow{width:52px;height:104px;min-height:104px;font-size:52px;border:0;opacity:.65;box-shadow:none;padding:0;background:color-mix(in srgb,var(--crm-muted) 35%,transparent);color:var(--crm-text)}
body.crm-top-navigation .table-scroll-arrow.left,body.crm-top-navigation .table-scroll-left{left:0;border-radius:0 60px 60px 0}
body.crm-top-navigation .table-scroll-arrow.right,body.crm-top-navigation .table-scroll-right{right:0;border-radius:60px 0 0 60px}
body.crm-top-navigation .table-scroll-arrow{display:flex;align-items:center;justify-content:center;font-size:0!important;line-height:1;opacity:0!important;pointer-events:none!important;transition:opacity .15s ease}
body.crm-top-navigation .table-scroll-arrow::after{content:"";position:absolute;left:50%;top:50%;width:10px;height:18px;background:currentColor;clip-path:polygon(75% 0,100% 14%,35% 50%,100% 86%,75% 100%,0 50%);transform:translate(-50%,-50%)}
body.crm-top-navigation .table-scroll-right::after,body.crm-top-navigation .table-scroll-arrow.right::after{transform:translate(-50%,-50%) rotate(180deg)}
body.crm-top-navigation .table-scroll-arrow.table-edge-near:not(:disabled),body.crm-top-navigation .table-scroll-arrow:focus-visible:not(:disabled){opacity:.85!important;pointer-events:auto!important}
body.crm-top-navigation .table-scroll-shell:hover>.table-scroll-arrow,body.crm-top-navigation .table-scroll-shell:focus-within>.table-scroll-arrow{opacity:0!important;pointer-events:none!important}
body.crm-top-navigation .table-scroll-shell:hover>.table-scroll-arrow.table-edge-near:not(:disabled),body.crm-top-navigation .table-scroll-shell:focus-within>.table-scroll-arrow.table-edge-near:not(:disabled){opacity:.85!important;pointer-events:auto!important}
body.crm-top-navigation .table-scroll-arrow.table-edge-near:hover:not(:disabled){opacity:1!important}
@media(prefers-reduced-motion:reduce){body.crm-top-navigation .table-scroll-arrow{transition:none}}
body.crm-top-navigation[data-module=workshop] [data-action=columns],body.crm-top-navigation[data-module=workshop] .table-settings-toolbar{display:none}
.wd-form{display:grid;gap:16px}.wd-form fieldset{display:grid;gap:12px;border:1px solid var(--crm-border);border-radius:8px;padding:16px}.wd-form input,.wd-form select,.wd-form textarea{color:var(--crm-text);background:var(--crm-panel)}.wd-table-card{padding:0;overflow:visible}.wd-table-card td{min-width:140px}.wd-table-card td small{display:block}.wd-table-card .crm-table-wrap{max-width:100%}
@media(max-width:700px){body.crm-top-navigation #deliveryForm{margin-left:0!important;width:100%}body.crm-top-navigation .table-scroll-arrow{width:36px;height:72px;min-height:72px;font-size:38px}}

body.crm-top-navigation .dt-table .dt-sort{display:inline-flex!important;border:0;background:transparent;color:inherit;font:inherit;box-shadow:none;padding:3px 0;min-height:0;white-space:normal;text-align:left;align-items:center;gap:4px}

/* Launch workspace shares the portal navigation and table surfaces. */
.launch-deal-nav{position:relative;top:auto;left:auto;right:auto;height:47px;display:flex;gap:24px;align-items:stretch;padding:0 28px;background:var(--crm-panel);border-bottom:1px solid var(--crm-border);overflow-x:auto;z-index:2}
.launch-deal-nav a{display:flex;align-items:center;white-space:nowrap;color:var(--crm-muted);font-size:13px;text-decoration:none}.launch-deal-nav a.active{color:var(--crm-text);box-shadow:inset 0 -3px var(--crm-accent)}
body:has(.launch-deal-nav) .crm-layout{padding-top:16px}.launch-deal-title{font-weight:650;display:block;max-width:280px;min-width:180px;white-space:normal}.launch-deal-meta{color:var(--crm-muted);font-size:12px;line-height:1.6;margin-top:8px}.launch-table td{vertical-align:top;padding:16px 18px}.launch-table th{white-space:nowrap}.launch-table tr:hover td{background:var(--crm-soft)}.launch-filter{max-width:480px;margin-bottom:20px}.launch-sync-status{margin:-8px 0 16px;color:var(--crm-muted);font-size:13px;min-height:1.25em}.launch-filter label{display:grid;gap:8px}.launch-filter input{padding:10px;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-panel);color:var(--crm-text)}
.launch-preview{width:130px;min-height:80px;text-align:center}.launch-preview img{width:120px;height:88px;object-fit:contain;border-radius:6px}.launch-preview>div{display:flex;justify-content:space-between;align-items:center;margin-top:5px}.launch-preview button{border:0;background:var(--crm-soft);color:var(--crm-text);border-radius:5px;width:30px;cursor:pointer}.launch-status{display:inline-block;padding:5px 9px;border-radius:6px;background:var(--crm-soft);white-space:nowrap}
.launch-files{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:24px;margin-top:24px}.launch-file{display:grid;grid-template-columns:170px minmax(0,1fr);gap:18px;padding:16px;border:1px solid var(--crm-border);border-radius:12px}.launch-file strong{overflow-wrap:anywhere}.launch-file-picture>img{width:160px;height:145px;object-fit:contain}.launch-file-icon{display:flex;align-items:center;justify-content:center;width:100px;height:100px;margin:8px auto 20px;border:2px solid var(--crm-border);border-radius:10px;background:var(--crm-soft);font-weight:700;font-size:24px;color:var(--crm-accent)}.launch-file .crm-actions{gap:6px;flex-wrap:nowrap}.launch-file .crm-button{padding:7px;font-size:12px}.launch-file dl{display:grid;grid-template-columns:auto 1fr;gap:8px;font-size:12px}.launch-file dd{margin:0}.launch-file dt{color:var(--crm-muted)}
.launch-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.launch-spec-cards{display:flex;flex-wrap:nowrap;gap:8px;align-items:stretch;margin-bottom:8px;width:100%}
.launch-send-all{margin:16px 0 4px;padding:0}
.launch-spec-card{flex:1 1 0;min-width:0;width:auto;display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--crm-border);border-radius:12px;background:var(--crm-panel)}
@media(max-width:720px){.launch-spec-cards{flex-wrap:wrap}.launch-spec-card{flex:1 1 100%}}.launch-spec-card h3{margin:0;font-size:15px}.launch-spec-card .crm-button{width:100%;margin-top:auto}.launch-drop{display:grid;place-items:center;position:relative;min-height:88px;padding:10px;border:1px dashed var(--crm-border);border-radius:10px;text-align:center;color:var(--crm-muted);font-size:12px;cursor:pointer}.launch-drop input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.launch-drop.is-over{border-color:var(--crm-accent);background:var(--crm-soft)}.launch-upload-bar{display:flex;flex-direction:column;align-items:stretch;gap:6px;height:auto;position:relative;min-width:0}.launch-upload-row{display:flex;align-items:center;gap:8px;min-width:0}.launch-upload-track{flex:1;height:8px;border-radius:99px;background:var(--crm-soft);overflow:hidden;min-width:0}.launch-upload-track i,.launch-upload-bar i{display:block;height:100%;width:0;background:var(--crm-accent)}.launch-upload-bar em{position:static;right:auto;top:auto;font-size:12px;min-width:2.6em;text-align:right;color:var(--crm-muted);font-style:normal;flex:0 0 auto}.launch-upload-note{display:block;font-size:11px;line-height:1.35;color:var(--crm-muted);white-space:normal;overflow-wrap:anywhere;word-break:break-word;max-width:100%}.launch-sent-flag{margin:0;color:#26985c;font-size:12px}.launch-spec-card.is-sent{border-color:#26985c}.launch-assembly-cost{display:grid;gap:6px;padding:8px;border-radius:8px;background:var(--crm-soft);color:var(--crm-muted);font-size:12px}.launch-assembly-cost input{width:100%;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);padding:10px 11px;font:14px "Segoe UI",sans-serif}.launch-spec-grid section{padding:18px;border:1px solid var(--crm-border);border-radius:10px}.launch-check{display:flex!important;align-items:center;gap:8px}.launch-check input{width:auto!important}.launch-notice{border-left:3px solid var(--crm-accent);padding:14px;margin-bottom:20px}.launch-cost-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.launch-recipe{border:1px solid var(--crm-border);border-radius:8px;padding:16px;margin:12px 0;display:grid;gap:12px}.launch-cost-tip{cursor:help;border-bottom:1px dotted var(--crm-muted);position:relative;display:inline-block}.launch-cost-tip>span{display:none}
@media(max-width:600px){.launch-deal-nav{top:auto;padding:0 14px}body:has(.launch-deal-nav) .crm-layout{padding-top:16px}.launch-spec-grid{grid-template-columns:1fr}.launch-files{grid-template-columns:1fr}.launch-file{grid-template-columns:135px minmax(0,1fr)}.launch-file-picture>img{width:130px}.launch-cost-tip:hover>span,.launch-cost-tip:focus>span{max-width:90vw}}

.launch-floating-tip{position:fixed;z-index:10000;max-width:min(600px,90vw);max-height:40vh;overflow:auto;padding:14px;background:var(--crm-panel);color:var(--crm-text);border:1px solid var(--crm-border);border-radius:10px;box-shadow:0 8px 35px #0005;line-height:1.6;pointer-events:none}
.launch-preview .launch-preview-open{width:130px;height:auto;background:none;display:grid;justify-items:center}.launch-lightbox{max-width:100vw;width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:16px;background:#0b1527;color:#fff;border:0;border-radius:0}
.launch-lightbox[open]{display:grid;grid-template-rows:auto 1fr auto;align-items:center;max-height:100dvh}
.launch-lightbox::backdrop{background:#000b}
.launch-lightbox-body{display:grid;grid-template-columns:48px 1fr 48px;align-items:center;justify-items:center;gap:8px;min-height:0;height:100%}
.launch-lightbox img{max-width:min(96vw,100%);max-height:min(calc(100dvh - 120px),100%);width:auto;height:auto;object-fit:contain}
.launch-lightbox>button{justify-self:end}
.launch-lightbox p{text-align:center}.launch-file img{cursor:zoom-in}
.launch-material-search{position:relative}.launch-material-search [role=listbox]{position:absolute;top:100%;left:0;right:0;max-height:240px;overflow:auto;z-index:30;background:var(--crm-panel);border:1px solid var(--crm-border);box-shadow:0 8px 20px #0003}.launch-material-search [role=option]{display:block;width:100%;text-align:left;padding:10px;border:0;background:transparent;color:var(--crm-text);cursor:pointer}.launch-material-search [role=option]:hover,.launch-material-search [role=option]:focus{background:var(--crm-soft)}

.launch-selected-files,.launch-dispatch-files{display:grid;gap:10px;margin:12px 0}.launch-selected-file,.launch-dispatch-file{display:flex;align-items:center;gap:10px;min-width:0}.launch-mini-icon{display:flex;width:42px;height:42px;flex:0 0 42px;align-items:center;justify-content:center;object-fit:contain;border-radius:6px;background:var(--crm-soft);font-size:11px}.launch-selected-file span,.launch-dispatch-file div{overflow-wrap:anywhere}.launch-selected-file small,.launch-dispatch-file small,.launch-dispatch-file div>span{display:block;margin-top:4px}.launch-delivery-sent{color:#26985c}.launch-delivery-error{color:#d85959}.launch-dispatch-report{border-top:1px solid var(--crm-border);padding-top:12px;margin-top:20px}
.launch-workspace .crm-button{transition:background-color .15s,border-color .15s,color .15s,filter .15s}
.launch-workspace .crm-button:not(:disabled):hover{background:color-mix(in srgb,var(--crm-panel) 80%,var(--crm-accent));border-color:var(--crm-accent)}
.launch-workspace .crm-button.primary:not(:disabled):hover{background:#e86e00;border-color:#e86e00}
.launch-workspace .crm-button:not(:disabled):active{filter:brightness(.86)}
.launch-workspace .crm-button.danger-text{color:#b34343}
.launch-workspace .crm-button.danger-text:not(:disabled):hover{background:#ffeded;border-color:#b34343;color:#b34343}
[data-theme=dark] .launch-workspace .crm-button.danger-text{color:#efadb6}
[data-theme=dark] .launch-workspace .crm-button.danger-text:not(:disabled):hover{background:#422a34;border-color:#9e6570;color:#ffd0d6}
.launch-table th,.launch-workspace .crm-table th,.crm-table th,.milling-table th{position:relative;overflow:visible}
.launch-sort-button{border:0!important;background:transparent!important;color:inherit;font:inherit;text-align:left;padding:0 16px 0 0;cursor:pointer;width:100%}
.launch-sort-button:hover{color:var(--crm-accent)}
.launch-column-resize{position:absolute;right:0;top:0;bottom:0;width:9px;height:auto;cursor:col-resize;touch-action:none;z-index:4;background:transparent;border:0}
.launch-column-resize::after{content:"";position:absolute;top:25%;bottom:25%;right:3px;width:1px;background:var(--crm-border,#9aa8ba)}
.launch-column-resize:hover::after,.launch-column-resize:focus-visible::after{background:var(--crm-accent);width:2px}
.launch-table td{overflow-wrap:anywhere}
.directory-card{padding:20px 24px}
.directory-search{display:grid;gap:8px;max-width:420px;margin:0 0 18px;color:var(--crm-muted);font-size:13px;font-weight:600}
.directory-search input{width:100%;min-height:43px;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);padding:11px 12px}
.directory-multi{border:1px solid var(--crm-border);border-radius:8px;padding:12px;margin:0 0 12px;display:grid;gap:8px}
.directory-multi legend{padding:0 6px;font-size:12px;color:var(--crm-muted)}
.directory-multi-row{display:flex;gap:8px;align-items:center}
.directory-multi-row input{flex:1}

.milling-table small{display:block;color:var(--crm-muted);margin-top:4px}
.milling-table tr.overdue td{background:#3a2228}
.milling-table tr.partial-row td{background:#3a3220}
.deadline-overdue{color:#e17889;font-weight:400}
.deadline-today,.deadline-soon{color:#e0a35a;font-weight:400}
.mill-item{display:grid;grid-template-columns:2fr 90px 1fr 90px 160px auto;gap:8px;margin-bottom:10px;align-items:end}
@media(max-width:900px){.mill-item{grid-template-columns:1fr 1fr}}

.milling-wrap{margin-top:18px}
.milling-table td small{display:block;color:var(--crm-muted);margin-top:4px}
.mill-status{display:inline-block;font-size:12px;font-weight:400;border-radius:999px;padding:4px 9px}
.mill-status-WAITING{background:#3a4456;color:#d5deea}
.mill-status-IN_PROGRESS{background:#8a6a12;color:#ffe9a8}
.mill-status-PARTIALLY_COMPLETED{background:#8a6a12;color:#ffe9a8}
.mill-status-COMPLETED{background:#1f6b3a;color:#d8ffe6}
.mill-status-BLOCKED{background:#8a2a32;color:#ffd0d4}
.mill-actions{white-space:nowrap}
.mill-card-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.mill-form{display:grid;gap:10px;margin-top:12px}
.mill-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 16px}
.mill-meta dt{font-size:12px;color:var(--crm-muted)}
.mill-meta dd{margin:4px 0 0;font-weight:600}
.deadline-overdue{color:#e17889;font-weight:400}
.deadline-today,.deadline-soon{color:#e0a35a;font-weight:400}
.mill-status-new{background:#3a4456;color:#d5deea}
.mill-status-working{background:#8a6a12;color:#ffe9a8}
.mill-status-partial{background:#8a6a12;color:#ffe9a8}
.mill-status-received{background:#1f6b3a;color:#d8ffe6}
.mill-status-cancelled{background:#3a4456;color:#9aa6b8}

/* Fit workspace icons on one row without a horizontal scrollbar. */
body.crm-top-navigation #crm-header{overflow:hidden}
body.crm-top-navigation.crm-blocks-open #crm-header,body.crm-blocks-more-open #crm-header{overflow:visible}
body.crm-top-navigation #crm-workspaces{overflow-x:hidden;gap:0;flex:0 0 auto;min-width:0;width:auto;max-width:100%}
body.crm-top-navigation #crm-workspaces .crm-workspace{min-width:72px;flex:0 0 auto;width:auto;max-width:none;padding:6px 10px;gap:3px;font-size:11px;line-height:1.15}
body.crm-top-navigation #crm-workspaces .crm-workspace svg{width:20px;height:20px}
body.crm-top-navigation #crm-workspaces .crm-workspace span{overflow:visible;text-overflow:unset;white-space:nowrap;max-width:none}
@media(max-width:1200px){body.crm-top-navigation #crm-workspaces .crm-workspace{font-size:11px;padding:5px 8px}body.crm-top-navigation #crm-workspaces .crm-workspace svg{width:18px;height:18px}}
.launch-comments{display:grid;gap:12px;margin:0 0 24px}.launch-comment{padding:14px 16px;border:1px solid var(--crm-border);border-radius:10px;background:var(--crm-soft)}.launch-comment p{margin:0 0 8px;white-space:pre-wrap}.launch-comment small{color:var(--crm-muted)}
.crm-module[data-module=agents],.crm-module[data-module=managers],body.crm-top-navigation[data-module=agents],body.crm-top-navigation[data-module=managers]{--bg:var(--crm-bg);--surface:var(--crm-panel);--surface-2:var(--crm-soft);--surface-muted:var(--crm-panel);--ink:var(--crm-text);--muted:var(--crm-muted);--line:var(--crm-border);--accent:var(--crm-accent)}
.crm-module[data-module=agents] .panel,.crm-module[data-module=agents] input,.crm-module[data-module=agents] select,.crm-module[data-module=agents] textarea,.crm-module[data-module=agents] .topbar{background:var(--crm-panel)!important;color:var(--crm-text)!important;border-color:var(--crm-border)!important}
.crm-module[data-module=agents] .panel-title,.crm-module[data-module=agents] td,.crm-module[data-module=agents] th,.crm-module[data-module=managers] .table-viewport thead,.crm-module[data-module=agents] .table-viewport thead{color:var(--crm-text)!important;background:var(--crm-panel)!important}
.crm-module[data-module=agents] .button.primary{background:var(--crm-accent)!important;color:#fff!important}
.crm-module[data-module=agents] .workspace{display:block!important;min-width:0!important}
.crm-module[data-module=agents] .app{max-width:none!important;margin:0!important}
.crm-module[data-module=agents] .content{padding:0!important}
html[data-theme=dark] .table-viewport thead,html[data-theme=dark] .table-toolbar,html[data-theme=dark] .table-column-options{background:var(--crm-panel)!important;color:var(--crm-text)!important;border-color:var(--crm-border)!important}

body[data-module=launch] .crm-table,body[data-module=launch] .launch-table,
body[data-module=milling] .crm-table,body[data-module=printing] .crm-table,body[data-module=bending] .crm-table,
body[data-module=directory] .crm-table,body[data-module=warehouse] .crm-table{
  width:max-content;
  min-width:0;
  max-width:none;
  table-layout:fixed;
}
body[data-module=milling] .table-viewport,body[data-module=printing] .table-viewport,body[data-module=bending] .table-viewport,
body[data-module=milling] .crm-table-wrap,body[data-module=printing] .crm-table-wrap,body[data-module=bending] .crm-table-wrap,
body[data-module=directory] .table-viewport,body[data-module=warehouse] .table-viewport,
body[data-module=directory] .crm-table-wrap,body[data-module=warehouse] .crm-table-wrap{
  overflow:auto!important;
  max-width:100%;
}
.mill-file-list{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}
.mill-action-list{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}
.mill-file-list a.mill-file-link{
  margin:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  min-height:0;
  width:auto;
  color:inherit;
  font-size:12px;
  font-weight:400;
  text-decoration:underline;
  text-decoration-style:dashed;
  text-underline-offset:3px;
}
.mill-file-list a.mill-file-link:hover{color:var(--crm-accent)}
.mill-action-list .crm-button{margin:0;width:auto;align-self:flex-start;min-height:32px;padding:6px 10px;font-size:13px}
td.mill-actions,td.mill-files{vertical-align:top}
td.mill-actions{min-width:140px}
.deal-flag{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-right:5px;color:#d08a18;vertical-align:-2px}
.deal-flag svg{display:block;width:12px;height:12px}
.deal-flag-num{white-space:nowrap}
body[data-module=launch] .table-viewport,body[data-module=launch] .crm-table-wrap,
body[data-module=directory] .table-viewport,body[data-module=directory] .crm-table-wrap,
body[data-module=warehouse] .table-viewport,body[data-module=warehouse] .crm-table-wrap{
  overflow:auto!important;
  max-width:100%;
}
body[data-module=launch] .crm-table td,body[data-module=launch] .crm-table td strong,body[data-module=launch] .crm-table td b,
body[data-module=milling] .crm-table td,body[data-module=milling] .crm-table td strong,
body[data-module=printing] .crm-table td,body[data-module=printing] .crm-table td strong,
body[data-module=bending] .crm-table td,body[data-module=bending] .crm-table td strong,
body[data-module=directory] .crm-table td,body[data-module=directory] .crm-table td strong,
body[data-module=warehouse] .crm-table td,body[data-module=warehouse] .crm-table td strong{
  font-weight:400;
}
body[data-module=launch] .crm-table a,body[data-module=milling] .crm-table a,body[data-module=printing] .crm-table a,body[data-module=bending] .crm-table a,
body[data-module=directory] .crm-table a,body[data-module=warehouse] .crm-table a,
.crm-table .deal-num,.crm-table .deal-b24,.crm-table .b24-num,.launch-deal-title{
  font-size:12px;
  font-weight:400;
}
.launch-deal-title{display:inline;text-decoration:none}
body[data-module=launch] .launch-actions,body[data-module=directory] .launch-actions,body[data-module=warehouse] .launch-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
body[data-module=launch] .launch-actions .crm-button,body[data-module=directory] .launch-actions .crm-button,body[data-module=warehouse] .launch-actions .crm-button{
  margin:0;
  width:auto;
  align-self:flex-start;
  min-height:32px;
  padding:6px 10px;
  font-size:13px;
}
html[data-theme=dark] .launch-column-resize::after{background:#5a6a82}
.order-card-nav{display:flex;gap:18px;flex-wrap:wrap;margin:0 0 18px;border-bottom:1px solid var(--crm-border)}
.order-card-nav a{padding:10px 2px 12px;color:var(--crm-muted);text-decoration:none;font-size:14px}
.order-card-nav a.active{color:var(--crm-text);box-shadow:inset 0 -3px var(--crm-accent)}
.order-card-dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px 20px;margin:0 0 24px}
.order-card-dl dt{font-size:12px;color:var(--crm-muted)}
.order-card-dl dd{margin:4px 0 0;font-weight:600}
.order-card-list{margin:0;padding-left:18px;line-height:1.5}
.order-card-finance{display:grid;gap:22px}
.order-card-files.launch-files{margin-top:0;display:flex;flex-wrap:wrap;gap:14px;grid-template-columns:unset;align-items:flex-start}
.order-card-files .launch-file{width:120px;grid-template-columns:1fr;padding:0;gap:4px;justify-items:center;text-align:center;border:0;background:transparent;box-shadow:none}
.order-card-files .launch-file-picture{width:96px;height:96px;flex:none}
.order-card-files .launch-file-picture>img,.order-card-files .launch-file-icon{width:96px;height:96px;object-fit:cover;margin:0;border-radius:8px;border:1px solid var(--crm-border);aspect-ratio:1/1}
.order-card-files .launch-file-icon{background:var(--crm-soft);display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--crm-accent)}
.order-card-files .launch-file strong,.order-card-files .launch-file p{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.order-card-files .launch-file .crm-button{width:auto;min-height:24px;padding:4px 8px;font-size:11px;margin:0}
.deal-num-wrap{display:inline-flex;align-items:center;white-space:nowrap;gap:0}
.deal-num{text-decoration:none;font-weight:400;color:inherit;white-space:nowrap}
.deal-b24{text-decoration:none;font-weight:400;margin-left:0.35em;white-space:nowrap;font-size:12px}
.b24-num{text-decoration:none;font-weight:400;color:inherit}
#order-card-body h2{margin:18px 0 8px;font-size:17px}
#order-card-body .crm-table-wrap{margin-top:0}
body[data-module=users] .crm-table td{vertical-align:middle}
body[data-module=users] .crm-actions{flex-wrap:nowrap;white-space:nowrap}
@media(max-width:700px){
 .order-card-nav{gap:12px}
 .order-card-dl{grid-template-columns:1fr 1fr}
}

.pr-lines{display:grid;gap:8px;margin:8px 0 4px;overflow:visible}
.pr-line{display:grid;grid-template-columns:minmax(160px,1.6fr) minmax(130px,1fr) 80px 100px 36px;gap:8px;align-items:end;min-width:0}
.pr-line label{display:flex;flex-direction:column;gap:4px;min-width:0;color:var(--crm-muted);font-size:12px}
.pr-line > [data-pr-x]{align-self:start;margin-top:22px;width:36px;height:38px;padding:0}
.pr-line [data-pr-categories] .mf-panel{position:fixed!important;margin-top:0!important;z-index:40}
.pr-line input,.pr-line select{width:100%;min-width:0;min-height:38px;padding:6px 8px;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);font:inherit}
.crm-dialog:not([open]){display:none!important}
.crm-dialog[open]{display:flex;flex-direction:column;max-height:90vh;overflow:hidden;box-sizing:border-box}
.crm-dialog .crm-form{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;padding-right:16px;scrollbar-gutter:stable}
.crm-dialog.crm-dialog-wide{width:80vw;min-width:min(80vw,960px);max-width:80vw;max-height:90vh;overflow:hidden;padding:22px 18px 16px 24px;box-sizing:border-box}
.crm-dialog.crm-dialog-wide .crm-form{display:flex;flex-direction:column;max-height:none;overflow:hidden;gap:12px}
.crm-dialog.crm-dialog-wide .rc-form{flex:1 1 auto;min-height:0;overflow:auto;padding-right:16px;margin-right:2px;scrollbar-gutter:stable}
.crm-dialog .crm-actions{flex:0 0 auto;position:sticky;bottom:0;z-index:3;background:var(--crm-panel);padding:12px 0 2px;margin:0;border-top:1px solid var(--crm-border)}
.crm-dialog .crm-error{flex:0 0 auto}
*{scrollbar-width:thin;scrollbar-color:var(--crm-muted) var(--crm-soft)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:var(--crm-soft);border-radius:8px}
*::-webkit-scrollbar-thumb{background:var(--crm-border);border-radius:8px;border:2px solid var(--crm-soft)}
*::-webkit-scrollbar-thumb:hover{background:var(--crm-muted)}
*::-webkit-scrollbar-corner{background:var(--crm-soft)}
table,.crm-table,.launch-table,.table-viewport table,
table th,table td,table a,table button,table strong,table b,
.crm-table th,.crm-table td,.crm-table a,.crm-table button,.crm-table strong,
.launch-table th,.launch-table td,.launch-deal-title,.kb-table-wrap th,.kb-table-wrap td{
  font-weight:400!important
}
.crm-table a.kb-title-link,.kb-title-link{
  font-weight:700!important;
  font-size:14px!important
}
.kb-title-sub{font-size:11px!important;font-weight:400!important;color:var(--crm-muted);margin-top:2px;line-height:1.3}
.crm-table td.kb-msg-cell,.crm-table td.kb-cmt-cell,.kb-msg-cell,.kb-cmt-cell{font-size:11px!important}
.dir-assign{border:1px solid var(--crm-border);border-radius:10px;padding:10px 12px;margin:0 0 12px;display:grid;gap:6px}
.dir-assign legend{font-weight:600;padding:0 6px}
.dir-assign .check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--crm-text)}
.pr-line label{display:flex;flex-direction:column;gap:4px;min-width:0;color:var(--crm-muted);font-size:12px}
.pr-line input,.pr-line select{width:100%;min-height:38px;padding:6px 8px;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);font:inherit}
button:focus,a:focus,input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.mf-drop>summary:focus-visible{
  outline:none!important;outline-offset:0!important;box-shadow:none!important
}
input:focus,select:focus,textarea:focus,input:focus-visible,select:focus-visible,textarea:focus-visible,.crm-button:focus-visible,.mf-drop>summary:focus-visible,.tbl-ico:focus-visible{
  border-color:var(--crm-accent)!important
}
.kb :focus-visible{outline:none!important;border-color:var(--crm-accent)!important}
.rc-ocr-status{display:flex;align-items:center;gap:10px;margin:0 0 8px;color:var(--crm-muted);font-size:13px}
.rc-ocr-status[hidden]{display:none!important}
.rc-ocr-track{flex:1;height:8px;border-radius:99px;background:var(--crm-soft);overflow:hidden;min-width:80px}
.rc-ocr-track i{display:block;height:100%;width:0;background:var(--crm-accent);transition:width .2s}
.rc-ocr-pct{min-width:3em;font-variant-numeric:tabular-nums}
.rc-lines{display:grid;gap:8px;margin:8px 0;overflow-x:auto}
.rc-line{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(140px,0.9fr) 72px 88px 76px 92px 108px 36px;grid-auto-flow:column;grid-auto-rows:auto;gap:8px;align-items:end;min-width:920px}
.rc-line>*{min-width:0}
.rc-line label{display:flex;flex-direction:column;gap:4px;min-width:0;color:var(--crm-muted);font-size:12px;white-space:nowrap}
.rc-line input,.rc-line select{width:100%;min-width:0;min-height:38px;padding:6px 8px;border:1px solid var(--crm-border);border-radius:7px;background:var(--crm-panel);color:var(--crm-text);font:inherit}
.rc-line input[readonly]{background:var(--crm-soft)}
.receipt-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;margin:0 0 18px}
.receipt-filters.stacked-filters{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:12px}
.receipt-filters.stacked-filters>label{max-width:420px;min-width:220px}
.filter-row{display:flex;flex-wrap:wrap;gap:14px;align-items:end}
.receipt-filters label{display:flex;flex-direction:column;gap:6px;color:var(--crm-muted);font-size:12px;font-weight:500;min-width:160px;text-align:left}
.receipt-filters input[type=search],.receipt-filters input[type=date],.receipt-filters input[type=text],.receipt-filters select{min-height:42px;padding:10px 12px;border:1px solid var(--crm-border);border-radius:8px;background-color:var(--crm-panel);color:var(--crm-text);font:14px "Segoe UI",sans-serif;text-align:left}
.receipt-filters select{
  -webkit-appearance:none !important;
  appearance:none !important;
  min-width:220px;
  padding-right:36px !important;
  background-color:var(--crm-panel);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2317243a' stroke-width='2' stroke-linecap='round' d='M1.5 1.5 6 6 10.5 1.5'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 12px center !important;
  background-size:12px 8px !important;
}
html[data-theme=dark] .receipt-filters select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23e9eff8' stroke-width='2' stroke-linecap='round' d='M1.5 1.5 6 6 10.5 1.5'/%3E%3C/svg%3E") !important;
}
select::-ms-expand{display:none}
.dir-settings{display:grid;grid-template-columns:1fr 1fr;gap:24px 28px;align-items:start}
.dir-settings-field{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0}
.dir-settings-field>span{font-size:15px;font-weight:600;color:var(--crm-text)}
.dir-settings-field>small{color:var(--crm-muted);font-size:12px}
.dir-settings-field textarea{display:block;width:100%;min-height:260px;margin:0;padding:12px 14px;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-panel);color:var(--crm-text);font:14px/1.45 "Segoe UI",sans-serif;resize:vertical}
.dir-settings-save{grid-column:1/-1;margin:0}
@media(max-width:800px){.dir-settings{grid-template-columns:1fr}.crm-dialog.crm-dialog-wide{width:calc(100vw - 24px);max-width:calc(100vw - 24px);min-width:0}}
.launch-actions{display:flex !important;flex-direction:column !important;flex-wrap:nowrap !important;align-items:stretch;gap:8px;width:100%;max-width:168px;white-space:normal}
.crm-table td:has(.launch-actions){white-space:normal;width:1%;vertical-align:top;padding-top:12px;padding-bottom:12px}
body[data-module=directory] .crm-table[data-table-key=materials] .launch-actions{flex-direction:row!important;align-items:flex-start;gap:4px;width:max-content}
body[data-module=directory] .crm-table[data-table-key=materials] td:has(.launch-actions){vertical-align:top;padding-left:2px;padding-right:2px}
.launch-actions .crm-button{width:100%;justify-content:center;margin:0}
.tbl-ico,.crm-table button.tbl-ico,.crm-table .tbl-ico{width:36px !important;min-width:36px !important;max-width:36px !important;height:36px !important;padding:0 !important;border-radius:8px;border:1px solid var(--crm-border);background:var(--crm-panel);color:var(--crm-text);display:inline-flex !important;align-items:center;justify-content:center;cursor:pointer;flex:0 0 36px;float:none !important;margin:0}
.tbl-ico svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tbl-ico-del{color:#d15b4a}
.tbl-ico:hover{border-color:var(--crm-accent)}
.mf-field{display:flex;flex-direction:column;gap:6px;min-width:220px;flex:1 1 240px;max-width:360px;margin:0;text-align:left}
.mf-caption{color:var(--crm-muted);font-size:12px;font-weight:500;text-align:left}
.mf-drop{position:relative;width:100%;min-width:0;max-width:none;flex:none;text-align:left;list-style:none}
.mf-drop>summary{list-style:none;min-height:42px;padding:10px 12px;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-panel);display:flex;align-items:center;justify-content:flex-start;gap:8px;cursor:pointer;color:var(--crm-text);font-size:14px;font-weight:400;text-align:left;position:relative}
.mf-drop>summary::-webkit-details-marker{display:none}
.mf-drop>summary::marker{content:none;display:none}
.mf-drop>summary::before,.mf-drop>summary::after{content:none !important;display:none !important;background:none !important;width:0 !important;height:0 !important}
.mf-caret{width:12px;height:8px;margin-left:auto;flex:0 0 12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;color:var(--crm-muted)}
.mf-drop[open] .mf-caret{transform:rotate(180deg)}
.mf-drop[open]>summary{border-color:var(--crm-accent)}
.mf-value{font-size:14px;line-height:1.3;text-align:left}
.mf-panel{position:absolute;z-index:40;top:calc(100% + 6px);left:0;right:auto;min-width:100%;width:max(100%,280px);max-width:min(440px,92vw);max-height:280px;overflow:auto;background:var(--crm-panel);border:1px solid var(--crm-border);border-radius:10px;padding:6px;box-shadow:0 10px 28px #0004;text-align:left}
.receipt-filters .mf-opt,.mf-panel .mf-opt,label.mf-opt{display:flex !important;flex-direction:row !important;align-items:center !important;justify-content:flex-start !important;gap:10px !important;padding:8px 10px !important;margin:0 !important;min-width:0 !important;max-width:none !important;width:100% !important;font-size:13px !important;font-weight:400 !important;line-height:1.35 !important;color:var(--crm-text) !important;text-align:left !important;white-space:normal !important;cursor:pointer;border-radius:6px;background:transparent}
.mf-opt:hover{background:var(--crm-soft)}
.receipt-filters .mf-opt[hidden],.mf-panel .mf-opt[hidden],.mf-panel [data-mf-no-results][hidden]{display:none!important}
.receipt-filters .mf-drop>summary input[data-mf-search]{display:block;flex:1 1 auto;width:0;min-width:0;min-height:0;padding:0;border:0!important;border-radius:0;background:transparent;color:var(--crm-text);font:14px/1.3 "Segoe UI",sans-serif;outline:none}
.receipt-filters .mf-drop>summary input[data-mf-search]::placeholder{color:var(--crm-text);opacity:1}

.receipt-filters .mf-opt input,.receipt-filters .mf-opt input[type=checkbox],.mf-opt input[type=checkbox]{display:inline-block !important;width:16px !important;height:16px !important;min-width:16px !important;max-width:16px !important;min-height:16px !important;margin:0 !important;padding:0 !important;border:1px solid var(--crm-border) !important;border-radius:3px !important;flex:0 0 16px !important;align-self:center !important;accent-color:var(--crm-accent);appearance:auto !important}
.mf-opt span{display:inline !important;text-align:left !important;flex:1 1 auto;line-height:1.35}
.mf-empty{margin:0;padding:8px;color:var(--crm-muted);font-size:13px}
.stock-total{margin:0 0 12px;color:var(--crm-muted);font-size:14px}
.stock-total strong{color:var(--crm-text);font-weight:600}
.tbl-ico svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tbl-ico-del{color:#d15b4a}
.tbl-ico:hover{border-color:var(--crm-accent)}
.rc-inv-lines{display:grid;gap:12px;margin-top:12px}
.rc-inv-line{display:grid;grid-template-columns:1fr 1fr 140px;gap:8px 12px;align-items:end;padding:10px 0;border-bottom:1px solid var(--crm-border)}
.rc-inv-name{grid-column:1/-1;font-size:14px}
.rc-inv-meta{grid-column:1/-1;color:var(--crm-muted);font-size:12px;margin-top:-6px}



/* knowledge-embed */
.kb{--ink:var(--crm-text);--secondary:var(--crm-muted);--muted:var(--crm-muted);--line:var(--crm-border);--surface:var(--crm-panel);--canvas:var(--crm-bg);--input-line:var(--crm-border);--blue:var(--crm-accent);--blue-soft:var(--crm-soft);--blue-border:#f0b27a;--blue-strong:#ce5e03;--orange:var(--crm-accent);--on-orange:#fff;--orange-ink:#ce5e03;--orange-soft:#fff3e8;--surface-muted:var(--crm-soft);--calendar-yellow-bg:#fff3c4;--calendar-yellow-ink:#5a4a00;max-width:1240px;margin:0 auto;color:var(--ink);font-size:15px}
.kb *{box-sizing:border-box}.kb a{color:inherit;text-decoration:none}.kb h1,.kb h2,.kb h3,.kb p{margin:0}.kb button,.kb select,.kb input{font:inherit}
.kb :focus-visible{outline:2px solid var(--crm-accent);outline-offset:2px}
.kb-tabs{display:flex;gap:28px;border-bottom:1px solid var(--line);margin-bottom:26px}
.kb-tabs a{display:flex;align-items:center;gap:9px;padding:0 0 17px;border-bottom:3px solid transparent;color:var(--secondary);font-weight:600}
.kb-tabs a[aria-current]{border-color:var(--orange);color:var(--ink)}
.kb-hero{padding:36px 40px;background:var(--surface);border:1px solid var(--line);border-radius:18px;position:relative;overflow:hidden}
.kb-hero:before{content:'';position:absolute;top:0;left:0;bottom:0;width:5px;background:var(--orange)}
.kb-eyebrow{font-size:11px;font-weight:750;letter-spacing:1.9px;color:var(--orange-ink);margin-bottom:15px}
.kb-hero h1{font-size:clamp(26px,3vw,40px);line-height:1.16;letter-spacing:-1.2px;font-weight:720}
.kb-hero>p{color:var(--secondary);margin-top:16px;line-height:1.65;max-width:650px}
.kb-search{display:flex;align-items:center;gap:14px;background:var(--canvas);border:1px solid var(--input-line);border-radius:10px;padding:7px 8px 7px 18px;margin:26px 0 12px;max-width:860px}
.kb-search:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px #ee700b33}
.kb-search>svg{flex-shrink:0;color:var(--muted)}
.kb-search input{border:0!important;box-shadow:none!important;outline:0!important;background:transparent;flex:1;width:0;min-width:0;padding:12px 0;color:var(--ink)}
.kb-search button{background:var(--orange);color:var(--on-orange);border:0;border-radius:7px;padding:13px 18px;font-weight:650;display:flex;align-items:center;gap:8px;cursor:pointer}
.kb-suggestions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.kb-suggestions button{background:var(--surface);border:1px solid var(--line);color:var(--secondary);padding:5px 9px;border-radius:6px;cursor:pointer}
.kb-hero-meta{margin-top:25px;color:var(--muted);font-size:12px;line-height:1.8}
.kb-hero-meta span{padding:0 10px}
.kb-filters{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:26px 0;flex-wrap:wrap}
.kb-roles{display:flex;gap:5px;flex-wrap:wrap;border:0;padding:0;margin:0}
.kb-roles legend,.kb-category{color:var(--secondary);font-size:12px;font-weight:600;margin-bottom:9px}
.kb-roles button{border:1px solid var(--line);border-radius:7px;padding:9px 13px;background:var(--surface);font-size:13px;color:var(--secondary);cursor:pointer}
.kb-roles button[aria-pressed=true]{background:var(--blue-soft);border-color:var(--blue-border);color:var(--blue-strong);font-weight:650}
.kb-category{display:grid;gap:7px;margin:0;min-width:210px}
.kb-category select{font-size:13px;border-radius:7px;background:var(--surface);border:1px solid var(--input-line);padding:9px 12px;color:var(--ink)}
.kb-results-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:6px 0 16px}
.kb-results-heading h2,.kb-related>h2{font-size:21px;letter-spacing:-.5px}
.kb-results-heading>span{color:var(--muted);font-size:12px}
.kb-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.kb-card{display:flex;flex-direction:column;gap:13px;padding:23px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0}
.kb-card:hover{border-color:var(--blue-border)}
.kb-card-meta{display:flex;justify-content:space-between;gap:10px;color:var(--blue);font-size:11px;font-weight:600}
.kb-card-meta span{color:var(--muted);font-weight:400}
.kb-card h3{font-size:17px;line-height:1.4}
.kb-card p{color:var(--secondary);font-size:13px;line-height:1.65}
.kb-card-bottom{margin-top:auto;padding-top:7px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px}
.kb mark{background:var(--calendar-yellow-bg);color:var(--calendar-yellow-ink);padding:0 1px;border-radius:2px}
.kb-quick{margin-bottom:30px}
.kb-start-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.kb-start-cards a{display:flex;align-items:flex-start;gap:13px;background:var(--blue-soft);border:1px solid var(--line);border-radius:11px;padding:20px}
.kb-start-number{color:var(--blue);font-size:13px;font-weight:750}
.kb-start-cards h3{font-size:15px}
.kb-start-cards p{color:var(--secondary);font-size:12px;margin-top:8px}
.kb-footer{display:flex;gap:20px;justify-content:space-between;padding:27px 0;margin-top:26px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.kb-empty{text-align:center;background:var(--surface);border:1px dashed var(--input-line);border-radius:12px;padding:50px 22px}
.kb-back{color:var(--blue)!important;display:inline-block;font-size:13px;margin:0 0 22px}
.kb-article-heading{margin-bottom:28px;max-width:950px}
.kb-article-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}
.kb-tag{display:inline-block;background:var(--blue-soft);color:var(--blue-strong);font-size:11px;padding:6px 9px;border-radius:5px}
.kb-article-heading h1{font-size:clamp(26px,3vw,36px);line-height:1.22}
.kb-article-heading>p{font-size:16px;line-height:1.7;color:var(--secondary);margin-top:15px}
.kb-article-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:20px;font-size:12px;color:var(--muted)}
.kb-reading-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:28px;align-items:start}
.kb-article{min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:8px 34px 24px}
.kb-section{padding:26px 0;border-bottom:1px solid var(--line)}
.kb-section h2{font-size:23px;line-height:1.35;margin-bottom:17px;scroll-margin-top:24px}
.kb-section p,.kb-section li{font-size:15px;line-height:1.85;color:var(--secondary)}
.kb-section p+p{margin-top:12px}
.kb-steps{counter-reset:steps;list-style:none;padding:0;margin:20px 0}
.kb-steps li{counter-increment:steps;position:relative;padding-left:43px;margin:0 0 17px}
.kb-steps li:before{content:counter(steps);position:absolute;left:0;top:2px;background:var(--blue-soft);color:var(--blue-strong);width:29px;height:29px;border-radius:8px;display:grid;place-items:center;font-size:13px;font-weight:700}
.kb-bullets{padding-left:21px;margin:16px 0}
.kb-note{background:var(--orange-soft);border-left:3px solid var(--orange);padding:17px 19px;margin:20px 0;border-radius:0 8px 8px 0}
.kb-note strong{font-size:13px;color:var(--orange-ink)}
.kb-note p{font-size:14px;margin-top:5px}
.kb-check{background:var(--surface-muted);border:1px solid var(--line);border-radius:9px;padding:20px;margin:20px 0}
.kb-check h3{font-size:14px}
.kb-check ul{padding-left:21px;margin:12px 0 0}
.kb-table-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:9px;margin:20px 0}
.kb-table-wrap table{width:100%;border-collapse:collapse;font-size:13px}
.kb-table-wrap th{background:var(--surface-muted);color:var(--ink);font-weight:650;text-align:left}
.kb-table-wrap th,.kb-table-wrap td{padding:13px 15px;border-bottom:1px solid var(--line);vertical-align:top}
.kb-figure{margin:24px 0 0}
.kb-image-button{display:block;width:100%;border:1px solid var(--line);border-radius:9px;background:var(--surface-muted);padding:0;overflow:hidden;cursor:zoom-in}
.kb-image-button img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain;object-position:top;background:#f3f5f9}
.kb-image-button>span{display:flex;align-items:center;justify-content:center;gap:7px;padding:10px;font-size:12px;border-top:1px solid var(--line)}
.kb-figure figcaption{font-size:12px;color:var(--muted);margin-top:10px}
.kb-toc{position:sticky;top:24px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px}
.kb-toc h2{font-size:13px;margin-bottom:15px}
.kb-toc nav{display:grid;gap:4px}
.kb-toc button{text-align:left;background:none;border:0;padding:9px 0;color:var(--secondary);font-size:13px;cursor:pointer}
.kb-toc>a{display:block;border-top:1px solid var(--line);padding-top:17px;margin-top:17px;color:var(--blue);font-size:12px}
.kb-article-end{padding-top:24px;color:var(--muted);font-size:12px}
.kb-action{display:inline-flex;align-items:center;gap:8px;border-radius:7px;background:var(--blue);color:#fff!important;padding:13px 17px;font-size:14px;font-weight:650}
.kb-related{margin-top:34px}
.kb-release{display:grid;grid-template-columns:180px minmax(0,1fr);gap:25px;margin:12px 0 28px}
.kb-release-body{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:28px}
.kb-release-links a{color:var(--blue);font-size:13px}
.kb-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.kb-lightbox img{display:block;width:100%;height:auto}
@media(max-width:1200px){.kb-cards,.kb-start-cards{grid-template-columns:1fr 1fr}.kb-reading-layout{grid-template-columns:minmax(0,1fr) 205px}}
@media(max-width:950px){.kb-reading-layout{display:flex;flex-direction:column}.kb-toc{order:-1;position:static}.kb-cards,.kb-start-cards{grid-template-columns:1fr}.kb-hero{padding:28px}.kb-release{grid-template-columns:1fr}}
html[data-theme=dark] .kb{--orange-soft:#3a2a1c;--calendar-yellow-bg:#4a3f12;--calendar-yellow-ink:#ffe9a0}
html[data-theme=dark] .kb-image-button img{background:#1a2433}

.deal-form{display:grid;gap:18px;justify-items:start}
.deal-form .crm-table-wrap{width:40%;min-width:320px}
.deal-sync{width:40%;min-width:320px;margin:0;padding:10px 12px;border:1px solid var(--crm-border);border-radius:11px;background:var(--crm-panel)}
.deal-sync[hidden]{display:none!important}
.deal-sync-bar{height:4px;border-radius:99px;background:var(--crm-soft);overflow:hidden}
.deal-sync-bar i{display:block;height:100%;width:32%;border-radius:99px;background:var(--crm-accent);animation:deal-sync-slide 1.15s ease-in-out infinite}
@keyframes deal-sync-slide{0%{transform:translateX(-140%)}100%{transform:translateX(420%)}}
.deal-sync p{margin:8px 0 0;font-size:12px;color:var(--crm-muted)}
.deal-sheet{width:100%;border-collapse:collapse;background:var(--crm-panel);border:1px solid var(--crm-border);border-radius:11px;overflow:hidden}
.deal-sheet th,.deal-sheet td{border-bottom:1px solid var(--crm-border);padding:8px 12px;font-weight:400;vertical-align:middle}
.deal-sheet th{width:240px;text-align:left;color:var(--crm-muted);background:var(--crm-soft);font-size:12px}
.deal-sheet input,.deal-sheet select,.deal-sheet textarea{width:100%;border:1px solid var(--crm-border);border-radius:7px;background-color:var(--crm-panel);color:var(--crm-text);padding:8px 10px;font:14px "Segoe UI",sans-serif;box-sizing:border-box}
.deal-sheet textarea{min-height:72px;resize:vertical}
div.deal-num{display:flex;gap:8px;align-items:center}
div.deal-num input{flex:1}
.deal-lookup{width:36px;height:36px;border:1px solid var(--crm-border);border-radius:8px;background:var(--crm-panel);color:var(--crm-text);cursor:pointer;display:grid;place-items:center;flex:0 0 36px}
.deal-lookup svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.deal-lookup:hover{border-color:var(--crm-accent);color:var(--crm-accent)}
.deal-drops{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.deal-drop{border:1px dashed var(--crm-border);border-radius:11px;padding:14px;background:var(--crm-panel);min-height:160px}
.deal-drop.over{border-color:var(--crm-accent);background:color-mix(in srgb,var(--crm-accent) 8%,var(--crm-panel))}
.deal-drop h3{margin:0 0 8px;font-size:14px;font-weight:600}
.deal-drop p{margin:0 0 10px;color:var(--crm-muted);font-size:12px}
.deal-drop ul{margin:8px 0 0;padding:0;list-style:none;font-size:12px}
.deal-drop li{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--crm-border)}
.deal-file-ico{width:28px;height:28px;flex:0 0 28px;border-radius:6px;display:grid;place-items:center;font-size:9px;font-weight:700;letter-spacing:.02em;color:#fff;text-transform:uppercase}
.deal-file-ico img{width:28px;height:28px;object-fit:cover;border-radius:6px;display:block}
.deal-file-ico.pdf{background:#c0392b}.deal-file-ico.doc{background:#2a5699}.deal-file-ico.xls{background:#1d6f42}
.deal-file-ico.cdr,.deal-file-ico.ai{background:#ee700b}.deal-file-ico.zip{background:#5d6d7e}.deal-file-ico.file{background:#69778b}
.deal-file-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deal-file-name.is-img{border:0;background:none;padding:0;color:var(--crm-text);cursor:zoom-in;text-align:left;font:inherit}
.deal-file-name.is-img:hover{color:var(--crm-accent)}
.deal-pick{margin-top:4px;display:inline-flex;cursor:pointer}
.deal-file{display:flex;align-items:center;gap:8px}
.deal-file.is-img{cursor:zoom-in}
.deal-fico{width:26px;height:26px;flex:0 0 26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--crm-muted)}
.deal-thumb{width:32px;height:32px;flex:0 0 32px;object-fit:cover;border-radius:6px;border:1px solid var(--crm-border)}
.deal-file span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deal-preview img{display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:8px}
.deal-preview p{text-align:center;color:var(--crm-muted);margin:10px 0 0}
.deal-lightbox img{display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:8px}
.deal-drop button.x{border:0;background:none;color:var(--crm-muted);cursor:pointer;margin-left:auto}
.deal-file{display:flex;align-items:center;gap:8px}
.deal-file.is-img{cursor:zoom-in}
.deal-fico{width:26px;height:26px;flex:0 0 26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--crm-accent)}
.deal-thumb{width:32px;height:32px;flex:0 0 32px;object-fit:cover;border-radius:6px;border:1px solid var(--crm-border)}
.deal-preview img{display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:8px}
.deal-preview p{text-align:center;color:var(--crm-muted);margin:10px 0 0}
.deal-pick{display:inline-flex;align-items:center;cursor:pointer}
@media(max-width:900px){.deal-drops{grid-template-columns:1fr}.deal-sheet th{width:140px}}

/* knowledge-embed: styles in /knowledge.css */

/* one chevron on the right — never tile */
select{
  -webkit-appearance:none !important;appearance:none !important;
  background-color:var(--crm-panel);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2317243a' stroke-width='2' stroke-linecap='round' d='M1.5 1.5 6 6 10.5 1.5'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 12px center !important;
  background-size:12px 8px !important;
  padding-right:36px !important;
}
html[data-theme=dark] select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239cacc1' stroke-width='1.6' stroke-linecap='round' d='M1.5 1.5 6 6 10.5 1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat !important;
  background-position:right 12px center !important;
  background-size:12px 8px !important;
}
.crm-block-picker select,#crm-sidebar select{
  background-color:#20354e;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23dbe5f4' stroke-width='1.6' stroke-linecap='round' d='M1.5 1.5 6 6 10.5 1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat !important;
  background-position:right 12px center !important;
  background-size:12px 8px !important;
  padding-right:36px !important;
}
.mf-drop>summary,.receipt-filters .mf-drop>summary{
  background-image:none !important;
}
.mf-drop>summary::after,.mf-drop>summary::before,.receipt-filters .mf-drop>summary::after{
  content:none !important;
  display:none !important;
}
.pass-form{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:14px;
  max-width:520px;
}
.pass-form label{
  display:grid !important;
  gap:6px;
  grid-column:1/-1 !important;
  color:var(--crm-muted);
  font-size:12px;
}
.pass-form input{
  width:100% !important;
  min-height:42px !important;
  max-width:none !important;
  padding:10px 12px;
  border:1px solid var(--crm-border);
  border-radius:8px;
  background:var(--crm-panel);
  color:var(--crm-text);
  font:14px "Segoe UI",sans-serif;
}

/* child-deal caption must wrap in every table */
.tree-num{flex-wrap:wrap;white-space:normal !important;max-width:220px}
.tree-id{white-space:nowrap}
.tree-count-text,small.tree-count-text,td .tree-count-text,.crm-module .tree-count-text{display:block !important;flex:1 0 100% !important;white-space:normal !important;overflow-wrap:anywhere !important;line-height:1.35;max-width:180px}
td:has(.tree-num),td:has(.tree-count-text){white-space:normal !important}

/* Chrome scrolls with the page. Only the table header pins. */
body.crm-top-navigation{--table-sticky-top:0px}
body.crm-top-navigation #crm-header{
  position:relative !important;left:auto !important;right:auto !important;top:auto !important;
  width:100%;height:88px;z-index:20;background:#13233a;
}
body.crm-top-navigation #crm-sidebar{
  position:relative !important;inset:auto !important;top:auto !important;left:auto !important;right:auto !important;
  width:100% !important;height:49px;z-index:19;background:var(--crm-panel);
}
body.crm-top-navigation .crm-layout{padding:16px 28px 32px !important}
body.crm-top-navigation.crm-module{padding:0 !important}
@media(max-width:600px){
  body.crm-top-navigation #crm-header{height:auto;min-height:64px;flex-wrap:nowrap}
  body.crm-top-navigation .crm-layout{padding-top:12px !important}
}
.crm-table-wrap,.kb-table-wrap,.delivery-table-wrap,.registry-sheet-viewport,.orders-panel .table-wrap,.table-frame>.table-viewport{
  overflow-x:auto !important;overflow-y:hidden !important;max-height:none !important;max-width:100%;
}
body.crm-module .orders-panel,body.crm-module .panel.orders-panel,body.crm-module .table-tools{
  overflow:hidden;
}
.crm-table,.orders-panel table,.table-viewport table{border-collapse:separate;border-spacing:0}
.crm-table thead th,.table-viewport thead th,.orders-panel thead th{
  position:sticky;top:0;z-index:4;
  background:var(--crm-soft,var(--soft,#edf2f8));
}
.orders-panel .order-actions,.orders-panel td.order-actions,.orders-panel th:last-child{
  position:static !important;box-shadow:none !important;right:auto !important;
}
.crm-workspaces-row{display:flex;align-items:center;justify-content:space-between;flex:1 1 auto;min-width:0;gap:12px;align-self:stretch}
.crm-workspaces-row #crm-workspaces{flex:0 0 auto!important;width:max-content;max-width:100%;overflow:hidden}
.crm-blocks-more{position:relative;display:flex;align-items:center;flex:0 0 auto;align-self:center;margin:0 0 0 auto}
#crm-blocks-menu.crm-blocks-burger{display:inline-flex;box-sizing:border-box;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;padding:0;margin:0;float:none;position:static;border:1px solid #3d5674;border-radius:8px;background:#223b56;color:#eef4ff;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;gap:4px;box-shadow:none}
#crm-blocks-menu[hidden],#crm-blocks-popup[hidden],#crm-blocks-overlay[hidden]{display:none!important}
#crm-blocks-menu span{display:block;width:16px;height:2px;min-height:2px;border-radius:1px;background:currentColor}
#crm-blocks-menu[aria-expanded=true]{background:#2c4a6a;border-color:#f58220}
body.crm-top-navigation.crm-blocks-more-open #crm-header{z-index:1002}
#crm-blocks-popup{position:fixed;inset:auto;z-index:1001;display:flex;flex-direction:column;box-sizing:border-box;min-width:0;margin:0;padding:6px;overflow:auto;overscroll-behavior:contain;background:var(--crm-panel,#1b2b3e);color:var(--crm-text,#e8eef8);border:1px solid var(--crm-border,#3d5674);border-radius:10px;box-shadow:0 14px 36px #0006;text-align:left}
#crm-blocks-popup .crm-blocks-item{position:static;float:none;display:flex;align-items:center;justify-content:flex-start;flex-direction:row;flex:0 0 auto;gap:10px;box-sizing:border-box;width:100%;min-width:0;max-width:none;min-height:44px;height:auto;margin:0;padding:10px 12px;border:0;border-radius:6px;background:transparent;color:inherit;text-decoration:none;text-transform:none;font:14px/1.3 "Segoe UI",Arial,sans-serif;text-align:left;cursor:pointer;box-shadow:none}
#crm-blocks-popup .crm-blocks-item:hover,#crm-blocks-popup .crm-blocks-item:focus-visible{background:var(--crm-soft,#253348)}
#crm-blocks-popup .crm-blocks-item.active{color:var(--crm-accent,#ee700b)}
#crm-blocks-popup .crm-blocks-item svg{position:static;display:block;width:20px;height:20px;flex:0 0 20px;margin:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#crm-blocks-popup .crm-blocks-item span{display:block;min-width:0;white-space:normal;overflow-wrap:anywhere}
#crm-workspaces .crm-workspace[data-overflow]{display:none}
#crm-blocks-overlay{position:fixed;inset:0;z-index:1000;background:transparent}
@media(max-width:900px){
  body.crm-top-navigation .crm-workspaces-row #crm-workspaces{display:none}
  body.crm-top-navigation #crm-header .crm-user{display:none}
  #crm-blocks-overlay{background:#0b152744}
}
@media(max-width:600px){#crm-header .crm-brand-tagline{display:none}}
/* The chat workspace must keep the shared CRM navigation reachable too. */
body.crm-top-navigation[data-module=luna] #crm-header{display:flex!important}
body.crm-top-navigation[data-module=luna].crm-settings-open #crm-sidebar{display:block!important}
body.crm-top-navigation[data-module=luna]{--crm-settings-height:0px}
body.crm-top-navigation[data-module=luna].crm-settings-open{--crm-settings-height:49px}
body.crm-top-navigation[data-module=luna] .luna-shell{top:calc(var(--luna-top,88px) + var(--crm-settings-height))}
@media(max-width:760px){body.crm-top-navigation[data-module=luna] .luna-shell{top:calc(var(--luna-mobile-top,0px) + var(--luna-top,64px) + var(--crm-settings-height));height:calc(var(--luna-mobile-height,100dvh) - var(--luna-top,64px) - var(--crm-settings-height))}}

#crm-scroll-top{
  position:fixed;right:22px;bottom:22px;z-index:90;
  width:44px;height:44px;padding:0;border:0;border-radius:50%;
  background:#ee700b;color:#fff;box-shadow:0 8px 22px #0005;cursor:pointer;
  display:grid;place-items:center;
}
#crm-scroll-top[hidden]{display:none!important}
#crm-scroll-top svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

dialog{overflow:auto;scrollbar-gutter:stable}
dialog[open] .dialog-body{padding-right:16px}
.crm-pop-close{
  position:absolute;top:14px;right:14px;z-index:50;float:none;
  display:grid;place-items:center;box-sizing:border-box;flex:none;
  width:40px;height:40px;min-width:40px;min-height:40px;max-width:40px;max-height:40px;aspect-ratio:1;
  margin:0;padding:0;border:1px solid var(--crm-border,#3d5674);border-radius:10px;
  background:color-mix(in srgb,var(--crm-panel,#223b56) 88%,#000);color:var(--crm-text,#eef4ff);opacity:.9;cursor:pointer;
}
.crm-pop-close svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.crm-pop-close:hover{opacity:1;border-color:var(--crm-accent,#ee700b);background:color-mix(in srgb,var(--crm-panel,#223b56) 70%,#000)}

body.crm-module .table-scroll-shell>.table-wrap,body.crm-module .table-scroll-shell>.gantt-scroll{
  max-height:none !important;overflow-x:auto !important;overflow-y:hidden !important;
}
body.crm-top-navigation .table-scroll-shell:hover>.table-scroll-arrow,
body.crm-top-navigation .table-scroll-shell:focus-within>.table-scroll-arrow{
  opacity:0 !important;pointer-events:none !important;
}
body.crm-top-navigation .table-scroll-arrow.table-edge-near:not(:disabled):not([hidden]){
  opacity:.9 !important;pointer-events:auto !important;
}


/* dialog-head-gap */
dialog .dialog-head{padding:18px 18px 16px 24px;gap:16px}
dialog .dialog-head h2{padding:10px 12px 4px 0;margin:0}
.crm-dialog h2{padding-right:56px;padding-top:4px}
#crm-header .crm-user{cursor:pointer;user-select:none}
#crm-header .crm-user:hover{opacity:.85}
.deal-mail-item{border:1px solid var(--crm-border,#3d5674);border-radius:12px;padding:12px 14px;margin:0 0 12px;background:color-mix(in srgb,var(--crm-panel,#223b56) 80%,#000)}
.deal-mail-item.is-out{border-color:var(--crm-accent,#ee700b)}
.deal-mail-body{white-space:pre-wrap;font:13px/1.45 inherit;margin:8px 0}
.crm-mail-acc{border:1px solid var(--crm-border);border-radius:12px;padding:14px;margin:0 0 14px}

.deal-num-wrap{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:normal;max-width:100%}
.deal-num-row{display:inline-flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:4px;white-space:nowrap}
a.deal-num{display:inline;white-space:nowrap}
.deal-sub-type,.orders-panel .deal-sub-type,.child-type{display:block;padding-left:18px;margin:0;font-size:11px;line-height:1.3;font-weight:400!important;color:var(--crm-muted,#9cacc1)}
body.crm-top-navigation #crm-subnav button.active,body.crm-top-navigation #crm-sidebar #crm-subnav button.active{box-shadow:inset 0 -3px var(--crm-accent)!important;color:var(--crm-text)!important}

:is(#deal-drawer,#launch-drawer-underlay){position:fixed;inset:0;z-index:1200;background:#0b152799;display:flex;justify-content:flex-start}
.deal-drawer-panel{width:90vw;max-width:90%;height:100%;background:var(--crm-bg,#0f1c2e);color:var(--crm-text,#eef4ff);box-shadow:16px 0 48px #0007;display:flex;flex-direction:column;animation:deal-slide .22s ease;position:relative}
@keyframes deal-slide{from{transform:translateX(-24px);opacity:.6}to{transform:none;opacity:1}}
.deal-drawer-head{display:flex;align-items:flex-start;gap:16px;padding:16px 20px 12px;border-bottom:1px solid var(--crm-border,#3d5674);background:var(--crm-panel,#223b56)}
.deal-drawer-titles{flex:1;min-width:0;display:flex;flex-direction:row;align-items:flex-start;gap:14px;padding-right:12px}
.deal-head-media{flex:0 0 72px;width:72px;height:72px;border-radius:10px;overflow:hidden;background:var(--crm-soft,#1c2941);border:1px solid var(--crm-border,#3d5674)}
.deal-head-media img{width:100%;height:100%;object-fit:cover}
.deal-head-ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:11px;color:var(--crm-muted)}
.deal-head-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.deal-head-line1{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.deal-head-line1 strong{font-size:20px;font-weight:700;white-space:nowrap}
.deal-head-title{font-size:16px;line-height:1.35;white-space:normal}
.deal-head-badges{display:flex;flex-wrap:wrap;gap:6px}
.st-badge,.deal-badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:600;line-height:1.3;border:1px solid transparent;white-space:nowrap}
.st-muted,.st-gray,.st-slate{background:#3d4a5c;color:#d5deea;border-color:#5a6a82}
.st-sky{background:#1e3a5f;color:#9ec5ff;border-color:#3d6ea8}
.st-cyan{background:#16464c;color:#8fe3e8;border-color:#2a7a80}
.st-indigo{background:#2a2f6b;color:#c5c9ff;border-color:#4c54b0}
.st-violet,.st-purple,.st-grape{background:#3a2a5c;color:#d4b8ff;border-color:#6b4aa8}
.st-teal,.st-sea{background:#164a42;color:#7ee0c8;border-color:#2d8f7a}
.st-blue,.st-navy{background:#1a3f73;color:#9ec5ff;border-color:#3d6ea8}
.st-amber,.st-gold,.st-yellow{background:#4a3a12;color:#f5d67a;border-color:#8a6b20}
.st-orange,.st-deep-orange{background:#4a2a10;color:#ffb068;border-color:#c45b00}
.st-green,.st-emerald{background:#1c4a2e;color:#8fdfb0;border-color:#2f8a52}
.st-pink,.st-magenta{background:#4a1e3a;color:#f5a8d0;border-color:#a84a80}
.st-brown,.st-rust,.st-copper{background:#4a2e1c;color:#e8b48a;border-color:#8a5630}
.st-steel{background:#2c3a4a;color:#b8c9dc;border-color:#4a6278}
.st-fix{background:#3a2f1c;color:#f3c27a;border-color:#6d5630}
.st-red{background:#5c1c24;color:#ffb0b8;border-color:#c45a66}
.deal-badge-fixing{background:#3a2f1c;color:#f3c27a;border-color:#6d5630}
.deal-head-deadline{font-size:13px;color:var(--crm-muted,#9cacc1)}
.deal-tab-count{display:inline-flex;min-width:22px;height:20px;padding:0 6px;margin-left:6px;border-radius:11px;align-items:center;justify-content:center;font-size:11px;font-weight:700;background:var(--crm-soft,#344b67);color:var(--crm-text,#eef4ff);vertical-align:middle}
.deal-info-actions{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;margin:14px 0 8px}
.deal-info-actions .crm-button{width:auto;min-height:36px;padding:8px 14px;flex:0 0 auto}
.deal-info-actions .crm-button:not(.primary){background:transparent;color:var(--crm-text);border:1px solid var(--crm-border,#3d5674)}
.deal-info-actions .crm-button:not(.primary):hover{border-color:var(--crm-accent,#ee700b);background:color-mix(in srgb,var(--crm-accent,#ee700b) 14%,transparent)}
.deal-info-actions .crm-button:not(.primary):active{transform:translateY(1px);border-color:var(--crm-accent,#ee700b)}
.deal-info-actions .crm-button.primary:hover{filter:brightness(1.08);background:#f58220;border-color:#f58220}
.deal-card-form .crm-table-wrap,.deal-sheet{width:min(920px,100%)}
.deal-sheet th{width:42%}
.deal-sheet td{width:58%}
.deal-comment-form{max-width:50%}
.deal-comment-form .deal-pick{width:50%;max-width:100%}
.deal-comment-form .deal-comment-send{width:25%;min-width:120px}
.deal-file-ico{display:inline-flex;width:72px;height:72px;margin:0 4px 0 0;border:1px solid var(--crm-border);border-radius:8px;overflow:hidden;align-items:center;justify-content:center;font-size:11px;text-decoration:none;color:inherit;vertical-align:middle}
.deal-file-ico img{width:100%;height:100%;object-fit:cover}
.deal-mini-form{border:1px solid var(--crm-border);border-radius:12px;padding:14px;margin:0 0 16px;background:var(--crm-panel);display:grid;gap:10px;max-width:520px}
.deal-drawer-head .crm-pop-close{float:none;margin:0;position:static}
.deal-drawer-tabs{display:flex;gap:4px;padding:0 16px;border-bottom:1px solid var(--crm-border,#3d5674);background:var(--crm-panel,#223b56);flex-wrap:wrap}
.deal-drawer-tabs button,.deal-drawer-tabs a{appearance:none;border:0;background:none;color:var(--crm-muted,#9cacc1);padding:12px 16px;cursor:pointer;font:600 13px "Segoe UI",sans-serif;border-bottom:3px solid transparent;text-decoration:none}
.deal-drawer-tabs button.active,.deal-drawer-tabs a.active{color:var(--crm-text,#eef4ff);border-bottom-color:var(--crm-accent,#ee700b)}
.deal-related-tabs{display:flex;flex-wrap:wrap;gap:0;margin:0 0 14px;border-bottom:1px solid var(--crm-border,#3d5674)}
.deal-related-tabs button{appearance:none;border:0;background:none;color:var(--crm-muted,#9cacc1);padding:10px 14px;cursor:pointer;font:600 13px "Segoe UI",sans-serif;border-bottom:3px solid transparent}
.deal-related-tabs button.active{color:var(--crm-text,#eef4ff);border-bottom-color:var(--crm-accent,#ee700b)}
:is(#deal-drawer,#launch-drawer-underlay).is-launch{z-index:40}
.deal-drawer-head .crm-actions{flex-wrap:wrap;gap:8px}
.deal-drawer-body{flex:1;overflow:auto;padding:20px 24px 40px;min-width:0}
.deal-drawer-work{flex:1;min-height:0;display:flex;align-items:stretch;gap:22px;padding:18px 20px 24px}
.deal-feed{flex:0 1 36%;width:36%;max-width:40%;min-width:260px;border:1px solid var(--crm-border,#3d5674);border-radius:12px;background:var(--crm-soft,#1b2738);display:flex;flex-direction:column;overflow:hidden}
.deal-feed-resizer{flex:0 0 8px;width:8px;cursor:ew-resize;align-self:stretch;border-radius:4px;background:transparent}
.deal-feed-resizer:hover,.deal-feed-resizer:active{background:#ee700b66}
.deal-msg-acts{display:none;gap:8px;padding:2px 4px}
.deal-msg:hover .deal-msg-acts{display:flex;flex-wrap:wrap}
.deal-msg-acts button{border:0;background:none;color:#8fa4b8;cursor:pointer;font-size:11px;padding:0}
.deal-msg-acts button:hover{color:#ee700b}
.deal-reply-quote{border-left:3px solid #ee700b;padding:4px 8px;margin:0 0 6px;background:#ffffff10;border-radius:0 6px 6px 0;font-size:12px;display:grid;gap:2px}
.deal-edited{color:#8fa4b8;font-size:11px;margin-left:6px}
.tg-reply-bar{padding:6px 12px;background:#17212b;font-size:12px;color:#c5d0dc;display:flex;justify-content:space-between;gap:8px}
.deal-msg.is-deleted .deal-msg-bubble{opacity:.6;font-style:italic}
.deal-drawer-body{flex:1 1 54%;overflow:auto;padding:0;min-width:0}
.deal-feed[hidden]{display:none!important}
.deal-feed-tabs{display:flex;border-bottom:1px solid var(--crm-border,#3d5674)}
.deal-feed-tabs button{flex:1;appearance:none;border:0;background:none;color:var(--crm-muted,#9cacc1);padding:12px 10px;cursor:pointer;font:600 13px "Segoe UI",sans-serif;border-bottom:3px solid transparent}
.deal-feed-tabs button.active{color:#ee700b;border-bottom-color:#ee700b}
.deal-feed-body{flex:1;overflow:hidden;padding:0;display:flex;flex-direction:column;min-height:0}
.deal-works .deal-block{margin:0 0 18px}
.deal-work-form{margin-top:12px}
.deal-work-form .crm-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.deal-work-form .crm-fields label{display:grid;gap:4px;font-size:12px;color:var(--crm-muted)}
.deal-work-form .crm-fields .wide{grid-column:1/-1}
.deal-comment-files{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
@media(max-width:900px){.deal-drawer-work{flex-direction:column}.deal-feed{flex:0 0 auto;width:100%;max-height:42vh;border-left:0;border-top:1px solid var(--crm-border,#3d5674)}}
.deal-card-form .crm-table-wrap{width:100%}
.deal-block{margin:22px 0;padding:16px;border:1px solid var(--crm-border);border-radius:12px;background:var(--crm-soft,#1b2738)}
.deal-block h3{margin:0 0 10px;font-size:15px}
.deal-rework-card{border:1px solid var(--crm-border,#3d5674);border-radius:12px;padding:14px 16px;margin:0 0 14px;background:var(--crm-panel,#223b56)}
.deal-rework-card header{display:flex;gap:10px;align-items:baseline;margin-bottom:8px}
.deal-comment{border-bottom:1px solid var(--crm-border,#3d5674);padding:12px 0}
.deal-comments.tg-chat{display:flex;flex-direction:column;gap:10px;flex:1;overflow:auto;max-width:none;padding:12px 14px 8px;min-height:0;align-items:stretch}
.deal-msg{display:block;max-width:min(85%,440px);width:auto;margin:0}
.deal-msg.is-me{margin-left:auto}
.deal-msg-meta{display:block;font-size:12px;padding:0 6px 2px}
.deal-msg-bubble{display:block;box-sizing:border-box;background:#182533;border:0;border-radius:14px 14px 14px 4px;padding:8px 44px 6px 12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;word-break:normal;position:relative;color:#e8eef5;box-shadow:0 1px 2px #0004;width:max-content;max-width:100%;min-width:0;writing-mode:horizontal-tb;text-orientation:mixed;direction:ltr}
.deal-msg.is-me .deal-msg-bubble{background:#2b5278;border-radius:14px 14px 4px 14px;margin-left:auto}
.deal-msg-text{display:inline;writing-mode:horizontal-tb;word-break:normal;overflow-wrap:anywhere}
.deal-msg-bubble time{position:static;display:block;text-align:right;font-size:11px;color:#8fa4b8;margin:4px 0 0;white-space:nowrap;float:none}
.deal-comment-form.tg-compose{display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex:0 0 auto;margin:0;max-width:none;min-height:52px;background:#17212b;padding:8px 10px;border-radius:0 0 12px 12px}
#deal-msg-form[data-disabled]{opacity:.55;pointer-events:none}
.deal-comment-form.tg-compose .deal-ce{flex:1 1 auto;min-height:32px;max-height:64px;padding:6px 12px;border:0;border-radius:16px;background:#242f3d;overflow:auto}
.tg-attach{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;cursor:pointer;font-size:16px}
.tg-send{flex:0 0 32px;width:32px;height:32px;min-width:32px;padding:0;border:0;border-radius:50%;background:#ee700b;color:#fff;cursor:pointer;font-size:14px;line-height:1}
.deal-comment-form.tg-compose #deal-comment-list,.deal-comment-form.tg-compose #deal-comment-err{flex:1 0 100%;margin:0}
.deal-pop{position:absolute;inset:0;z-index:20;background:#0b152799;display:flex;align-items:center;justify-content:center;padding:24px}
.deal-pop-card{width:min(640px,100%);max-height:90%;overflow:auto;background:var(--crm-panel,#223b56);border:1px solid var(--crm-border);border-radius:12px;padding:20px}
.deal-drops-1{grid-template-columns:1fr;max-width:420px}
.deal-work-bar{margin:0 0 16px;flex-wrap:wrap}
.deal-comment header{display:flex;gap:10px;align-items:baseline}
.deal-comment time{color:var(--crm-muted,#9cacc1);font-size:12px}
.deal-comment-body{margin:6px 0}
.deal-comment-form{margin-top:18px;display:grid;gap:10px;max-width:720px}
.deal-comment-form.tg-compose{display:flex;margin:0;max-width:none;gap:8px}
.deal-ce{min-height:88px;border:1px solid var(--crm-border,#3d5674);border-radius:10px;padding:10px 12px;background:var(--crm-panel,#223b56);overflow:auto}
.deal-comment-form.tg-compose .deal-ce{min-height:32px;max-height:56px;padding:6px 12px;border:0}
.deal-feed .deal-comment-form.tg-compose{max-width:none;width:100%;display:flex;flex-wrap:wrap}
.deal-ce-bar{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.deal-ce-bar button{width:32px;height:32px;min-width:32px;padding:0;border:1px solid var(--crm-border,#3d5674);border-radius:8px;background:var(--crm-panel,#223b56);color:var(--crm-text,#eef4ff);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font:700 14px "Segoe UI",sans-serif}
.deal-ce-bar button svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2}
.deal-ce-swatch{padding:0;border:0}
.deal-ce{min-height:88px;border:1px solid var(--crm-border,#3d5674);border-radius:10px;padding:10px 12px;background:var(--crm-panel,#223b56);overflow:auto}
.deal-ce:empty:before{content:attr(data-placeholder);color:var(--crm-muted)}
.deal-drawer-body input[type=number]{-moz-appearance:textfield}
.deal-drawer-body .crm-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.deal-drawer-body .crm-actions .crm-button,#launch-tab .crm-actions .crm-button{min-height:36px;padding:8px 14px;width:auto}
#launch-tab h2{font-size:18px;font-weight:600;margin:0 0 8px}
#launch-tab>p{margin:0 0 14px;color:var(--crm-muted)}
body.deal-drawer-open{overflow:hidden}
@media(max-width:720px){.deal-drawer-panel{width:100%;max-width:100%}}
.launch-tab-actions{margin:0 0 14px}
.crm-button:hover,.kb-tool:hover,.kb-dd-btn:hover,.kb-views button:hover{border-color:var(--crm-accent,#ee700b)}
.crm-button:active,.kb-tool:active,.kb-views button:active{transform:translateY(1px)}
.crm-button.primary:hover{filter:brightness(1.06)}
.crm-button.primary:active{filter:brightness(.92)}
.crm-button:focus-visible,.kb-tool:focus-visible{outline:2px solid var(--crm-accent,#ee700b);outline-offset:2px}
body.crm-top-navigation .page .primary:hover,body.crm-top-navigation .button.primary:hover,body.crm-top-navigation button.primary:hover{filter:brightness(1.06)}
.crm-table th:last-child{overflow:visible}
.deal-file-wrap,.launch-file-picture{position:relative}
.deal-file-del{position:absolute;z-index:2;top:2px;right:4px;width:auto;height:auto;padding:0;border:0;background:none;color:#c5cdd6;cursor:pointer;opacity:0;font:600 16px/1 "Segoe UI",sans-serif;text-shadow:0 1px 2px #000a}
.deal-file-wrap:hover .deal-file-del,.launch-file:hover .deal-file-del{opacity:1}
.deal-file-del:hover{color:#fff}
.order-card-files .launch-file-picture>img[data-preview],.deal-file-ico.is-img,.deal-head-media img[data-preview]{cursor:zoom-in}
.deal-lightbox{position:fixed;inset:0;z-index:6000;background:#0b1527f0;display:grid;place-items:center;padding:56px 64px 24px;cursor:zoom-out}
.deal-lightbox img{display:block;max-width:min(96vw,100%);max-height:min(calc(100dvh - 80px),92vh);width:auto;height:auto;object-fit:contain;margin:0 auto;border-radius:4px;box-shadow:0 8px 40px #0008}
.deal-lightbox .crm-pop-close,.deal-lightbox-x{position:fixed;top:16px;right:20px;float:none;margin:0;z-index:6001}
html:not([data-theme=dark]) .deal-feed{background:var(--crm-panel);border-color:var(--crm-border)}
html:not([data-theme=dark]) .deal-msg-bubble{background:#e8eef5;color:#17243a;box-shadow:none}
html:not([data-theme=dark]) .deal-msg.is-me .deal-msg-bubble{background:#d4e4f7}
html:not([data-theme=dark]) .deal-msg-bubble time,html:not([data-theme=dark]) .deal-msg-acts button{color:var(--crm-muted)}
html:not([data-theme=dark]) .tg-reply-bar{background:var(--crm-soft);color:var(--crm-text)}
html:not([data-theme=dark]) .deal-reply-quote{background:#fff}
html:not([data-theme=dark]) .deal-feed .deal-ce{background:#fff;color:var(--crm-text)}
.deal-file-add.deal-drop{min-height:auto;margin-top:8px;padding:10px;display:flex;align-items:center;gap:10px}
button.deal-num{border:0;background:none;padding:0;color:var(--crm-accent);cursor:pointer;font:inherit;text-align:left}
button.deal-num:hover{text-decoration:underline}
.kb-msg-unread{background:color-mix(in srgb,var(--crm-accent,#ee700b) 18%,transparent);color:var(--crm-text);font-weight:650}
.kb-title-link{font-weight:700;font-size:14px}
.kb-title-sub{font-size:11px;color:var(--crm-muted);font-weight:400;margin-top:2px;line-height:1.3}
.kb-msg-cell,.kb-cmt-cell{font-size:11px;max-width:280px}
.deal-messages{flex:1;min-height:0;display:flex;flex-direction:column}
.deal-msg-list{flex:1;overflow:auto;padding:12px 14px;min-height:0}
.deal-feed .deal-comment-form.tg-compose{
  display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:8px;
  flex:0 0 52px;width:100%!important;max-width:none!important;min-height:52px;height:52px;
  margin:0!important;padding:8px 10px;box-sizing:border-box;
  background:#17212b;border-radius:0 0 12px 12px
}
.deal-feed .deal-comment-form.tg-compose .deal-ce{
  flex:1 1 auto;min-height:36px!important;max-height:36px!important;height:36px;
  padding:6px 12px!important;border:0!important;border-radius:16px;overflow:hidden
}
.deal-feed .tg-attach,.deal-feed .tg-send{flex:0 0 32px}
.deal-feed .tg-compose ul,.deal-feed .tg-compose .crm-error{display:none}
.deal-feed .tg-compose ul:not(:empty),.deal-feed .tg-compose .crm-error:not(:empty){display:block;flex:1 0 100%;height:auto}
.deal-msg-img{display:block;max-width:220px;max-height:180px;border-radius:8px;margin:0 0 6px;object-fit:cover}
.deal-msg-file{display:inline-block;margin:0 0 6px}
.deal-msg-audio{display:block;width:240px;max-width:100%;margin:0 0 6px}
.deal-msg-open{display:block;margin:4px 0 0 0;font-size:12px;color:#60a5fa;text-decoration:underline}
html:not([data-theme=dark]) .deal-comment-form.tg-compose{background:#eef2f7}
html:not([data-theme=dark]) .deal-comment-form.tg-compose .deal-ce{background:#ffffff;color:#1a2433;border:1px solid #cfd8e3}
.deal-head-actions .deal-save-top{height:40px;min-height:40px;box-sizing:border-box;padding:0 18px;white-space:nowrap;display:inline-flex;align-items:center;background:transparent;border:1px solid var(--crm-accent,#ee700b);color:var(--crm-text,#eef4ff);font-weight:600;border-radius:10px}
.deal-head-actions .deal-save-top:hover{background:color-mix(in srgb,var(--crm-accent,#ee700b) 14%,transparent)}
.deal-client-title{margin:14px 0 6px;font-size:15px}
.deal-lightbox{position:fixed;inset:0;z-index:2000;background:rgba(5,10,18,.86);display:flex;align-items:center;justify-content:center;padding:56px 72px}
.deal-lightbox-stage{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}
.deal-lightbox-stage img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:6px;background:#fff}
.deal-lightbox-x{position:absolute;top:14px;right:14px;width:40px;height:40px;border-radius:10px;border:1px solid var(--crm-border,#3d5674);background:var(--crm-panel,#223b56);color:var(--crm-text,#eef4ff);font-size:24px;line-height:1;cursor:pointer}
.deal-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:10px;border:1px solid var(--crm-border,#3d5674);background:var(--crm-panel,#223b56);color:var(--crm-text,#eef4ff);font-size:26px;line-height:1;cursor:pointer}
.deal-lightbox-prev{left:14px}
.deal-lightbox-next{right:14px}
.deal-head-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:8px 20px 10px;margin:0;border-bottom:1px solid var(--crm-border,#3d5674);background:var(--crm-panel,#223b56)}
.deal-inn-wrap{display:flex;gap:6px;align-items:center}
.deal-inn-wrap input{flex:1 1 auto;min-width:0}
.deal-inn-search{flex:0 0 auto;align-self:stretch;width:44px;min-width:44px;height:auto;padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--crm-text,#eef4ff)}
.deal-inn-search svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.call-label{color:#22c55e;font-weight:600}
.dir-party-card{display:grid;gap:12px;margin:0 0 8px}
.dir-party-card dt{font-size:12px;color:var(--crm-muted)}
.dir-party-card dd{margin:2px 0 0}
.deal-site-meta{display:block;box-sizing:border-box;width:100%;margin:8px 0 0;border:1px solid var(--crm-border);border-radius:10px;padding:8px 12px;background:var(--crm-soft)}
.deal-site-meta summary{cursor:pointer;color:var(--crm-muted);font-size:13px}
.deal-site-meta .deal-sheet{margin-top:8px}


.deal-mail-item{border:1px solid var(--crm-border,#3d5674);border-radius:10px;padding:12px 14px;margin:0 0 12px}
.deal-mail-item.is-out{border-color:var(--crm-accent,#ee700b)}
.deal-mail-body{white-space:pre-wrap;font:inherit;margin:8px 0;max-height:240px;overflow:auto}
.crm-mail-acc{border:1px solid var(--crm-border,#3d5674);border-radius:12px;padding:14px;margin:0 0 14px}

.deal-mail{display:flex;min-height:520px;border:1px solid var(--crm-border,#3d5674);border-radius:12px;overflow:hidden;background:var(--crm-panel,#1b2d42)}
.deal-mail-nav{width:200px;flex:0 0 200px;padding:14px 10px;border-right:1px solid var(--crm-border,#3d5674);display:flex;flex-direction:column;gap:6px}
.deal-mail-folder,.deal-mail-row{display:block;width:100%;text-align:left;background:transparent;border:0;color:inherit;cursor:pointer;border-radius:8px;padding:8px 10px}
.deal-mail-folder.active,.deal-mail-row.active{background:color-mix(in srgb,var(--crm-accent,#ee700b) 18%,transparent)}
.deal-mail-folder b{float:right;opacity:.6;font-weight:600}
.deal-mail-list{width:34%;flex:0 0 34%;overflow:auto;border-right:1px solid var(--crm-border,#3d5674)}
.deal-mail-row{border-bottom:1px solid var(--crm-border,#3d5674);border-radius:0}
.deal-mail-row b,.deal-mail-row span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deal-mail-row.unread b{font-weight:700}
.deal-mail-row small{display:block;opacity:.7;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deal-mail-pane{flex:1;min-width:0;padding:16px 18px;overflow:auto}
.deal-mail-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.deal-mail-compose{position:relative}
.deal-mail-compose>.deal-mail-toolbar{padding-right:48px}
.deal-mail-compose>.crm-pop-close{position:absolute;top:0;right:0;float:none;margin:0}
.deal-mail-compose label{display:block;margin:0 0 8px}
.kb-feed-pop .deal-msg-text{white-space:pre-wrap}
.deal-mail-compose textarea{width:100%;min-height:220px}
.deal-mail-empty{padding:48px 16px;text-align:center}

.deal-mail-nav{display:flex;flex-direction:column}
.deal-mail-beget{margin-top:auto;display:block;text-align:center;padding:10px 12px;border:1px solid var(--crm-border,#3d5674);border-radius:10px;color:inherit;text-decoration:none}
.deal-mail-beget:hover{border-color:var(--crm-accent,#ee700b)}

#crm-set-tabs{margin:0 0 16px;padding:0 4px;position:sticky;top:0;z-index:4}
[data-set-pane][hidden]{display:none!important}

/* Compact image viewers. Keep this block identical in the four frontend stylesheets. */
:is(dialog.crm-image-viewer,.deal-lightbox-panel.crm-image-viewer,#ordersDialog:has(.spec-gallery)) {
  --viewer-control:44px; --viewer-gap:8px; --viewer-inset:12px;
  --viewer-media-width:calc(100vw - 156px);
  --viewer-media-height:calc(100dvh - 116px);
  position:relative; inset:auto; box-sizing:border-box;
  width:max-content; min-width:0; max-width:calc(100vw - 24px);
  height:auto; min-height:0; max-height:calc(100dvh - 24px);
  margin:auto; padding:44px var(--viewer-inset); overflow:visible; scrollbar-gutter:auto;
  border:1px solid var(--crm-border,var(--line,#34445b)); border-radius:12px;
  background:var(--crm-panel,var(--surface,#132034)); color:var(--crm-text,var(--ink,#edf3ff));
  box-shadow:0 16px 64px #0008; cursor:default;
}
:is(dialog.crm-image-viewer,#ordersDialog:has(.spec-gallery)) {position:fixed;inset:0;height:max-content}
dialog.crm-image-viewer[open],#ordersDialog:has(.spec-gallery)[open] {display:block}
dialog.crm-image-viewer::backdrop {background:#07111fc9}
.deal-lightbox:has(.crm-image-viewer) {padding:12px;display:grid;place-items:center;z-index:6000;box-sizing:border-box}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-row {
  display:grid;grid-template-columns:var(--viewer-control) auto var(--viewer-control);
  gap:var(--viewer-gap);align-items:center;justify-content:center;justify-items:center;
  width:max-content;height:auto;min-height:0;flex:none;padding:0;margin:0;background:none;
}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-stage {
  grid-column:2;grid-row:1;display:grid;place-items:center;
  width:max-content;max-width:var(--viewer-media-width);height:auto;min-width:0;min-height:0;
  padding:0;margin:0;flex:none;touch-action:pan-y;
}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-media {
  display:block;width:auto;height:auto;max-width:var(--viewer-media-width);max-height:var(--viewer-media-height);
  object-fit:contain;margin:0;border:0;border-radius:4px;box-shadow:none;
}
.crm-image-viewer iframe.crm-image-media {width:min(900px,var(--viewer-media-width));height:min(700px,var(--viewer-media-height))}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) :is(.crm-image-prev,.crm-image-next) {
  position:static;inset:auto;transform:none;grid-row:1;box-sizing:border-box;float:none;
  display:grid;place-items:center;width:var(--viewer-control);min-width:0;max-width:none;
  height:44px;min-height:44px;margin:0;padding:0;border-radius:9px;
  border:1px solid #8193aa66;background:#40536b55;color:inherit;font-size:28px;line-height:1;cursor:pointer;
}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-prev {grid-column:1}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-next {grid-column:3}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) :is(.crm-image-prev,.crm-image-next):disabled {visibility:hidden}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) :is(.crm-image-close,.dialog-head [data-close]) {
  position:absolute;inset:8px 12px auto auto;transform:none;float:none;z-index:5;
  display:grid;place-items:center;box-sizing:border-box;width:32px;min-width:32px;height:32px;min-height:32px;
  margin:0;padding:0;border:1px solid #8193aa66;border-radius:8px;background:#40536b55;color:inherit;line-height:1;font-size:22px;
}
.crm-image-viewer .crm-image-close svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
:is(.crm-image-viewer,#ordersDialog:has(.spec-gallery)) .crm-image-caption {
  position:absolute;inset:auto 12px 10px;display:block;height:22px;box-sizing:border-box;
  padding:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;
  font-size:12px;line-height:22px;color:inherit;background:none;
}
:is(.photo-gallery.crm-image-viewer,#ordersDialog:has(.spec-gallery)) :is(header,.dialog-head) {
  position:absolute;inset:0 0 auto;display:block;height:44px;box-sizing:border-box;padding:0;margin:0;border:0;
}
:is(.photo-gallery.crm-image-viewer,#ordersDialog:has(.spec-gallery)) :is(header span,.dialog-head h2) {
  position:absolute;inset:12px 56px auto 12px;padding:0;margin:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;font-size:13px;line-height:20px;font-weight:500;
}
#ordersDialog:has(.spec-gallery) .dialog-body {padding:0;margin:0}
.photo-gallery.crm-image-viewer footer {
  position:absolute;inset:auto 12px 8px;height:28px;display:flex;align-items:center;justify-content:center;
  padding:0;margin:0;gap:8px;white-space:nowrap;font-size:12px;
}
.photo-gallery.crm-image-viewer footer :is(button,a) {box-sizing:border-box;font-size:12px;height:28px;min-height:0;padding:4px 6px;margin:0;line-height:20px}
.photo-gallery.crm-image-viewer .gallery-error {max-width:var(--viewer-media-width);min-width:min(220px,var(--viewer-media-width));white-space:normal}
.crm-image-viewer .crm-image-media[hidden] {display:none}
/* Single-image previews in upload forms and the knowledge base. */
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) {
  position:fixed;inset:0;width:max-content;min-width:0;max-width:calc(100vw - 24px);height:max-content;
  max-height:calc(100dvh - 24px);box-sizing:border-box;margin:auto;padding:44px 12px;border-radius:12px;scrollbar-gutter:auto;overflow:visible;
}
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) :is(.crm-form,.modal-body,.kb-lightbox,.deal-preview) {display:block;width:auto;min-width:0;padding:0;margin:0;overflow:visible;scrollbar-gutter:auto;flex:none}
dialog :is(.kb-lightbox,.deal-preview) img {display:block;width:auto;height:auto;max-width:calc(100vw - 52px);max-height:calc(100dvh - 116px);margin:0 auto;object-fit:contain}
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) :is(h2,header) {position:absolute;inset:0 0 auto;height:44px;box-sizing:border-box;padding:0;margin:0;border:0}
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) h2 {inset:12px 56px auto 12px;height:22px;font-size:13px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) :is(.crm-pop-close,header [data-close]) {position:absolute;top:8px;right:12px;min-height:32px;width:32px;height:32px;padding:0;margin:0;z-index:2}
dialog:is(.crm-dialog,.modal,dialog):has(:is(.kb-lightbox,.deal-preview)) :is(.crm-actions,.crm-error) {display:none}
dialog :is(.kb-lightbox,.deal-preview) p {position:absolute;inset:auto 12px 10px;height:22px;margin:0;padding:0;font-size:12px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
dialog .kb-lightbox:has(a) p {bottom:26px;height:18px;line-height:18px}
dialog .kb-lightbox>a {position:absolute;inset:auto 12px 6px;height:18px;line-height:18px;font-size:12px;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(max-width:600px) {
  :is(dialog.crm-image-viewer,.deal-lightbox-panel.crm-image-viewer,#ordersDialog:has(.spec-gallery)) {
    --viewer-control:36px;--viewer-gap:4px;--viewer-inset:8px;--viewer-media-width:calc(100vw - 128px);
  }
}
.file-type-icon{display:block;width:100%;height:100%}
.order-card-files .launch-file-icon{padding:12px 16px}
.deal-file-ico:not(.is-img){padding:8px 12px;background:var(--crm-soft)}

/* Card documents: the full filename is the only caption. */
.order-card-files .launch-file{width:200px;max-width:100%;align-content:start}
.order-card-files .launch-file .card-file-name{width:100%;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45;font-size:12px;font-weight:500}
.card-autosave{font-size:12px;color:var(--crm-muted)}
.card-autosave.crm-error{color:#df6058}
[data-autosave-retry][hidden]{display:none!important}

/* Launch file cards: room at drawer edges and files already stored in deal folders. */
:is(#deal-drawer,#launch-drawer-underlay).is-launch #launch-tab {padding:20px 24px 28px;box-sizing:border-box;min-width:0}
:is(#deal-drawer,#launch-drawer-underlay).is-launch .launch-spec-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:12px}
.launch-folder-toolbar {display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:14px 0;color:var(--crm-muted);font-size:13px}
.launch-folder-files {display:grid;gap:10px;min-width:0}
.launch-folder-file {display:grid;grid-template-columns:18px 42px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.launch-folder-file>input {width:16px;height:16px;margin:0}
.launch-spec-card .launch-file-preview {width:42px;height:42px;min-height:0;padding:0;margin:0;border:0;border-radius:6px;overflow:hidden;background:var(--crm-soft);cursor:zoom-in}
.launch-file-preview img {display:block;width:100%;height:100%;object-fit:contain}
.launch-folder-name {min-width:0;overflow-wrap:anywhere;font-size:12px}
.launch-folder-name small,.launch-folder-name a {display:block;font-size:11px;margin-top:3px}
.launch-folder-file.is-missing {color:var(--crm-muted)}
.launch-upload-bar[hidden] {display:none}
@media(max-width:600px){:is(#deal-drawer,#launch-drawer-underlay).is-launch #launch-tab {padding:16px 12px 24px}:is(#deal-drawer,#launch-drawer-underlay).is-launch .launch-spec-cards {grid-template-columns:minmax(0,1fr)}}
/* Card pipeline: full labels, compact chevrons and visible current stages. */
.deal-stages{display:flex;flex:0 0 auto;gap:4px;overflow-x:auto;padding:10px 20px 12px;margin:0;background:var(--crm-panel);border-bottom:1px solid var(--crm-border);scrollbar-width:thin;max-height:140px}
.deal-stage{box-sizing:border-box;flex:1 0 124px;max-width:174px;min-height:52px;display:flex;align-items:center;justify-content:center;padding:8px 18px 8px 12px;background:var(--crm-soft);color:var(--crm-text);border:0;font:600 12px/1.3 "Segoe UI",sans-serif;text-align:center;white-space:normal;overflow-wrap:anywhere;clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%,8px 50%)}
button.deal-stage{cursor:pointer}
button.deal-stage:hover{background:color-mix(in srgb,var(--crm-accent) 25%,var(--crm-soft))}
.deal-stage.is-current{background:var(--crm-accent,#ee700b);color:#fff}
button.deal-stage:focus-visible{outline:0;box-shadow:inset 0 0 0 3px var(--crm-text)}
button.deal-stage:disabled{cursor:wait;opacity:.7}
.deal-card-form{gap:4px;align-content:start}
.deal-card-form .deal-site-meta{margin:0}
.deal-card-form #deal-card-err:empty,.card-autosave:empty{display:none}
.deal-stage-dialog{width:min(560px,calc(100vw - 32px));padding:24px;max-height:calc(100dvh - 32px)}
.deal-stage-dialog .crm-form{gap:18px;padding-right:0;scrollbar-gutter:auto}
.deal-stage-dialog h2{margin:0;font-size:20px;line-height:1.35}
.deal-stage-dialog label{display:grid;gap:7px;margin:0;color:var(--crm-muted);font:13px/1.45 "Segoe UI",sans-serif}
.deal-stage-dialog [data-loss]{display:grid;gap:18px;margin:0}
.deal-stage-dialog textarea{min-height:110px;resize:vertical;line-height:1.5}
.deal-stage-dialog .crm-error:empty{display:none}
.deal-stage-dialog .crm-actions{padding-top:16px}
.deal-stage-dialog>.crm-pop-close{position:absolute;top:16px;right:16px;margin:0;float:none}
.deal-stage-dialog .crm-button.primary{background:var(--crm-accent,#ee700b);border-color:var(--crm-accent,#ee700b);color:#fff}
@media(max-width:600px){.deal-stage-dialog{padding:20px 16px}.deal-stage-dialog h2{font-size:18px}.deal-stage-dialog .crm-actions>.crm-button{flex:1}}
.deal-stage-dialog [data-win]{display:flex;align-items:center}
.deal-stage-dialog [hidden]{display:none!important}
.deal-stage-dialog select,.deal-stage-dialog textarea{box-sizing:border-box;width:100%}
@media(max-width:720px){.deal-stages{padding:8px 12px}.deal-stage{flex-basis:136px}.deal-head-actions{padding-left:12px;padding-right:12px}}

/* Compact card header; preserve the original 72px photo. */
.deal-drawer-head{display:grid;grid-template-columns:minmax(0,1fr) auto 30px;align-items:center;gap:12px;padding:8px 16px}
.deal-drawer-titles{min-width:0;gap:10px;align-items:center;padding-right:0}
.deal-head-copy{display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:4px;flex-direction:row}
.deal-head-line1{flex-basis:100%;min-width:0;gap:8px}
.deal-head-line1 strong{font-size:18px}
.deal-head-title{font-size:15px;line-height:1.25;overflow-wrap:anywhere}
.deal-head-deadline{font-size:11px}
.deal-head-deadline:empty{display:none}
.deal-head-badges .st-badge{font-size:11px;line-height:15px;padding:2px 6px}
.deal-drawer-head .deal-head-actions{justify-content:flex-end;gap:6px;padding:0;margin:0;max-width:50vw;min-width:0;border:0;background:none}
.deal-head-actions .crm-button{width:auto;min-height:30px;height:auto;padding:5px 9px;font-size:12px;line-height:18px;white-space:nowrap}
.deal-drawer-head>.crm-pop-close{width:30px;height:30px;min-height:30px;padding:5px;align-self:start}
.deal-stages{display:flex;flex-wrap:nowrap;gap:3px;overflow:hidden;padding:5px 16px 6px;max-height:none}
.deal-stage{display:block;flex:1 1 0;min-width:0;max-width:none;min-height:30px;height:30px;padding:5px 10px 5px 7px;font-size:11px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
.deal-stage:hover,.deal-stage:focus-visible{flex:0 1 auto;width:max-content;max-width:80%;outline:0;box-shadow:inset 0 0 0 2px var(--crm-accent)}
.deal-drawer-tabs{flex:0 0 auto;gap:2px;padding:0 12px}
.deal-drawer-tabs button,.deal-drawer-tabs a{padding:7px 10px;font-size:12px;border-bottom-width:2px}

@media(max-width:900px){
 .deal-drawer-head{grid-template-columns:minmax(0,1fr) 30px;gap:6px 10px;padding:8px 12px}
 .deal-drawer-titles{grid-column:1;grid-row:1}
 .deal-drawer-head>.crm-pop-close{grid-column:2;grid-row:1}
 .deal-drawer-head .deal-head-actions{grid-column:1/-1;grid-row:2;max-width:none;justify-content:flex-start}
 .deal-drawer-tabs{gap:0;padding:0 8px}
 .deal-drawer-tabs button,.deal-drawer-tabs a{padding:6px 8px;font-size:11px}
}
@media(max-width:600px){.deal-stages{padding:4px 12px;gap:2px}.deal-stage{font-size:10px;padding-left:4px;padding-right:7px}}

/* One vertical scroll for the complete card, including its header. */
.deal-drawer-panel{display:block;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.deal-drawer-head>.crm-pop-close{min-width:30px}
.deal-drawer-work{min-height:420px;align-items:stretch}
.deal-drawer-body{overflow:visible;max-height:none}
.deal-feed{height:auto;max-height:none;min-height:420px}
.deal-feed-body,.deal-comments.tg-chat,.deal-msg-list{overflow:visible;max-height:none}
@media(max-width:900px){.deal-feed{width:100%;max-width:none;min-width:0}.deal-drawer-body{flex:0 0 auto}}

/* Card funnel colors match the table stage column, including parallel stages. */
html[data-theme=light] .deal-stages{--card-tone-muted:#b7c4d4;--card-tone-gray:#b7c4d4;--card-tone-slate:#b7c4d4;--card-tone-sky:#8ec8ff;--card-tone-cyan:#7ee8ee;--card-tone-indigo:#a8b0ff;--card-tone-violet:#d4b4ff;--card-tone-purple:#d4b4ff;--card-tone-grape:#d4b4ff;--card-tone-teal:#7ee8d0;--card-tone-sea:#7ee8d0;--card-tone-blue:#7eb4ff;--card-tone-navy:#7eb4ff;--card-tone-amber:#ffe08a;--card-tone-gold:#ffe08a;--card-tone-yellow:#ffe08a;--card-tone-orange:#ffb06a;--card-tone-deep-orange:#ff8a4a;--card-tone-green:#8aebb0;--card-tone-emerald:#8aebb0;--card-tone-pink:#f8a8d8;--card-tone-magenta:#f8a8d8;--card-tone-brown:#edc09a;--card-tone-rust:#edc09a;--card-tone-copper:#edc09a;--card-tone-steel:#b4c6d8;--card-tone-fix:#f3d08a;--card-tone-red:#ff8a96;}
html[data-theme=dark] .deal-stages{--card-tone-muted:#8a9cb0;--card-tone-gray:#8a9cb0;--card-tone-slate:#8a9cb0;--card-tone-sky:#6eb4ff;--card-tone-cyan:#5ee0ea;--card-tone-indigo:#8b96ff;--card-tone-violet:#c090ff;--card-tone-purple:#c090ff;--card-tone-grape:#c090ff;--card-tone-teal:#5edcc4;--card-tone-sea:#5edcc4;--card-tone-blue:#6aa4ff;--card-tone-navy:#6aa4ff;--card-tone-amber:#f0c85a;--card-tone-gold:#f0c85a;--card-tone-yellow:#f0c85a;--card-tone-orange:#ff9a4a;--card-tone-deep-orange:#ff7a30;--card-tone-green:#5edc90;--card-tone-emerald:#5edc90;--card-tone-pink:#f080c0;--card-tone-magenta:#f080c0;--card-tone-brown:#e0a070;--card-tone-rust:#e0a070;--card-tone-copper:#e0a070;--card-tone-steel:#90a8c0;--card-tone-fix:#e8b85a;--card-tone-red:#f06070;}
.deal-stages{--card-tone-unknown:var(--card-tone-muted);gap:3px}
.deal-stages .deal-stage{position:relative;display:block;flex:1 1 0;box-sizing:border-box;height:36px;min-height:36px;min-width:0;max-width:none;width:auto;padding:7px 16px 7px 18px;line-height:22px;background:var(--crm-soft);color:var(--crm-text);border:0;box-shadow:none;text-align:center;clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%,8px 50%)}
.deal-stage-label{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.deal-stages .deal-stage::after{content:"";position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--stage-tone)}
.deal-stages .deal-stage.is-fill{background:var(--stage-fill);color:#102030}
.deal-stages .deal-stage:hover,.deal-stages .deal-stage:focus-visible{background:var(--stage-tone);color:#102030;filter:none}
.deal-stages .deal-stage:focus-visible{box-shadow:inset 0 0 0 2px var(--crm-text)}
.deal-stages .deal-stage.is-expanded{flex:0 0 var(--stage-expanded-width);width:var(--stage-expanded-width)}
@media(max-width:600px){.deal-stages{gap:1px}.deal-stages .deal-stage{padding-left:8px;padding-right:8px}}

/* Current stages always keep their full names, including parallel stages. */
.deal-stages .deal-stage.is-current{flex:0 0 auto;width:max-content}
@media(max-width:600px){.deal-stages .deal-stage:not(.is-current){padding-left:6px;padding-right:6px}}

html[data-theme=dark] .deal-stages .deal-stage{color:#fff}

/* Keep arrow insets inside the label so collapsed neighbors can yield space. */
.deal-stages .deal-stage{padding-left:0;padding-right:0}
.deal-stage-label{margin-left:18px;margin-right:16px}
.deal-stage-label::after{content:"";display:inline-block;width:2px}
.deal-stages .deal-stage.is-current,.deal-stages .deal-stage.is-expanded{flex:0 0 auto;width:max-content;min-width:max-content;max-width:none}
@media(max-width:600px){.deal-stage-label{margin-left:8px;margin-right:8px}.deal-stage:not(.is-current) .deal-stage-label{margin-left:6px;margin-right:6px}}
@media(max-width:600px){.deal-stages .deal-stage:not(.is-current){padding-left:0;padding-right:0}}

/* Narrow parallel pipelines retain hit areas and reveal full hover names above the row. */
.deal-stages{position:relative}
.deal-stages .deal-stage{clip-path:polygon(0 0,calc(100% - min(9px,20%)) 0,100% 50%,calc(100% - min(9px,20%)) 100%,0 100%,0 50%)}
.deal-stage-placeholder{flex:1 1 0;min-width:0;height:36px}
.deal-stages .deal-stage.is-overlay-expanded{position:absolute;left:var(--stage-overlay-left);top:var(--stage-overlay-top);z-index:2}

/* A single path; the stripe is part of the filled arrow. */
.deal-stages .deal-stage::after{background:var(--stage-tone)}
.deal-stages .deal-stage.is-fill::after{background:var(--stage-fill)}
.deal-stages.is-preview .deal-stage{background:var(--crm-soft);color:var(--crm-text)}
.deal-stages.is-preview .deal-stage::after{background:var(--stage-tone)}
.deal-stages.is-preview .deal-stage.is-preview-fill{background:var(--stage-preview);color:#102030}
.deal-stages.is-preview .deal-stage.is-preview-fill::after{background:var(--stage-preview)}
html[data-theme=dark] .deal-stages.is-preview .deal-stage{color:#fff}

/* Keep the active arrow at the common flex share; grow only for a longer label. */
.deal-stages .deal-stage{font-size:14px}
.deal-stages .deal-stage.is-current{flex:1 0 0;width:auto;min-width:max-content}
@media(max-width:600px){.deal-stages .deal-stage{font-size:13px}}

/* Dedicated CRM deal overview palette, shared by arrows and their path preview. */
.deal-stages{--card-tone-crm-purple:#8b5cf6;--card-ink-crm-purple:#f3f3f3;--card-tone-crm-brown:#8b5e3c;--card-ink-crm-brown:#f3f3f3;--card-tone-crm-lime:#a3d95b;--card-ink-crm-lime:#303030;--card-tone-crm-orange:#c65d0a;--card-ink-crm-orange:#f3f3f3;--card-tone-crm-russet:#943e3e;--card-ink-crm-russet:#f3f3f3;--card-tone-crm-light-red:#ff8a8a;--card-ink-crm-light-red:#303030;--card-tone-crm-red:#dc2626;--card-ink-crm-red:#f3f3f3;--card-tone-crm-dark-green:#166534;--card-ink-crm-dark-green:#f3f3f3;}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-purple"]{color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-brown"]{color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-lime"]{color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-orange"]{color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-russet"]{color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-light-red"]{color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-red"]{color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="crm-dark-green"]{color:#f3f3f3}
.deal-stages.is-preview .deal-stage.is-preview-fill{color:var(--stage-preview-ink,#303030)}

/* Card attachments follow the agent create-deal panels without changing file actions. */
.card-file-panels{align-items:start;margin-top:18px}
.card-file-panel{min-width:0;padding:18px;min-height:180px}
.card-file-panel .deal-pick{display:inline-flex;margin:4px 0 12px}
.card-file-panel-list{margin-top:4px}
.card-file-panel .card-file-empty{padding:8px 0;border-bottom:1px solid var(--crm-border);margin:0}
.card-file-panel .order-card-files{display:grid;grid-template-columns:minmax(0,1fr);gap:0;width:100%}
.card-file-panel .launch-file{display:grid;grid-template-columns:48px minmax(0,1fr);width:100%;max-width:none;gap:6px 12px;align-items:center;justify-items:start;text-align:left;padding:12px 0;border-bottom:1px solid var(--crm-border)}
.card-file-panel .launch-file-picture{grid-row:1 / span 2;width:48px;height:56px}
.card-file-panel .launch-file-picture>img,.card-file-panel .launch-file-icon{width:48px;height:56px;object-fit:contain;border-radius:6px}
.card-file-panel .launch-file-icon{padding:5px}
.card-file-panel .card-file-name{min-width:0;width:100%;overflow-wrap:anywhere;white-space:normal}
.card-file-panel .launch-file>.crm-button{grid-column:2;font-size:12px;min-height:28px}
.card-file-results-title{margin-top:28px}
.card-file-results{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.card-file-panels,.card-file-results{grid-template-columns:1fr}.card-file-panel{padding:16px}}

/* Secondary deadline note; keep primary date and sorting unchanged. */
td .deadline-workdays{display:block;margin-top:4px;font-size:0.82em;line-height:1.35;font-weight:400;color:inherit;opacity:.68;white-space:normal;}

/* Directory bulk selection */
.directory-bulk-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0}.directory-bulk-bar label,.directory-bulk-code{display:flex!important;align-items:center;gap:10px}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]{appearance:none;-webkit-appearance:none;width:15px!important;height:15px!important;min-height:15px;flex:0 0 15px;margin:0;padding:0;position:relative;display:inline-block;vertical-align:middle;background:transparent;border:1px solid var(--crm-border);border-radius:4px;color:var(--crm-text);box-shadow:none;cursor:pointer}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]:hover{border-color:var(--crm-muted)}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]:checked::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]:indeterminate::after{content:"";position:absolute;left:3px;top:6px;width:7px;height:1.5px;background:currentColor}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]:focus-visible{outline:2px solid var(--crm-accent);outline-offset:3px}:is(.directory-bulk-bar,.directory-bulk-code) input[type=checkbox]:disabled{opacity:.45;cursor:default}.directory-bulk-code{justify-content:flex-start;cursor:pointer}.directory-bulk-help{color:var(--muted,#94a3b8);font-size:13px;margin:0}.directory-bulk-bar button:disabled{opacity:.5;cursor:default}

/* Align directory table actions across all sections. */
body[data-module=directory] .crm-table .launch-actions{display:flex;flex-direction:row!important;flex-wrap:nowrap;align-items:flex-start;gap:4px;width:max-content}
body[data-module=directory] .crm-table td:has(.launch-actions){vertical-align:top;padding-left:2px;padding-right:2px}

.deal-head-badges a.deal-status-link{text-decoration:none;cursor:pointer}.deal-head-badges a.deal-status-link:hover{text-decoration:underline;filter:brightness(1.15)}.deal-head-badges a.deal-status-link:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Station orders: colour only deadline labels. */
body:is([data-module=milling],[data-module=printing],[data-module=bending]) .milling-table tbody td,body:is([data-module=milling],[data-module=printing],[data-module=bending]) .milling-table tbody td a{color:var(--crm-text)}
body:is([data-module=milling],[data-module=printing],[data-module=bending]) .milling-table .station-deadline-note{color:var(--crm-text);opacity:1}
body:is([data-module=milling],[data-module=printing],[data-module=bending]) .milling-table .station-deadline-note.is-today{color:#eac647}
body:is([data-module=milling],[data-module=printing],[data-module=bending]) .milling-table .station-deadline-note.is-overdue{color:#f07178}

/* Lead stages: independent palette, same colors in both themes. */
.deal-stages{--card-tone-lead-gray:#94a3b8;--card-ink-lead-gray:#303030;--card-tone-lead-light-yellow:#fff3ad;--card-ink-lead-light-yellow:#303030;--card-tone-lead-yellow:#facc15;--card-ink-lead-yellow:#303030;--card-tone-lead-light-orange:#fdba74;--card-ink-lead-light-orange:#303030;--card-tone-lead-orange:#f97316;--card-ink-lead-orange:#303030;--card-tone-lead-brown:#8b5e3c;--card-ink-lead-brown:#f3f3f3;--card-tone-lead-light-green:#bef264;--card-ink-lead-light-green:#303030;--card-tone-lead-green:#4ade80;--card-ink-lead-green:#303030;--card-tone-lead-deep-green:#15803d;--card-ink-lead-deep-green:#f3f3f3;--card-tone-lead-sky:#7dd3fc;--card-ink-lead-sky:#303030;--card-tone-lead-bright-green:#22e64e;--card-ink-lead-bright-green:#303030;}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-gray"]{color:#303030}
html[data-theme] .st-badge.st-lead-gray{background:#94a3b8;border-color:#94a3b8;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-light-yellow"]{color:#303030}
html[data-theme] .st-badge.st-lead-light-yellow{background:#fff3ad;border-color:#fff3ad;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-yellow"]{color:#303030}
html[data-theme] .st-badge.st-lead-yellow{background:#facc15;border-color:#facc15;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-light-orange"]{color:#303030}
html[data-theme] .st-badge.st-lead-light-orange{background:#fdba74;border-color:#fdba74;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-orange"]{color:#303030}
html[data-theme] .st-badge.st-lead-orange{background:#f97316;border-color:#f97316;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-brown"]{color:#f3f3f3}
html[data-theme] .st-badge.st-lead-brown{background:#8b5e3c;border-color:#8b5e3c;color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-light-green"]{color:#303030}
html[data-theme] .st-badge.st-lead-light-green{background:#bef264;border-color:#bef264;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-green"]{color:#303030}
html[data-theme] .st-badge.st-lead-green{background:#4ade80;border-color:#4ade80;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-deep-green"]{color:#f3f3f3}
html[data-theme] .st-badge.st-lead-deep-green{background:#15803d;border-color:#15803d;color:#f3f3f3}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-sky"]{color:#303030}
html[data-theme] .st-badge.st-lead-sky{background:#7dd3fc;border-color:#7dd3fc;color:#303030}
.deal-stages .deal-stage.is-fill[data-fill-tone="lead-bright-green"]{color:#303030}
html[data-theme] .st-badge.st-lead-bright-green{background:#22e64e;border-color:#22e64e;color:#303030}

/* Gray labels follow the actual arrow background, including hover preview. */
html[data-theme=dark] .deal-stages .deal-stage:is([data-tone^="lead-"],[data-tone^="crm-"]):not(.is-fill){color:#d6d6d6}
html[data-theme=light] .deal-stages .deal-stage:is([data-tone^="lead-"],[data-tone^="crm-"]):not(.is-fill){color:#404040}
html[data-theme=dark] .deal-stages.is-preview .deal-stage:is([data-tone^="lead-"],[data-tone^="crm-"]){color:#d6d6d6}
html[data-theme=light] .deal-stages.is-preview .deal-stage:is([data-tone^="lead-"],[data-tone^="crm-"]){color:#404040}
html[data-theme] .deal-stages.is-preview .deal-stage:is([data-tone^="lead-"],[data-tone^="crm-"]).is-preview-fill{color:var(--stage-preview-ink,#303030)}

/* The import preview keeps every field visible; only its rows scroll vertically. */
dialog.crm-dialog.kb-lead-import{width:min(1500px,calc(100vw - 48px));max-width:calc(100vw - 48px);min-width:0}
.kb-lead-import .kb-lead-import-scroll{min-height:0;max-height:58vh;overflow-y:auto;overflow-x:hidden}
.kb-lead-import-table{width:100%;table-layout:fixed;border-collapse:collapse}
.kb-lead-import .kb-lead-import-table th,.kb-lead-import .kb-lead-import-table td{box-sizing:border-box;padding:10px 12px;text-align:left;vertical-align:top;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid var(--crm-border)}
.kb-lead-import .kb-lead-import-table th{background:var(--crm-soft);color:var(--crm-muted);font-weight:600;position:sticky;top:0;z-index:1}
.kb-lead-import .kb-lead-import-table input[type=checkbox]{width:16px;height:16px;min-height:0;margin:2px 0;accent-color:var(--crm-accent)}
@media(max-width:800px){dialog.crm-dialog.kb-lead-import{width:calc(100vw - 24px);max-width:calc(100vw - 24px);padding:16px!important}.kb-lead-import .kb-lead-import-table th,.kb-lead-import .kb-lead-import-table td{padding:8px 5px;font-size:11px}}
