/* polish-planning: визуальная полировка главного экрана (только CSS, без изменения логики) */
.plan-root table.tabel thead th.period-header { width:calc(var(--w-fio) + var(--w-role));min-width:calc(var(--w-fio) + var(--w-role));max-width:calc(var(--w-fio) + var(--w-role));padding:3px 4px;overflow:visible;background:#fbfcfd; }
.plan-root .period-header .plan-period { width:100%;gap:2px!important;flex-wrap:nowrap; }
.plan-root .period-header .plan-period>button { min-height:28px!important;height:28px!important;border-radius:6px!important;color:#0b3a4c; }
.plan-root .period-header .plan-period>button:not(#period-btn) { width:26px!important;min-width:26px;flex:0 0 26px; }
.plan-root .period-header #period-btn { height:28px!important;min-height:28px!important;min-width:0!important;flex:1;padding:0 3px!important;font-size:12px!important;white-space:nowrap;letter-spacing:0;display:flex;align-items:center;justify-content:center;text-align:center;background:#f0f8f1!important;border-color:#d5e6d8!important; }
.plan-root .period-header .plan-period>button:hover { background:#edf4f7!important;border-color:#a9c0cc!important; }
@media(max-width:600px) { .plan-root .period-header #period-btn { font-size:10px!important; } .plan-root .period-header .plan-period>button:not(#period-btn) { width:22px!important;min-width:22px;flex-basis:22px; } }
.plan-root .period-header #period-btn:hover { background:#e5f2e7!important;border-color:#b7d2bd!important; }
.plan-root { font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
.plan-root:focus { outline: none; }

/* Табель: плавные состояния, читаемые наведения */
.tabel td.day { transition: background-color .12s ease, box-shadow .12s ease; }
.tabel tbody tr:hover td { background-color: rgba(11, 58, 76, .035); }
.tabel td.day:hover { box-shadow: inset 0 0 0 1.5px rgba(11, 58, 76, .45); cursor: pointer; }
.tabel .substitution-day { box-shadow: inset 0 0 0 1px rgba(227, 30, 37, .35); }
.tabel .substitution-active { box-shadow: inset 0 0 0 2px #e31e25; position: relative; z-index: 1; }
.tabel .substitution-name { font-weight: 800; }
.tabel .substitution-role { font-style: italic; opacity: .85; }
.tabel th { letter-spacing: .02em; }

/* Плавающая панель выделения */
.selbub { filter: drop-shadow(0 10px 28px rgba(11, 58, 76, .28)); animation: pp-rise .18s ease-out; }
.selbub-pill { backdrop-filter: blur(8px); border-radius: 999px; transition: background-color .12s ease, transform .12s ease; }
.selbub-pill:active { transform: scale(.98); }
.selbub-edit { transition: background-color .12s ease, transform .12s ease; }
.selbub-edit:hover { background: #eef6f9; transform: translateY(-1px); }
.selbub-panel { border-radius: 14px; animation: pp-rise .16s ease-out; }
.selbub-panel .chip { transition: border-color .12s ease, color .12s ease, background-color .12s ease; }

/* Модалки */
.modal-back { backdrop-filter: blur(3px); animation: pp-fade .15s ease-out; }
.modal, .command-palette { border-radius: 18px; box-shadow: 0 24px 64px rgba(11, 58, 76, .28); animation: pp-pop .18s cubic-bezier(.2, .8, .2, 1); }
.modal-head { background: linear-gradient(180deg, #fff, #f8fbfc); }
.sp-head, .sp-foot { background: #fbfdfe; }
.sp-foot { border-top: 1px solid #e1e8ec; }
.sp-who-cell, .match-row, .schedule-candidate, .mlist-i { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.schedule-candidate:hover, .match-row:hover, .mlist-i:hover { background: #f3f8fa; border-color: #b9ccd5; }
.sp-done, .done-card { border-radius: 12px; }
.sp-more, .sp-sub, .cand-note { color: #5b707b; }
.result-row { border-radius: 8px; }
.warnbox, .mwarn { border-radius: 10px; }

/* Кнопки и чипы */
.btn { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .1s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(227, 30, 37, .28); }
.chip { transition: border-color .12s ease, background-color .12s ease, color .12s ease; }
.chip:hover { border-color: #0b3a4c; }
button:focus-visible, .chip:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #0b3a4c; outline-offset: 2px; border-radius: 6px;
}
input:focus, select:focus, textarea:focus { border-color: #0b3a4c; box-shadow: 0 0 0 3px rgba(11, 58, 76, .12); }

/* Тосты с «Отменить» */
.toast { animation: pp-rise .2s ease-out; border: 1px solid rgba(255, 255, 255, .08); }
.toast-undo { transition: filter .12s ease, transform .1s ease; }
.toast-undo:hover { filter: brightness(1.1); }
.toast-undo:active { transform: scale(.96); }
.toast-x:hover { color: #fff; }

/* Фильтры, поиск, легенда */
.plan-search input { transition: box-shadow .12s ease, border-color .12s ease; }
.plan-legend { opacity: .92; }
.plan-empty { color: #5b707b; }
.variant-banner { border-radius: 10px; box-shadow: 0 2px 10px rgba(11, 58, 76, .08); }
.busy-badge, .badge-days, .pill { letter-spacing: .01em; }

/* Тонкие скроллбары */
.tablewrap, .scroll, .modal-body, .mlist { scrollbar-width: thin; scrollbar-color: #b9ccd5 transparent; }
.tablewrap::-webkit-scrollbar, .scroll::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 10px; height: 10px; }
.tablewrap::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb { background: #b9ccd5; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }

@keyframes pp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pp-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .selbub, .selbub-panel, .modal-back, .modal, .command-palette, .toast { animation: none; }
  .btn, .chip, .tabel td.day { transition: none; }
}
@media print {
  .selbub, .toast, .modal-back { display: none !important; }
}

/* === главный экран: сводка, замены, подсказки === */
.sum-compl { font-size: 12.5px; font-weight: 700; color: #4a5f6a; background: #eef3f6; border-radius: 8px; padding: 5px 10px; display: inline-flex; align-items: center; min-height: 28px; }
.sum-compl.ok { color: #0f7a4d; background: #e8f6ef; }
.sum-compl.low { color: #8a4a08; background: #fff7ed; }
.sub-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 4px; border-radius: 5px; font-size: 11px; font-weight: 800; line-height: 1; }
.sub-mark.up { background: #0b3a4c; color: #fff; }
.sub-mark.out { background: #fef2f2; color: #a5121a; border: 1px solid #f3b9bc; }
.subst-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 20px 8px; font-size: 12px; font-weight: 600; color: #2c424d; }
.subst-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #5b707b; text-transform: uppercase; }
.subst-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid #d8e2e7; border-radius: 999px; background: #fff; font-weight: 700; }
.subst-chip .sub-mark { margin-left: 0; }
.subst-per { margin-left: 6px; color: #5b707b; font-weight: 600; }
.subst-hint { color: #8a9ba4; font-weight: 500; }
.kbd-hint { margin-right: auto; font-size: 11.5px; font-weight: 600; color: #5b707b; }
.selbub-warn { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: #8a4a08; }
.selbub-panel .kbd-hint { margin-right: 6px; }

/* === узкие экраны === */
.sum-compl, .subst-chip { max-width: 100%; }
.subst-chip { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
.subst-per, .subst-hint { overflow-wrap: anywhere; }
.mrow { flex-wrap: wrap; gap: 8px; }
.selbub-panel { max-width: calc(100vw - 24px); }
.selbub-panel .kbd-hint { flex: 1 1 100%; margin-right: 0; }
.selbub-pill { max-width: calc(100vw - 24px); flex-wrap: wrap; }
@media (max-width: 720px) {
  .subst-strip { padding: 6px 12px 8px; gap: 6px; }
  .subst-hint { flex: 1 1 100%; }
  .subst-chip { padding: 4px 8px; font-size: 11.5px; }
  .sum-compl { font-size: 12px; padding: 4px 8px; }
  .kbd-hint { flex: 1 1 100%; margin-right: 0; }
}
@media (max-width: 480px) {
  .subst-lbl { flex: 1 1 100%; }
  .selbub-edit { white-space: nowrap; }
}

/* === читаемость ячеек, выходные, сегодня === */
.plan-root table.tabel td.day.we:not(.cw):not(.cv):not(.cb):not(.cop):not(.c-hl) { background-image: linear-gradient(rgba(11,58,76,.05), rgba(11,58,76,.05)); }
.plan-root table.tabel td.day.we { box-shadow: inset 1px 0 0 rgba(165,18,26,.10); }
.plan-root table.tabel th.day-h.today { background: #0b3a4c; color: #fff; border-radius: 6px 6px 0 0; position: relative; }
.plan-root table.tabel th.day-h.today .dow { color: #fff; }
.plan-root table.tabel th.day-h.today::after { content: "сегодня"; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #e31e25; color: #fff; padding: 0 3px; border-radius: 3px 3px 0 0; line-height: 9px; }
.plan-root table.tabel td.day.today { box-shadow: inset 2px 0 0 #e31e25, inset -2px 0 0 #e31e25; }
.plan-root table.tabel tr.row:hover td.st-fio, .plan-root table.tabel tr.row:hover td.st-role { background: #eef6f9; }
.plan-root table.tabel td.st-fio { font-weight: 700; }
/* символы рядом с цветом: не полагаемся только на оттенок */
td.cv::before { content: "☀"; font-size: 8px; margin-right: 2px; opacity: .8; }
td.cb::before { content: "✚"; font-size: 8px; margin-right: 2px; opacity: .8; }
td.cop::before { content: "◷"; font-size: 8px; margin-right: 2px; opacity: .8; }
.plan-density-s td.cv::before, .density-0 td.cv::before, .density-0 td.cb::before, .density-0 td.cop::before { content: none; }
td.cr { color: #6b7f89; }
td.day.lens-low { background: #fde4e6 !important; color: #a5121a; font-weight: 800; }
td.day.lens-low::after { content: "▼"; font-size: 7px; margin-left: 1px; vertical-align: super; }
td.day.lens-ok { background: #dcefe8 !important; color: #0f7a4d; }
td.day.lens-ok::after { content: "✓"; font-size: 8px; margin-left: 1px; }
.plan-filters .plan-jump { color: #a5121a; border-color: #f3b9bc; }
.plan-filters .plan-today { color: #0b3a4c; }
.plan-root.focus-true .plan-legend { display: none; }
@media (prefers-reduced-motion: no-preference) { .plan-root table.tabel th.day-h.today { transition: background-color .2s ease; } }

/* Hover and selection share one compact action bubble. */
.plan-root table.tabel td.cb::before { content:none; }
.selbub-details-toggle { padding:4px 7px;border:1px solid #ffffff55;border-radius:6px;background:#ffffff15;color:#fff;font-size:10px;font-weight:700;cursor:pointer; }
.selbub-details-toggle:hover { background:#ffffff30; }
.plan-root .selbub-panel.selbub-details { width:320px;max-width:calc(100vw - 16px);max-height:280px;padding:14px;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;gap:0;color:#0b3a4c;white-space:normal;font-size:12px;line-height:1.5; }
.cell-hover-name { display:block;flex-shrink:0;font-size:13px; }
.cell-hover-meta { display:block;flex-shrink:0;color:#647d89;font-size:11px;margin:2px 0 10px; }
.cell-hover-details { min-height:0;overflow:auto; }
.cell-hover-details p { margin:4px 0;overflow-wrap:anywhere; }
.cell-hover-details p:first-child { font-weight:700; }
@media(max-width:600px) { .selbub-pill { padding:5px 7px;gap:5px!important;font-size:11px; } }

.selbub-pill>svg { width:12px;height:12px;flex:none; }

/* Quiet replacement cues: flat text summary and a continuous assignment band. */
.plan-root .subst-strip { display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:8px 16px;padding:9px 12px;background:#f7f9fb;border-bottom:1px solid #e1e8ec; }
.plan-root .subst-lbl { padding-top:2px;font-size:10px;line-height:18px;color:#718491;letter-spacing:.04em; }
.subst-list { display:flex;flex-wrap:wrap;gap:5px 20px;min-width:0; }
.subst-entry { display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 6px;min-width:0;line-height:20px;font-size:11.5px; }
.subst-person { color:#344e5d;font-weight:600; }
.subst-relation { color:#8a9ba5;font-size:10px;font-weight:400; }
.plan-root .subst-per { margin-left:3px;font-size:10px;font-weight:400;color:#718491; }
.plan-root table.tabel td.st-fio .assignment-indicator { display:inline;margin-left:4px;padding:0;border:0;border-radius:0;background:none;color:#778bad;font-size:11px;line-height:inherit;font-weight:600; }
.plan-root table.tabel tr.substitution-child td.substitution-day { box-shadow:none;border-bottom-color:#dfe5f3; }
.plan-root table.tabel tr.substitution-child td.substitution-active { background:#e3eaf7!important;color:#425a87;box-shadow:inset 0 -2px #9badcf; }
@media(max-width:600px) {
 .plan-root .subst-strip { grid-template-columns:1fr;gap:2px;padding:7px 8px; }
 .subst-list { flex-direction:column;gap:3px; }
 .subst-entry { font-size:10.5px;line-height:17px;gap:2px 5px; }
 .plan-root .subst-per { font-size:10px; }
}

/* A single compact toolbar; secondary actions live in Settings at every width. */
.plan-root .scroll>header { padding:8px 12px!important;gap:8px!important;flex-wrap:nowrap;min-height:56px; }
.plan-root .scroll>header>button:first-child { order:0;min-width:175px;height:38px!important;padding:4px 10px!important; }
.plan-root .scroll>header>.plan-period { order:1;gap:4px!important;flex:none; }
.plan-root .scroll>header>.plan-switch { order:2;flex:none; }
.plan-root .scroll>header>.plan-quick-search { order:3; }
.plan-root .scroll>header>.plan-primary-edit { order:4; }
.plan-root .scroll>header>.mobile-view-toggle { order:5;flex:none;font-size:12px;padding:0 12px; }
.plan-root .scroll>header .plan-switch-button { border:1px solid #d8e2e7;background:#f8fafb;font-size:12px;height:36px;min-height:36px; }
.plan-root #period-btn { height:36px!important;padding:0 10px!important;font-size:12px!important; }
.plan-root .plan-period>button { min-height:36px!important; }
.plan-quick-search { display:flex;align-items:center;gap:7px;flex:1;min-width:120px;max-width:300px;height:36px;padding:0 10px;border:1px solid #e1e8ec;border-radius:8px;background:#f8fafb;color:#8a9ba4;margin-left:auto; }
.plan-quick-search input { width:100%;min-width:0;border:0;outline:0;background:none;font:inherit;font-size:12px;color:#344e5d; }
.plan-quick-search svg { width:14px;height:14px;flex:none; }
.plan-root .plan-primary-edit { min-height:36px;padding:0 12px;background:#0b3a4c;border-color:#0b3a4c;font-size:12px;white-space:nowrap; }
.plan-root.view-true .plan-tools { top:12px;right:12px;padding:18px;gap:10px; }
.plan-tools>.plan-settings-section { flex-basis:100%;font-size:12px;margin:12px 0 0;color:#5b707b; }
.plan-tools>.plan-legend { display:flex!important;flex-basis:100%;padding:0!important;font-size:11px!important;gap:8px 12px!important; }
.plan-tools>.plan-legend>span { display:flex;align-items:center;gap:5px; }
.plan-tools>.plan-legend>span>span { width:24px!important;height:20px!important;font-size:10px!important; }
.plan-settings-summary { display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;width:100%;padding:10px;background:#f7f9fb;border-radius:8px; }
.plan-settings-summary span { min-width:0; }
.plan-settings-summary small { display:block;font-size:10px;color:#718491; }
.plan-settings-summary b { display:block;font-size:11px;color:#344e5d; }
.plan-settings-filters { display:flex;flex-wrap:wrap;gap:6px; }
.plan-settings-filters .pill { padding:7px 10px;min-height:34px;font-size:11px; }
@media(max-width:1150px) { .plan-root .scroll>header>.plan-quick-search { display:none; } }
@media(max-width:760px) {
 .plan-root .scroll>header { flex-wrap:wrap!important;padding:8px!important;gap:6px!important; }
 .plan-root .scroll>header>button:first-child { order:0;flex:0 0 calc(50% - 3px)!important;min-width:0; }
 .plan-root .scroll>header>button:first-child span:last-child { font-size:12px!important; }
 .plan-root .scroll>header>.plan-switch { order:1;flex:0 0 calc(50% - 3px);min-width:0; }
 .plan-root .plan-switch-button { width:100%;max-width:none;font-size:11px!important;padding:0 6px;overflow:hidden;text-overflow:ellipsis; }
 .plan-root .scroll>header>.plan-period { order:2;flex:1;min-width:0; }
 .plan-root #period-btn { min-width:0!important;flex:1;padding:0 4px!important;font-size:11px!important;white-space:nowrap; }
 .plan-root .plan-period>button:not(#period-btn) { width:30px!important;flex:none; }
 .plan-root .scroll>header>.mobile-view-toggle { order:3;height:36px;min-height:36px;padding:0 9px;font-size:11px; }
 .plan-root .scroll>header>.plan-primary-edit { display:none; }
}

/* Semantic cell colors: status stays readable without decorative symbols. */
.plan-root table.tabel td.day { border-color:#e8eef1;background-image:none!important; }
.plan-root table.tabel td.day.cw { background:#d7e8f0!important;color:#17445a!important;font-weight:600; }
.plan-root table.tabel td.day.cr { background:#ffffff!important;color:#64717e;font-weight:500; }
.plan-root table.tabel td.day.cv { background:#ffe6ad!important;color:#754a0d;font-weight:600; }
.plan-root table.tabel td.day.cb { background:#f7d7dd!important;color:#8a3147;font-weight:600; }
.plan-root table.tabel td.day.cop { background:#e0dff7!important;color:#514083;font-weight:600; }
.plan-root table.tabel td.day.fct.cw { background:#e1e9ef!important;color:#405969!important; }
.plan-root table.tabel td.day.fct.cr { color:#64717e; }
.plan-root table.tabel td.day.c-as { box-shadow:inset 0 -2px #96a9ca;color:#425a87!important; }
.plan-root table.tabel td.day.c-hl { background:#e1e9f6!important;color:#425a87!important; }
.plan-root table.tabel td.day.nodata-cell { background:#fafbfd!important;color:#c0cbd2; }
.plan-root table.tabel td.day.cv::before,.plan-root table.tabel td.day.cb::before,.plan-root table.tabel td.day.cop::before { content:none; }
.plan-root table.tabel td.day.we { box-shadow:none; }
.plan-root table.tabel td.day.today { box-shadow:inset 1px 0 #b5c9e4; }
.plan-root table.tabel td.day.seld { background:#c7ddf0!important;color:#254e75!important;outline:0!important;box-shadow:inset 0 0 0 2px #2f638f!important; }
.plan-root table.tabel td.day:not(.seld):hover { box-shadow:inset 0 0 0 1.5px #86a3ba; }
.plan-root table.tabel td.day.lens-low { background:#f7d7dd!important;color:#8a3147!important; }
.plan-root table.tabel td.day.lens-ok { background:#d7e8f0!important;color:#17445a!important; }
.plan-root table.tabel thead th.zone { height:22px;padding:2px 5px;font-size:9px;line-height:16px;font-weight:600; }
.plan-root table.tabel thead th.zone.fz { background:#eff3f6;color:#718491; }
.plan-root table.tabel thead th.zone.pz { background:#f0f6f3;color:#4c7061; }
.plan-root table.tabel thead th.zone.tz { background:#f5f7f9;color:#718491; }
.plan-root table.tabel thead th.day-h { height:32px;padding:2px;font-size:11px;color:#5a7282;background:#fbfcfd; }
.plan-root table.tabel thead th.day-h .dow { font-size:9px;font-weight:500;color:#9aa8b2; }
.plan-root table.tabel thead th.day-h.we { color:#967382;background:#faf7f8; }
.plan-root table.tabel thead th.day-h.today { background:#e8f0fc;color:#315c91;border-radius:0; }
.plan-root table.tabel thead th.day-h.today::after { content:none; }
.plan-root table.tabel tr.grp td { height:24px;padding:3px 12px;background:#f3f5f7;color:#637b8b;font-size:10px;font-weight:600; }
.plan-root table.tabel td.st-fio { font-weight:600; }

.plan-root table.tabel tfoot .plan-total-row td.low { background:#f7d7dd;box-shadow:none;outline:0;color:#8a3147;border-top:1px solid #e3ccd2; }

/* Fact is protected by interaction, not faded like a disabled control. */
.plan-root table.tabel td.day.fct,.plan-root table.tabel tr.row:hover td.day.fct { opacity:1; }
.plan-root table.tabel td.day { border-color:#e1e8ee;line-height:18px; }
.plan-root table.tabel td.day.cw { border-right-color:#f4f8fb; }
.plan-root table.tabel td.day.fct.cw { font-weight:500; }
.plan-root table.tabel td.day.c-as { color:#354f78!important;box-shadow:inset 0 -2px #8098bb; }
.plan-root table.tabel thead th.zone.fz { background:#e5edf3;color:#4e6678; }
.plan-root table.tabel thead th.zone.pz { background:#dceaf3;color:#244f69; }
.plan-root table.tabel td.day.replacement-covered {position:relative;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath d='M-1 1L1-1M0 4L4 0M3 5L5 3M-1 3L1 5M0 0L4 4M3-1L5 1' fill='none' stroke='%231b8755' stroke-opacity='.60' stroke-width='.65'/%3E%3C/svg%3E")!important;background-size:4px 4px!important;background-position:0 0!important;background-repeat:repeat!important;}
.plan-root table.tabel td.day.replacement-covered::after {content:none;}
.plan-root table.tabel td.day.replacement-uncovered {position:relative;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath d='M-1 1L1-1M0 4L4 0M3 5L5 3M-1 3L1 5M0 0L4 4M3-1L5 1' fill='none' stroke='%23e87548' stroke-opacity='.60' stroke-width='.65'/%3E%3C/svg%3E")!important;background-size:4px 4px!important;background-position:0 0!important;background-repeat:repeat!important;}
.plan-root table.tabel td.day.replacement-uncovered::after {content:none;}
.plan-root table.tabel td.day.replacement-covered {background-color:#f8fcf9!important;}
.plan-root table.tabel td.day.replacement-uncovered {background-color:#fffafb!important;}
.covered-cell-value {display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;box-sizing:border-box;border-radius:50%;background:#fff;color:inherit;font-size:inherit;line-height:1;vertical-align:middle;}
.covered-cell-value.status-pill {width:auto;min-width:25px;padding:0 5px;border-radius:999px;}
.plan-root table.tabel td.day.cv .covered-cell-value {background:#ffe6ad;}
.plan-root table.tabel td.day.cb .covered-cell-value {background:#f7d7dd;}
.plan-root table.tabel td.day.cop .covered-cell-value {background:#e0dff7;}
.plan-root table.tabel td.day.cw .covered-cell-value {background:#d7e8f0;}
.replacement-covered .covered-cell-value {border:1px solid rgba(27,135,85,.25);}
.replacement-uncovered .covered-cell-value {border:1px solid rgba(232,117,72,.25);}

/* Keep status capsules clear of the grid edges at every density. */
.plan-root table.tabel td.day:has(.covered-cell-value) {padding:3px!important;}
.covered-cell-value {width:18px;height:18px;font-size:11px;margin-inline:1px;}
.covered-cell-value.status-pill {min-width:24px;padding:0 4px;}
.plan-root.density-0 table.tabel td.day:has(.covered-cell-value) {padding:2px 3px!important;}

/* Square, readable table zones and matching frozen totals headings. */
.plan-root table.tabel thead th.zone {border-radius:0!important;margin:0;font-size:10px;font-weight:700;letter-spacing:.03em;border-bottom:1px solid #d0dce4;}
.plan-root table.tabel thead th.zone.nz {background:#edf0f3;color:#566a79;}
.plan-root table.tabel thead th.zone.fz {background:#cfdee8;color:#34556a;}
.plan-root table.tabel thead th.zone.pz {background:#c4dfe9;color:#164b61;}
.plan-root table.tabel thead th.zone.tz {background:#dfe9ef;color:#36586c;}
.plan-root table.tabel thead th.day-h {background:#eef4f8;color:#24475d;font-size:12px;font-weight:700;}
.plan-root table.tabel thead th.day-h .dow {color:#526c7e;font-size:10px;font-weight:600;}
.plan-root table.tabel thead th.day-h.we {background:#f6e7e4;color:#9d5447;}
.plan-root table.tabel thead th.day-h.we .dow {color:#925445;}
.plan-root table.tabel thead th.day-h.nd {background:#f1f3f5;color:#526c7e;}
.plan-root table.tabel thead th.day-h.nd .dow {color:#526c7e;}
.plan-root table.tabel thead th.zone.tz {position:sticky;right:0;z-index:34;box-shadow:-1px 0 #c9d8e2;}
.plan-root table.tabel thead th.rh {z-index:34;background:#eef4f8;color:#36586c;}
.plan-root table.tabel tbody tr.grp>td {position:sticky;top:var(--plan-head-height,70px);z-index:26;background:#e8eff4;color:#3c5e73;box-shadow:0 1px #c9d8e2;border-radius:0;}
.plan-root table.tabel tbody tr.grp .plan-group-label {color:#3c5e73;}
@media(max-width:600px){.plan-root table.tabel thead th.zone.tz {position:static;box-shadow:none;}}

/* Keep the full brigade name visible during horizontal panning as well. */
.plan-root table.tabel .plan-group-label {position:relative;left:0;transform:translateX(var(--plan-scroll-left,0px));}

@media(min-width:801px){.plan-root table.tabel td.rc,.plan-root table.tabel th.rh {position:sticky!important;}}
@media(max-width:800px){.plan-root table.tabel td.rc,.plan-root table.tabel th.rh,.plan-root table.tabel th.zone.tz {position:static!important;}}
.plan-root table.tabel.totals-unfrozen td.rc,.plan-root table.tabel.totals-unfrozen th.rh,.plan-root table.tabel.totals-unfrozen th.zone.tz {position:static!important;}

.plan-root table.tabel thead th.zone:not(.tz) {position:relative;overflow:hidden;}
.plan-zone-label {position:absolute;top:50%;left:var(--zone-label-left,50%);transform:translate(-50%,-50%);width:max-content;max-width:var(--zone-label-width,100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:16px;}

/* Unified neutral header palette. */
.plan-root table.tabel thead th.zone.nz {background:#f0f2f4;color:#62717c;}
.plan-root table.tabel thead th.zone.fz {background:#dde5eb;color:#405969;}
.plan-root table.tabel thead th.zone.pz {background:#e7edf1;color:#405969;}
.plan-root table.tabel thead th.zone.tz {background:#dde5eb;color:#405969;}
.plan-root .scroll>header .plan-object-control,.plan-root .scroll>header .plan-switch-button,.plan-root .scroll>header .mobile-view-toggle,.plan-root .scroll>header .plan-quick-search {height:36px!important;min-height:36px!important;box-sizing:border-box;border-radius:8px;}
.plan-object-control {display:inline-flex;align-items:center;gap:8px;padding:0 10px;border:1px solid #d8e2e7;background:#fff;color:#173e52;cursor:pointer;}
.plan-object-control b {font-size:12px;white-space:nowrap;}.plan-object-caption {font-size:11px;color:#728692;}
.plan-floating-settings {position:fixed;top:6px;right:18px;z-index:55;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:1px solid #d2dfe7;border-radius:12px;background:#ffffffd9;color:#315a70;box-shadow:0 3px 12px #12344916;opacity:.48;backdrop-filter:blur(8px);cursor:pointer;transition:opacity .15s,background .15s;}
.plan-floating-settings:hover,.plan-floating-settings:focus-visible {opacity:1;background:#fff;}
/* One integrated selection card, with explicit expansion. */
.plan-root .selbub {width:min(var(--selection-bubble-width,430px),calc(100vw - 16px));max-width:calc(100vw - 16px);align-items:stretch;gap:0;padding:0;border:1px solid #d5e1e8;border-radius:13px;background:#fff;box-shadow:0 8px 28px #0b3a4c29;filter:none;overflow:hidden;}
.plan-root .selbub-pill,.plan-root .selbub-pill:hover {display:flex;flex-wrap:wrap;gap:6px;padding:9px 10px;border:0;border-radius:0;background:#fff;color:#385c71;box-shadow:none;cursor:default;font-size:11px;}
.selbub-count {flex:1;min-width:80px;font-weight:600;white-space:nowrap;}
.plan-root .selbub-edit {padding:7px 10px;border:1px solid #0b3a4c;border-radius:7px;background:#0b3a4c;color:#fff;font-size:11px;font-weight:600;white-space:nowrap;}
.plan-root .selbub-more,.plan-root .selbub-details-toggle {padding:7px 9px;border:1px solid #d9e3e9;border-radius:7px;background:#f6f9fb;color:#496b7e;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer;}
.plan-root .selbub-more:hover,.plan-root .selbub-details-toggle:hover {background:#eaf1f5;}
.plan-root .selbub-panel.selbub-quick-actions {display:block;width:100%;max-width:none;box-sizing:border-box;padding:10px;border:0;border-top:1px solid #e2eaf0;border-radius:0;background:#f9fbfc;box-shadow:none;backdrop-filter:none;}
.selbub-status-actions {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;}
.selbub-other-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:9px;padding-top:9px;border-top:1px solid #e2eaf0;}
.plan-root .selbub-panel .chip {display:flex;align-items:center;justify-content:center;min-width:0;min-height:36px;padding:7px 8px;border:1px solid #d9e3e9;border-radius:7px;background:#fff;color:#35566b;font-size:11px;font-weight:600;line-height:15px;text-align:center;white-space:normal;box-sizing:border-box;}
.plan-root .selbub-panel .chip:hover {background:#edf3f6;border-color:#a3bdcb;}
.plan-root .selbub-status-actions .chip:nth-child(1) {background:#e6f0f5;}.plan-root .selbub-status-actions .chip:nth-child(2) {background:#f5f7f9;}.plan-root .selbub-status-actions .chip:nth-child(3) {background:#fff2d4;}.plan-root .selbub-status-actions .chip:nth-child(4) {background:#fbe7ea;}.plan-root .selbub-status-actions .chip:nth-child(5) {background:#eeebfa;}
.plan-root .selbub-panel.selbub-details {width:100%;max-width:none;max-height:260px;border:0;border-top:1px solid #e2eaf0;border-radius:0;padding:12px;box-shadow:none;box-sizing:border-box;}
@media(max-width:600px){.plan-object-caption {display:none;}.plan-root .selbub-pill {padding:8px;gap:5px!important;}.plan-root .selbub-count {font-size:10px;}.plan-root .selbub-panel .chip {font-size:10px;padding:6px 5px;}.plan-floating-settings {top:8px;right:12px;}}

.plan-root .scroll>header>button.plan-object-control:first-child {height:36px!important;min-height:36px!important;padding:0 10px!important;}
.plan-root .selbub-status-actions .chip {flex-direction:column;gap:3px;min-height:48px;}
.selbub-status-actions .chip b {font-size:12px;line-height:14px;}.selbub-status-actions .chip span {font-size:10px;line-height:13px;}
.plan-root .selbub-other-actions .chip.sub {grid-column:1/-1;background:#edf4f7;}
.selbub-pill {gap:6px;}
.selbub-count {white-space:nowrap;}
.selbub-icon {display:inline-flex;align-items:center;justify-content:center;flex:none;width:30px;height:32px;padding:0;border:1px solid #d7e3e9;border-radius:7px;background:#f5f8fa;color:#355c70;}
.selbub-icon:hover {background:#e6eff3;border-color:#9ab6c5;}
.selbub-icon:disabled {opacity:.38;cursor:default;}
@media(max-width:450px){.selbub-pill{padding:7px;gap:4px;}.selbub-count{font-size:10px;}.selbub-icon{width:27px;}.selbub-edit,.selbub-more{padding-left:8px;padding-right:8px;}}
.selbub .selbub-more {display:flex;align-items:center;justify-content:center;flex:none;width:30px;min-width:30px;padding:0;height:32px;}
.rail a[aria-disabled=true] {opacity:.3;cursor:not-allowed;}
.plan-tools button:disabled,.plan-tools fieldset:disabled {opacity:.4;cursor:not-allowed;}
.plan-tools fieldset.plan-mobile-filters {border:0;margin:0;padding:0;min-width:0;}
.plan-presets button.on,.cal-modes button.on {background:#0b3a4c!important;color:#fff!important;border-color:#0b3a4c!important;box-shadow:inset 0 0 0 1px #0b3a4c;font-weight:700!important;}
.ui-chevron {display:inline-block!important;flex:none;width:6px!important;height:6px!important;min-width:0!important;padding:0!important;margin:0 2px 3px 6px;border:solid currentColor!important;border-width:0 1.5px 1.5px 0!important;border-radius:0!important;background:transparent!important;transform:rotate(45deg);vertical-align:middle;box-sizing:border-box;align-self:center;}
.plan-switch-button {display:inline-flex;align-items:center;justify-content:center;gap:5px;}
.date-rich-text {font:inherit;white-space:nowrap;}
.date-rich-text .date-text-year {font-size:.78em;font-weight:500;color:#8a9da6;letter-spacing:.02em;}
.shared-date-trigger>.date-rich-text {min-width:0;white-space:normal;}
#period-btn .date-text-year {color:#80988c;}
.plan-presets>button,.cal-modes>.cal-mode {display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.35;}
.cal-modes {display:grid;grid-template-columns:.85fr .9fr .85fr 1.4fr;gap:4px;}
.cal-modes>.cal-mode {min-width:0;padding:8px 4px;font-size:10px;}
.plan-presets>button {flex:1;min-width:0;}
.cal-month-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:6px 0;}
.cal-month-choice {display:flex;align-items:center;justify-content:center;min-height:42px;padding:8px 4px;border:1px solid #dce7ed;border-radius:8px;background:#f7fafb;color:#35596c;font:600 11px Montserrat,system-ui,sans-serif;cursor:pointer;}
.cal-month-choice:hover {background:#eaf3ee;border-color:#b3ccbc;}
.cal-month-choice.on {background:#e0efe5;border-color:#8eb69e;color:#245b3b;box-shadow:inset 0 0 0 1px #8eb69e;}
/* Applied changes briefly glow without hiding the status or moving the grid. */
.tabel td.plan-cell-updated {position:relative;animation:plan-cell-update .72s ease-in-out 5;outline:2px solid transparent;outline-offset:-2px;}
@keyframes plan-cell-update {
  0%,85%,100% {box-shadow:inset 0 0 0 0 #12986700,inset 0 0 0 30px #38d99700,0 0 0 #139e6100;outline-color:transparent;}
  35%,50% {box-shadow:inset 0 0 0 2px #129867,inset 0 0 0 30px #38d99788,0 0 8px #139e6170;outline-color:#118e60;}
}
@media(prefers-reduced-motion:reduce){.tabel td.plan-cell-updated{animation-name:plan-cell-update;animation-duration:1.2s!important;animation-iteration-count:3!important;}}
