@font-face{font-family:Onest;src:url('/css/fonts/onest.ttf')}@font-face{font-family:Onest;src:url('/css/fonts/onest_semibold.ttf');font-weight:600}
:root{--navy:#293942;--ink:#172027;--muted:#66737e;--line:#dce2e7;--paper:#f3f5f7;--white:#fff;--sidebar:192px}*{box-sizing:border-box}body{margin:0;font:14px Onest,Arial,sans-serif;background:var(--paper);color:var(--ink)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;border:1px solid var(--line);border-radius:7px;padding:10px 16px;background:white;color:var(--ink);white-space:nowrap;line-height:1.3}button:hover{background:#eaf0f3}button:disabled{opacity:.55;cursor:not-allowed}input,select,textarea{color:var(--ink);border:1px solid var(--line);border-radius:6px;background:#fff;padding:9px 11px;max-width:100%;min-width:0}input:focus,select:focus,textarea:focus{border-color:#617b8b}input[readonly],textarea[readonly]{background:#f2f4f6}input[type=hidden],[hidden]{display:none!important}.crm-sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:var(--navy);color:white;z-index:30;display:flex;flex-direction:column}.crm-brand{background:white;height:82px;display:flex;align-items:center;justify-content:center;border-right:1px solid var(--line)}.crm-brand img{width:140px;height:70px;object-fit:contain}.crm-sidebar nav{padding:20px 10px}.crm-sidebar nav a{display:flex;gap:12px;align-items:center;border-radius:7px;padding:12px 10px;margin-bottom:4px;font-size:13px}.crm-sidebar nav a:hover,.crm-sidebar nav a.active{background:#425a68}.crm-sidebar svg{width:20px;height:20px}.crm-home-link{margin:auto 20px 24px;color:#d8e2e9;font-size:12px}.crm-top{height:64px;margin-left:var(--sidebar);padding:0 28px;display:flex;align-items:center;justify-content:space-between;background:white;border-bottom:1px solid var(--line)}.crm-top>span{font-weight:600}.crm-top small{font-weight:400;color:var(--muted)}.crm-top>div{display:flex;align-items:center;gap:24px}.crm-logout{border:0;border-left:1px solid var(--line);border-radius:0;background:transparent}.crm-main{margin-left:var(--sidebar);padding:24px 28px 40px;min-width:0}.crm-page-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.crm-page-heading h1{font-size:29px;letter-spacing:-1px;margin:0;font-weight:600}#crm-actions{display:flex;gap:8px;flex-wrap:wrap}#crm-actions button:first-child,.crm-primary{background:var(--navy);color:white;border:1px solid var(--navy)}.crm-primary{display:inline-flex;align-items:center;justify-content:center;padding:12px 22px;border-radius:7px}.crm-home-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:40px 0 30px}.crm-home-grid a{background:white;border:1px solid var(--line);border-radius:10px;padding:44px 20px;display:flex;flex-direction:column;align-items:center;gap:20px;font-size:19px;font-weight:600}.crm-home-grid a:hover{border-color:#78909f;box-shadow:0 5px 20px #2939420c}.crm-home-grid svg{width:36px;height:36px}.crm-new-person{display:flex;max-width:300px;margin:0 auto}.crm-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:16px;background:white;border:1px solid var(--line);border-radius:9px;margin-bottom:20px}.crm-field{display:flex;flex-direction:column;gap:7px;min-width:125px;flex:1;max-width:220px}.crm-field>span{font-size:11px;color:var(--muted)}.crm-field input,.crm-field select{width:100%}.crm-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:0 0 22px}.crm-total{background:white;border:1px solid var(--line);border-radius:9px;padding:15px 18px}.crm-total span{display:block;color:var(--muted);font-size:12px;margin-bottom:9px}.crm-total input{border:none;background:transparent;font-size:21px;font-weight:600;width:100%;padding:0}.crm-total:last-child{background:#e7edf1}.crm-table-scroll{overflow:auto;border:1px solid var(--line);border-radius:9px;background:white;max-height:64vh}.crm-table-head,.crm-main #data-container .data-card{display:grid!important;grid-template-columns:var(--columns);gap:0!important;width:max-content!important;min-width:100%!important;margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:white!important;align-items:stretch}.crm-table-head{position:sticky;top:0;z-index:5;background:#e9eef2!important;font-weight:600}.crm-table-head input,.crm-table-head span,.crm-main .data-card>input:not([type=hidden]),.crm-main .data-card>select{font-size:12px!important;height:48px!important;width:100%!important;min-width:0!important;margin:0!important;padding:9px 10px!important;border:0!important;border-right:1px solid #e5e9ed!important;border-radius:0!important;box-shadow:none!important;outline:none;background:transparent!important;color:var(--ink)!important}.crm-table-head input{font-weight:600;font-size:11px!important;white-space:normal}.crm-main .data-card>input:not([readonly]),.crm-main .data-card>select{box-shadow:inset 0 0 0 1px #dfe6eb!important;background:#fbfcfd!important}.crm-main .data-card:nth-child(even){background:#f8fafb!important}.crm-main .data-card:hover,.crm-main .data-card.selected{background:#eaf1f6!important}.crm-main .data-card input.changed,.crm-main .data-card select.changed{background:#fff4d3!important;box-shadow:inset 0 0 0 1px #d7a645!important}.crm-main .data-card>br,.crm-main .data-card>label{display:none!important}.crm-main .data-card>.select2-container{min-width:0;width:100%!important;align-self:center}.crm-comment{background:white;padding:20px;border:1px solid var(--line);border-radius:8px;margin-top:20px}.crm-comment h2{font-size:16px;margin:0 0 12px}.crm-comment textarea{width:100%;min-height:70px}.crm-comment textarea:disabled{background:#f1f3f5}.modal,.error-modal{display:none;position:fixed;inset:0;z-index:100;background:#14202a66;overflow:auto;padding:30px;align-items:center;justify-content:center}.modal-content,.error-modal-content{position:relative;background:white;border:1px solid var(--line);border-radius:12px;margin:auto;padding:28px;max-width:1120px;width:100%;max-height:90vh;overflow:auto;box-shadow:0 20px 70px #14202a33}.error-modal{z-index:150}.error-modal-content{max-width:520px}.modal h2,.modal h3{margin:0 0 22px;font-size:23px}.modal form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.modal .input-row{display:flex;flex-direction:column;gap:7px;margin:0;min-width:0}.modal .input-row label{font-size:12px;font-weight:600;color:var(--ink)}.modal .input-row input,.modal .input-row select,.modal .input-row textarea{width:100%!important}.modal .modal-buttons{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:18px;background:white;position:sticky;bottom:0}.modal .close,.error-modal .close-error{position:absolute;right:16px;top:12px;font-size:25px;cursor:pointer}.modal .validation-error{border-color:#cf352e!important;background:#fff3f2!important}.modal .auto-calc-field{background:#edf1f4!important}.modal [id*=delete],.modal [id*=Delete]{color:#b52d28}.modal #saveModalButton,.modal #saveCreateBtn{background:var(--navy);color:white}.details-table{border-collapse:collapse;width:100%;font-size:12px}.details-table td,.details-table th{padding:11px;text-align:left;border-bottom:1px solid var(--line)}.details-table th{background:#edf1f5}.modal-buttons-left{display:flex;gap:10px;margin:22px 0}.create-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-row{display:flex;flex-direction:column;gap:8px}#toastMessage{display:none;position:fixed;bottom:24px;right:28px;background:var(--navy);color:white;padding:14px 22px;border-radius:8px;z-index:200}#crm-notice{background:#e9f0f5;border:1px solid #cbd8e2;padding:12px 18px;margin:0 0 15px;border-radius:7px}#crm-notice.error{background:#fff0ef;border-color:#edc8c3}.loading-spinner,.empty-state{padding:36px;color:var(--muted);text-align:center}.crm-segment{display:flex;gap:4px;background:#e7edf1;padding:4px;border-radius:8px;margin-bottom:25px;width:max-content}.crm-segment a{padding:10px 50px;border-radius:6px}.crm-segment a.active{background:var(--navy);color:white}[data-section=registration] #dataForm{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:1100px;background:white;border:1px solid var(--line);padding:28px;border-radius:10px}[data-section=registration] .crm-field{max-width:none}[data-section=registration] #dataForm>button{grid-column:1/-1;justify-self:end}[data-section=registration] .inf-container{margin-top:24px}.crm-login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:35px;background:#e9eef2}.crm-login-panel{display:grid;grid-template-columns:1fr 1fr;max-width:1000px;width:100%;min-height:600px;background:white;border:1px solid #d6dfe5;border-radius:14px;overflow:hidden;box-shadow:0 20px 80px #26364015}.crm-login-brand{padding:45px;background:linear-gradient(32deg,var(--navy) 0%,var(--navy) 47%,#eff3f6 47%);display:flex;flex-direction:column;justify-content:space-between}.crm-login-brand img{width:250px;height:240px;object-fit:contain;align-self:center;mix-blend-mode:multiply}.crm-login-brand h2{font-size:20px;font-weight:500;color:white;text-transform:uppercase;line-height:1.6}.crm-login-brand p{color:#cdd9e1;font-size:12px}.crm-login-form{padding:70px 48px}.crm-login-form h1{font-size:27px;margin:0 0 12px}.crm-login-form p{color:var(--muted);line-height:1.6}.crm-login-form label{display:block;margin:25px 0 8px;font-size:12px;font-weight:600}.crm-login-form input{width:100%;height:46px}.crm-password{position:relative}.crm-password input{padding-right:45px}.crm-password button{position:absolute;right:2px;top:3px;border:0;background:transparent}.crm-login-form .crm-primary{width:100%;margin-top:30px;height:46px}#loginError{color:#b52828}.crm-cell-pinned{position:sticky!important;left:var(--pin-left,0);background:inherit!important;z-index:2}.crm-table-head .crm-cell-pinned{background:#e9eef2!important;z-index:6}.crm-table-scroll .data-card .crm-cell-pinned{background:#fff!important}
@media(max-width:1000px){:root{--sidebar:158px}.crm-main{padding:20px 16px}.crm-top{padding:0 16px}.crm-top small{display:none}.crm-home-grid{grid-template-columns:repeat(2,1fr)}.modal form{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){:root{--sidebar:64px}.crm-sidebar nav a{font-size:0;justify-content:center;padding:12px 0}.crm-brand img{width:55px;height:60px}.crm-home-link{font-size:10px;margin:10px}.crm-top>span{display:none}.crm-top{justify-content:flex-end}.crm-top>div{gap:8px}.crm-main{padding:16px 10px}.crm-page-heading{align-items:flex-start;flex-wrap:wrap}.crm-page-heading h1{font-size:24px}.crm-home-grid{gap:10px}.crm-home-grid a{font-size:15px;padding:28px 10px}.modal{padding:10px}.modal form,[data-section=registration] #dataForm{grid-template-columns:1fr}.crm-login{padding:12px}.crm-login-panel{grid-template-columns:1fr;min-height:0}.crm-login-brand{display:none}.crm-login-form{padding:35px}.crm-totals{grid-template-columns:repeat(2,1fr)}}
.task-toolbar{display:flex;align-items:center;gap:20px;margin-bottom:20px;flex-wrap:wrap}.task-toolbar>div:last-child{margin-left:auto;display:flex;gap:8px}.task-mode{display:flex;background:#e4ebf0;padding:4px;border-radius:8px}.task-mode button{border:0;background:transparent}.task-mode button[aria-pressed=true]{background:var(--navy);color:white}.task-workspace{display:grid;grid-template-columns:150px minmax(0,1fr);gap:20px}.task-categories{background:var(--navy);border-radius:10px;align-self:start;padding:10px 7px;position:sticky;top:20px}.task-categories button{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;border:0;background:transparent;color:#dce5ed;border-radius:6px;padding:13px 9px;width:100%;text-align:left}.task-categories button.active{background:#465f70;color:white}.task-categories b{font-size:11px;font-weight:500}.task-results{min-width:0}.task-results>p{font-size:12px;color:var(--muted);margin:0 0 12px}.task-card{display:block;white-space:normal;text-align:left;width:100%;background:white;padding:14px 18px;border:1px solid var(--line);border-radius:9px;margin-bottom:10px}.task-card:hover{border-color:#8ca0ae;background:#f7fafc}.task-card-top,.task-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}.task-card-top strong{color:#101820;font-size:13px}.task-card-top strong:last-child{text-align:right}.task-card p{font-size:13px;line-height:1.5;margin:7px 0}.task-card small{color:var(--muted);font-size:11px}.task-deadline{font-size:11px;color:#435564;background:#e9edf2;padding:5px 9px;border-radius:6px;display:inline-block;white-space:nowrap}.task-deadline.urgent{color:#895700;background:#fff0d4}.task-deadline.expired{color:#b32c24;background:#ffe6e3}.task-shop{border:1px solid var(--line);border-radius:10px;background:white;padding:0 12px 8px;margin-bottom:14px}.task-shop-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;border:0;padding:19px 7px;width:100%;background:transparent}.task-shop-heading span{font-size:12px;color:var(--muted)}.task-card.nested{margin:0 4px 7px;width:calc(100% - 8px);background:#e9edf1;border:0;padding:10px 12px}.task-card.nested p{margin:5px 0}.task-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(520px,100%);height:100%;max-height:100%;border:0;border-left:1px solid var(--line);padding:28px;background:white;box-shadow:-10px 0 40px #29394220}.task-drawer::backdrop{background:#17202745}.drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.drawer-heading h2{font-size:22px;margin:0}.drawer-heading button{font-size:24px;border:0}.task-drawer label{display:flex;flex-direction:column;gap:9px;font-size:12px;margin:0 0 22px}.drawer-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:30px}.task-detail-row{padding:14px 0;border-bottom:1px solid var(--line)}.task-detail-row small{color:var(--muted)}.task-detail-row p{margin:7px 0 0;white-space:pre-wrap;line-height:1.6;overflow-wrap:anywhere}#task-detail-back{margin-top:25px}#task-more{display:block;margin:20px auto}#task-counts{font-size:12px;color:var(--muted)}@media(min-width:1600px){#task-items{max-width:1100px}}@media(max-width:800px){.task-workspace{grid-template-columns:110px minmax(0,1fr);gap:9px}.task-categories button{font-size:10px;padding:12px 5px}.task-toolbar{gap:10px}.task-card{padding:12px}.task-card-top strong{font-size:11px}}
.select2-container--default .select2-selection--single{height:34px;border-color:#dce2e7;border-radius:5px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:32px;font-size:12px}.select2-container--default .select2-selection--single .select2-selection__arrow{height:32px}.select2-dropdown{border-color:#c8d3db;font-size:12px}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background:#425a68}.modal .changed{box-shadow:inset 0 0 0 1px #c59c44}.crm-main .data-card input:focus,.crm-main .data-card select:focus{box-shadow:inset 0 0 0 2px #637f91!important}

[data-section=salary] .crm-table-head input,[data-section=salary] .crm-main .data-card>input{height:38px!important;padding:7px 5px!important;font-size:13.2px!important;font-weight:700!important}
.crm-shop-more{display:block;margin:12px auto}.crm-shop-more[hidden]{display:none}

[data-section=salary] .crm-main #data-container .data-card>input.crm-cell-pinned{background:rgba(255,255,255,.7)!important}

.crm-unsaved{outline:2px solid #e08a1e!important;outline-offset:1px;background:#fff3e0!important}
.crm-main .data-card>.shop-delete{height:48px;border:0;border-right:1px solid #e5e9ed;border-radius:0;background:transparent;color:#b52d28;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.crm-main .data-card>.shop-delete:hover{background:#ffe9e7}.crm-main .data-card>.shop-delete:disabled{opacity:.4;cursor:wait}
.assign-content{max-width:600px}.assign-step{display:flex;flex-direction:column;gap:7px;margin:0 0 18px}.assign-step>label,.assign-label{font-size:12px;font-weight:600;color:var(--ink);margin:0 0 7px}.assign-roles{display:flex;flex-wrap:wrap;gap:6px}.assign-roles button{border:1px solid var(--line);background:white;border-radius:7px;padding:8px 12px;font-size:12px;cursor:pointer}.assign-roles button[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:white}.assign-search{position:relative}.assign-search input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:7px;font-size:13px}.assign-suggest{position:absolute;left:0;right:0;top:100%;z-index:3;background:white;border:1px solid #c8d3db;border-radius:7px;box-shadow:0 10px 30px #14202a22;max-height:260px;overflow:auto}.assign-suggest button{display:flex;justify-content:space-between;gap:12px;width:100%;border:0;border-bottom:1px solid var(--line);background:white;padding:9px 12px;font-size:12px;text-align:left;cursor:pointer}.assign-suggest button:hover,.assign-suggest button.active{background:#eaf1f6}.assign-suggest button:disabled{color:var(--muted);cursor:default}.assign-suggest small{color:var(--muted)}.assign-suggest p{margin:0;padding:10px 12px;font-size:12px;color:var(--muted)}.assign-list{border:1px solid var(--line);border-radius:7px;max-height:240px;overflow:auto}.assign-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);font-size:12px}.assign-row:last-child{border-bottom:0}.assign-row small{color:var(--muted)}.assign-row small.assign-replace{color:#895700}.assign-row button{border:0;background:transparent;font-size:18px;line-height:1;cursor:pointer;color:var(--muted)}.assign-row button:hover{color:#b52d28}.assign-empty{margin:0;padding:12px;font-size:12px;color:var(--muted)}.assign-error{color:#b52d28;font-size:12px;margin:12px 0 0}.assign-buttons{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:18px;margin-top:18px}
.task-duty-toggle{border:1px solid var(--line);background:white;border-radius:8px;padding:8px 14px}.task-duty-toggle[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:white}
.duty-content{max-width:980px}.duty-modal form{display:block}.duty-tabs{display:flex;gap:6px;margin:0 0 18px}.duty-tabs button{border:1px solid var(--line);background:white;border-radius:7px;padding:8px 14px}.duty-tabs button[aria-selected=true]{background:var(--navy);border-color:var(--navy);color:white}.duty-label{display:block;font-size:12px;font-weight:600;margin:0 0 7px}.duty-form{border:1px solid #c8d3db;border-radius:10px;padding:16px 18px;margin:16px 0;background:#f8fafb}.duty-form h3{margin:0 0 14px;font-size:16px}.duty-form fieldset{border:0;padding:0;margin:0 0 14px}.duty-form legend{font-size:12px;font-weight:600;margin-bottom:8px}.duty-form input[type=text],.duty-form input[type=search],.duty-form input[type=date]{width:100%;padding:9px 11px;border:1px solid var(--line);border-radius:7px;margin:0 0 12px}.duty-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px}.duty-dates label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:6px}.duty-checks{display:flex;flex-wrap:wrap;gap:8px}.duty-check{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:7px;padding:7px 10px;background:white;font-size:12px}.duty-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.duty-danger{color:#b52d28}.duty-error{color:#b52d28;font-size:12px;margin:8px 0}.duty-warn{color:#895700;font-size:12px}.duty-muted{color:var(--muted);font-size:12px;margin:0 0 6px}.duty-empty{color:var(--muted);font-size:12px;padding:12px 0;margin:0}.duty-notice{background:#fff4d3;color:#6e4a00;border-radius:7px;padding:10px 12px;font-size:12px}.duty-list{margin-top:16px}.duty-person{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:12px;background:white}.duty-person-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}.duty-actions{display:flex;gap:6px;flex-wrap:wrap}.duty-actions button{border:1px solid var(--line);background:white;border-radius:6px;padding:5px 10px;font-size:12px}.duty-shift{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:9px 0;font-size:12px}.duty-shift-info{display:flex;flex-direction:column;gap:4px}.duty-shift small{color:var(--muted)}.duty-status{border-radius:5px;padding:2px 7px;font-size:11px;background:#e9edf2;color:#435564}.duty-status-active{background:#e3f4e6;color:#1f6b33}.duty-status-finished{background:#f1f1f1;color:#7a7a7a}.duty-cluster-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}.duty-cluster-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.duty-cluster-item{display:flex;flex-direction:column;align-items:flex-start;gap:3px;border:1px solid var(--line);background:white;border-radius:7px;padding:9px 11px;text-align:left}.duty-cluster-item small{color:var(--muted)}.duty-cluster-item.active{border-color:var(--navy);background:#eaf1f6}.duty-cluster-layout .duty-form{margin:0}.duty-cities{max-height:340px;overflow:auto;border:1px solid var(--line);border-radius:7px;background:white}.duty-city{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 10px;border-bottom:1px solid var(--line);font-size:12px}.duty-city small{color:var(--muted)}.duty-city small.duty-warn{color:#895700}@media(max-width:800px){.duty-cluster-layout{grid-template-columns:1fr}.duty-dates{grid-template-columns:1fr}.duty-shift{flex-direction:column}}
.crm-toasts{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:300;display:flex;flex-direction:column-reverse;align-items:center;gap:6px;pointer-events:none;width:min(560px,calc(100% - 24px))}.crm-toast{pointer-events:none;display:flex;align-items:center;gap:10px;width:100%;padding:9px 14px;border-radius:8px;background:#293942;color:#fff;font-size:12px;box-shadow:0 8px 24px #14202a33;animation:crm-toast-in .18s ease-out}.crm-toast-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-toast-icon{width:18px;height:18px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;background:#ffffff26}.crm-toast-saved .crm-toast-icon{background:#3a8f57}.crm-toast-error{background:#8f2722}.crm-toast-error .crm-toast-text{white-space:normal}.crm-toast button{pointer-events:auto;border:0;background:transparent;color:#fff;text-decoration:underline;font-size:12px;cursor:pointer;padding:0 2px}.crm-toast .crm-toast-close{text-decoration:none;font-size:16px;line-height:1}@keyframes crm-toast-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.crm-main .data-card input.crm-saved-flash,.crm-main .data-card select.crm-saved-flash{background:#e3f4e6!important;box-shadow:inset 0 0 0 1px #3a8f57!important;transition:background .6s}
.crm-summary{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px 22px;margin:0 0 16px}
.crm-summary-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.crm-summary-label{font-size:12px;color:var(--muted)}
.crm-summary-total{font-size:26px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}.crm-summary-sub{font-size:12px;color:var(--muted)}
.crm-summary-bar{display:flex;gap:2px;height:10px;border-radius:5px;overflow:hidden;background:#eef0f2;margin:14px 0 16px}.crm-summary-bar .crm-seg{display:block;min-width:4px;border-radius:0;padding:0}
.crm-summary-legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px 18px}.crm-legend-item{display:flex;flex-direction:column;gap:3px}
.crm-legend-label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.crm-legend-item b{font-size:14px;color:var(--ink)}.crm-dot{display:inline-block;width:8px;height:8px;border-radius:2px;padding:0}
.crm-totals-legacy,[data-section=salary] .crm-comment{display:none!important}
.crm-heading-side{display:flex;align-items:center;gap:8px;margin:0 auto 0 14px;flex-wrap:wrap}.crm-heading-side select{border:1px solid var(--line);border-radius:8px;background:#fff;padding:7px 10px;font-size:13px;min-width:0;width:auto}
.crm-unsaved-chip{background:#fff4d3;color:#7a5200;border-radius:6px;padding:4px 9px;font-size:11px;white-space:nowrap}
[data-section=salary] .crm-filters .crm-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.crm-badge{display:inline-block;border-radius:6px;padding:3px 8px;font-size:11px;font-weight:500;white-space:nowrap;line-height:1.3}
.crm-badge-tk{background:#e3eef7;color:#1f4e73}.crm-badge-tk2{background:#e5f2f6;color:#2d6b82}.crm-badge-sz{background:#e3f4e6;color:#1f6b33}.crm-badge-sz2{background:#edf6ee;color:#3f7a50}
.crm-badge-proj{background:#fdf0dc;color:#8a5a12}.crm-badge-ip{background:#eeeafa;color:#4f3f99}.crm-badge-off{background:#eef0f2;color:#55616b}
.crm-seg.crm-badge-tk,.crm-dot.crm-badge-tk{background:#1f5f7a}.crm-seg.crm-badge-tk2,.crm-dot.crm-badge-tk2{background:#6aaac4}.crm-seg.crm-badge-sz,.crm-dot.crm-badge-sz{background:#3a9b5c}
.crm-seg.crm-badge-sz2,.crm-dot.crm-badge-sz2{background:#9fd3ad}.crm-seg.crm-badge-proj,.crm-dot.crm-badge-proj{background:#d9912f}.crm-seg.crm-badge-ip,.crm-dot.crm-badge-ip{background:#7b68c8}.crm-seg.crm-badge-off,.crm-dot.crm-badge-off{background:#a9b2ba}
.crm-table-modern{background:#fff;border:1px solid var(--line);border-radius:12px}
.crm-table-modern .crm-table-head{background:#fff!important;border-bottom:1px solid var(--line)!important;font-weight:500}
.crm-table-modern .crm-table-head>.crm-th-legacy{display:none!important}
.crm-table-modern .crm-table-head>.crm-th{display:flex!important;align-items:center;height:40px!important;padding:0 10px!important;font-size:11px!important;font-weight:500;color:var(--muted)!important;background:#fff!important;border:0!important;white-space:nowrap;overflow:hidden}
.crm-table-modern .crm-table-head>.crm-th.crm-num{justify-content:flex-end}
.crm-table-modern .crm-pin{position:sticky;left:0;z-index:3;background:#fff}.crm-table-modern .crm-table-head>.crm-pin{z-index:7}
.crm-main #data-container .data-card.crm-row{background:#fff!important;border-bottom:1px solid #edf0f2!important}
.crm-main #data-container .data-card.crm-row:hover,.crm-main #data-container .data-card.crm-row:hover .crm-pin{background:#f7f9fb!important}
.crm-cell{position:relative;display:flex;align-items:center;min-height:52px;padding:0 10px;font-size:13px;color:var(--ink);min-width:0;background:inherit}
.crm-cell.crm-num{justify-content:flex-end;font-variant-numeric:tabular-nums}
.crm-main .data-card .crm-cell>input{position:absolute;inset:7px 4px;width:calc(100% - 8px);height:auto;margin:0;border:0;border-radius:6px;background:transparent!important;color:transparent;font:inherit;padding:0 6px;outline:none;box-shadow:none!important;z-index:0}
.crm-main .data-card .crm-cell.crm-num>input{text-align:right}
.crm-display{position:relative;z-index:1;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.crm-cell:focus-within>.crm-display{visibility:hidden}
.crm-main .data-card .crm-cell:focus-within>input{color:var(--ink);background:#fff!important;box-shadow:0 0 0 1.5px var(--navy)!important;z-index:2}
.crm-cell.crm-editable{cursor:text}.crm-cell.crm-editable:hover{background:#eef3f7}
.crm-zero .crm-display{color:#9aa5ad}.crm-neg .crm-display{color:#c0392b}.crm-total-cell .crm-display{font-weight:700}
.crm-cell:has(input.changed){background:#fff4d3!important}.crm-cell:has(input.crm-saved-flash){background:#e3f4e6!important;transition:background .6s}
.crm-cell-who{flex-direction:column;align-items:flex-start;justify-content:center;gap:2px}.crm-cell-who b{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.crm-cell-who small{font-size:11px;color:var(--muted)}
.crm-stash{display:none!important}
.crm-table-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);padding:10px 4px 0}

/* list-view: единый стиль списков (сотрудники, магазины, сметы, материалы) */
.crm-filters{border-radius:12px}.crm-total{border-radius:12px}
.crm-filters .crm-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.crm-badge-red{background:#fde8e6;color:#9b2a22}
.crm-strong .crm-display{font-weight:600}
.crm-main #data-container .data-card.crm-row-click,.crm-row-click .crm-cell{cursor:pointer}
.crm-main .data-card .crm-cell>select{position:absolute;inset:7px 4px;width:calc(100% - 8px)!important;height:auto;margin:0;opacity:0;cursor:pointer;z-index:2}
.crm-cell.crm-select:focus-within>.crm-display{visibility:visible}
.crm-cell.crm-select:focus-within{box-shadow:inset 0 0 0 1.5px var(--navy)}
.crm-cell.crm-select.crm-editable{padding-right:22px}
.crm-cell.crm-select.crm-editable::after{content:'▾';position:absolute;right:9px;top:50%;transform:translateY(-50%);color:#9aa5ad;font-size:11px;pointer-events:none}
.crm-cell .select2-container{position:absolute!important;inset:7px 4px;width:auto!important;z-index:3}
.crm-cell:has(.select2-container)>.crm-display,.crm-cell:has(.select2-container)::after{visibility:hidden}
.crm-cell .select2-container--default .select2-selection--single{height:100%;border:0;border-radius:6px;background:#fff;box-shadow:0 0 0 1.5px var(--navy)}
.crm-cell .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px;font-size:13px;padding-left:6px}
.crm-cell.crm-action{justify-content:center;padding:0}
.crm-main .data-card .crm-action .shop-delete{height:auto;border:0;background:transparent;color:#b52d28;cursor:pointer;padding:7px;border-radius:6px;display:flex}
.crm-main .data-card .crm-action .shop-delete:hover{background:#fde8e6}

/* Логотип: блок той же высоты, что и шапка, логотип на всю площадь с маленьким отступом */
.crm-brand{height:64px;padding:3px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--line)}
.crm-brand img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:7px}
@media(max-width:650px){.crm-brand img{width:100%;height:100%;object-position:52% center}}

/* Аналитика заявок */
[data-section=analytics] .crm-page-heading{display:none}
.an-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}
.an-head h1{font-size:29px;letter-spacing:-1px;margin:0;font-weight:600}
.an-head p{margin:6px 0 0;color:var(--muted);font-size:13px;display:flex;align-items:center;gap:8px}
.an-dot{width:8px;height:8px;border-radius:50%;background:#2f9a5b;display:inline-block}
.an-dot.stale{background:#c9862b}
.an-clock{background:var(--navy);color:#fff;border-radius:12px;padding:10px 22px;font-size:38px;font-weight:700;letter-spacing:1px;font-variant-numeric:tabular-nums}
.an-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:16px}
.an-kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 18px;min-width:0}
.an-kpi span{display:block;font-size:14px;color:#3c4852}
.an-kpi b{display:block;font-size:44px;line-height:1.1;font-weight:700;letter-spacing:-1px;margin:6px 0 4px;font-variant-numeric:tabular-nums}
.an-kpi small{color:var(--muted);font-size:12px}
.an-kpi.today{background:#fdf1e7;border-color:#efb58c}.an-kpi.today span,.an-kpi.today b{color:#a8501f}
.an-kpi.tomorrow b,.an-kpi.tomorrow span{color:#7a5a12}
.an-kpi.expired{background:#fbe7e4;border-color:#e6a69d}.an-kpi.expired span,.an-kpi.expired b{color:#b3302a}
.an-kpi.hour{background:#fdf1e7;border-color:#efb58c}.an-kpi.hour span,.an-kpi.hour b{color:#a8331f}
.an-kpi.smho{background:#eaf2f9;border-color:#c6d9ea}.an-kpi.smho span,.an-kpi.smho b{color:#1f5f8b}
.an-grid{display:grid;grid-template-columns:1fr 1fr .9fr;gap:14px;align-items:start}
.an-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.an-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px 20px;min-width:0}
.an-card h2{font-size:19px;margin:0 0 12px;font-weight:600;display:flex;justify-content:space-between;align-items:center;gap:10px}
.an-legend{display:flex;gap:12px;font-size:11px;font-weight:400;color:var(--muted)}
.an-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:4px;background:#5d7486}
.an-legend i.red{background:#c9402f}
.an-near{border-top:1px solid var(--line);padding:12px 0;display:flex;justify-content:space-between;gap:12px;align-items:center}
.an-near>div{min-width:0}
.an-near b{font-size:15px}.an-near b small{font-weight:400;color:var(--muted);font-size:12px}
.an-near p{margin:4px 0 2px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.an-near em{font-style:normal;font-size:12px;font-weight:600}.an-near em.none{color:#b3302a}
.an-timer{flex:none;background:#f4ead8;color:#6b5113;border-radius:8px;padding:8px 12px;font-weight:700;font-size:14px;white-space:nowrap}
.an-timer.hot{background:#fadcd2;color:#a8331f}
.an-table{width:100%;border-collapse:collapse;font-size:14px}
.an-table th{white-space:nowrap;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:var(--muted);font-weight:600;text-align:right;padding:0 6px 8px;border-bottom:1px solid var(--line)}
.an-table th:first-child,.an-table td:first-child{text-align:left;padding-left:0}
.an-table td{padding:12px 6px;border-bottom:1px solid #edf0f2;text-align:right;font-variant-numeric:tabular-nums}
.an-table td:first-child{font-weight:600}
.an-table .hot{color:#c35a1c;font-weight:600}.an-table .bad{color:#b3302a;font-weight:700}
.an-share{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.an-share i{display:block;width:60px;height:6px;border-radius:3px;background:#e9ecef;overflow:hidden}
.an-share i u{display:block;height:100%;border-radius:3px;background:#5d7486}
.an-share i u.mid{background:#d39a2c}.an-share i u.high{background:#c9402f}
.an-share small{width:32px;font-size:11px;font-weight:600}
.an-scroll{max-height:420px;overflow:auto}
.an-region{margin-bottom:12px}
.an-region div{display:flex;justify-content:space-between;font-size:13px;margin-bottom:5px}
.an-region div span:first-child{font-weight:600}
.an-region div b{color:#b3302a}
.an-bar{display:flex;height:9px;border-radius:5px;background:#eceff2;overflow:hidden}
.an-bar i{background:#5d7486}.an-bar u{background:#c9402f}
.an-days{display:flex;align-items:flex-end;gap:10px;height:150px;padding-top:10px}
.an-day{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;font-size:11px;color:var(--muted)}
.an-day b{color:var(--ink);font-size:12px;margin-bottom:4px}
.an-day i{display:block;width:100%;max-width:34px;background:#dc9e93;border-radius:4px 4px 0 0;min-height:2px}
.an-day.last i{background:#c9402f}
.an-day span{margin-top:6px}
.an-empty{color:var(--muted);font-size:13px;padding:10px 0}
@media(max-width:1300px){.an-kpis{grid-template-columns:repeat(3,1fr)}.an-grid{grid-template-columns:1fr 1fr}.an-grid>.an-col:last-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:800px){.an-kpis{grid-template-columns:repeat(2,1fr)}.an-grid,.an-grid>.an-col:last-child{grid-template-columns:1fr;display:grid}.an-clock{font-size:26px}}

/* Личный кабинет */
.crm-profile-link{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.crm-profile-link:hover,.crm-profile-link.active{background:#eaf0f3}
.crm-profile-link svg{width:18px;height:18px;flex:none}
.crm-profile-link small{color:var(--muted);font-size:12px}
.pf-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px 22px;display:flex;align-items:center;gap:18px;max-width:760px;margin-bottom:14px}
.pf-avatar{width:56px;height:56px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:19px;flex:none}
.pf-info b{display:block;font-size:19px}.pf-info span{color:var(--muted);font-size:13px}
.pf-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;max-width:760px;margin-bottom:14px}
.pf-row{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 18px;min-width:0}.pf-row small{color:var(--muted);font-size:12px}.pf-row p{margin:6px 0 0;font-weight:600;overflow-wrap:anywhere}
.pf-security{justify-content:space-between}.pf-security b{display:block;font-size:16px}.pf-security span{color:var(--muted);font-size:13px}
.pf-dialog{border:0;border-radius:12px;padding:26px;width:min(420px,calc(100vw - 32px));box-shadow:0 20px 70px #14202a33}
.pf-dialog::backdrop{background:#14202a66}
.pf-dialog h2{margin:0 0 18px;font-size:21px}
.pf-dialog label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;margin-bottom:14px}
.pf-dialog input[type=password],.pf-dialog input[type=text]{height:42px}
.pf-dialog input.bad{border-color:#cf352e;background:#fff3f2}
.pf-dialog small{font-weight:400;color:var(--muted);min-height:0}.pf-dialog small.err{color:#b3302a}.pf-dialog small:empty{display:none}
.pf-dialog .pf-show{flex-direction:row;align-items:center;gap:8px;font-weight:400;color:var(--muted)}
.pf-buttons{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:16px}
@media(max-width:650px){.pf-grid{grid-template-columns:1fr}.pf-security{flex-direction:column;align-items:flex-start}.crm-profile-link small{display:none}}
#profile .crm-primary:hover,.pf-dialog .crm-primary:hover{background:#3a4f5c;border-color:#3a4f5c}

/* Зарплаты: расшифровка итога */
.crm-summary-note{font-size:12px;color:var(--muted);margin:2px 0 10px;line-height:1.4}

/* Доступы исполнителей (окно в «Сотрудниках» у суперадмина) */
.crm-access-btn{border:1px solid var(--line);border-radius:7px;padding:4px 9px;font-size:12px;background:#fff;color:var(--ink);cursor:pointer;white-space:nowrap}
.crm-access-btn.custom{border-color:#d7a645;background:#fff8e6;color:#7a5a12}
.crm-access-btn.full{color:var(--muted)}
.access-dialog{border:0;border-radius:12px;padding:22px 24px;width:min(580px,calc(100vw - 32px));box-shadow:0 20px 70px #14202a33}
.access-dialog::backdrop{background:#14202a66}
.access-dialog h2{margin:0;font-size:20px}
.access-sub{margin:4px 0 12px;color:var(--muted);font-size:12px;line-height:1.4}
.access-row{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #edf0f2;font-size:13px}
.access-changed{margin-left:6px;font-size:10px;color:#8a5a12}
.access-seg{display:flex;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.access-seg button{flex:1;border:0;border-right:1px solid var(--line);border-radius:0;background:#fff;padding:7px 0;font-size:12px;color:#55616b;cursor:pointer}
.access-seg button:last-child{border-right:0}
.access-seg button:disabled{cursor:default}
.access-seg button.on.lv-none{background:#eef0f2;color:#172027;font-weight:700}
.access-seg button.on.lv-read{background:#e3eef7;color:#1f4e73;font-weight:700}
.access-seg button.on.lv-edit{background:#e3f4e6;color:#1f6b33;font-weight:700}
.access-buttons{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #edf0f2}
.access-hint{color:var(--muted);font-size:12px}
.access-dialog .crm-primary:hover{background:#3a4f5c}

/* Режим «Только просмотр»: права раздела = Просмотр */
.crm-readonly-badge{display:inline-flex;align-items:center;margin-left:12px;padding:3px 10px;border-radius:999px;background:#fff4e0;color:#8a5a00;font-size:12px;font-weight:600;vertical-align:middle}
.crm-page-heading h1+.crm-readonly-badge{align-self:center;margin:0 auto 0 -8px}
body[data-readonly="true"] :is(#saveAllButton,#save-button,#assign-shops-button,#createEstimateButton,#deleteModalButton,#saveEstimateButton,#showCreateFormBtn,#createFormContainer,.shop-delete,.crm-new-person){display:none!important}
body[data-readonly="true"] .crm-cell{cursor:default}

/* ---------- Чат ---------- */
.crm-nav-badge{margin-left:auto;background:#d9912f;color:#fff;border-radius:9px;padding:0 7px;font-size:11px;line-height:18px;font-weight:600}
.crm-top-avatar{width:26px;height:26px;border-radius:50%;object-fit:cover;flex:none}
.pf-avatar{position:relative;overflow:hidden}.pf-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pf-photo-actions{display:flex;gap:8px;margin-left:auto;flex-wrap:wrap}.pf-photo-actions button{padding:8px 12px}
.chat{display:grid;grid-template-columns:330px 1fr;height:calc(100vh - 64px - 24px - 74px - 40px);min-height:520px;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.chat-side{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.chat-side-top{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--line)}.chat-side-top input{flex:1;min-width:0}
.chat-list{overflow:auto;flex:1}
.chat-item{display:flex;gap:11px;align-items:center;width:100%;text-align:left;border:0;border-bottom:1px solid #eef1f4;border-radius:0;padding:11px 13px;background:#fff}
.chat-item:hover{background:#f4f7f9}.chat-item.on{background:#eaf1f6}
.chat-item-body{min-width:0;flex:1}.chat-item-body b{display:flex;gap:6px;align-items:center;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item-body small{display:block;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.chat-item-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-size:11px;color:var(--muted);flex:none}
.chat-badge{background:#1f5f7a;color:#fff;border-radius:10px;padding:1px 7px;font-weight:600}
.chat-kind{font-size:10px;font-weight:600;color:#1f5f7a;background:#e3eef4;border-radius:5px;padding:1px 5px}.chat-kind.arch{color:#8a5a00;background:#fff4e0}
.chat-av{width:40px;height:40px;border-radius:50%;background:#dfe7ee;color:#293942;display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;flex:none;overflow:hidden}
.chat-av img{width:100%;height:100%;object-fit:cover}.chat-av.sm{width:30px;height:30px;font-size:11px}.chat-av-gap{width:30px;flex:none}
.chat-main{display:flex;flex-direction:column;background:#f6f8fa;min-height:0;min-width:0;position:relative}.chat-side{min-width:0}.chat-main.drop{outline:3px dashed #617b8b;outline-offset:-8px}
.chat-placeholder{margin:auto;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:6px}
.chat-head{display:flex;align-items:center;gap:11px;background:#fff;border-bottom:1px solid var(--line);padding:10px 16px}
.chat-head-text{min-width:0;flex:1}.chat-head-text b{display:block}.chat-head-text small{color:var(--muted)}
.chat-back{display:none;border:0;font-size:24px;padding:0 8px}
.chat-msgs{flex:1;min-height:0;overflow:auto;padding:16px 20px;display:flex;flex-direction:column;gap:6px}
.chat-day{align-self:center;font-size:11px;color:var(--muted);background:#e9eef2;border-radius:10px;padding:2px 10px;margin:8px 0}
.chat-row{display:flex;gap:8px;align-items:flex-end}.chat-row.me{justify-content:flex-end}
.chat-bubble{max-width:min(620px,70%);background:#fff;border:1px solid #e3e8ec;border-radius:12px;padding:8px 11px;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.chat-row.me .chat-bubble{background:#293942;color:#fff;border-color:#293942}
.chat-sender{font-size:12px;font-weight:600;color:#1f5f7a;margin-bottom:3px}
.chat-text{white-space:pre-wrap}.chat-meta{font-size:10px;opacity:.65;text-align:right;margin-top:3px}
.chat-tick.read{color:#7fd0ff;opacity:1}.chat-row:not(.me) .chat-tick.read{color:#1f5f7a}.chat-tick.link{cursor:pointer;text-decoration:underline dotted}
.chat-photo{display:block;max-width:300px;width:100%;border-radius:8px;margin-bottom:4px;cursor:zoom-in;background:#dfe7ee}
.chat-photo-gone{font-size:12px;opacity:.75;font-style:italic;margin-bottom:4px}
.chat-task{display:flex;flex-direction:column;gap:2px;background:#fff;color:#172027;border:1px solid #cfdbe4;border-left:4px solid #d9912f;border-radius:8px;padding:7px 10px;margin-bottom:5px;font-size:12px}
.chat-task:hover{background:#f6f9fb}.chat-task b{font-size:13px}.chat-task small.due{color:#a8302a;font-weight:600}.chat-task.closed{border-left-color:#a7b0b8;opacity:.85}
.chat-archived{background:#fff4e0;color:#8a5a00;text-align:center;padding:12px;font-size:13px;border-top:1px solid var(--line)}
.chat-input{background:#fff;border-top:1px solid var(--line);padding:10px 14px}
.chat-input-row{display:flex;gap:8px;align-items:flex-end}.chat-input textarea{flex:1;min-width:0;resize:none;min-height:42px;max-height:160px;line-height:1.4}
.chat-ic{width:42px;height:42px;padding:0;font-size:18px;flex:none}
.chat-attach{display:flex;align-items:center;gap:8px;background:#fff8e6;border:1px solid #f0d9a8;border-radius:8px;padding:6px 10px;margin-bottom:8px;font-size:13px;width:max-content;max-width:100%}
.chat-attach-x{border:0;padding:0 4px;font-size:18px;background:transparent}
.chat-empty{color:var(--muted);text-align:center;padding:24px;font-size:13px}
.chat-dialog{border:1px solid var(--line);border-radius:12px;padding:22px;width:min(520px,92vw);max-height:84vh}.chat-dialog::backdrop{background:#14202a66}
.chat-dialog h2{margin:0 0 14px;font-size:20px}.chat-dialog-x{position:absolute;right:14px;top:12px;border:0;font-size:24px;padding:0 6px;background:transparent}
.chat-dialog-content{display:flex;flex-direction:column;gap:10px}.chat-dialog-content input:not([type=checkbox]){width:100%}.chat-dialog-content>div:not(.chat-seg):not(.chat-chips):not(.chat-rename):not(.chat-members){display:flex;flex-direction:column;gap:10px}
.chat-seg{display:flex;background:#eef2f5;border-radius:9px;padding:3px;gap:3px}.chat-seg button{flex:1;border:0;background:transparent;padding:8px}.chat-seg button.on{background:#293942;color:#fff}
.chat-pick{display:flex;flex-direction:column;gap:6px;max-height:46vh;overflow:auto}
.chat-pick-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;white-space:normal}.chat-pick-item.person{flex-direction:row;align-items:center;gap:10px}
.chat-pick-item small,.chat-member small{display:block;color:var(--muted);font-size:12px}
.chat-hint{font-size:12px;color:var(--muted)}
.chat-chips{display:flex;flex-wrap:wrap;gap:6px}.chat-chip{padding:5px 10px;border-radius:14px;background:#eaf1f6;font-size:12px}
.chat-members{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow:auto}
.chat-member{display:flex;align-items:center;gap:10px;padding:6px 2px;border-bottom:1px solid #eef1f4}.chat-member span{flex:1}
.chat-danger{color:#a8302a}.chat-rename{display:flex;gap:6px;flex-wrap:wrap}.chat-rename input{flex:1;min-width:160px}
.chat-lightbox{position:fixed;inset:0;background:#0c1318e6;z-index:300;display:flex;align-items:center;justify-content:center;cursor:zoom-out}
.chat-lightbox img{max-width:94vw;max-height:92vh;border-radius:6px}.chat-lightbox button{position:absolute;top:14px;right:18px;font-size:28px;background:transparent;color:#fff;border:0}
@media(max-width:820px){
 .chat{grid-template-columns:1fr;height:calc(100vh - 64px - 90px)}
 .chat-main{display:none}.chat.chat-open .chat-side{display:none}.chat.chat-open .chat-main{display:flex}
 .chat-back{display:block}.chat-bubble{max-width:85%}.chat-msgs{padding:12px}
 #chat-send{padding:10px 12px}.chat-ic{width:38px;height:38px}
}

/* Меню слева: группы разделов */
.crm-sidebar nav{flex:1;min-height:0;overflow-y:auto;padding:14px 10px}
.crm-sidebar nav a{padding:10px 10px;margin-bottom:2px}
.crm-nav-group{margin:16px 10px 6px;font-size:11px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:#8fa3b0}
@media(max-width:650px){.crm-sidebar nav a{padding:10px 0}.crm-nav-group{font-size:0;height:1px;margin:10px 6px;background:#425a68}}

/* Чат в шапке: значок со счётчиком на каждой странице */
.crm-top-chat{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink)}
.crm-top-chat svg{width:18px;height:18px;flex:none}
.crm-top-chat:hover,.crm-top-chat.active{background:#eaf0f3}
.crm-top-chat.hot{border-color:#e8b7a8;background:#fff4f0}
.crm-top-chat .crm-nav-badge{margin-left:0;background:#d9480f}
@media(max-width:650px){.crm-top-chat{padding:7px 9px}.crm-top-chat-label{display:none}}

/* ---------- Дежурить за сотрудника ---------- */
.duty-replace-new{margin-top:8px}
#dutyReplaceBox .select2-container{margin-bottom:10px}

.crm-has-second{padding-right:30px!important}.crm-second-add{position:absolute;right:3px;top:8px;z-index:8;padding:2px 7px!important;font-size:16px!important}.crm-has-second>select{width:calc(100% - 28px)!important}.access-dialog .select2-container{min-width:260px}
