/* Disposition: module stylesheet. Shared CI tokens live in timebase-tokens.css.
   Loaded after app.css and before Razor CSS isolation. Domain cell/shift colors
   remain in app.css; this file owns layout and neutral planning surfaces only. */
.tb-dispo-2027 {
    --dispo-panel: var(--tb-surface);
    --dispo-panel-soft: var(--tb-surface-soft);
    --dispo-panel-line: var(--tb-border);
    --dispo-panel-line-strong: var(--tb-border-strong);
    --dispo-panel-shadow: var(--tb-shadow-sm);
    --dispo-row: var(--tb-surface-soft);
    --dispo-kpi-feature: var(--tb-surface);
}
/* A few broad fields carry timebase's Aurora; the dense weekly grid stays crisp. */
.tb-theme-dark:not([data-tb-appearance="light"]) .tb-dispo-2027 {
    --dispo-panel: linear-gradient(145deg, rgb(15 46 79 / 95%), rgb(7 27 54 / 96%) 58%, rgb(16 45 76 / 95%));
    --dispo-panel-soft: linear-gradient(160deg, rgb(23 57 90 / 91%), rgb(8 30 57 / 94%));
    --dispo-panel-line: rgb(119 167 210 / 24%);
    --dispo-panel-line-strong: rgb(135 179 215 / 36%);
    --dispo-panel-shadow: 0 9px 24px rgb(0 13 30 / 18%), inset 0 1px 0 rgb(255 255 255 / 5%);
    --dispo-row: rgb(8 30 57 / 90%);
    --dispo-kpi-feature: linear-gradient(130deg, rgb(91 39 61 / 78%), rgb(14 43 71 / 94%));
}

.tb-theme-dark .tb-content:has(.tb-dispo-2027) {
    background: radial-gradient(ellipse 52% 33% at 3% 22%, rgb(18 72 116 / 27%), transparent 78%),
        radial-gradient(ellipse 48% 35% at 93% 6%, rgb(136 43 65 / 12%), transparent 78%),
        radial-gradient(ellipse 58% 45% at 64% 82%, rgb(22 82 121 / 19%), transparent 82%);
}
.tb-dispo-2027.dispo-page-shell {
    position: relative;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--tb-text);
    box-shadow: none;
    overflow: visible;
}
.tb-dispo-2027.dispo-page-shell > .tb-card-body {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    min-width: 0;
    padding: .7rem .55rem 1rem;
}
.tb-dispo-2027 .dispo-2027-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    min-height: 28px;
    color: var(--tb-on-dark-muted);
    font-size: .75rem;
    letter-spacing: .04em;
}
.tb-dispo-2027 .dispo-2027-heading-name { color: var(--tb-on-navy); font-weight: 800; }
.tb-dispo-2027 .dispo-2027-heading-name::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 13px;
    margin-right: .55rem;
    background: var(--tb-accent);
    vertical-align: -2px;
}
.tb-dispo-2027 .dispo-2027-heading-divider { width: 22px; height: 1px; background: var(--tb-border-strong); }
.tb-dispo-2027 .dispo-2027-heading-week { font-variant-numeric: tabular-nums; }

/* Compact command strip. Status borders convey protection state without motion. */
.tb-dispo-2027 .dispo-command-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    border: 1px solid var(--dispo-panel-line);
    border-radius: 14px;
    background: var(--dispo-panel);
    box-shadow: var(--dispo-panel-shadow);
}
.tb-dispo-2027 .dispo-command-strip,
.tb-dispo-2027 .dispo-command-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.tb-dispo-2027 .dispo-command-actions { justify-content: flex-end; }
.tb-dispo-2027 .dispo-command-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 52px;
    padding: .42rem .7rem;
    border: 1px solid var(--dispo-panel-line);
    border-radius: 9px;
    background: var(--dispo-row);
    color: var(--tb-text);
    text-align: left;
    box-shadow: none;
}
.tb-dispo-2027 button.dispo-command-info { cursor: pointer; }
.tb-dispo-2027 .dispo-command-info strong { color: var(--tb-text); font-size: .94rem; line-height: 1.2; }
.tb-dispo-2027 .dispo-command-info small { color: var(--tb-text-dim); font-size: .72rem; margin-top: .05rem; }
.tb-dispo-2027 .dispo-command-label { color: var(--tb-text-dim); font-size: .74rem; margin-bottom: .08rem; }
.tb-dispo-2027 .dispo-command-info--updated { position: relative; padding-left: 1.65rem; }
.tb-dispo-2027 .dispo-command-info--updated::before {
    content: ""; position: absolute; left: .65rem; top: 50%; width: 8px; height: 8px;
    border-radius: 50%; transform: translateY(-50%); background: var(--tb-success);
}
.tb-dispo-2027 .dispo-command-info--lock.is-locked { border-color: var(--tb-warning); }
.tb-dispo-2027 .dispo-command-info--lock.is-unlocked { border-color: var(--tb-success); }
.tb-dispo-2027 .dispo-command-info--lock.is-locked .dispo-command-label { color: var(--tb-warning); }
.tb-dispo-2027 .dispo-command-info--lock.is-unlocked .dispo-command-label { color: var(--tb-success); }
.tb-dispo-2027 .dispo-command-action-chip:hover { background: var(--tb-surface-hover); border-color: var(--tb-border-strong); }
.tb-dispo-2027 .dispo-command-link { align-self: center; border: 0; padding: .2rem .35rem; background: transparent; color: var(--tb-link); font-weight: 700; cursor: pointer; }
.tb-dispo-2027 .dispo-command-link:hover { text-decoration: underline; }
.tb-dispo-2027 .dispo-command-search { min-width: 170px; width: clamp(170px, 17vw, 280px); min-height: 37px; }
.tb-dispo-2027 .dispo-command-actions > .tb-btn { min-height: 37px; padding: .38rem .7rem; }

/* KPI strip. Entry/exit, sickness, vacation and other domain meter colors are
   supplied by app.css and are intentionally not recolored here. */
.tb-dispo-2027 .tb-kpi-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.tb-dispo-2027 .dispo-kpi-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: .28rem;
    min-width: 0;
    min-height: 86px;
    padding: .6rem;
    border: 1px solid var(--dispo-panel-line);
    border-radius: 9px;
    background: var(--dispo-panel-soft);
    color: var(--tb-text);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box:first-child { border-top: 3px solid var(--tb-accent); border-color: color-mix(in srgb, var(--tb-accent) 38%, var(--dispo-panel-line)); background: var(--dispo-kpi-feature); padding-top: calc(.6rem - 2px); }
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box:hover,
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box:focus-within { transform: none; border-color: var(--tb-border-strong); }
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box-title { color: var(--tb-text-dim); font-size: .68rem; letter-spacing: .02em; white-space: normal; overflow-wrap: anywhere; }
.tb-dispo-2027 .dispo-kpi-grid .tb-kpi-box-value { color: var(--tb-text); font-size: 1.3rem; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tb-dispo-2027 .dispo-kpi-meter { margin-top: auto; height: 5px; width: 100%; border-radius: 2px; background: var(--tb-border); overflow: hidden; }
.tb-dispo-2027 .dispo-kpi-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--tb-text-dim); }

.tb-dispo-2027 .dispo-check-card {
    padding: .7rem .85rem;
    margin-bottom: 0;
    border: 1px solid var(--dispo-panel-line);
    border-left: 3px solid var(--tb-success);
    border-radius: 12px;
    background: var(--dispo-panel);
    box-shadow: var(--dispo-panel-shadow);
}
.tb-dispo-2027 .dispo-check-card.has-issues { border-left-color: var(--tb-warning); }
.tb-dispo-2027 .dispo-check-head-compact { display: grid; grid-template-columns: minmax(160px, auto) minmax(180px, 1fr) auto; gap: .7rem; align-items: center; }
.tb-dispo-2027 .dispo-check-heading,
.tb-dispo-2027 .dispo-check-status-area { min-width: 0; }
.tb-dispo-2027 .dispo-check-clean-inline { display: flex; align-items: center; min-height: 38px; padding: .4rem .7rem; border: 1px solid var(--tb-border); border-radius: var(--tb-radius-sm); background: var(--tb-surface-soft); color: var(--tb-success); }
.tb-dispo-2027 .dispo-check-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.tb-dispo-2027 .dispo-check-last-run { color: var(--tb-text-dim); font-size: .8rem; }

/* One fixed CI layout contract. Children never exceed their grid track.
   Horizontal overflow belongs to the weekly grid, never the page/sidebar. */
.tb-dispo-2027 .dispo-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; gap: 16px; min-width: 0; }
.tb-dispo-2027 .dispo-left-column { position: sticky; top: 16px; align-self: start; z-index: 2; }
.tb-dispo-2027 .dispo-left-column,
.tb-dispo-2027 .dispo-right-column,
.tb-dispo-2027 .dispo-comp-wrap,
.tb-dispo-2027 .company-block { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.tb-dispo-2027 .dispo-right-column,
.tb-dispo-2027 .dispo-comp-wrap { display: flex; flex-direction: column; gap: .8rem; }
.tb-dispo-2027 .tb-emp-list { padding: .65rem .7rem; border: 1px solid var(--dispo-panel-line-strong); border-radius: 14px; background: var(--dispo-panel); box-shadow: var(--dispo-panel-shadow); box-sizing: border-box; width: 100%; max-width: 100%; }
.tb-dispo-2027 .tb-emp-list .tb-mini-tabs { display: flex; flex-wrap: wrap; padding: 0 0 .4rem; gap: .25rem; }
.tb-dispo-2027 .tb-emp-list .tb-mini-tab { min-height: 36px; padding: .4rem .55rem; border: 0; border-bottom: 2px solid transparent; border-radius: var(--tb-radius-sm) var(--tb-radius-sm) 0 0; background: transparent; color: var(--tb-text-dim); box-shadow: none; }
.tb-dispo-2027 .tb-emp-list .tb-mini-tab:hover { background: var(--tb-surface-hover); }
.tb-dispo-2027 .tb-emp-list .tb-mini-tab.active { background: var(--tb-surface-soft); border-bottom-color: var(--tb-accent); color: var(--tb-text); }
.tb-dispo-2027 .tb-emp-list .tb-mini-badge { background: var(--tb-surface-soft); border-color: var(--tb-border); color: var(--tb-text); border-radius: var(--tb-radius-sm); }
.tb-dispo-2027 .tb-emp-list .tb-input.search { width: 100%; min-width: 0; box-sizing: border-box; }
.tb-dispo-2027 .tb-emp-list .tb-free-emp,
.tb-dispo-2027 .tb-emp-list .tb-ex-emp { border: 0; border-bottom: 1px solid var(--tb-border); border-radius: 0; margin: 0; padding: .65rem .3rem; background: transparent; box-shadow: none; min-height: 58px; box-sizing: border-box; }
.tb-dispo-2027 .tb-emp-list .tb-free-emp.tb-free-emp-rich { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.tb-dispo-2027 .tb-emp-list .tb-free-emp:hover,
.tb-dispo-2027 .tb-emp-list .tb-ex-emp:hover { background: var(--tb-surface-hover); }
.tb-dispo-2027 .tb-free-emp-main,
.tb-dispo-2027 .tb-free-emp-rich,
.tb-dispo-2027 .tb-ex-left { min-width: 0; }
.tb-dispo-2027 .tb-emp-list .tb-emp-name,
.tb-dispo-2027 .tb-emp-list .tb-emp-link { color: var(--tb-text); white-space: normal; overflow-wrap: anywhere; }
.tb-dispo-2027 .tb-emp-list .tb-free-emp-meta-line,
.tb-dispo-2027 .tb-emp-list .tb-ex-left small { color: var(--tb-text-dim); }
.tb-dispo-2027 .tb-emp-list .tb-emp-action { min-width: 32px; height: 32px; border-radius: var(--tb-radius-sm); border-color: var(--tb-border); background: var(--tb-surface-soft); color: var(--tb-text); box-shadow: none; }
.tb-dispo-2027 .tb-emp-list .tb-emp-action:hover { background: var(--tb-surface-hover); border-color: var(--tb-border-strong); }
.tb-dispo-2027 .tb-emp-list .tb-free-emp-actions { justify-content: flex-end; width: auto; margin-top: 0; align-self: center; }

.tb-dispo-2027 .company-block { position: relative; margin: 0; padding: .7rem .8rem .8rem; border: 1px solid var(--dispo-panel-line-strong); border-left: 3px solid var(--tb-accent); border-radius: 14px; background: var(--dispo-panel); box-shadow: var(--dispo-panel-shadow); overflow: hidden; }
.tb-dispo-2027 .company-block::before { content: none; }
.tb-dispo-2027 .company-block:hover { border-color: var(--dispo-panel-line-strong); border-left-color: var(--tb-accent); box-shadow: var(--dispo-panel-shadow); }
.tb-dispo-2027 .company-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; padding: .25rem .15rem .6rem; border: 0; border-bottom: 1px solid var(--tb-border); border-radius: 0; background: transparent; box-shadow: none; }
.tb-dispo-2027 .company-header > div { min-width: 0; max-width: 100%; }
.tb-dispo-2027 .company-header > div:first-child { flex: 1 1 220px; }
.tb-dispo-2027 .company-header > div:first-child > div { min-width: 0; }
.tb-dispo-2027 .company-header > div:first-child > .tb-btn { flex: 0 0 auto; }
.tb-dispo-2027 .company-header h3 { margin: 0; color: var(--tb-text); font-size: 1.1rem; line-height: 1.3; letter-spacing: -.01em; text-shadow: none; overflow-wrap: anywhere; }
.tb-dispo-2027 .company-header small { color: var(--tb-text-dim); text-transform: none; letter-spacing: .02em; }
.tb-dispo-2027 .company-header-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.tb-dispo-2027 .company-header-actions .tb-btn { min-width: 34px; }
.tb-dispo-2027 .dispo-grid-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; scrollbar-color: var(--tb-border-strong) var(--tb-surface-soft); scrollbar-width: thin; }
.tb-dispo-2027 .dispo-grid { width: max(100%, 1020px); grid-template-columns: minmax(220px, 1.45fr) repeat(7, minmax(82px, 1fr)) minmax(80px, .68fr) minmax(100px, .84fr); gap: 5px; }
.tb-dispo-2027 .dispo-grid .hdr { min-height: 40px; padding: .4rem; border: 1px solid var(--dispo-panel-line); border-radius: 8px; color: var(--tb-text); background: var(--dispo-panel-soft); box-shadow: none; }
.tb-dispo-2027 .dispo-grid .hdr.emp { position: sticky; left: 0; z-index: 3; }
.tb-dispo-2027 .dispo-grid .dispo-employee-cell { position: sticky; left: 0; z-index: 2; min-width: 0; max-width: none; min-height: 55px; grid-template-columns: 18px minmax(0, 1fr) 26px; padding: .25rem .35rem; box-sizing: border-box; border: 1px solid var(--dispo-panel-line); border-radius: 8px; background: var(--dispo-row); box-shadow: none; }
.tb-dispo-2027 .dispo-grid .dispo-employee-cell.is-bulk-selected { border-color: var(--tb-accent); }
.tb-dispo-2027 .dispo-grid .dispo-employee-cell .emp-name { display: block; width: 100%; min-width: 0; box-sizing: border-box; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; color: var(--tb-text); background: var(--tb-surface); border-color: var(--tb-border); box-shadow: none; text-shadow: none; }
.tb-dispo-2027 .dispo-grid .tb-cell-sub { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.15; }
.tb-dispo-2027 .dispo-grid .tb-sum-cell { min-width: 0; overflow-wrap: anywhere; }
.tb-dispo-2027 .dispo-grid .dispo-empty-row { grid-column: 1 / -1; }
.tb-dispo-2027 .dispo-grid .tb-cell { border-radius: var(--tb-radius-sm); box-shadow: none; transition: border-color 120ms ease; }
.tb-dispo-2027 .dispo-grid .tb-cell:hover { transform: none; border-color: var(--tb-border-strong); }
.tb-dispo-2027 .dispo-grid .tb-sum-cell { border-radius: var(--tb-radius-sm); background: var(--tb-surface-soft); border-color: var(--tb-border); }

.tb-dispo-2027 :is(button, input, select, textarea, a, [tabindex]):focus-visible { outline: 2px solid var(--tb-focus); outline-offset: 3px; }
@media (max-width: 1550px) {
    .tb-dispo-2027 .dispo-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1220px) {
    .tb-dispo-2027 .dispo-command-bar,
    .tb-dispo-2027 .dispo-check-head-compact { grid-template-columns: minmax(0, 1fr); }
    .tb-dispo-2027 .dispo-command-actions,
    .tb-dispo-2027 .dispo-check-actions { justify-content: flex-start; }
}
@media (max-width: 1030px) {
    .tb-dispo-2027 .dispo-layout { grid-template-columns: minmax(0, 1fr); }
    .tb-dispo-2027 .dispo-left-column { position: static; }
}
@media (max-width: 760px) {
    .tb-dispo-2027 .dispo-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tb-dispo-2027 .dispo-command-info { flex: 1 1 130px; }
    .tb-dispo-2027 .dispo-command-search { width: 100%; min-width: 0; }
}
@media (max-width: 620px) {
    .tb-dispo-2027 .dispo-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-dispo-2027 .company-block { padding: .55rem; }
    .tb-dispo-2027 .dispo-grid { width: max(100%, 990px); grid-template-columns: minmax(190px, 1.45fr) repeat(7, minmax(82px, 1fr)) minmax(80px, .68fr) minmax(100px, .84fr); }
}
@media (prefers-reduced-motion: reduce) {
    .tb-dispo-2027 .dispo-grid .tb-cell { transition: none; }
}
