/* Компактный каркас ERP: неподвижные шапка/навигация, отдельная рабочая область. */
:root{font-family:Arial,sans-serif;color:#233952;background:#f3f6fa;font-size:16px;--navy:#172e4a;--blue:#1764bc;--border:#d4dfeb}*{box-sizing:border-box}body{margin:0;display:flex;height:100dvh;overflow:hidden}button,input,select,textarea{font:inherit}button,.button,.erp-guide-link{border:1px solid #c7d7e8;border-radius:7px;background:#fff;color:#294560;min-height:38px;padding:8px 13px;cursor:pointer;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}button:hover,.button:hover{border-color:#1764bc;background:#edf4ff}button:disabled{cursor:default;opacity:.55}button.primary{color:#fff;background:#1764bc;border-color:#1764bc}.sidebar{background:var(--navy);color:#fff;width:260px;flex:none;display:flex;flex-direction:column;padding:23px 16px 15px}.brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;font-size:24px;font-weight:bold;margin-bottom:34px}.crest{border:1px solid #8eabc5;border-radius:10px;padding:8px;color:#e4d39d;font:40px Georgia}.brand small{display:block;font-size:13px;font-weight:normal;line-height:1.6;color:#bbcce0}.sidebar nav{overflow:auto;flex:1}.sidebar nav a{display:flex;align-items:center;color:#d8e3f1;text-decoration:none;padding:13px 12px;border-radius:7px;margin:4px 0;gap:12px}.sidebar nav a:hover,.sidebar nav a.active{background:#284c70;color:#fff}.sidebar footer{border-top:1px solid #42576f;padding-top:16px;display:grid;gap:8px}.sidebar footer strong{font-size:14px;overflow-wrap:anywhere}.sidebar footer small{color:#c3d0df}.sidebar footer button{justify-self:start;background:transparent;color:#dce8f7}.shell{display:flex;flex-direction:column;flex:1;min-width:0;padding:26px 38px 0}.page-header{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--border);padding-bottom:18px;flex:none}h1{font-size:29px;margin:0 0 6px}h2{font-size:21px;margin:0}h3{font-size:18px;margin:0}p{line-height:1.5}.page-header p{margin:0;color:#687d94}.erp-form-header-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.erp-guide-link{color:#1260b3}main{flex:1;min-height:0;overflow:auto;padding:18px 0}.bottom{display:flex;justify-content:space-between;gap:12px;flex:none;padding:10px 0;border-top:1px solid var(--border);color:#647b93;font-size:13px}.message,.notice{border:1px solid #e4b04f;border-radius:7px;background:#fff7e6;padding:13px;margin-top:12px;line-height:1.5}.message{background:#fff0f2;border-color:#f1a5ae;color:#ad2035}.filters{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-bottom:14px}.filters label{display:grid;gap:5px;font-size:14px;font-weight:600}.filters input{min-width:240px}input,select,textarea{background:#fff;color:#243c56;border:1px solid #cbd9e8;border-radius:6px;min-height:38px;padding:8px 10px;max-width:100%}textarea{resize:vertical}input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:3px solid #99bfed;outline-offset:2px}input[type=checkbox]{min-height:18px;width:18px;height:18px;accent-color:#1764bc}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}.card{border:1px solid var(--border);background:#fff;border-radius:10px;padding:21px;display:flex;gap:15px;align-items:start;text-decoration:none;color:inherit;min-height:130px}.card[href]:hover{border-color:#1764bc;box-shadow:0 3px 12px #17345215}.card p{margin:8px 0 0;color:#6c7f94;font-size:14px}.card .icon{width:45px;height:45px;flex:none;background:#edf4fd;border-radius:10px;display:grid;place-items:center;font-size:23px}.card.unavailable{opacity:.7}.tag{display:inline-block;background:#eaf0f6;border-radius:4px;padding:4px 6px;font-size:12px;margin-top:10px}.section-title{margin:24px 0 12px}.section-title:first-child{margin-top:0}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:8px;background:#fff}table{border-collapse:collapse;width:100%;font-size:14px}th,td{text-align:left;border-bottom:1px solid #e2e8f0;padding:10px 12px;vertical-align:middle}th{position:sticky;top:0;background:#eaf0f7;z-index:1;color:#405b76;white-space:nowrap}td small{display:block;color:#6a7d92;margin-top:5px}tr:last-child td{border-bottom:0}tr:hover td{background:#f6f9fd}.row-button{padding:5px 9px;min-height:30px;font-size:14px}td.wrap{white-space:pre-wrap;max-width:500px;overflow-wrap:anywhere}.login{max-width:510px;margin:8vh auto;background:#fff;border:1px solid var(--border);border-radius:12px;padding:34px}.login p{color:#6b7d94}.login button{width:100%;margin-top:12px}.empty{padding:35px 12px;color:#6a7e95}.overlay{position:fixed;inset:0;background:#11263b99;z-index:100;display:grid;place-items:center;padding:20px}.dialog{display:flex;flex-direction:column;width:min(850px,100%);max-height:90dvh;background:#fff;border-radius:12px;box-shadow:0 16px 50px #0003}.dialog-header{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none}.dialog-header button{font-size:22px;border:0}.dialog-body{padding:20px 22px;overflow:auto;min-height:0}.dialog-footer{padding:14px 22px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:9px;flex:none}.field{display:grid;gap:7px;margin-bottom:15px;font-size:14px;font-weight:600}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.details{display:grid;grid-template-columns:minmax(150px,1fr) 2fr;gap:0;margin:0}.details dt,.details dd{padding:10px 0;border-bottom:1px solid #e6ecf2;margin:0;overflow-wrap:anywhere}.details dt{color:#687c92}.error-text{color:#b42c40;line-height:1.5}#toasts{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:max-content;pointer-events:none;z-index:200;max-width:min(510px,90vw)}.toast{background:#16794e;color:#fff;border-radius:8px;padding:16px 20px;box-shadow:0 6px 25px #0002;line-height:1.5}.toast.error{background:#b72d42}[hidden]{display:none!important}
@media(max-width:850px){.sidebar{width:210px}.shell{padding:20px 20px 0}.page-header{align-items:start;flex-direction:column}.erp-form-header-actions{justify-content:flex-start}h1{font-size:25px}.grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}}@media(max-width:600px){body{flex-direction:column}.sidebar{width:100%;padding:9px 12px;display:block;flex:none}.brand{font-size:20px;margin:0}.brand .crest{font-size:26px;padding:1px 8px}.brand small{display:none}.sidebar nav{display:flex;gap:4px;max-height:55px;white-space:nowrap}.sidebar nav a{font-size:14px;padding:9px 10px;margin:3px 0}.sidebar footer{display:none}.shell{padding:15px 15px 0;min-height:0}.page-header{gap:10px;padding-bottom:12px}h1{font-size:23px}.page-header p{font-size:14px}.filters input{min-width:0;width:100%}.filters label{flex:1;min-width:150px}.fields{grid-template-columns:1fr}.overlay{padding:10px}.dialog{max-height:95dvh}.dialog-body{padding:15px}.details{grid-template-columns:1fr}.details dt{border:0;padding-bottom:0}.grid{grid-template-columns:1fr}.login{padding:23px;margin:15px auto}}
@media(max-width:600px){.sidebar footer{display:flex;position:absolute;top:9px;right:12px;border:0;padding:0}.sidebar footer strong,.sidebar footer small{display:none}.sidebar footer button{min-height:30px;padding:5px 9px;font-size:14px}}

/* Логотип владельца сохраняет пропорции и читаемость на тёмной панели. */
.brand img.crest{display:block;width:76px;height:60px;flex:0 0 76px;object-fit:contain;background:#fff;border:0;border-radius:6px;padding:2px}
@media(max-width:600px){.brand img.crest{width:52px;height:36px;flex-basis:52px;padding:1px}}

/* Версия открытой сборки видна и в компактной шапке на узком экране. */
.brand .brand-version{display:block;font-size:.75rem;font-weight:400;letter-spacing:0;line-height:1.4;color:#bbcce0;margin-top:3px;white-space:nowrap}

/* Цветные значки сохраняют размер и выравнивание в боковом и мобильном меню. */
.sidebar nav .section-icon{display:inline-grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:1.375rem;line-height:1.2}
.card .icon{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}

/* Подтверждения и уведомления остаются над вложенными корпоративными окнами расписания/журнала. */
.overlay{z-index:140000}#toasts{z-index:140001}

/* Длинные подтверждения полномочий сохраняют верхние действия на узком экране. */
.permission-filters label{min-width:0;max-width:100%}.permission-filters select{width:100%;max-width:300px}.permission-filters input{min-width:0}
.role-dialog .dialog-header,.role-dialog .dialog-footer{flex-wrap:wrap}.role-dialog .dialog-body{overflow-wrap:anywhere}
@media(max-width:600px){.role-dialog .dialog-header{padding:12px 15px;gap:10px}.role-dialog .dialog-header h2{font-size:20px}.role-dialog .dialog-header .erp-form-header-actions{width:100%;justify-content:flex-end}.role-dialog .dialog-footer{padding:12px 15px}.role-dialog .dialog-footer button{max-width:100%}}
