:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --accent: #2f6feb;
  --success: #17a34a;
  --warn: #eab308;
  --danger: #dc2626;
  --name-col: 74px;
  --hours-col: 42px;
  --cell-width: 45px;
  --row-height: 46px;
  --header-height: 34px;
  --summary-height: 27px;
  --chart-summary-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --shadow-raised: 0 2px 8px rgb(17 17 17 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  margin: -1px;
  white-space: nowrap;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

.workspace {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  background: var(--bg);
}

.shift-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(56px + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.shift-context__store {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.shift-context__meta {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.shift-window {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.shift-context__store > strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-context__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
}

.context-button {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
}

.context-button svg {
  width: 16px;
  height: 16px;
}

.context-button--icon {
  min-width: 40px;
  width: 40px;
  padding: 0;
}

.context-button:hover {
  border-color: color-mix(in oklab, var(--accent) 28%, var(--border));
  background: color-mix(in oklab, var(--accent) 4%, var(--surface));
}

.context-button:active {
  transform: scale(0.97);
}

.filter-panel,
.task-panel {
  border-bottom: 1px solid var(--border);
}

.filter-panel {
  padding: 7px 8px 8px;
  background: var(--bg);
}

.filter-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 0.95fr 0.95fr;
  gap: 5px;
}

.filter-button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.filter-button {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow: hidden;
  padding: 3px 7px;
  text-align: left;
}

.filter-button > svg:first-child {
  display: none;
}

.filter-button span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.1;
}

.filter-button time {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.filter-button small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.1;
}

.filter-button strong {
  display: flex;
  gap: 3px;
  align-items: baseline;
  overflow: hidden;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-button strong span {
  display: inline;
  overflow: hidden;
  flex-direction: initial;
  justify-content: initial;
  min-width: 0;
  text-overflow: ellipsis;
}

.filter-button em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
}

.filter-button__chevron {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-left: auto;
  color: color-mix(in oklab, var(--muted) 72%, transparent);
}

.filter-button:hover {
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  background: color-mix(in oklab, var(--accent) 3%, var(--surface));
}

.filter-button:active {
  transform: scale(0.985);
}

.task-panel {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 32;
  padding: 7px 0 8px;
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(14px);
}

.section-heading,
.schedule-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading {
  gap: 8px;
  padding: 0 10px 5px;
}

.section-heading h2,
.schedule-heading h2,
.sheet-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-heading__title {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.task-panel__hint {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.task-mode {
  overflow: hidden;
  max-width: 58vw;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-mode.is-painting {
  background: color-mix(in oklab, var(--selected-task) 10%, var(--surface));
  color: color-mix(in oklab, var(--selected-task) 72%, var(--fg));
}

.task-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 10px;
  scroll-padding-inline: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.task-strip::-webkit-scrollbar {
  display: none;
}

.task-chip {
  --chip-color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  scroll-snap-align: start;
  white-space: nowrap;
}

.task-chip::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chip-color);
  content: "";
}

.task-chip[aria-selected="true"] {
  border-color: var(--chip-color);
  background: color-mix(in oklab, var(--chip-color) 10%, var(--surface));
  color: color-mix(in oklab, var(--chip-color) 80%, var(--fg));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--chip-color) 14%, transparent);
}

.task-chip:active {
  transform: scale(0.98);
}

.schedule-panel {
  min-width: 0;
  background: var(--surface);
}

.schedule-heading {
  padding: 9px 10px 8px;
}

.schedule-heading h2 {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.schedule-heading h2 small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.schedule-heading__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.freeze-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--muted);
}

.freeze-toggle svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.9;
}

.freeze-toggle[data-frozen="true"] {
  border-color: color-mix(in oklab, var(--accent) 36%, var(--border));
  background: color-mix(in oklab, var(--accent) 9%, var(--surface));
  color: var(--accent);
}

.freeze-toggle:active {
  transform: scale(0.96);
}

.summary-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
}

.summary-view-switch button {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-width: 43px;
  min-height: 26px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.summary-view-switch button svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.9;
}

.summary-view-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 3px rgb(17 17 17 / 8%);
}

.summary-view-switch button:active {
  transform: scale(0.97);
}

.schedule-metrics {
  display: flex;
  gap: 6px;
  align-items: center;
}

.fulfillment-rate {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px;
  align-items: baseline;
  min-width: 56px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--bg);
}

.fulfillment-rate span {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.fulfillment-rate strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.fulfillment-rate[data-state="under"] strong {
  color: var(--danger);
}

.fulfillment-rate[data-state="met"] strong {
  color: var(--success);
}

.fulfillment-rate[data-state="over"] strong {
  color: color-mix(in oklab, var(--warn) 74%, var(--fg));
}

.live-total {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.live-total span {
  color: var(--muted);
  font-size: 9px;
}

.live-total strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.schedule-scroll {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: color-mix(in oklab, var(--muted) 40%, transparent) transparent;
  scrollbar-width: thin;
}

.schedule-scroll.is-summary-frozen {
  max-height: min(62dvh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.schedule-grid {
  display: grid;
  grid-template-columns: var(--name-col) var(--hours-col) repeat(48, var(--cell-width));
  grid-template-rows: var(--header-height) var(--summary-height) var(--summary-height) repeat(var(--staff-count), var(--row-height));
  min-width: calc(var(--name-col) + var(--hours-col) + 48 * var(--cell-width));
  background: var(--surface);
  font-size: 11px;
}

.grid-head,
.grid-summary-label,
.grid-summary-value,
.grid-time,
.grid-summary-cell,
.staff-cell,
.staff-hours {
  position: sticky;
}

.grid-head,
.grid-summary-label,
.grid-summary-value {
  left: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.grid-head {
  top: 0;
  z-index: 12;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.grid-head--hours,
.grid-summary-value,
.staff-hours {
  left: var(--name-col);
}

.grid-head--hours,
.grid-summary-value,
.staff-hours {
  box-shadow: 8px 0 12px -12px rgb(17 17 17 / 80%);
}

.grid-time {
  top: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.grid-time.is-midnight {
  color: color-mix(in oklab, var(--accent) 80%, var(--fg));
  font-weight: 600;
}

.grid-summary-label {
  color: var(--fg);
  font-size: 9px;
  font-weight: 600;
}

.grid-summary-label.is-estimate {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.grid-summary-label.is-estimate svg {
  width: 10px;
  height: 10px;
  color: var(--muted);
}

.schedule-scroll.is-summary-frozen .is-estimate-row,
.schedule-scroll.is-summary-frozen .is-comparison-row {
  top: var(--header-height);
}

.schedule-scroll.is-summary-frozen .grid-summary-cell.is-estimate-row,
.schedule-scroll.is-summary-frozen .grid-summary-cell.is-comparison-row {
  z-index: 8;
}

.schedule-scroll.is-summary-frozen .grid-summary-label.is-estimate-row,
.schedule-scroll.is-summary-frozen .grid-summary-value.is-estimate-row,
.schedule-scroll.is-summary-frozen .grid-summary-label.is-comparison-row,
.schedule-scroll.is-summary-frozen .grid-summary-value.is-comparison-row {
  z-index: 11;
}

.schedule-scroll.is-summary-frozen .is-schedule-row {
  top: calc(var(--header-height) + var(--summary-height));
  box-shadow: 0 4px 8px -8px rgb(17 17 17 / 65%);
}

.schedule-scroll.is-summary-frozen .grid-summary-cell.is-schedule-row {
  z-index: 7;
}

.schedule-scroll.is-summary-frozen .grid-summary-label.is-schedule-row,
.schedule-scroll.is-summary-frozen .grid-summary-value.is-schedule-row {
  z-index: 10;
}

.schedule-grid.is-chart-view .grid-summary-label.is-comparison {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.schedule-grid.is-chart-view .grid-summary-label.is-comparison::before {
  width: 7px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent) 0 38%,
    transparent 38% 50%,
    var(--success) 50% 100%
  );
  content: "";
}

.grid-summary-value.is-comparison-total {
  overflow: hidden;
  padding-inline: 2px;
  font-size: 7.5px;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.grid-summary-value {
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.grid-summary-cell {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.estimate-trigger {
  cursor: pointer;
}

.estimate-trigger:hover,
.estimate-trigger:focus-visible {
  background: color-mix(in oklab, var(--accent) 7%, var(--surface));
}

.estimate-trigger:active {
  background: color-mix(in oklab, var(--accent) 12%, var(--surface));
}

.estimate-value.is-under {
  color: var(--success);
  font-weight: 600;
}

.estimate-value.is-over {
  color: var(--danger);
  font-weight: 600;
}

.grid-summary-cell.comparison-value.is-chart {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(to top, color-mix(in oklab, var(--fg) 16%, transparent) 0 1px, transparent 1px),
    repeating-linear-gradient(
      to top,
      transparent 0 24%,
      color-mix(in oklab, var(--border) 70%, transparent) 24% 25%
    );
}

.summary-compare {
  position: absolute;
  inset: 4px 3px 3px;
}

.summary-compare__bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  min-width: 2px;
  min-height: 2px;
  transform: translateX(-50%);
  transition: height 180ms ease;
}

.summary-compare__bar--estimate {
  z-index: 1;
  width: 22px;
  height: calc(var(--estimate-ratio, 0) * 100%);
  border: 1px solid color-mix(in oklab, var(--success) 48%, var(--border));
  border-radius: 4px 4px 1px 1px;
  background: color-mix(in oklab, var(--success) 24%, var(--surface));
}

.comparison-value.is-over .summary-compare__bar--estimate {
  border-color: color-mix(in oklab, var(--danger) 44%, var(--border));
  background: color-mix(in oklab, var(--danger) 24%, var(--surface));
}

.summary-compare__bar--schedule {
  z-index: 2;
  width: 11px;
  height: calc(var(--schedule-ratio, 0) * 100%);
  border: 1px solid color-mix(in oklab, var(--accent) 72%, var(--fg));
  border-radius: 3px 3px 1px 1px;
  background: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--surface) 88%, transparent),
    0 -2px 0 color-mix(in oklab, var(--surface) 70%, transparent);
}

.summary-compare.is-single .summary-compare__bar {
  width: 14px;
}

.summary-compare.is-empty::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: color-mix(in oklab, var(--muted) 52%, transparent);
  content: "—";
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
}

.schedule-value {
  color: color-mix(in oklab, var(--fg) 70%, var(--muted));
}

.grid-summary-cell.is-hidden,
.grid-summary-label.is-hidden,
.grid-summary-value.is-hidden {
  display: none;
}

.is-middle-night {
  box-shadow: inset 1px 0 0 color-mix(in oklab, var(--accent) 28%, var(--border));
}

.staff-cell {
  left: 0;
  z-index: 5;
  display: flex;
  gap: 2px;
  align-items: center;
  min-width: 0;
  padding: 0 2px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.staff-cell__avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.staff-cell__avatar::before {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 6%, var(--bg));
  content: "";
}

.staff-cell__avatar svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
  transform: translate(-50%, -50%);
}

.staff-cell__avatar:hover {
  color: var(--accent);
}

.staff-cell__avatar:active::before {
  background: color-mix(in oklab, var(--accent) 13%, var(--bg));
}

.staff-cell__name {
  overflow: hidden;
  min-width: 0;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-cell.is-compact {
  justify-content: center;
  padding: 0;
}

.staff-cell.is-compact .staff-cell__avatar {
  display: none;
}

.staff-hours {
  z-index: 5;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 42%, var(--surface));
  font-family: var(--font-mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.staff-hours.is-rest-day {
  background: color-mix(in oklab, var(--warn) 8%, var(--surface));
  color: color-mix(in oklab, var(--warn) 66%, var(--fg));
  font-size: 9px;
  font-weight: 600;
}

.gantt-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(48, 1fr);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  touch-action: pan-x;
  user-select: none;
}

.gantt-row.is-painting {
  cursor: crosshair;
  touch-action: none;
}

.gantt-row.is-rest-day {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklab, var(--warn) 5%, var(--surface)) 0,
      color-mix(in oklab, var(--warn) 5%, var(--surface)) 7px,
      var(--surface) 7px,
      var(--surface) 14px
    );
  cursor: not-allowed;
}

.gantt-row.is-rest-day.is-painting {
  cursor: not-allowed;
}

.gantt-cell {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--border);
}

.gantt-cell.is-middle-night {
  box-shadow: inset 1px 0 0 color-mix(in oklab, var(--accent) 28%, var(--border));
}

.gantt-cell.is-preview {
  background: color-mix(in oklab, var(--selected-task) 18%, var(--surface));
}

.gantt-cell.is-preview::after {
  position: absolute;
  inset: 2px;
  border: 1px dashed color-mix(in oklab, var(--selected-task) 75%, var(--border));
  border-radius: 4px;
  content: "";
}

.gantt-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  z-index: 2;
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--block-color) 42%, var(--surface));
  border-radius: 5px;
  background: color-mix(in oklab, var(--block-color) 13%, var(--surface));
  color: color-mix(in oklab, var(--block-color) 86%, var(--fg));
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-block span {
  display: grid;
  gap: 2px;
  justify-items: center;
  overflow: hidden;
  padding: 0 3px;
  text-overflow: ellipsis;
  line-height: 1.05;
  white-space: nowrap;
}

.gantt-block small {
  color: color-mix(in oklab, var(--block-color) 64%, var(--muted));
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.gantt-block.is-compact small {
  display: none;
}

.rest-day-block {
  position: absolute;
  inset: 5px 8px;
  z-index: 3;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in oklab, var(--warn) 30%, var(--border));
  border-radius: 5px;
  background: color-mix(in oklab, var(--warn) 9%, var(--surface));
  color: color-mix(in oklab, var(--warn) 62%, var(--fg));
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  pointer-events: none;
}

.rest-day-block svg {
  width: 13px;
  height: 13px;
}

.schedule-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 10px;
}

.selected-task-indicator {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
}

.selected-task-indicator::before {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--selected-task, var(--muted));
  content: "";
}

.text-button {
  flex: 0 0 auto;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
}

.text-button:hover {
  text-decoration: underline;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
}

.icon-button:hover {
  background: var(--bg);
}

.popover-menu {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 10px !important;
  top: auto !important;
  z-index: 70;
  display: grid;
  width: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 -8px 32px rgb(17 17 17 / 14%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.popover-menu::before {
  justify-self: center;
  width: 28px;
  height: 3px;
  margin: 0 0 4px;
  border-radius: 999px;
  background: var(--border);
  content: "";
}

.popover-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.popover-menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  text-align: left;
}

.popover-menu button:hover {
  background: var(--bg);
}

.popover-menu svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.popover-menu em {
  display: grid;
  width: 18px;
  height: 18px;
  margin-left: auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--danger) 10%, var(--surface));
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
}

.staff-action-popover {
  position: fixed;
  z-index: 76;
  display: grid;
  width: min(236px, calc(100vw - 16px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(17 17 17 / 16%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.98);
  transform-origin: 20px top;
  transition: opacity 120ms ease, transform 120ms ease;
}

.staff-action-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.staff-action-popover.is-above {
  transform-origin: 20px bottom;
}

.staff-action-popover__person {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.staff-action-popover__person > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.staff-action-popover__person strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-action-popover__person small {
  color: var(--muted);
  font-size: 9px;
}

.staff-action-popover__avatar,
.staff-action-popover__icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.staff-action-popover__avatar svg,
.staff-action-popover__icon svg {
  width: 14px;
  height: 14px;
}

.staff-action-popover__actions {
  display: grid;
  padding: 4px;
}

.staff-action-popover__actions button {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.staff-action-popover__actions button:hover {
  background: var(--bg);
}

.staff-action-popover__actions button > span:last-child {
  display: grid;
  gap: 1px;
}

.staff-action-popover__actions strong {
  font-size: 12px;
  font-weight: 600;
}

.staff-action-popover__actions small {
  color: var(--muted);
  font-size: 9px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 24px;
  background: rgb(17 17 17 / 38%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  width: min(100%, 560px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 32px rgb(17 17 17 / 12%);
  transform: translateY(20px);
  transition: transform 180ms ease;
}

.modal-backdrop.is-open .bottom-sheet {
  transform: translateY(0);
}

.bottom-sheet--compact {
  max-width: 460px;
}

.sheet-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.sheet-header .section-heading__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.sheet-close {
  margin: -6px -4px -6px 0;
}

.sheet-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.search-field {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 13px;
}

.field textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.sheet-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.button--primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button--primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, var(--fg));
}

.button--secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
}

.button--secondary:hover {
  background: var(--bg);
}

.search-field {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 11px;
}

.search-field svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.person-options {
  display: grid;
  gap: 6px;
}

.person-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}

.person-option:hover {
  border-color: var(--border);
}

.person-option__avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.person-option__meta {
  display: grid;
  gap: 2px;
}

.person-option__meta strong {
  font-size: 12px;
}

.person-option__meta small {
  color: var(--muted);
  font-size: 10px;
}

.person-option input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
}

.person-empty {
  padding: 44px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.selection-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.copy-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.copy-flow > div {
  display: grid;
  gap: 3px;
}

.copy-flow small,
.copy-flow span {
  color: var(--muted);
  font-size: 10px;
}

.copy-flow strong {
  font-size: 12px;
}

.copy-flow__arrow {
  color: var(--accent) !important;
  font-size: 18px !important;
}

.switch-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  cursor: pointer;
}

.switch-row + .switch-row {
  border-top: 1px solid var(--border);
}

.switch-row > span {
  display: grid;
  gap: 2px;
}

.switch-row strong {
  font-size: 12px;
  font-weight: 600;
}

.switch-row small {
  color: var(--muted);
  font-size: 10px;
}

.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-row i {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  transition: background 140ms ease;
}

.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgb(17 17 17 / 18%);
  content: "";
  transition: transform 140ms ease;
}

.switch-row input:checked + i {
  background: var(--accent);
}

.switch-row input:checked + i::after {
  transform: translateX(16px);
}

.field-settings {
  gap: 0;
}

.transfer-sheet {
  max-width: 520px;
}

.transfer-sheet__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  padding-left: 12px;
}

.transfer-sheet__header > div {
  text-align: center;
}

.transfer-sheet__back {
  margin-left: -6px;
}

.transfer-sheet__body {
  gap: 16px;
}

.transfer-person {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.transfer-person__avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.transfer-person__avatar svg {
  width: 19px;
  height: 19px;
}

.transfer-person > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.transfer-person > div strong {
  font-size: 13px;
}

.transfer-person > div small,
.transfer-person__date {
  color: var(--muted);
  font-size: 10px;
}

.transfer-person__date {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.transfer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.transfer-route > div {
  display: grid;
  gap: 4px;
}

.transfer-route > div:last-child {
  text-align: right;
}

.transfer-route small {
  color: var(--muted);
  font-size: 9px;
}

.transfer-route strong {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.transfer-route > svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.transfer-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.transfer-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.approval-list {
  display: grid;
  gap: 10px;
}

.approval-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.approval-card__head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.approval-card__avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  font-size: 11px;
  font-weight: 600;
}

.approval-card__title {
  display: grid;
  gap: 2px;
}

.approval-card__title strong {
  font-size: 12px;
}

.approval-card__title small {
  color: var(--muted);
  font-size: 10px;
}

.approval-card__change {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
}

.approval-card__change del {
  color: var(--muted);
}

.approval-card__change ins {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.approval-card__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
}

.mini-button--approve {
  border-color: color-mix(in oklab, var(--success) 30%, var(--border));
  color: var(--success);
}

.estimate-sheet {
  width: min(100%, 1180px);
  max-height: calc(100dvh - 12px);
}

.estimate-sheet__body {
  gap: 10px;
  padding: 12px;
}

.estimate-scope {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in oklab, var(--accent) 18%, var(--border));
  border-radius: 8px;
  background: color-mix(in oklab, var(--accent) 5%, var(--surface));
}

.estimate-scope > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.estimate-scope > div:nth-child(2) {
  justify-items: end;
  text-align: right;
}

.estimate-scope span {
  color: var(--muted);
  font-size: 9px;
}

.estimate-scope strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.estimate-scope > div:nth-child(2) strong {
  color: var(--accent);
  font-size: 15px;
}

.estimate-scope__tasks {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  padding-top: 8px;
  border-top: 1px solid color-mix(in oklab, var(--accent) 13%, var(--border));
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.estimate-source-list {
  display: grid;
  gap: 10px;
}

.estimate-task-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.estimate-task-group__header {
  display: flex;
  min-height: 48px;
  padding: 9px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--group-color) 5%, var(--surface));
}

.estimate-task-group__identity {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.estimate-task-group__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--group-color);
}

.estimate-task-group__identity > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.estimate-task-group__identity strong {
  font-size: 12px;
}

.estimate-task-group__identity span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.estimate-task-group__total {
  flex: 0 0 auto;
  color: color-mix(in oklab, var(--group-color) 74%, var(--fg));
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.estimate-table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.estimate-table-scroll:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 52%, transparent);
  outline-offset: -2px;
}

.estimate-source-table {
  width: max-content;
  min-width: 1120px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.estimate-source-table th,
.estimate-source-table td {
  min-width: 82px;
  height: 42px;
  padding: 7px 9px;
  border-right: 1px solid color-mix(in oklab, var(--border) 72%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 82%, transparent);
  background: var(--surface);
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.estimate-source-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 38px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 500;
}

.estimate-source-table tbody th {
  font-weight: 500;
}

.estimate-source-table th:nth-child(1) {
  width: 76px;
  min-width: 76px;
}

.estimate-source-table th:nth-child(2) {
  width: 132px;
  min-width: 132px;
}

.estimate-source-table th:nth-child(6) {
  width: 118px;
  min-width: 118px;
}

.estimate-source-table th:nth-child(10) {
  width: 92px;
  min-width: 92px;
}

.estimate-source-table th:nth-child(1),
.estimate-source-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 8px 0 10px -10px rgb(17 17 17 / 42%);
}

.estimate-source-table th:nth-child(2),
.estimate-source-table td:nth-child(2) {
  position: sticky;
  left: 76px;
  z-index: 2;
  box-shadow: 8px 0 10px -10px rgb(17 17 17 / 42%);
}

.estimate-source-table thead th:nth-child(1),
.estimate-source-table thead th:nth-child(2) {
  z-index: 4;
  background: var(--bg);
}

.estimate-object-row:hover th,
.estimate-object-row:hover td {
  background: color-mix(in oklab, var(--accent) 3%, var(--surface));
}

.estimate-source-table tr:last-child th,
.estimate-source-table tr:last-child td {
  border-bottom: 0;
}

.estimate-col-task {
  color: var(--muted);
}

.estimate-col-object {
  color: var(--fg);
  font-weight: 600 !important;
}

.estimate-col-hours {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.estimate-col-basis {
  padding-block: 5px !important;
}

.estimate-basis-trigger {
  display: inline-flex;
  min-height: 30px;
  padding: 0 8px;
  align-items: center;
  gap: 3px;
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--border));
  border-radius: 6px;
  background: color-mix(in oklab, var(--accent) 5%, var(--surface));
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
}

.estimate-basis-trigger svg {
  width: 11px;
  height: 11px;
  transition: transform 150ms ease;
}

.estimate-basis-trigger[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.estimate-basis-row[hidden] {
  display: none;
}

.estimate-basis-row > td {
  padding: 0;
  background: var(--bg);
}

.estimate-basis {
  position: sticky;
  left: 0;
  display: grid;
  width: min(720px, calc(100vw - 48px));
  gap: 8px;
  padding: 11px 12px 13px;
  background: var(--bg);
}

.estimate-basis > div {
  display: grid;
  gap: 3px;
}

.estimate-basis span {
  color: var(--muted);
  font-size: 9px;
}

.estimate-basis code {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

.estimate-method-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin: 0 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.estimate-method-note svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.toast {
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--fg) 92%, transparent);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 640px) {
  :root {
    --name-col: 116px;
    --hours-col: 58px;
    --cell-width: 54px;
    --row-height: 51px;
    --header-height: 40px;
    --summary-height: 32px;
    --chart-summary-height: 78px;
  }

  .shift-context {
    min-height: 64px;
    padding-block: 10px;
    padding-inline: 20px;
  }

  .shift-context__store > strong {
    font-size: 16px;
  }

  .shift-context__meta {
    font-size: 10px;
  }

  .context-button {
    min-width: 76px;
    min-height: 44px;
    font-size: 12px;
  }

  .context-button--icon {
    min-width: 44px;
    width: 44px;
  }

  .filter-panel {
    padding-block: 10px 12px;
    padding-inline: 20px;
  }

  .filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .filter-button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .filter-button > svg:first-child {
    display: block;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: var(--muted);
  }

  .filter-button small {
    font-size: 9px;
  }

  .filter-button strong {
    font-size: 12px;
  }

  .filter-button em {
    font-size: 9px;
  }

  .task-panel {
    padding-block: 10px;
  }

  .task-chip {
    min-height: 38px;
    padding-inline: 13px;
    font-size: 12px;
  }

  .task-strip,
  .section-heading,
  .schedule-heading {
    padding-inline: 20px;
  }

  .summary-view-switch button {
    min-width: 50px;
    min-height: 28px;
    font-size: 10px;
  }

  .fulfillment-rate {
    min-width: 62px;
    padding: 5px 7px;
  }

  .fulfillment-rate span {
    font-size: 9px;
  }

  .fulfillment-rate strong {
    font-size: 13px;
  }

  .schedule-footer {
    padding-inline: 20px;
  }

  .popover-menu {
    right: auto;
    bottom: auto;
    width: 188px;
    padding: 6px;
    border-radius: 12px;
    box-shadow: var(--shadow-raised);
    transform: translateY(-4px);
  }

  .popover-menu::before {
    display: none;
  }

  .popover-menu button {
    min-height: 44px;
    border-radius: 7px;
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  :root {
    --name-col: 136px;
    --hours-col: 68px;
    --cell-width: 56px;
    --row-height: 53px;
  }

  body {
    background: var(--border);
  }

  .app-shell {
    max-width: 1440px;
    margin: 0 auto;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  .shift-context,
  .filter-panel {
    padding-inline: 28px;
  }

  .filter-button {
    min-height: 46px;
  }

  .section-heading,
  .schedule-heading,
  .task-strip,
  .schedule-footer {
    padding-inline: 28px;
  }

  .gantt-block {
    font-size: 10px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .bottom-sheet {
    border-radius: 14px;
  }
}

@media (min-width: 1440px) {
  :root {
    --cell-width: 60px;
  }
}

@media (max-width: 374px) {
  :root {
    --name-col: 68px;
    --hours-col: 38px;
    --cell-width: 43px;
  }

  .filter-grid {
    gap: 3px;
  }

  .filter-button {
    padding-inline: 5px;
  }

  .filter-button strong {
    font-size: 9.5px;
  }

  .filter-button__chevron {
    display: none;
  }

  .task-panel__hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
