body{margin:0;font-family:Montserrat,system-ui,sans-serif;color:#14232b;background:#f3f6f8;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
/* === AdminExchange.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.tabs{display:flex;gap:4px;border-bottom:2px solid #e1e8ec;overflow-x:auto}
.tabs a{padding:12px 16px;font-size:13.5px;font-weight:700;color:#5b707b;text-decoration:none;white-space:nowrap}
.tabs a.on{color:#0b3a4c;box-shadow:inset 0 -3px 0 #e31e25}
.er{display:grid;grid-template-columns:130px 130px 1fr 110px 110px;gap:8px;padding:10px 12px;border-bottom:1px solid #edf1f4;font-size:13px;font-weight:600;align-items:center}
.tg{padding:2px 9px;border-radius:6px;font-size:11px;font-weight:800;white-space:nowrap}
.l{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin:0 0 6px}
.b{height:42px;padding:0 16px;border-radius:10px;border:1px solid #d8e2e7;background:#fff;font-weight:700;font-size:13px}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === AdminRef.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.tabs{display:flex;gap:4px;border-bottom:2px solid #e1e8ec;overflow-x:auto}
.tabs a{padding:12px 16px;font-size:13.5px;font-weight:700;color:#5b707b;text-decoration:none;white-space:nowrap}
.tabs a.on{color:#0b3a4c;box-shadow:inset 0 -3px 0 #e31e25}
.side a{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-radius:10px;font-size:13.5px;font-weight:700;color:#2c424d;text-decoration:none;min-height:24px}
.side a.on{background:#0b3a4c;color:#fff}
.l{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin:0 0 6px}
.f{display:block;width:100%;box-sizing:border-box;height:44px;border:1px solid #c5d3d9;border-radius:10px;padding:0 12px;font:inherit;font-size:14px;font-weight:600}
.rr{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr 70px;gap:8px;padding:10px 12px;border-bottom:1px solid #edf1f4;font-size:13px;font-weight:600;align-items:center}
.tg{padding:2px 9px;border-radius:6px;font-size:11px;font-weight:800}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === AdminUsers.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.tabs{display:flex;gap:4px;border-bottom:2px solid #e1e8ec;overflow-x:auto}
.tabs a{padding:12px 16px;font-size:13.5px;font-weight:700;color:#5b707b;text-decoration:none;white-space:nowrap;min-height:20px}
.tabs a.on{color:#0b3a4c;box-shadow:inset 0 -3px 0 #e31e25}
.ur{display:grid;grid-template-columns:1.6fr 1.2fr 1.2fr 90px 100px;gap:8px;padding:10px 12px;border-bottom:1px solid #edf1f4;font-size:13px;font-weight:600;align-items:center}
.ur.on{background:#eef6f9;box-shadow:inset 3px 0 0 #0b3a4c}
.tg{padding:2px 9px;border-radius:6px;font-size:11px;font-weight:800;white-space:nowrap}
.l{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin:0 0 6px}
.chip{display:inline-flex;align-items:center;padding:6px 12px;border-radius:999px;border:1px solid #d8e2e7;background:#fff;font-size:12px;font-weight:700;min-height:34px}
.chip.on{background:#0b3a4c;border-color:#0b3a4c;color:#fff}
.pm{width:100%;border-collapse:collapse;font-size:12.5px;min-width:520px}
.pm th{font-size:11px;color:#5b707b;font-weight:800;padding:7px 8px;text-align:center;border-bottom:2px solid #e1e8ec}
.pm th:first-child,.pm td:first-child{text-align:left}
.pm td{padding:8px;border-bottom:1px solid #edf1f4;text-align:center;font-weight:700}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === Check.dc === */

.tb{width:100%;border-collapse:collapse;font-size:13px;min-width:760px}
.tb th{text-align:left;font-size:11px;font-weight:800;color:#5b707b;padding:8px 10px;border-bottom:2px solid #e1e8ec;letter-spacing:.05em}
.tb td{padding:9px 10px;border-bottom:1px solid #edf1f4;vertical-align:top;font-weight:500;line-height:1.45}
.tb td:first-child{font-weight:700;color:#0b3a4c;width:34%}
.rw{display:grid;grid-template-columns:34% 1fr 150px;gap:12px;padding:9px 10px;border-bottom:1px solid #edf1f4;font-size:13px;font-weight:500;line-height:1.45;align-items:start}
.st{display:inline-block;padding:2px 9px;border-radius:6px;font-size:11.5px;font-weight:800;white-space:nowrap}

/* === Dashboard.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.h{font-size:14px;font-weight:800;color:#0b3a4c}
.seg{display:flex;background:#e6edf1;border-radius:10px;padding:3px}
.seg button{padding:6px 12px;border-radius:8px;font-size:12.5px;font-weight:600;color:#4a5f6a;min-height:30px}
.seg button.on{background:#fff;color:#0b3a4c;box-shadow:0 1px 2px rgba(11,58,76,.18)}
.hm{display:grid;grid-template-columns:90px repeat(30,minmax(8px,1fr));gap:2px;align-items:center}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === Dialogs.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.dlg{background:#fff;border-radius:18px;box-shadow:0 14px 40px rgba(11,58,76,.18);overflow:hidden;display:flex;flex-direction:column;border:1px solid #d8e2e7}
.hd{padding:14px 18px;border-top:4px solid #e31e25;display:flex;align-items:center;justify-content:space-between;gap:10px}
.hd b{font-size:16px;font-weight:800;color:#0b3a4c}
.hd span{font-size:11.5px;font-weight:600;color:#5b707b;display:block}
.bd{padding:4px 18px 16px;display:flex;flex-direction:column;gap:12px;flex:1}
.ft{padding:12px 18px;background:#f8fafb;border-top:1px solid #e1e8ec;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.b{height:42px;padding:0 16px;border-radius:10px;border:1px solid #d8e2e7;background:#fff;font-weight:700;font-size:13px}
.b.p{background:#e31e25;border-color:#e31e25;color:#fff;font-weight:800}
.b.d{background:#0b3a4c;border-color:#0b3a4c;color:#fff}
.chip{padding:6px 12px;border-radius:999px;border:1px solid #d8e2e7;background:#fff;font-size:12px;font-weight:700;min-height:34px}
.chip.on{background:#0b3a4c;border-color:#0b3a4c;color:#fff}
.l{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin-bottom:5px}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal span{height:34px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;border-radius:7px}
.r{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 0;border-top:1px solid #edf1f4;font-size:13px;align-items:center}
.tg{padding:2px 8px;border-radius:6px;font-size:11px;font-weight:700}
.x{display:block;width:100%;box-sizing:border-box;height:44px;border:1px solid #c5d3d9;border-radius:10px;padding:0 12px;font:inherit;font-size:14px;font-weight:600}

/* === Main.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.seg{display:flex;background:#e6edf1;border-radius:10px;padding:3px}
.seg button{padding:6px 12px;border-radius:8px;font-size:12.5px;font-weight:600;color:#4a5f6a;min-height:30px}
.seg button.on{background:#fff;color:#0b3a4c;box-shadow:0 1px 2px rgba(11,58,76,.18)}


.c i{position:absolute;top:1px;right:3px;font-size:9px;font-style:normal;font-weight:800}

.sw{width:26px;height:22px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;vertical-align:middle}
.pill{padding:6px 14px;border-radius:999px;background:#fff;border:1px solid #d8e2e7;font-size:12.5px;font-weight:600;min-height:32px}
.sa{height:38px;min-width:42px;padding:0 10px;border-radius:9px;background:#145268;color:#fff;font-weight:800;font-size:13px}
.sa:hover{background:#1d6a85}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === Palette.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit;text-align:left}
.g{font-size:10.5px;font-weight:800;letter-spacing:.07em;color:#5b707b;padding:12px 18px 4px}
.it{display:flex;align-items:center;gap:12px;padding:8px 18px;min-height:46px;width:100%;box-sizing:border-box}
.it.on{background:#eef6f9;box-shadow:inset 3px 0 0 #0b3a4c}
.ic{width:30px;height:30px;border-radius:8px;background:#eef3f6;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#0b3a4c;flex:none}
.k{margin-left:auto;font-size:11px;font-weight:700;border:1px solid #c5d3d9;border-radius:5px;padding:1px 6px;color:#4a5f6a;background:#fff;white-space:nowrap}
.t{font-size:13.5px;font-weight:700}.s{font-size:11.5px;font-weight:500;color:#5b707b}

/* === Panels.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.pn{background:#fff;border-radius:18px;border:1px solid #d8e2e7;box-shadow:0 14px 40px rgba(11,58,76,.14);overflow:hidden;display:flex;flex-direction:column}
.hd{padding:14px 18px;border-top:4px solid #0b3a4c;display:flex;justify-content:space-between;align-items:center;gap:10px}
.hd b{font-size:17px;font-weight:800;color:#0b3a4c}
.sec{padding:14px 18px;border-top:1px solid #edf1f4}
.l{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin-bottom:6px}
.b{height:42px;padding:0 14px;border-radius:10px;border:1px solid #d8e2e7;background:#fff;font-weight:700;font-size:13px}
.tg{padding:2px 8px;border-radius:6px;font-size:11px;font-weight:700}
.mc{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.mc span{height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.j{display:grid;grid-template-columns:62px 1fr auto;gap:10px;padding:11px 18px;border-top:1px solid #edf1f4;font-size:12.5px;align-items:start}

/* === Params.dc === */

.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:20px 22px}
.h{font-size:11.5px;font-weight:800;letter-spacing:.08em;color:#5b707b;margin-bottom:10px}
.tb{width:100%;border-collapse:collapse;font-size:13px}
.tb th{text-align:left;font-size:11px;font-weight:800;color:#5b707b;padding:8px 10px;border-bottom:2px solid #e1e8ec}
.tb td{padding:9px 10px;border-bottom:1px solid #edf1f4;vertical-align:top;font-weight:500;line-height:1.4}
.tb td:first-child{font-weight:800;color:#0b3a4c;white-space:nowrap}
.k{display:inline-block;padding:1px 6px;border:1px solid #c5d3d9;border-bottom-width:2px;border-radius:5px;font-size:11px;font-weight:700;background:#fff}

/* === PlanSmall.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.seg{display:flex;background:#e6edf1;border-radius:10px;padding:3px;gap:2px}
.seg button{flex:1;padding:6px 8px;border-radius:8px;font-size:12px;font-weight:700;color:#4a5f6a;min-height:36px}
.seg button.on{background:#0b3a4c;color:#fff}
.ib{width:40px;height:40px;border-radius:10px;border:1px solid #d8e2e7;background:#fff;display:flex;align-items:center;justify-content:center;flex:none}


.c i{position:absolute;top:1px;right:3px;font-size:8px;font-style:normal;font-weight:800}
.pl{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin:0 0 6px}
.tg{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;font-size:13px;font-weight:600}
.sw{width:46px;height:26px;border-radius:13px;background:#c5d3d9;position:relative;flex:none}
.sw:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff}
.sw.on{background:#0b3a4c}.sw.on:after{left:23px}
.sa{height:40px;min-width:40px;padding:0 8px;border-radius:9px;background:#145268;color:#fff;font-weight:800;font-size:13px}
.pill{padding:6px 12px;border-radius:999px;background:#fff;border:1px solid #d8e2e7;font-size:12px;font-weight:600;min-height:34px;white-space:nowrap}

/* === Reports.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.seg{display:flex;background:#e6edf1;border-radius:10px;padding:3px}
.seg button{padding:6px 12px;border-radius:8px;font-size:12.5px;font-weight:600;color:#4a5f6a;min-height:30px}
.seg button.on{background:#fff;color:#0b3a4c;box-shadow:0 1px 2px rgba(11,58,76,.18)}
.tr{display:grid;grid-template-columns:2fr 70px 90px 90px 90px;gap:8px;padding:9px 0;border-bottom:1px solid #edf1f4;font-size:13px;font-weight:600;align-items:center}
.tr span:nth-child(n+2){text-align:right}
.f{display:grid;grid-template-columns:repeat(31,minmax(0,1fr));gap:2px}
.f span{height:30px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:700}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
.tr{grid-template-columns:1.6fr 40px 60px 60px 60px;font-size:12px}
}

/* === Scenarios.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.rail a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;color:#9fc0cd;margin:2px 0;position:relative}
.rail a.on{background:#145268;color:#fff}
.rail a.on:after{content:"";position:absolute;left:-10px;top:10px;bottom:10px;width:4px;border-radius:0 4px 4px 0;background:#e31e25}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:18px 20px}
.btn{height:40px;padding:0 14px;border-radius:10px;border:1px solid #d8e2e7;background:#fff;font-size:13px;font-weight:700}
@media (max-width:900px){
.shell{flex-direction:column-reverse !important;min-height:0 !important}
.rail{width:100% !important;height:60px;flex-direction:row !important;padding:6px 12px !important;justify-content:space-around !important;position:sticky;bottom:0;z-index:50}
.rail > div{display:none !important}
.rail a.on:after{left:12px !important;right:12px;top:-6px !important;bottom:auto !important;width:auto !important;height:4px;border-radius:0 0 4px 4px}
}

/* === SheetSmall.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.seg{display:flex;background:#e6edf1;border-radius:12px;padding:3px;gap:2px}
.seg button{flex:1;padding:8px 6px;border-radius:10px;font-size:14px;font-weight:800;color:#4a5f6a;min-height:46px}
.seg button.on{background:#0b3a4c;color:#fff}
.seg button.warn.on{background:#a5121a}
.chip{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;border:1px solid #d8e2e7;background:#fff;font-size:13px;font-weight:700;min-height:44px}
.chip.on{border:2px solid #0b3a4c;background:#eef6f9}
.chip.off{background:#f3f6f8;color:#8a9ba4;border-style:dashed}
.l{font-size:11px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin:0 0 6px}
.st{display:flex;gap:3px}
.st span{flex:1;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;max-width:46px}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:14px}

/* === States.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.cap{padding:12px 18px;border-bottom:1px solid #edf1f4;font-size:11.5px;font-weight:800;letter-spacing:.06em;color:#5b707b}
.b{padding:18px;display:flex;flex-direction:column;gap:10px;flex:1}
.t{font-size:13px;line-height:1.5;font-weight:500;color:#2c424d}
.btn{height:42px;padding:0 16px;border-radius:10px;font-size:13px;font-weight:700;border:1px solid #d8e2e7;background:#fff}
.btn.p{background:#e31e25;color:#fff;border-color:#e31e25;font-weight:800}
.btn.d{background:#0b3a4c;color:#fff;border-color:#0b3a4c}


/* === Structure.dc === */

.card{background:#fff;border:1px solid #e1e8ec;border-radius:16px;padding:20px 22px}
.h{font-size:11.5px;font-weight:800;letter-spacing:.08em;color:#5b707b;margin-bottom:10px}
.t{font-size:13px;font-weight:500;line-height:1.5;color:#2c424d}
.kbd{display:inline-block;min-width:22px;padding:2px 7px;border:1px solid #c5d3d9;border-bottom-width:2px;border-radius:6px;background:#fff;font-size:11.5px;font-weight:700;text-align:center}
.pb{display:flex;gap:12px;padding:10px 0;border-top:1px solid #edf1f4;font-size:13px;line-height:1.45}
.pb b{flex:0 0 220px;color:#a5121a;font-weight:700}
.pb span{flex:1 1 200px;color:#2c424d;font-weight:500}
.zone{border-radius:16px;padding:16px 18px;flex:1 1 260px}
.step{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:13px;font-weight:600}
.n{width:24px;height:24px;border-radius:50%;background:#0b3a4c;color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex:none}

/* === Substitution.dc === */

button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.seg{display:inline-flex;background:#e6edf1;border-radius:10px;padding:3px;gap:2px}
.seg
.seg button.on{background:#0b3a4c;color:#fff}
.seg button.warn.on{background:#a5121a}
.chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid #d8e2e7;background:#fff;font-size:12px;font-weight:700;min-height:34px}
.chip.on{border:2px solid #0b3a4c;background:#eef6f9}
.chip.off{background:#f3f6f8;color:#8a9ba4;border-style:dashed;text-decoration:none}
.lbl{font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#5b707b;margin-bottom:5px}
.st{display:flex;gap:2px}
.st span{width:26px;height:24px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.rowc{display:grid;grid-template-columns:230px 190px 1fr 190px;gap:16px;padding:16px 22px;border-top:1px solid #e1e8ec;align-items:start}

/* ============================================================
   Dioxus-обёртки: классы для интерактивных состояний,
   которых нет в статических макетах
   ============================================================ */

/* sticky-шапка таблицы: при прокрутке прилипает к верху */
.sheet-scroll { overflow: visible; max-height: none; }
.row.head { position: sticky; top: 0; z-index: 10; background: #fbfcfd; }
.row.head-2 { position: sticky; top: 22px; z-index: 9; background: #fbfcfd; }

/* день-колонки: sticky слева для ФИО */
.row .who { position: sticky; left: 0; z-index: 3; background: #fff; border-right: 1px solid #e1e8ec; min-width: 270px; width: 270px; }
.row.head .who { z-index: 11; }
.row.head-2 .who { z-index: 10; }

/* итоги sticky справа */
.row .tot { position: sticky; right: 0; background: #fff; border-left: 1px solid #e1e8ec; }
.row .tot:first-of-type { border-left: 2px solid #e1e8ec; }

/* ячейки факта — курсор default */
.c.fct { cursor: default; opacity: .75; }

/* ячейки без данных */
.c.nd {
  background: repeating-linear-gradient(45deg,#f6f7f9,#f6f7f9 4px,#eef0f3 4px,#eef0f3 8px);
  color: #c3c9d1; font-weight: 500;
}

/* зоны шапки: sticky */
.zone-row { position: sticky; top: 0; z-index: 12; background: #fbfcfd; }
.zone-row-2 { position: sticky; top: 22px; z-index: 11; background: #fbfcfd; }

/* плавающая панель выделения: sticky bottom */
.selbar {
  position: sticky; bottom: 18px;
  display: flex; justify-content: center;
  margin-top: -70px; padding: 0 20px;
  pointer-events: none; z-index: 100;
}
.selbar-in {
  pointer-events: auto;
  background: #0b3a4c; color: #fff;
  border-radius: 16px; padding: 10px 12px 10px 16px;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 14px;
  box-shadow: 0 12px 36px rgba(5,25,35,.35);
  animation: selbar-in .18s ease-out;
}
@keyframes selbar-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.selbar-title { font-size: 13.5px; font-weight: 800; line-height: 1.2; }
.selbar-sub { font-size: 11px; font-weight: 600; color: #b7ccd6; }
.selbar .sa {
  height: 38px; min-width: 42px; padding: 0 10px;
  border-radius: 9px; background: #145268; color: #fff;
  font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.selbar .sa:hover { background: #1d6a85; }

/* модальные формы */
.modal-back {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,25,35,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: #fff; border-radius: 18px;
  width: 560px; max-width: 94vw; max-height: 86vh; overflow: auto;
  box-shadow: 0 30px 80px rgba(5,25,35,.45);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 12px; border-bottom: 1px solid #e1e8ec;
}
.modal-title { font-size: 16px; font-weight: 800; color: #0b3a4c; }

/* тост */
.toast {
  position: fixed; right: 20px; bottom: 80px; z-index: 300;
  display: flex; align-items: center; gap: 12px;
  background: #0b3a4c; color: #f1f5f9;
  border-radius: 10px; padding: 11px 14px;
  max-width: 620px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 12px 36px rgba(5,25,35,.35);
}
.toast-undo { background: #e31e25; color: #fff; border-radius: 7px; font-size: 12px; font-weight: 700; padding: 6px 12px; }
.toast-x { color: #94a3b8; font-size: 13px; padding: 4px; }

/* контрол масштаба */
.zoombar {
  display: flex; align-items: center; gap: 4px;
  background: #e6edf1; border-radius: 10px; padding: 3px;
}
.zoombar button {
  width: 34px; height: 30px; border-radius: 8px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.zoombar button:hover { background: #fff; box-shadow: 0 1px 2px rgba(11,58,76,.18); }
.zoombar .vf-z { font-size: 12.5px; font-weight: 700; min-width: 44px; text-align: center; }

/* дропдауны */
.dd { position: relative; display: inline-block; }
.dd-btn {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #d8e2e7; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #14232b;
  padding: 0 12px; height: 38px; white-space: nowrap;
}
.dd-btn:hover { border-color: #0b3a4c; }
.dd-backdrop { position: fixed; inset: 0; z-index: 399; }
.dd-menu {
  z-index: 400; background: #fff;
  border: 1px solid #e1e8ec; border-radius: 0 0 12px 12px; border-top: none;
  box-shadow: 0 12px 30px rgba(5,25,35,.16);
  min-width: 180px; width: max-content; max-width: 92vw;
  padding: 4px;
}
.dd-opt { text-align: left; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: #14232b; font-weight: 500; white-space: nowrap; }
.dd-opt:hover { background: #eef6f9; }
.dd-opt.on { color: #0b3a4c; font-weight: 700; }

/* календарь-поповер */
.cal-back { position: fixed; inset: 0; z-index: 398; }
.cal-pop {
  position: fixed; z-index: 400;
  width: 348px; max-width: 94vw;
  background: #fff; border: 1px solid #e1e8ec; border-radius: 14px;
  box-shadow: 0 20px 50px rgba(5,25,35,.22);
  padding: 14px;
}
.cal-modes { display: flex; gap: 4px; margin-bottom: 10px; }
.cal-mode {
  flex: 1; border: 1px solid #d8e2e7; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: #4a5f6a;
  padding: 6px 4px; background: #fff;
}
.cal-mode:hover { border-color: #0b3a4c; color: #0b3a4c; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-cap { font-size: 13.5px; font-weight: 800; color: #0b3a4c; }
.cal-nav { width: 28px; height: 28px; border-radius: 8px; color: #5b707b; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.cal-nav:hover { background: #edf1f4; color: #14232b; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 10.5px; font-weight: 800; color: #5b707b; text-transform: uppercase; padding: 3px 0; }
.cal-d { height: 34px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: #14232b; display: flex; align-items: center; justify-content: center; position: relative; }
.cal-d.blank { visibility: hidden; }
.cal-d.we { color: #a5121a; }
.cal-d.fct { background: #eef3f6; color: #5b707b; }
.cal-d:not(.nodata):not(.blank):hover { background: #eef6f9; color: #0b3a4c; }
.cal-d.inwin { box-shadow: inset 0 0 0 1.5px #b7ccd6; color: #0b3a4c; font-weight: 700; }
.cal-d.pin { background: #eef6f9 !important; color: #0b3a4c !important; }
.cal-d.pin-a { box-shadow: inset 0 0 0 2px #0b3a4c; }
.cal-d.nodata { color: #c3c9d1; background: repeating-linear-gradient(45deg,#f6f7f9,#f6f7f9 4px,#eef0f3 4px,#eef0f3 8px); cursor: not-allowed; }
.cal-d.today::after { content: ""; position: absolute; bottom: 3px; left: 50%; margin-left: -2px; width: 4px; height: 4px; border-radius: 50%; background: #e31e25; }
.cal-presets { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cal-preset { border: 1px solid #d8e2e7; border-radius: 999px; font-size: 12px; font-weight: 600; color: #14232b; padding: 4px 11px; background: #fff; }
.cal-preset:hover { border-color: #0b3a4c; color: #0b3a4c; }
.cal-legend { display: flex; gap: 12px; margin-top: 10px; }
.cal-legend .it { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #5b707b; }
.cal-legend .sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid #e1e8ec; }
.cal-legend .sw.plan { background: #fff; }
.cal-legend .sw.fct { background: #eef3f6; }
.cal-legend .sw.nodata { background: repeating-linear-gradient(45deg,#f6f7f9,#f6f7f9 3px,#eef0f3 3px,#eef0f3 6px); }
.cal-legend .sw.inwin { box-shadow: inset 0 0 0 1.5px #b7ccd6; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1f4; margin-top: 10px; padding-top: 9px; }
.cal-cur { font-size: 11.5px; color: #5b707b; }

/* печатная форма */
.paper { border: 1px solid #e1e8ec; border-radius: 10px; background: #fff; padding: 18px 20px; }
.paper-title { text-align: center; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.paper-req { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #14232b; margin-bottom: 12px; }
.paper-grid { border: 1px solid #e1e8ec; border-radius: 6px; overflow: hidden; }
.paper-row { display: flex; }
.paper-row .pc { flex: 1; text-align: center; font-size: 12px; padding: 6px 2px; border-left: 1px solid #edf1f4; border-top: 1px solid #edf1f4; min-width: 26px; }
.paper-row .pc:first-child { border-left: none; }
.paper-head-row .pc { background: #f8fafb; font-weight: 700; color: #5b707b; border-top: none; font-size: 11px; }
.pc.pc-name { flex: 0 0 130px; text-align: left; padding-left: 8px; font-weight: 600; background: #f8fafb; }
.paper-total { font-size: 12px; color: #14232b; margin-top: 10px; font-weight: 600; }
.paper-sign { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 12px; color: #5b707b; }

/* таблицы в отчётах/модалах */
.ntable { width: 100%; border-collapse: collapse; }
.ntable th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #5b707b; padding: 6px 8px; border-bottom: 1px solid #e1e8ec; }
.ntable td { font-size: 13px; padding: 9px 8px; border-bottom: 1px solid #edf1f4; }
.ntable tr:last-child td { border-bottom: none; }
.ntable th.r, .ntable td.r { text-align: right; }

/* панель подмены (модальная) */
.modal.subpanel { width: 920px; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; padding: 0; border-top: 4px solid #e31e25; border-radius: 20px; }
.sp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 20px 12px; border-bottom: 1px solid #e1e8ec; }
.sp-title { display: block; font-size: 16px; font-weight: 800; color: #0b3a4c; }
.sp-sub { display: block; font-size: 12px; color: #5b707b; margin-top: 2px; }
.sp-who { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 10px 20px; background: #f8fafb; border-bottom: 1px solid #e1e8ec; }
.sp-who-cell { display: flex; flex-direction: column; gap: 1px; }
.sp-who-name { font-size: 14px; font-weight: 800; }
.sp-who-role { font-size: 11.5px; color: #5b707b; }
.sp-k { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #5b707b; font-weight: 800; }
.sp-v { font-size: 12.5px; color: #2c424d; font-weight: 600; white-space: nowrap; }
.sp-more { display: inline-block; margin-left: 7px; vertical-align: 1px; background: #eef6f9; color: #0b3a4c; border: 1px solid #cfe3ea; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.sp-targets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 20px; border-bottom: 1px solid #e1e8ec; background: #fbfcfd; }
.sp-tg { border: 1px solid #d8e2e7; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: #2c424d; padding: 4px 11px; white-space: nowrap; }
.sp-tg:hover { border-color: #0b3a4c; color: #0b3a4c; }
.sp-tg.on { background: #eef6f9; border-color: #0b3a4c; color: #0b3a4c; }
.sp-tg.done { background: #ecfdf5; border-color: #a7f3d0; color: #0f7a4d; }
.sp-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 4px 20px; padding: 14px 20px 8px; overflow: auto; align-items: start; }
.sp-cands { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.sp-right .info-line { margin-bottom: 8px; }
.sp-done { padding: 18px 20px; overflow: auto; }
.sp-foot { padding: 8px 20px 12px; font-size: 11px; color: #5b707b; border-top: 1px solid #e1e8ec; margin-top: auto; }

/* кандидаты */
.cand { border: 1px solid #e1e8ec; border-radius: 12px; padding: 9px 11px; margin-bottom: 10px; cursor: pointer; background: #fff; }
.cand:hover { border-color: #93c5fd; background: #fafcff; }
.cand.on { border: 2px solid #0b3a4c; background: #eef6f9; padding: 8px 10px; }
.cand-top { display: flex; align-items: center; gap: 8px; }
.cand-top .cand-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; }
.cand-top .cand-money { margin-left: auto; flex-shrink: 0; font-size: 13.5px; font-weight: 800; }
.cand-money.ok { color: #0f7a4d; }
.cand-money.bad { color: #8a4a08; }
.pass-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pass-dot.ok { background: #0f7a4d; }
.pass-dot.warn { background: #f59e0b; }
.pass-dot.fail { background: #e31e25; }
.cand-sub { margin: 3px 0 0 24px; font-size: 12px; color: #5b707b; }
.cand .fitline { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 7px 0 0 24px; padding: 6px 9px; border-radius: 7px; font-size: 11px; line-height: 1.5; }
.fitline.ok { background: #f0fdf4; color: #15803d; }
.fitline.warn { background: #fef3e2; color: #8a4a08; }
.fitline.fail { background: #fef2f2; color: #a5121a; }
.cand .cand-foot { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 0 24px; }
.cand-hours { font-size: 12px; font-weight: 600; }
.cand-hours.ok { color: #0f7a4d; }
.cand-hours.bad { color: #8a4a08; }

/* финансовый результат */
.info-line { font-size: 12px; color: #5b707b; margin: 2px 2px 12px; }
.result { background: #f8fafb; border-radius: 10px; padding: 13px 14px; margin-bottom: 12px; }
.result-val { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-val.ok { color: #0f7a4d; }
.result-val.bad { color: #8a4a08; }
.result-cap { font-size: 12px; color: #5b707b; margin: 2px 0 10px; }
.result-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-top: 1px dashed #d8e2e7; }
.result-row .k { color: #5b707b; }
.result-row .v { font-weight: 700; color: #2c424d; white-space: nowrap; }
.result-row.extra .v { color: #0b3a4c; }

.warnbox { background: #fef3e2; border: 1px solid #fde9b8; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #8a4a08; margin-bottom: 12px; line-height: 1.45; }

/* прочие модальные элементы */
.mtext { font-size: 13px; color: #2c424d; line-height: 1.55; margin-bottom: 12px; }
.mwarn { font-size: 12.5px; color: #8a4a08; background: #fef3e2; border: 1px solid #fde9b8; border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
.mhint { font-size: 11.5px; color: #5b707b; margin: 10px 0 12px; line-height: 1.5; }
.mlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mlist-i { background: #f8fafb; border: 1px solid #edf1f4; border-radius: 6px; font-size: 12px; padding: 3px 8px; color: #2c424d; }
.mrow { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.mfield { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #5b707b; flex: 1; min-width: 160px; margin-bottom: 10px; }
.mfield select, .mfield input { font: inherit; font-size: 13px; color: #14232b; border: 1px solid #d8e2e7; border-radius: 8px; padding: 7px 9px; background: #fff; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.pill.gray { background: #f1f5f9; color: #5b707b; }
.pill.blue { background: #eef6f9; color: #0b3a4c; }

/* KPI карточки для дашборда */
.kpi { background: #fff; border: 1px solid #e1e8ec; border-radius: 16px; padding: 14px 16px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kpi-name { font-size: 12.5px; font-weight: 600; color: #5b707b; }
.kpi-val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12px; margin-top: 4px; color: #5b707b; }

/* дашборд сетки */
.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.chart-svg { width: 100%; height: auto; display: block; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.bar-label { width: 62px; font-size: 12.5px; font-weight: 700; color: #2c424d; }
.bar-track { flex: 1; height: 16px; background: #eef3f6; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px 0 0 5px; background: #0b3a4c; }
.bar-val { width: 58px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* сценарии */
.scen-item { border: 1px solid #e1e8ec; border-radius: 12px; padding: 13px 16px; display: flex; align-items: center; gap: 14px; }
.scen-item.active { border-color: #0b3a4c; background: #eef6f9; }
.scen-name { font-weight: 700; font-size: 14px; }
.scen-sub { font-size: 12.5px; color: #5b707b; margin-top: 2px; }
.scen-metrics { margin-left: auto; text-align: right; font-size: 13px; }
.scen-btns { display: flex; gap: 8px; margin-left: 18px; flex-shrink: 0; }
.ctable { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ctable th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #5b707b; padding: 6px 8px; border-bottom: 1px solid #e1e8ec; }
.ctable td { font-size: 13px; padding: 9px 8px; border-bottom: 1px solid #edf1f4; }
.ctable td.r, .ctable th.r { text-align: right; }

/* отчёты */
.ok-text { font-size: 13px; color: #0f7a4d; font-weight: 600; }
.risk { border-radius: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; }
.risk.red { background: #fef2f2; color: #a5121a; border: 1px solid #f0b8bb; }
.risk.amber { background: #fef3e2; color: #8a4a08; border: 1px solid #fde9b8; }
.risk.blue { background: #eef6f9; color: #0b3a4c; border: 1px solid #cfe3ea; }

/* план-мелочи */
.page { max-width: 1340px; margin: 0 auto; padding: 20px 24px 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 800; color: #0b3a4c; }
.page-sub { font-size: 13px; color: #5b707b; margin-top: 3px; }

/* missing controls */
.sec-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5b707b; margin: 0 0 8px 2px; }
.purposes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fit-toggle { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #2c424d; font-weight: 600; margin-bottom: 14px; cursor: pointer; }
.fit-toggle input { width: 15px; height: 15px; accent-color: #0b3a4c; cursor: pointer; }
.btn-x { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #5b707b; font-size: 14px; }
.btn-x:hover { background: #edf1f4; color: #14232b; }
.mut { color: #5b707b; }
.linkbtn { color: #0b3a4c; font-size: 12.5px; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }
.busy-badge { background: #fef3e2; color: #8a4a08; border: 1px solid #fde9b8; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.done-card { text-align: center; padding: 26px 10px 10px; }
.done-ico { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px; background: #ecfdf5; color: #0f7a4d; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.done-t { font-size: 15px; font-weight: 700; }
.done-d { font-size: 13px; color: #5b707b; margin: 8px 0 2px; line-height: 1.5; }
.done-money { font-size: 13px; color: #2c424d; font-weight: 600; margin: 6px 0 16px; }
.done-money b { color: #0f7a4d; }
.btn-block { width: 100%; padding: 10px 14px; font-size: 13.5px; }
.vstrip { display: flex; align-items: center; gap: 10px; background: #fef3e2; border-bottom: 1px solid #fde9b8; padding: 7px 20px; font-size: 13px; color: #8a4a08; }
.vstrip-badge { background: #f59e0b; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; border-radius: 6px; padding: 2px 8px; text-transform: uppercase; }
.vstrip-text { flex: 1; }
.cnt-badge { background: #0b3a4c; color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; margin-left: 6px; }
.abs-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 300px; overflow: auto; }
.abs-row { display: flex; align-items: center; gap: 10px; border: 1px solid #e1e8ec; border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.abs-row-name { flex: 1; min-width: 180px; }
.abs-date { font: inherit; font-size: 12.5px; color: #14232b; border: 1px solid #d8e2e7; border-radius: 7px; padding: 5px 7px; background: #fff; }
.match-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e1e8ec; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.match-info { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.match-info .mut { font-size: 12px; color: #5b707b; }

/* misc */
.tsep { display: inline-block; width: 1px; height: 22px; background: #e1e8ec; margin: 0 4px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.badge-days { background: #fef3e2; color: #8a4a08; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.dash-foot { display: flex; justify-content: space-between; max-width: 1340px; margin: 0 auto; padding: 0 24px 18px; font-size: 12px; color: #5b707b; }
.var-row { margin-bottom: 14px; }
.var-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.var-track { height: 16px; background: #eef3f6; border-radius: 5px; position: relative; }
.var-fill { height: 100%; border-radius: 5px 0 0 5px; }
.save-badge { display: inline-block; background: #ecfdf5; color: #0f7a4d; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.var-lines { font-size: 12.5px; color: #5b707b; margin: 4px 0 0 0; }
.var-lines b { color: #2c424d; }
.var-draft { font-size: 11.5px; color: #5b707b; margin-top: 2px; }
.scen-diffs { margin-top: 8px; }
.scen-diff { font-size: 12px; color: #4a5f6a; padding: 2px 0; }

/* table-foot */
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid #edf1f4; background: #fbfcfd; font-size: 12px; color: #5b707b; font-weight: 500; }

/* группировка: строки */
.grp-h .chev { display: inline-block; width: 14px; color: #5b707b; transition: transform .12s; }
.grp-h.closed .chev { transform: rotate(-90deg); }

/* план-мейн: сетка с зумом */
.plan-main { padding: 0 0 20px 0; }

/* ============================================================
   ТАБЕЛЬ: дизайн-цвета из Main.dc.html, применённые к HTML-таблице
   (структура не меняется — только визуал)
   ============================================================ */

/* Таблица */
table.tabel {
  border-collapse: separate; border-spacing: 0;
  table-layout: fixed; width: 100%;
  background: #fff;
}
.tabel th, .tabel td {
  font-size: 12.5px; height: 32px;
  border-bottom: 1px solid #edf1f4;
  padding: 0 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  text-align: left; background: #fff;
  font-variant-numeric: tabular-nums;
}
.tabel td.day, .tabel th.day { text-align: center; padding: 0 2px; }

/* --- зоны ФАКТ/ПЛАН в шапке --- */
th.zone {
  text-align: center; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; height: 22px; margin-top: 4px;
  border-bottom: 1px solid #e1e8ec;
}
th.zone.fz { background: #0b3a4c; color: #fff; border-radius: 6px 0 0 6px; }
th.zone.pz { background: #e7f0f4; color: #0b3a4c; border-radius: 0 6px 6px 0; }
th.zone.tz { background: #fbfcfd; color: #5b707b; }
th.zone.nz { background: #f6f7f9; color: #c3c9d1; }

/* --- строка дат в шапке --- */
th.day-h {
  text-align: center; vertical-align: middle;
  height: 42px; font-size: 12.5px; font-weight: 600; color: #14232b;
  border-bottom: 1px solid #e1e8ec; background: #fbfcfd;
}
th.day-h .dow { display: block; font-size: 10px; font-weight: 600; color: #5b707b; margin-top: 1px; }
th.day-h.we { color: #a5121a; }
th.day-h.we .dow { color: #a5121a; }
th.day-h.nd { color: #c3c9d1; }

/* --- закреплённые колонки --- */
:root { --hh1: 22px; --w-n: 42px; --w-fio: 270px; --w-role: 130px; --tbh: 0px; }
th.st-n, td.st-n { left: 0; width: var(--w-n); text-align: center; color: #5b707b; font-size: 11px; }
th.st-fio, td.st-fio { left: var(--w-n); width: var(--w-fio); font-weight: 700; color: #14232b; }
th.st-role, td.st-role { left: calc(var(--w-n) + var(--w-fio)); width: var(--w-role); color: #5b707b; font-size: 11px; }
th.st-n { position: sticky; z-index: 7; }
th.st-fio { position: sticky; z-index: 7; }
th.st-role { position: sticky; z-index: 7; }

td.st-n, td.st-fio, td.st-role { position: sticky; z-index: 3; border-right: 1px solid #e1e8ec; }
td.st-fio .badge-days { margin-left: 5px; vertical-align: 1px; }

/* --- разделитель факт/план --- */
.split { border-left: 2px solid #0b3a4c !important; }

/* --- группы --- */
tr.grp td {
  background: #eef3f6; font-size: 12.5px; font-weight: 800; color: #0b3a4c;
  height: 32px; cursor: pointer; border-bottom: 1px solid #e1e8ec;
}
tr.grp td:hover { background: #e2ebf0; }
tr.grp .chev { display: inline-block; width: 14px; color: #5b707b; transition: transform .12s; }
tr.grp.closed .chev { transform: rotate(-90deg); }
tr.grp .cnt { color: #5b707b; font-weight: 600; }

/* --- строки --- */
tbody tr.row:hover td { background: #f6f9fb; }
tr.row.sel td { background: #eef6f9; }
tr.row.sel td.st-fio { color: #0b3a4c; }
tr.row.clickable { cursor: pointer; }

/* ============================================================
   ЯЧЕЙКИ ТАБЕЛЯ — дизайн-цвета из Main.dc.html
   ============================================================ */

/* 12-часовая смена — бирюзовый тинт */
td.cw {
  text-align: center; font-weight: 700;
  background: #cfe3ea !important; color: #0b3a4c;
}
/* Отдых — белый, бледный текст */
td.cr {
  text-align: center; font-weight: 500;
  background: #fff !important; color: #8a9ba4;
}
/* Отпуск — жёлтый */
td.cv {
  text-align: center; font-weight: 700;
  background: #fde9b8 !important; color: #7a4a00;
}
/* Больничный — розовый */
td.cb {
  text-align: center; font-weight: 700;
  background: #f9c9cc !important; color: #8f0f16;
}
/* Планируемое отсутствие — синий */
td.cop {
  text-align: center; font-weight: 700;
  background: #dbe4ff !important; color: #27408f;
}
/* Подмена (назначение) — тёмный бирюзовый, белый текст */
td.c-hl {
  text-align: center; font-weight: 800;
  background: #0b3a4c !important; color: #fff !important;
}
/* Ячейка назначения (кто работает вместо) */
td.c-as {
  box-shadow: inset 0 0 0 1.5px #8fb5c3;
  color: #0b3a4c !important; font-weight: 700;
}
/* Выделенные ячейки */
td.seld {
  outline: 3px solid #e31e25;
  outline-offset: -3px;
  background: #fff1f1 !important;
  color: #14232b !important;
}
/* Факт — затонирован */
td.day.fct { cursor: default; opacity: .75; }
tr.row:hover td.day.fct { opacity: .75; }
/* Нет данных — штриховка */
td.nodata-cell {
  background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 4px, #eef0f3 4px, #eef0f3 8px);
  color: #c3c9d1; cursor: default;
}

/* --- строка комплектности --- */
tr.comp td {
  background: #f6f9fb; border-top: 1px solid #e1e8ec;
  font-weight: 800; height: 36px; font-size: 12.5px;
}
tr.comp td.lbl { color: #0b3a4c; font-size: 12px; }
tr.comp td.lbl small { display: block; font-size: 11px; font-weight: 600; color: #5b707b; }
tr.comp td.ok { color: #0b3a4c; text-align: center; }
tr.comp td.low {
  color: #a5121a; text-align: center; font-weight: 800;
  background: #fbd5d7; box-shadow: inset 0 0 0 2px #e31e25;
}
tr.comp td.over { color: #0b3a4c; text-align: center; background: #e0f2ee; }
tr.comp td.nd { background: #f6f9fb; color: #c3c9d1; font-weight: 500; }
tr.comp td.comp-sum {
  text-align: center; color: #a5121a; font-size: 11.5px; font-weight: 700;
  border-left: 1px solid #edf1f4;
}

/* --- итоговые колонки --- */
th.rh {
  text-align: center; font-size: 11px; font-weight: 700; color: #5b707b;
  width: 62px; border-left: 1px solid #e1e8ec; background: #fbfcfd;
}
td.rc {
  text-align: center; font-size: 12.5px; color: #14232b;
  font-variant-numeric: tabular-nums; border-left: 1px solid #edf1f4;
}
td.rc.ro { color: #b45309; font-weight: 800; }

/* --- легенда --- */
.legend { display: flex; gap: 14px; align-items: center; }
.legend .it { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 600; color: #4a5f6a; }
.lg-w { background: #cfe3ea; color: #0b3a4c; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-r { background: #fff; border: 1px solid #d8e2e7; color: #6b808b; font-weight: 500; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-v { background: #fde9b8; color: #7a4a00; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-b { background: #f9c9cc; color: #8f0f16; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-p { background: #dbe4ff; color: #27408f; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-a { background: #0b3a4c; color: #fff; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }

/* --- футер таблицы --- */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid #edf1f4;
  background: #fbfcfd; font-size: 12px; color: #5b707b; font-weight: 500;
}

/* --- бейдж отклонений --- */
.badge-days {
  background: #fef3e2; color: #8a4a08;
  font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}

/* --- карточка таблицы --- */
.tablewrap {
  flex: 1; min-width: 0;
  background: #fff; border: 1px solid #e1e8ec; border-radius: 14px;
  overflow: visible;
}
.scroll { overflow: visible; max-height: none; }

/* --- план-мейн --- */
.plan-main {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 0 20px 20px 20px;
}

/* пилюли-фильтры (дизайн Main.dc.html) */
.pill {
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #d8e2e7;
  font-size: 12.5px; font-weight: 600; min-height: 32px;
  cursor: pointer; white-space: nowrap;
}
.pill:hover { border-color: #0b3a4c; }
.pill.on { background: #0b3a4c; color: #fff; font-weight: 700; border-color: #0b3a4c; }
.pill.danger { border-color: #f0b8bb; color: #a5121a; font-weight: 700; }
.pill.danger.on { background: #fef2f2; }

/* сегмент-кнопки: активная/неактивная */
.seg-on {
  padding: 6px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #0b3a4c; min-height: 30px;
  background: #fff; box-shadow: 0 1px 2px rgba(11,58,76,.18);
  cursor: pointer;
}
.seg-off {
  padding: 6px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #4a5f6a; min-height: 30px;
  cursor: pointer;
}

/* ============================================================
   РЕЙЛ: контейнер (дизайн Main.dc.html — инлайн-стили из макета)
   ============================================================ */

.rail {
  width: 68px; flex: none;
  background: #0b3a4c;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0; gap: 2px;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
}
.app-main { margin-left: 68px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rail-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: #e31e25; color: #fff;
  font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; flex: none;
  cursor: pointer;
}
.rail-user {
  margin-top: auto;
  width: 36px; height: 36px; border-radius: 50%;
  background: #145268; color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   БАББЛ ВЫДЕЛЕНИЯ (функциональный компонент)
   ============================================================ */

.selbub {
  position: fixed; z-index: 120;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  max-width: 96vw;
  animation: selbub-in .18s ease-out;
}
@keyframes selbub-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.selbub-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11, 58, 76, .85);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(5, 25, 35, .25);
}
.selbub-pill:hover { background: rgba(11, 58, 76, .95); }
.selbub-panel {
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border: 1px solid #e1e8ec;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(5, 25, 35, .22);
  padding: 8px 10px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 640px;
}
.selbub-panel .chip {
  border: 1px solid #d8e2e7; border-radius: 999px;
  background: #fff; color: #14232b;
  font-size: 12.5px; font-weight: 600; padding: 6px 12px;
  white-space: nowrap; cursor: pointer;
}
.selbub-panel .chip:hover { border-color: #0b3a4c; color: #0b3a4c; }
.selbub-panel .chip.sub { border-color: #0b3a4c; color: #0b3a4c; }
.selbub-panel .btn-x { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #5b707b; font-size: 14px; cursor: pointer; }
.selbub-panel .btn-x:hover { background: #edf1f4; color: #14232b; }

/* тост */
.toast {
  position: fixed; right: 20px; bottom: 80px; z-index: 300;
  display: flex; align-items: center; gap: 12px;
  background: #0b3a4c; color: #f1f5f9;
  border-radius: 10px; padding: 11px 14px;
  max-width: 620px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 12px 36px rgba(5, 25, 35, .35);
}
.toast-text { flex: 1; }
.toast-undo { background: #e31e25; color: #fff; border-radius: 7px; font-size: 12px; font-weight: 700; padding: 6px 12px; white-space: nowrap; cursor: pointer; }
.toast-x { color: #94a3b8; font-size: 13px; padding: 4px; cursor: pointer; }

/* кнопка ✕ */
.btn-x {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #5b707b; font-size: 14px; cursor: pointer;
}
.btn-x:hover { background: #edf1f4; color: #14232b; }


/* ============================================================
   ДИЗАЙН-TABLE: точный визуал из Main.dc.html на HTML-таблице
   ============================================================ */

/* Карточка таблицы */
.tablewrap {
  flex: 1; min-width: 0;
  background: #fff;
  border: 1px solid #e1e8ec;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 20px;
  box-shadow: none;
}
.scroll { overflow: auto; max-height: none; }

/* Таблица: стандартный table-layout, но с дизайн-цветами */
table.tabel {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  min-width: 1000px;
  background: #fff;
  font-variant-numeric: tabular-nums;
}

/* Все ячейки: базовый дизайн-стиль */
table.tabel th, table.tabel td {
  font-size: 12.5px;
  height: 32px;
  border-bottom: 1px solid #edf1f4;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: #fff;
  font-weight: 600;
}
table.tabel td.day, table.tabel th.day { text-align: center; padding: 0 2px; }

/* Заголовки */
table.tabel th {
  background: #fbfcfd;
  font-size: 11px;
  font-weight: 700;
  color: #5b707b;
  height: auto;
  padding: 6px 4px;
}
th.day-h {
  text-align: center; vertical-align: middle;
  height: 42px; font-size: 13px; font-weight: 700; color: #14232b;
  border-bottom: 1px solid #e1e8ec; background: #fbfcfd;
}
th.day-h .dow { display: block; font-size: 10px; font-weight: 600; color: #5b707b; margin-top: 1px; }
th.day-h.we { color: #a5121a; }

/* Зоны */
th.zone {
  text-align: center; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; height: 22px;
  border-bottom: 1px solid #e1e8ec; background: #fbfcfd;
  padding: 0;
}
th.zone.fz { background: #0b3a4c; color: #fff; border-radius: 6px 0 0 6px; }
th.zone.pz { background: #e7f0f4; color: #0b3a4c; border-radius: 0 6px 6px 0; }
th.zone.tz { background: #fbfcfd; color: #5b707b; }
th.zone.nz { background: #f6f7f9; color: #c3c9d1; }

/* Sticky колонки */
:root { --hh1: 22px; --w-n: 42px; --w-fio: 270px; --w-role: 130px; }
th.st-n, td.st-n { left: 0; width: var(--w-n); min-width: var(--w-n); text-align: center; color: #5b707b; font-size: 11px; }
th.st-fio, td.st-fio { left: var(--w-n); width: var(--w-fio); min-width: var(--w-fio); font-weight: 700; color: #14232b; text-align: left; }
th.st-role, td.st-role { left: calc(var(--w-n) + var(--w-fio)); width: var(--w-role); min-width: var(--w-role); color: #5b707b; font-size: 11px; text-align: left; }

th.st-n, th.st-fio, th.st-role { position: sticky; top: 0; z-index: 7; background: #fbfcfd; }
td.st-n, td.st-fio, td.st-role { position: sticky; z-index: 3; border-right: 1px solid #e1e8ec; }
td.st-fio { display: table-cell; }
td.st-fio > span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; padding: 3px 12px; }
td.st-fio .nm { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
td.st-fio .ps { font-size: 11px; font-weight: 500; color: #5b707b; white-space: nowrap; overflow: hidden; text-ellipsis: ellipsis; max-width: 100%; }

/* Разделитель факт/план */
.split { border-left: 2px solid #0b3a4c !important; }

/* Группы */
tr.grp td {
  background: #eef3f6;
  font-size: 12.5px; font-weight: 800; color: #0b3a4c;
  height: 32px; cursor: pointer;
  border-bottom: 1px solid #e1e8ec;
  text-align: left; padding-left: 12px;
}
tr.grp td:hover { background: #e2ebf0; }
tr.grp .chev { display: inline-block; width: 14px; color: #5b707b; }
tr.grp .cnt { color: #5b707b; font-weight: 600; }

/* Строки */
tbody tr.row:hover td { background: #f6f9fb; }
tr.row.sel td { background: #eef6f9; }
tr.row.clickable { cursor: pointer; }

/* Итоговые колонки */
th.rh {
  text-align: center; font-size: 11px; font-weight: 700; color: #5b707b;
  width: 62px; min-width: 62px; border-left: 1px solid #e1e8ec; background: #fbfcfd;
}
td.rc {
  text-align: center; font-size: 12.5px; color: #14232b;
  font-variant-numeric: tabular-nums; border-left: 1px solid #edf1f4;
  font-weight: 600;
}
td.rc.ro { color: #b45309; font-weight: 800; }

/* Комплектность */
tr.comp td {
  background: #f6f9fb;
  font-size: 12.5px; font-weight: 800; height: 36px;
  text-align: center;
}
tr.comp td.lbl {
  text-align: left; color: #0b3a4c; font-size: 12px; padding-left: 12px;
  border-right: 1px solid #e1e8ec;
}
tr.comp td.ok { color: #0b3a4c; }
tr.comp td.low { color: #a5121a; background: #fbd5d7; box-shadow: inset 0 0 0 2px #e31e25; }
tr.comp td.over { color: #0b3a4c; background: #e0f2ee; }
tr.comp td.nd { color: #c3c9d1; font-weight: 500; }
tr.comp td.comp-sum { text-align: center; color: #a5121a; font-size: 11.5px; font-weight: 700; border-left: 1px solid #edf1f4; }

/* Легенда */
.legend { display: flex; gap: 14px; align-items: center; }
.legend .it { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 600; color: #4a5f6a; }
.legend .sw {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; border-radius: 5px;
  font-size: 11px; font-weight: 700;
}
.lg-w { background: #cfe3ea; color: #0b3a4c; }
.lg-r { background: #fff; border: 1px solid #d8e2e7; color: #6b808b; }
.lg-v { background: #fde9b8; color: #7a4a00; }
.lg-b { background: #f9c9cc; color: #8f0f16; }
.lg-p { background: #dbe4ff; color: #27408f; }
.lg-a { background: #0b3a4c; color: #fff; }

/* Футер таблицы */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid #edf1f4;
  background: #fbfcfd; font-size: 12px; color: #5b707b; font-weight: 500;
}

/* План-мейн */
.plan-main {
  display: flex; flex-direction: column; gap: 0;
  padding: 0; align-items: stretch;
}

/* Бейдж */
.badge-days {
  background: #fef3e2; color: #8a4a08;
  font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
  margin-left: 5px;
}

/* Override: tr должен быть table-row внутри table */
table.tabel tr { display: table-row !important; }
table.tabel td, table.tabel th { display: table-cell !important; }
/* кроме групп-заголовков и комплектности */
table.tabel tr.grp td { display: table-cell !important; }


/* ============================================================
   ДИЗАЙН Main.dc.html — таблица-табель пиксель-перфект
   HTML <table> стилизована под CSS Grid из макета.
   table-layout:fixed + colgroup = точные ширины колонок.
   ============================================================ */

/* Карточка таблицы */
.tablewrap {
  flex: 1; min-width: 0;
  background: #fff;
  border: 1px solid #e1e8ec;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 20px;
}
.scroll { overflow: auto; }

/* Таблица */
table.tabel {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  min-width: 1000px;
  background: #fff;
  font-family: Montserrat, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Все ячейки — базовый дизайн */
table.tabel th, table.tabel td {
  font-size: 12.5px;
  height: 32px;
  border-bottom: 1px solid #edf1f4;
  border-left: 1px solid #f1f4f6;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: #fff;
  font-weight: 600;
  box-sizing: border-box;
}
table.tabel td.day, table.tabel th.day { text-align: center; padding: 0 2px; }
table.tabel td:first-child, table.tabel th:first-child { border-left: none; }

/* --- ШАПКА --- */
th.zone {
  text-align: center; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; height: 22px;
  border-bottom: none; padding: 4px 0 0 0;
  background: #fbfcfd; border-left: none;
}
th.zone.fz {
  background: #0b3a4c; color: #fff;
  border-radius: 6px 0 0 6px;
  margin-top: 4px;
}
th.zone.pz {
  background: #e7f0f4; color: #0b3a4c;
  border-radius: 0 6px 6px 0;
  margin-top: 4px;
}
th.zone.tz { background: #fbfcfd; color: #5b707b; border-radius: 0; }
th.zone.nz { background: #f6f7f9; color: #c3c9d1; }

th.day-h {
  text-align: center; vertical-align: middle;
  height: 42px; font-size: 13px; font-weight: 700; color: #14232b;
  border-bottom: 1px solid #e1e8ec; background: #fbfcfd;
}
th.day-h .dow { display: block; font-size: 10px; font-weight: 600; color: #5b707b; margin-top: 1px; }
th.day-h.we { color: #a5121a; }
th.day-h.we .dow { color: #a5121a; }
th.day-h.nd { color: #c3c9d1; }

/* --- sticky колонки --- */
:root { --hh1: 22px; --w-n: 42px; --w-fio: 270px; --w-role: 130px; --tbh: 0px; }

th.st-n, td.st-n { left: 0; width: var(--w-n); min-width: var(--w-n); text-align: center; color: #5b707b; font-size: 11px; }
th.st-fio, td.st-fio { left: var(--w-n); width: var(--w-fio); min-width: var(--w-fio); font-weight: 700; color: #14232b; text-align: left; }
th.st-role, td.st-role { left: calc(var(--w-n) + var(--w-fio)); width: var(--w-role); min-width: var(--w-role); color: #5b707b; font-size: 11px; text-align: left; }

th.st-n, th.st-fio, th.st-role { position: sticky; top: 0; z-index: 7; background: #fbfcfd; }
td.st-n, td.st-fio, td.st-role { position: sticky; z-index: 3; border-right: 1px solid #e1e8ec; border-left: none; }

/* ФИО колонка — двухуровневая как в макете */
td.st-fio { padding: 3px 12px; }
td.st-fio .fio-name { font-size: 12.5px; font-weight: 700; }
td.st-fio .fio-role { font-size: 11px; font-weight: 500; color: #5b707b; }

/* --- разделитель факт/план --- */
.split { border-left: 2px solid #0b3a4c !important; }

/* --- группы --- */
tr.grp td {
  background: #eef3f6;
  font-size: 12.5px; font-weight: 800; color: #0b3a4c;
  height: 32px; cursor: pointer;
  border-bottom: 1px solid #e1e8ec;
  text-align: left; padding-left: 12px;
  border-left: none;
}
tr.grp td:hover { background: #e2ebf0; }
tr.grp .chev { display: inline-block; width: 14px; color: #5b707b; }
tr.grp .cnt { color: #5b707b; font-weight: 600; }

/* --- строки --- */
tbody tr.row:hover td { background: #f6f9fb; }
tr.row.sel td { background: #eef6f9; }
tr.row.clickable { cursor: pointer; }

/* --- итоги справа --- */
th.rh {
  text-align: center; font-size: 11px; font-weight: 700; color: #5b707b;
  width: 62px; min-width: 62px; border-left: 1px solid #e1e8ec; background: #fbfcfd;
}
td.rc {
  text-align: center; font-size: 12.5px; color: #14232b;
  font-variant-numeric: tabular-nums; border-left: 1px solid #edf1f4;
  font-weight: 600;
}
td.rc.ro { color: #b45309; font-weight: 800; }

/* --- комплектность --- */
tr.comp td {
  background: #f6f9fb;
  font-size: 12.5px; font-weight: 800; height: 36px;
  text-align: center; border-left: 1px solid #edf1f4;
}
tr.comp td.lbl {
  text-align: left; color: #0b3a4c; font-size: 12px; padding-left: 12px;
  border-right: 1px solid #e1e8ec; border-left: none;
}
tr.comp td.ok { color: #0b3a4c; }
tr.comp td.low {
  color: #a5121a; background: #fbd5d7;
  box-shadow: inset 0 0 0 2px #e31e25;
}
tr.comp td.over { color: #0b3a4c; background: #e0f2ee; }
tr.comp td.nd { color: #c3c9d1; font-weight: 500; }
tr.comp td.comp-sum {
  text-align: center; color: #a5121a; font-size: 11.5px; font-weight: 700;
  border-left: 1px solid #edf1f4;
}

/* --- легенда --- */
.legend { display: flex; gap: 14px; align-items: center; }
.legend .it { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 600; color: #4a5f6a; }
.lg-w { background: #cfe3ea; color: #0b3a4c; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-r { background: #fff; border: 1px solid #d8e2e7; color: #6b808b; font-weight: 500; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-v { background: #fde9b8; color: #7a4a00; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-b { background: #f9c9cc; color: #8f0f16; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-p { background: #dbe4ff; color: #27408f; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.lg-a { background: #0b3a4c; color: #fff; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 5px; }

/* --- футер таблицы --- */
.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid #edf1f4;
  background: #fbfcfd; font-size: 12px; color: #5b707b; font-weight: 500;
}

/* --- бейдж --- */
.badge-days {
  background: #fef3e2; color: #8a4a08;
  font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
  margin-left: 5px;
}

/* --- план-мейн --- */
.plan-main {
  display: flex; flex-direction: column;
  padding: 0; align-items: stretch;
}
/* Working controls and responsive layouts from design/Params.dc.html. */
* { box-sizing: border-box; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7aa3b3; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .45; }
.plan-switch { position: relative; }
.plan-switch-button { border: 2px solid #0b3a4c; }
.plan-menu { position:absolute;top:calc(100% + 6px);right:0;min-width:260px;z-index:80;background:#fff;border:1px solid #d8e2e7;border-radius:12px;padding:6px;box-shadow:0 12px 36px #0b3a4c26; }
.plan-menu button { display:block;width:100%;padding:12px;text-align:left;border-radius:8px;font-size:13px;font-weight:600; }
.plan-menu button:hover,.command-palette>button:hover { background:#eef6f9; }
.density-0 table.tabel tbody tr.row td { height:26px;padding-top:2px;padding-bottom:2px; }
.density-1 table.tabel tbody tr.row td { height:32px; }
.density-2 table.tabel tbody tr.row td { height:42px; }
.lens-1 table.tabel td.day,.lens-2 table.tabel td.day { font-size:10px; }
table.tabel td.lens-low { background:#f9c9cc;color:#8f0f16; }
table.tabel td.lens-ok { background:#e0f2ee;color:#0b3a4c; }
.overlay { position:fixed;inset:0;z-index:150;background:#0b3a4c66;display:flex;justify-content:center;align-items:flex-start;padding:10vh 20px 24px;overflow:auto; }
.employee-overlay { justify-content:flex-end;padding:0; }
.employee-panel { width:480px;max-width:100%;height:100%;overflow:auto;background:#fff;box-shadow:-12px 0 40px #0b3a4c26;padding:24px; }
.employee-heading { display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #e1e8ec; }
.employee-heading h2 { font-size:19px;color:#0b3a4c;margin:0; }
.employee-heading p { font-size:12px;color:#5b707b; }
.employee-metrics { display:flex;justify-content:space-between;gap:16px;padding:20px 0; }
.employee-metrics small,.employee-metrics b { display:block; }
.employee-metrics small { color:#5b707b;font-size:10px;font-weight:700;margin-bottom:8px; }
.employee-metrics b { color:#0b3a4c;font-size:20px; }
.employee-event { padding:12px 0;border-bottom:1px solid #e1e8ec;font-size:12px;line-height:1.6; }
.command-palette { background:#fff;border-radius:16px;padding:20px;width:580px;max-width:100%;box-shadow:0 20px 60px #0b3a4c33; }
.command-palette input { width:100%;border:1px solid #c5d3d9;border-radius:10px;font:inherit;padding:12px;margin:14px 0; }
.command-palette>button { display:block;width:100%;text-align:left;padding:12px;border-radius:8px;font-size:13px;font-weight:600; }
.variant-banner { position:fixed;bottom:16px;left:88px;padding:12px 18px;background:#f3edff;border:1px solid #7c3aed;color:#5b21b6;border-radius:10px;z-index:70;font-size:12px;font-weight:700; }
.data-note { color:#7a4a00;background:#fff7ed;padding:10px 12px;border-radius:8px;font-size:12px;line-height:1.5; }
.report-expand { text-align:left;font-weight:700; }
.report-person { display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;padding:9px 12px;background:#f3f7f9;border-bottom:1px solid #e1e8ec;font-size:12px; }
@media (max-width:1279px) { :root { --w-fio:168px; --w-role:110px; } .sp-grid { grid-template-columns:1fr; } }
@media (max-width:900px) {
 .app-main { margin-left:0;padding-bottom:72px; }
 .rail { position:fixed;top:auto;bottom:0;left:0;right:0;width:100%!important;height:60px;box-sizing:border-box; }
 .rail>a { margin:0; }
 .app { display:block; }
 :root { --w-fio:150px;--w-role:100px;--w-n:32px; }
 .plan-root .scroll>header { padding:10px 12px!important;gap:8px!important; }
 .sp-modal { width:calc(100vw - 16px)!important;max-height:calc(100dvh - 80px)!important; }
 .variant-banner { left:12px;right:12px;bottom:72px; }
 .employee-panel { padding-bottom:80px; }
}
@media print { .rail,.plan-root .scroll>header,.toast,.variant-banner { display:none!important; } .app-main { margin:0;padding:0; } }
.save-error { position:fixed;top:0;left:68px;right:0;padding:12px;background:#f9c9cc;color:#8f0f16;z-index:200;font-size:13px; }
.fio-role { display:block;font-size:10.5px;color:#5b707b;font-weight:500;margin-top:3px; }
@media (max-width:900px) { .save-error { left:0; } }
.admin-page { padding:24px;display:flex;flex-direction:column;gap:16px; }
.admin-page h1 { color:#0b3a4c;margin:0;font-size:26px;font-weight:800; }
.admin-page h2 { color:#0b3a4c;font-size:17px;margin:0 0 16px; }
.admin-subtitle { margin:0;color:#5b707b;font-size:13px; }
.admin-tabs { display:flex;border-bottom:2px solid #e1e8ec;overflow:auto; }
.admin-tabs button { padding:14px 18px;font-size:13px;font-weight:700;white-space:nowrap;color:#5b707b; }
.admin-tabs button.on { color:#0b3a4c;box-shadow:inset 0 -3px #e31e25; }
.admin-columns { display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start; }
.admin-columns>section { flex:1 1 550px;min-width:0; }
.admin-editor { flex:1 1 320px;max-width:460px;display:flex;flex-direction:column;gap:14px; }
.admin-editor label { font-size:12px;font-weight:600;color:#5b707b; }
.admin-editor input:not([type=radio]):not([type=checkbox]),.admin-tools input { display:block;width:100%;margin-top:6px;padding:12px;border:1px solid #c5d3d9;border-radius:10px;font:inherit; }
.admin-role-options label,.admin-checkbox { display:flex;align-items:center;gap:10px;min-height:44px; }
.admin-role-options input,.admin-checkbox input { width:18px;height:18px;accent-color:#0b3a4c; }
.admin-tools { display:flex;gap:12px;align-items:center;margin-bottom:16px; }
.admin-tools input { margin:0;min-width:0;flex:1; }
.admin-table-scroll { overflow-x:auto; }
.admin-user-row { display:grid;grid-template-columns:1.2fr 1.3fr 1fr 110px;gap:12px;align-items:center;padding:14px 8px;border-bottom:1px solid #edf1f4;width:100%;text-align:left;font-size:12px;min-width:580px; }
.admin-user-row.selected { background:#eef6f9;box-shadow:inset 3px 0 #0b3a4c; }
.admin-table-head { font-size:10px;font-weight:800;color:#5b707b;background:#fbfcfd; }
.admin-status { background:#f9c9cc;color:#8f0f16;border-radius:6px;padding:5px;font-size:10px;font-weight:700; }
.admin-status.ok { background:#e0f2ee;color:#0f7a4d; }
.admin-permissions>div { display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #edf1f4;font-size:12px; }
@media(max-width:900px) { .admin-page { padding:16px 12px; } .admin-editor { max-width:none; } }
/* The target table combines name and position in one frozen column. */
.plan-root table.tabel .st-fio { left:0;width:var(--w-fio);min-width:var(--w-fio);text-align:left; }
.plan-root table.tabel col.cg-fio { width:var(--w-fio); }
.plan-root table.tabel thead .st-fio { background:#fbfcfd; }
.plan-root table.tabel td.st-fio { padding:4px 12px;cursor:pointer;background:#fff; }
.plan-root table.tabel thead { position:sticky;top:0;z-index:12; }
.plan-root table.tabel tr.comp td { height:34px; }
.plan-root table.tabel tr.substitutions-row td { background:#f6f1ff;color:#5b21b6;font-size:11px;height:30px;border-bottom:2px solid #d8e2e7; }
.plan-root table.tabel tr.comp .lbl,.plan-root table.tabel tr.substitutions-row .lbl { position:sticky;left:0;z-index:13;text-align:left;padding-left:12px; }
.plan-root table.tabel .rc:last-child,.plan-root table.tabel .rh:last-child { position:sticky;right:0;background:#fff;z-index:4;min-width:90px; }
.plan-root .scroll { max-height:calc(100dvh - 310px);min-height:240px; }
.plan-root table.tabel .rh:nth-last-child(2),.plan-root table.tabel .rc:nth-last-child(2) { position:sticky;right:90px;background:#fff;z-index:4; }
.plan-root table.tabel .rh:nth-last-child(3),.plan-root table.tabel .rc:nth-last-child(3) { position:sticky;right:152px;background:#fff;z-index:4; }
@media(max-width:900px) { .plan-root .scroll { max-height:65dvh; } }
/* Scoped styles avoid collisions between independent designer mockups. */
.plan-root .seg { display:inline-flex;gap:2px;padding:3px;border-radius:10px; }
.plan-root .seg button { flex:none;white-space:nowrap;min-height:30px;padding:6px 12px;font-size:12.5px;font-weight:600;border-radius:8px; }
.plan-root .seg button.on { background:#fff;color:#0b3a4c;box-shadow:0 1px 2px #0b3a4c2e; }
.plan-root table.tabel col.cg-h,.plan-root table.tabel col.cg-o { width:62px; }
.plan-root table.tabel col.cg-p { width:90px; }
.plan-root table.tabel .rc { background:#fff!important; }
.plan-root table.tabel td.st-fio .fio-role { line-height:12px;margin:1px 0 0;padding:0; }
.plan-root table.tabel td.st-fio { line-height:14px; }
.plan-root table.tabel td.st-fio .badge-days { display:inline-block;position:absolute;right:8px;top:5px;font-size:9px;padding:1px 5px; }
@media(max-width:1279px) {
 .plan-root table.tabel .rh:nth-last-child(2),.plan-root table.tabel .rc:nth-last-child(2),.plan-root table.tabel .rh:nth-last-child(3),.plan-root table.tabel .rc:nth-last-child(3) { position:static; }
 .plan-root table.tabel .rc:last-child,.plan-root table.tabel .rh:last-child { width:90px; }
}
[aria-label="План и факт"] { overflow-x:auto; }
[aria-label="План и факт"]>div:not(.report-person) { min-width:500px; }
[aria-label="График работы"] { overflow-x:auto; }
.schedule-overlay { padding:5vh 20px;align-items:center; }
.schedule-editor { background:#fff;border-radius:18px;width:1240px;max-width:100%;max-height:90dvh;display:flex;flex-direction:column;box-shadow:0 18px 70px #0b3a4c33;overflow:hidden; }
.schedule-heading { display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-top:4px solid #e31e25; }
.schedule-heading h2 { margin:0;color:#0b3a4c;font-size:20px; }
.schedule-heading p { margin:6px 0 0;color:#5b707b;font-size:12px; }
.schedule-all { display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px 22px;background:#f3f6f8;font-size:12px; }
.schedule-body { overflow:auto;flex:1; }
.schedule-row { display:grid;grid-template-columns:230px 190px 1fr 160px;gap:16px;padding:16px 22px;border-bottom:1px solid #e1e8ec;font-size:13px; }
.schedule-labels { font-size:10px;font-weight:800;color:#5b707b;padding-top:12px;padding-bottom:8px; }
.schedule-role { font-size:11px;color:#5b707b;line-height:1.5;margin:5px 0; }
.schedule-dates { display:flex;gap:4px;margin:10px 0; }
.schedule-editor select { max-width:100%;padding:8px;border:1px solid #d8e2e7;border-radius:8px;background:#fff;font:inherit;font-size:11px; }
.schedule-dates select { width:50%; }
.schedule-actions { display:flex;flex-wrap:wrap;gap:6px;align-content:start; }
.schedule-actions button { font-size:11px; }
.schedule-mini { display:flex;gap:2px;align-items:center;font-size:10px;color:#5b707b;margin:3px 0; }
.schedule-mini span { min-width:20px;padding:4px 2px;text-align:center;border-radius:4px; }
.schedule-candidate { background:#eef3f6;border-radius:10px;padding:8px 12px;margin-top:10px;font-size:11px; }
.schedule-candidate p { margin:5px 0; }
.schedule-effect { text-align:right;font-size:12px;color:#5b707b; }
.schedule-effect b { color:#0b3a4c;font-size:18px; }
.schedule-footer { background:#f8fafb;padding:14px 22px;border-top:1px solid #d8e2e7; }
.schedule-footer label { display:flex;gap:12px;align-items:center;font-size:12px; }
.schedule-footer input { flex:1;padding:10px;border:1px solid #d8e2e7;border-radius:8px;font:inherit; }
.schedule-result { display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px;font-size:13px; }
.schedule-result>div { flex:1; }
.schedule-result p { margin:5px 0;color:#5b707b;font-size:12px; }
.schedule-result small { color:#5b707b;font-size:10px; }
@media(max-width:1100px) { .schedule-row { grid-template-columns:1fr 1fr; } .schedule-labels { display:none; } }
@media(max-width:900px) { .schedule-overlay { padding:8px 8px 68px; } .schedule-editor { max-height:calc(100dvh - 80px); } .schedule-row { padding:14px;gap:12px; } }
@media(max-width:600px) { .schedule-row { grid-template-columns:1fr; } .schedule-effect { text-align:left; } .schedule-footer { padding:12px; } .schedule-footer label { flex-direction:column;align-items:stretch; } .schedule-result>div { flex-basis:100%; } }
.heatmap-heading { display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;color:#0b3a4c;font-size:14px;margin-bottom:16px; }
.heatmap-heading span { color:#5b707b;font-size:11px;font-weight:500; }
.heatmap-scroll { overflow:auto; }
.heatmap-grid { display:grid;grid-template-columns:90px repeat(30,minmax(24px,1fr));gap:3px;align-items:center;min-width:900px;font-size:11px; }
.heatmap-date { text-align:center;color:#5b707b;font-size:10px; }
.heatmap-cell { height:26px;display:flex;align-items:center;justify-content:center;border-radius:4px;font-size:10px;font-weight:700; }
.heatmap-cell.low { background:#f9c9cc;color:#8f0f16; }
.heatmap-cell.ok { background:#e0f2ee;color:#0f7a4d; }
.heatmap-cell.unknown { color:#9aaab3;background:repeating-linear-gradient(45deg,#f3f6f8,#f3f6f8 4px,#e7edf1 4px,#e7edf1 6px); }
.heatmap-legend { color:#5b707b;font-size:11px;margin-bottom:0; }
:root { --brand:#0b3a4c;--accent:#e31e25;--mut:#5b707b;--text:#14232b;--border:#d8e2e7;--bg:#f3f6f8; }
.btn.btn-primary { background:#e31e25;border-color:#e31e25;color:#fff;font-weight:800; }
.btn.btn-primary:hover:not(:disabled) { background:#c81920; }
.btn.btn-outline { border-color:#d8e2e7;background:#fff;color:#0b3a4c; }
.schedule-mini .cw { background:#cfe3ea;color:#0b3a4c; }
.schedule-mini .cr { background:#fff;border:1px solid #d8e2e7; }
.schedule-mini .cv { background:#fde9b8;color:#7a4a00; }
.schedule-mini .cb { background:#f9c9cc;color:#8f0f16; }
.schedule-mini .cop { background:#dbe4ff;color:#27408f; }
.mobile-view-toggle { display:none; }
@media(max-width:1279px) {
 .mobile-view-toggle { display:block; }
 .plan-root.view-false .scroll>header>*:not(:first-child):not(.plan-period):not(.plan-switch):not(.mobile-view-toggle) { display:none!important; }
 .plan-root.view-false .scroll>.plan-filters,.plan-root.view-false .scroll>.plan-legend,.plan-root.view-false .scroll>section[aria-label="Сводка"] { display:none!important; }
 .plan-root.view-false .plan-main { margin-top:12px; }
 .plan-root.view-false .scroll { max-height:calc(100dvh - 205px); }
}
@media(max-width:767px) {
 .plan-root .scroll>header { gap:8px!important; }
 .plan-root .plan-period { order:2;flex-basis:100%; }
 .plan-root .scroll>header>button:first-child { flex:1; }
 .plan-root .plan-switch { order:3; }
 .plan-root .mobile-view-toggle { order:4; }
 .plan-root.view-false .scroll { max-height:calc(100dvh - 220px); }
 .tablewrap { margin-left:8px;margin-right:8px; }
}

/* Shared dialogs: body spacing and independently scrolling content. */
.modal-back { padding:24px;overflow:auto; }
.modal-back>.modal:not(.subpanel) { display:flex;flex-direction:column;width:560px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);overflow:hidden; }
.modal-back>.modal.modal-wide { width:900px; }
.modal>.modal-head { flex:none;padding:18px 24px;gap:16px; }
.modal .modal-title { font-size:17px;line-height:1.4; }
.modal .modal-head .btn-x { width:36px;height:36px;flex:none;border:1px solid #d8e2e7;border-radius:9px; }
.modal>.modal-body { padding:20px 24px;overflow:auto;overscroll-behavior:contain;min-height:0;font-size:13px;line-height:1.6; }
.modal-body>.mtext { margin:0 0 18px; }
.modal-body>.mtext:last-child { margin-bottom:0; }
.modal-body .mfield { margin-bottom:16px;min-width:0;font-size:12px; }
.modal-body input,.modal-body select { min-height:42px;font-size:14px; }
.modal-body>.mrow { padding:16px 24px;margin:20px -24px -20px;border-top:1px solid #e1e8ec;background:#f8fafb;gap:10px;flex-wrap:wrap; }
.modal-body>.mrow .btn { min-height:42px; }
.pob-head { display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:16px; }
.pob-head .mfield { margin:0;flex:0 1 220px; }
.pob-presets { display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding-bottom:2px; }
.pob-presets .pill { font-size:12px;padding:8px 12px;min-height:38px; }
.modal-body .ntable { width:100%;border-collapse:collapse;font-size:12px; }
.modal-body .ntable th { padding:10px;text-align:left;font-size:11px;color:#5b707b;white-space:normal;border-bottom:2px solid #e1e8ec; }
.modal-body .ntable td { padding:10px;border-bottom:1px solid #e1e8ec;vertical-align:top; }
.modal-body .ntable td .pill { font-size:11px;line-height:1.4;white-space:normal; }
.modal-body .ntable .total td { background:#eef3f6;font-weight:800; }
body:has([role="dialog"][aria-modal="true"]) .toast { display:none; }
@media(max-width:600px) {
 .modal-back { padding:12px; }
 .modal-back>.modal:not(.subpanel) { max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px; }
 .modal>.modal-head { padding:14px 16px;align-items:flex-start; }
 .modal>.modal-body { padding:16px; }
 .modal-body>.mrow { margin:16px -16px -16px;padding:14px 16px; }
 .modal-body>.mrow .btn { flex:1; }
 .pob-head { align-items:stretch; }
 .pob-head .mfield { flex-basis:100%; }
 .pob-table,.pob-table tbody { display:block;width:100%; }
 .pob-table thead { display:none; }
 .pob-table tbody tr { display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 0;border-bottom:1px solid #d8e2e7; }
 .modal-body .pob-table td { display:block;min-width:0;padding:0;border:0;font-size:12px; }
 .pob-table td[data-label]::before { display:block;content:attr(data-label);font-size:10px;color:#5b707b;margin-bottom:3px; }
 .pob-table td:first-child { grid-column:1/-1; }
 .pob-table tr.total { display:flex;justify-content:space-between; }
 .modal-body .pob-table tr.total td { padding:8px;background:#eef3f6; }
 .admin-page h1 { font-size:24px;overflow-wrap:anywhere; }
 .admin-tabs button { padding:12px 10px;font-size:12px; }
 .admin-tools { flex-wrap:wrap; }
 .admin-tools input { flex-basis:100%; }
 .admin-tools .btn { width:100%; }
 .admin-table-head { display:none; }
 .admin-user-row { min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:14px 8px; }
 .admin-user-row>b { grid-column:1; }
 .admin-user-row>span:nth-child(2),.admin-user-row>span:nth-child(3) { grid-column:1;font-size:12px; }
 .admin-user-row>span:last-child { grid-column:2;grid-row:1/4;align-self:center; }
}
.admin-page .employee-event { margin:0;padding:12px 0;line-height:1.5; }

.sub-apply-mobile { display:none; }
.subpanel .cand-note,.subpanel .cand-foot { font-size:12px;line-height:1.5; }
.subpanel .cand-foot { flex-wrap:wrap;gap:8px; }
.subpanel .pill.on { background:#0b3a4c;color:#fff;border-color:#0b3a4c; }
.subpanel .sp-head .btn-x { flex:none;width:36px;height:36px; }
@media(max-width:900px) {
 .modal-back>.modal.subpanel { height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);overflow:hidden; }
 .subpanel .sp-head,.subpanel .sp-who,.subpanel .sp-foot { flex:none; }
 .subpanel .sp-grid { flex:1;min-height:0;display:block;overflow:auto;padding:16px; }
 .subpanel .sp-cands { max-height:none;overflow:visible;padding:0; }
 .subpanel .sp-whole { min-height:0; }
 .subpanel .sp-right { padding:16px 0 0;border-top:1px solid #e1e8ec;margin-top:16px; }
 .subpanel #sub-apply { display:none; }
 .subpanel .sp-foot { display:flex;flex-direction:column;gap:8px;padding:12px 16px; }
 .subpanel .sub-apply-mobile { display:block;min-height:44px; }
 .subpanel .sp-foot>span { font-size:11px;line-height:1.4; }
 .subpanel .sp-who { padding:12px 16px;gap:12px; }
}
@media(max-width:600px) {
 .modal-body>.mrow .btn { font-size:12px;line-height:1.3;padding:0 12px;white-space:nowrap; }
 .abs-rows { max-height:none;overflow:visible; }
 .abs-row { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 32px;gap:8px;padding:12px; }
 .abs-row .abs-row-name { grid-column:1/3;min-width:0;white-space:normal;font-size:12px; }
 .abs-row>.mut { display:none; }
 .abs-row select { min-width:0;width:100%;font-size:13px; }
 .abs-row select:nth-child(2) { grid-column:1;grid-row:2; }
 .abs-row select:nth-child(4) { grid-column:2/4;grid-row:2; }
 .abs-row>.btn-x { grid-column:3;grid-row:1;width:32px;height:32px; }
}
