:root {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #202a33;
  background: #f5f7f8;
  font-synthesis: none;
  --green: #147d56;
  --green-dark: #0e6545;
  --green-soft: #e8f5ef;
  --line: #dce3e7;
  --line-strong: #c7d1d7;
  --muted: #6e7b84;
  --paper: #ffffff;
  --blue: #91c8ea;
  --blue-border: #70b4df;
  --blue-ink: #164b6b;
  --break: #82c990;
  --memo: #f1f6f7;
  --yellow: #fff7d7;
  --name-width: 178px;
  --quarter-width: 20px;
  --timeline-width: 1360px;
  --field-width: 118px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: #202a33;
  background: #f5f7f8;
  letter-spacing: 0;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.date-arrow {
  display: grid;
  place-items: center;
}

.request-status {
  position: sticky;
  left: var(--name-width);
  display: inline-block;
  padding: 18px 12px;
  color: #74828b;
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
  background: #f5f7f8;
}

.topbar {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  padding: 10px 16px;
  border-top: 4px solid #e1f2e9;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-period {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sync-account-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-left: auto;
}

.sync-google-button {
  display: inline-flex;
  min-width: 196px;
  min-height: 40px;
}

.sync-google-button > div {
  display: inline-flex;
}

.sync-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  max-width: 190px;
  padding: 0 8px;
  border: 1px solid #9cc6b3;
  border-radius: var(--radius);
  background: #f8fcfa;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
}

.sync-account-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status {
  color: #667780;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-status.is-conflict,
.sync-status.is-error {
  color: #b75843;
}

.sync-status.is-offline {
  color: #a76e21;
}

.sync-account-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  width: 240px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(34, 49, 59, 0.16);
}

.sync-account-panel p {
  margin: 4px 8px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sync-members-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.sync-members-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.sync-members-head p,
.sync-members-head h1,
.sync-members-head span {
  margin: 0;
}

.sync-members-head p {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.sync-members-head h1 {
  margin-top: 5px;
  color: #24323b;
  font-size: 25px;
}

.sync-members-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.sync-member-add,
.sync-members-list {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.sync-member-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
}

.sync-member-add label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sync-member-add input,
.sync-member-add select,
.sync-member-row select {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: #26343e;
  font-size: 12px;
}

.sync-member-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px 130px 82px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.sync-member-row:first-child {
  border-top: 0;
}

.sync-member-row strong {
  overflow: hidden;
  color: #26343e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-member-labels {
  min-height: 32px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.sync-owner-label,
.sync-members-empty {
  color: var(--muted);
  font-size: 11px;
}

.sync-members-empty {
  margin: 0;
  padding: 16px;
}

.store-switcher {
  position: relative;
  min-width: 0;
  margin-left: auto;
}

.store-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 250px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #9cc6b3;
  border-radius: var(--radius);
  background: #f8fcfa;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}

.store-switcher-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-switcher-trigger svg:last-child {
  width: 13px;
  height: 13px;
}

.store-switcher-panel {
  position: absolute;
  z-index: 31;
  top: calc(100% + 7px);
  right: 0;
  width: 250px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(34, 49, 59, 0.16);
}

.store-switcher-group {
  padding: 4px 0;
}

.store-switcher-group p {
  margin: 3px 8px 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.store-switcher-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #26343e;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.store-switcher-item:hover,
.store-switcher-item.is-active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.store-switcher-item small,
.store-switcher-empty {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.store-switcher-empty {
  display: block;
  padding: 6px 9px;
}

.breadcrumb {
  color: #74818a;
  font-size: 11px;
  white-space: nowrap;
}

.month-select {
  width: 160px;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: #26343e;
  font-size: 13px;
}

.view-select {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 12px;
}

.global-view-select {
  min-width: 74px;
  border-color: #9cbeb0;
  color: var(--green-dark);
  font-weight: 700;
}

.schedule-layer-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-layer-select {
  min-width: 82px;
}

.schedule-layer-version-select {
  min-width: 104px;
  max-width: 140px;
  color: #52636d;
}

.layer-confirm-button {
  min-height: 36px;
  padding-inline: 10px;
}

.import-layer-note {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.period-delete-button {
  color: #9d4b43;
}

.app-shell[data-view="confirmed"] :is(.row-delete-button, .time-clear-button, .resize-handle, .staff-add-button, [data-action="undo"], [data-action="redo"], [data-action="excel-import"], [data-action="staff-master"], [data-action="staffing-view"]) {
  visibility: hidden;
  pointer-events: none;
}

.app-shell[data-view="confirmed"] .shift-block {
  cursor: default;
}

.page-head-actions {
  flex-wrap: wrap;
}

.top-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  justify-content: flex-end;
  gap: 7px;
  overflow: visible;
  padding: 2px 0 3px;
}

.toolbar-menu {
  position: relative;
  flex: 0 0 auto;
}

.toolbar-menu-trigger {
  min-width: 84px;
}

.toolbar-menu-chevron {
  width: 13px;
  height: 13px;
  margin-left: -2px;
}

.toolbar-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 230px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(34, 49, 59, 0.16);
}

.toolbar-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #26343e;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.toolbar-menu-item:hover,
.toolbar-menu-item.is-active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.toolbar-menu-item.is-primary {
  color: var(--green-dark);
}

.toolbar-menu-item.is-danger {
  color: #9d4b43;
}

.toolbar-menu-item.is-danger:hover {
  background: #fff0ee;
  color: #8a3f39;
}

.toolbar-menu-divider {
  height: 1px;
  margin: 5px 3px;
  background: var(--line);
}

.toolbar-menu-period {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 2px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.toolbar-menu-period .month-select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  font-size: 11px;
}

.toolbar-menu-status {
  margin: 2px 5px 5px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
}

.toolbar-divider {
  width: 1px;
  height: 30px;
  margin: 0 2px;
  background: var(--line);
}

.icon-button,
.toolbar-button,
.staff-add-button,
.date-arrow {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
  font-size: 11px;
  font-weight: 700;
}

.icon-button {
  width: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 19px;
}

.icon-button:disabled {
  color: #bcc5ca;
  cursor: default;
}

.toolbar-button,
.staff-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  white-space: nowrap;
}

.toolbar-button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.mobile-action-label {
  display: none;
}

.toolbar-button:hover,
.staff-add-button:hover,
.icon-button:not(:disabled):hover,
.date-arrow:hover {
  background: #f0f5f3;
  border-color: #aec6ba;
}

.toolbar-button.primary:hover {
  background: var(--green-dark);
}

.toolbar-button.is-active {
  border-color: #8fbca8;
  background: var(--green-soft);
  color: var(--green-dark);
}

.staff-master-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.staff-master-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.staff-master-eyebrow,
.staff-master-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.staff-master-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.staff-master-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.staff-master-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.staff-master-table {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.staff-master-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 145px 120px 120px 86px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.staff-master-header-row {
  min-height: 38px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 11px;
  font-weight: 700;
}

.staff-master-row.is-retired {
  background: #f7f8f8;
}

.staff-master-row.is-retired .staff-master-input,
.staff-master-row.is-retired .staff-master-select {
  color: #819098;
}

.staff-master-input,
.staff-master-select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
  font-size: 13px;
}

.staff-master-input:focus,
.staff-master-select:focus {
  outline: 2px solid #a8d8c1;
  outline-offset: 1px;
}

.staff-rate-field {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.staff-rate-input {
  min-width: 0;
  text-align: right;
}

.staff-master-toggle {
  width: 36px;
  height: 36px;
}

.staff-master-row-actions {
  display: flex;
  gap: 6px;
}

.organization-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.organization-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.organization-eyebrow,
.organization-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.organization-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.organization-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.organization-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.organization-list {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.organization-business {
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--line);
}

.organization-business-head {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.organization-business-head label {
  display: grid;
  gap: 5px;
  min-width: 130px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.organization-business-head label:first-child {
  flex: 1 1 260px;
}

.organization-input,
.organization-select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
  font-size: 13px;
}

.organization-input:focus,
.organization-select:focus {
  outline: 2px solid #a8d8c1;
  outline-offset: 1px;
}

.organization-store-table {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.organization-store-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 150px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.organization-store-header {
  min-height: 36px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 11px;
  font-weight: 700;
}

.organization-store-row.is-paused {
  background: #f7f8f8;
}

.organization-empty {
  margin: 0;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.position-settings-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.position-settings-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.position-settings-eyebrow,
.position-settings-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.position-settings-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.position-settings-head h1 {
  margin: 4px 0 5px;
  color: #26343e;
  font-size: 24px;
  line-height: 1.25;
}

.position-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.position-settings-table {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.position-settings-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.4fr) 108px;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.position-settings-row:last-child {
  border-bottom: 0;
}

.position-settings-header {
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  background: #eef2f4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.position-settings-row[data-position-status="hidden"] {
  background: #f7f8f8;
}

.position-name-field,
.position-color-field {
  min-width: 0;
}

.position-setting-input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
  font-size: 13px;
  font-weight: 700;
}

.position-setting-input:focus {
  outline: 2px solid #a8d8c1;
}

.position-color-field,
.position-swatches {
  display: flex;
  align-items: center;
  gap: 7px;
}

.position-swatches {
  flex-wrap: wrap;
}

.position-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--position-color);
  box-shadow: inset 0 0 0 1px rgba(32, 42, 51, 0.12);
}

.position-swatch.is-selected {
  border-color: #26343e;
}

.position-color-input {
  width: 30px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.position-toggle-button {
  justify-content: center;
}

.position-settings-empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.rate-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.rate-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.rate-eyebrow,
.rate-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.rate-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.rate-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.rate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.rate-controls {
  display: flex;
  padding: 18px 0;
}

.rate-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.rate-staff-select {
  min-height: 36px;
  min-width: 180px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: #26343e;
  font-size: 13px;
}

.rate-table {
  border-top: 1px solid var(--line-strong);
}

.rate-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 42px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.rate-header-row {
  min-height: 38px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 11px;
  font-weight: 700;
}

.rate-date-input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
}

.week-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.week-eyebrow,
.week-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.week-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.week-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.week-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.week-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
}

.week-table {
  min-width: 760px;
}

.week-grid-row {
  display: grid;
  grid-template-columns: 190px repeat(var(--week-days), minmax(120px, 1fr));
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.week-grid-header {
  min-height: 58px;
  background: #eef2f4;
}

.week-name-cell {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-right: 1px solid var(--line-strong);
  color: #33424b;
  font-size: 12px;
  font-weight: 700;
}

.week-grid-header .week-name-cell {
  color: var(--muted);
  font-size: 11px;
}

.week-day-head,
.week-shift-cell {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #394850;
}

.week-day-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 2px 6px;
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.week-day-head small {
  color: var(--muted);
  font-size: 10px;
}

.week-day-head b {
  grid-column: 1 / -1;
  color: #66767f;
  font-size: 10px;
}

.week-day-head .weekend {
  color: #c76161;
}

.week-shift-cell {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #7c8b93;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.week-shift-cell.has-shift {
  color: var(--blue-ink);
  background: #edf8ff;
  font-weight: 700;
}

.half-page {
  max-width: 1880px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.half-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.half-eyebrow,
.half-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.half-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.half-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.half-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.half-table-wrap {
  margin-top: 18px;
  overflow: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.half-table {
  width: max-content;
  min-width: 100%;
}

.half-grid-row {
  display: grid;
  grid-template-columns: 184px repeat(var(--half-days), 104px);
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.half-grid-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 58px;
  background: #eef2f4;
}

.half-name-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid var(--line-strong);
  background: var(--paper);
  color: #33424b;
  font-size: 12px;
  font-weight: 700;
}

.half-grid-header .half-name-cell {
  z-index: 4;
  color: var(--muted);
  background: #eef2f4;
  font-size: 11px;
}

.half-grid-row.is-employee .half-name-cell {
  background: #edf7f2;
}

.half-grid-row.is-temporary .half-name-cell {
  background: #f1f3f4;
}

.half-day-head,
.half-shift-cell {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #394850;
}

.half-day-head {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
}

.half-day-head small {
  color: var(--muted);
  font-size: 11px;
}

.half-day-head .weekend {
  color: #c44d48;
}

.half-shift-cell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 41px;
  padding: 0;
  color: #607078;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.half-shift-cell.has-shift {
  color: #244b60;
  background: #f5fbfe;
  font-weight: 700;
}

.half-shift-cell.has-position {
  grid-template-columns: 1fr;
  align-items: center;
  background: color-mix(in srgb, var(--position-color, #5ba9d6) 10%, #ffffff);
}

.half-time {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 4px 1px;
  white-space: nowrap;
}

.half-time + .half-time {
  border-left: 1px dotted #aebdc6;
}

.half-position-summary {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 5px 5px 5px 8px;
  border-left: 4px solid var(--position-color);
  color: #29414d;
  font-size: 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.half-shift-cell.has-request {
  grid-template-columns: 1fr;
  background: #fffaf1;
  color: #816624;
}

.half-request {
  display: block;
  align-self: center;
  overflow: hidden;
  padding: 4px 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.half-day-head:hover,
.half-shift-cell:hover {
  background: #f0f5f3;
}

.cost-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.cost-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.cost-eyebrow,
.cost-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.cost-warning {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 7px 0 0;
  color: #a85e22;
  font-size: 11px;
  font-weight: 700;
}

.cost-warning svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.cost-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.cost-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.cost-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.cost-plan-settings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 18px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  background: #f7fbf9;
}

.cost-plan-settings p {
  flex: 1 1 240px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.cost-plan-settings .cost-budget-field {
  flex: 0 1 265px;
}

.cost-month-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #35454e;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cost-month-select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #9cc6b3;
  border-radius: 4px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.cost-plan-settings .cost-budget-field > span:first-child {
  color: #35454e;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cost-totals > div {
  display: grid;
  gap: 5px;
  min-height: 100px;
  align-content: center;
  padding: 16px 18px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.cost-totals span {
  color: var(--muted);
  font-size: 11px;
}

.cost-totals strong {
  color: #25373f;
  font-size: 20px;
}

.cost-budget-total {
  gap: 7px !important;
}

.cost-budget-field {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.labor-budget-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: #26343e;
  font: inherit;
  text-align: right;
}

.labor-planning-rate-input {
  width: 92px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #9cc6b3;
  border-radius: 4px;
  background: #ffffff;
  color: var(--green-dark);
  font: inherit;
  font-weight: 700;
  text-align: right;
}

.cost-budget-total strong {
  font-size: 13px;
}

.needs-attention {
  color: #b05b3f !important;
}

.cost-table {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.cost-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr repeat(6, 1fr);
  align-items: center;
  min-height: 54px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #3b4a53;
  text-align: left;
}

.cost-row > span,
.cost-row > strong {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.cost-row > strong {
  color: #26343e;
}

.cost-header-row {
  min-height: 38px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cost-header-row > span {
  font-size: 11px;
}

.cost-row:not(.cost-header-row):hover {
  background: #f0f5f3;
}

.cost-by-staff {
  margin-top: 30px;
}

.cost-by-staff h2 {
  margin: 0 0 10px;
  color: #33424b;
  font-size: 15px;
}

.cost-staff-table {
  border-top: 1px solid var(--line-strong);
}

.cost-staff-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1fr;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #3a4952;
  font-size: 12px;
}

.cost-staff-row > span,
.cost-staff-row > strong {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.cost-staff-header {
  min-height: 38px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.month-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.month-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.month-eyebrow,
.month-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.month-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.month-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.month-day-label {
  padding: 9px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.month-day-label.weekend {
  color: #c76161;
}

.month-empty-cell,
.month-day-cell {
  min-height: 118px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.month-empty-cell {
  background: #f7f8f8;
}

.month-day-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 7px;
  padding: 10px;
  color: #3a4952;
  text-align: left;
}

.month-day-cell:hover {
  background: #f0f5f3;
}

.month-date {
  font-size: 15px;
  font-weight: 700;
}

.month-count {
  color: var(--muted);
  font-size: 10px;
}

.month-day-cell strong,
.month-day-cell small {
  grid-column: 1 / -1;
}

.month-day-cell strong {
  color: #2c3c45;
  font-size: 12px;
}

.month-day-cell small {
  color: var(--green-dark);
  font-size: 10px;
}

.staffing-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.staffing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.staffing-eyebrow,
.staffing-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.staffing-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.staffing-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.staffing-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0;
}

.staffing-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.staffing-date-select,
.staffing-mode-select,
.staffing-template-select {
  min-height: 36px;
  min-width: 150px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: #26343e;
  font-size: 13px;
}

.staffing-table {
  border-top: 1px solid var(--line-strong);
}

.staffing-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #3a4952;
  font-size: 12px;
}

.staffing-row > span,
.staffing-row > strong,
.staffing-target-field {
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.staffing-header-row {
  min-height: 38px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.staffing-target-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.staffing-target-input {
  width: 70px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
  color: #26343e;
  text-align: right;
}

.staffing-template-input {
  width: 70px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #9cc6b3;
  border-radius: 4px;
  background: #f8fcfa;
  color: #1d5d42;
  text-align: right;
}

.staffing-note {
  margin: 0;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.staffing-plan-total {
  display: grid;
  align-content: center;
  min-height: 52px;
  padding: 7px 12px;
  border-left: 3px solid var(--green);
  background: #edf8f2;
}

.staffing-plan-total span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.staffing-plan-total strong {
  color: var(--green-dark);
  font-size: 16px;
}

.staffing-setup-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 320px;
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #d88929;
  background: #fff3df;
  color: #985b22;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.staffing-setup-warning svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.staffing-row .is-balanced {
  color: #167550;
  font-weight: 700;
}

.staffing-row .is-over {
  color: #aa6819;
  font-weight: 700;
}

.history-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.history-eyebrow,
.history-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.history-eyebrow {
  color: var(--green);
  font-weight: 700;
}

.history-head h1 {
  margin: 4px 0 5px;
  font-size: 24px;
  line-height: 1.25;
}

.history-list {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.history-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
}

.history-item:hover {
  background: #f0f5f3;
}

.history-item > div {
  display: grid;
  gap: 4px;
}

.history-item strong {
  color: #2a3a43;
  font-size: 14px;
}

.history-item span {
  color: var(--muted);
  font-size: 11px;
}

.history-item > div:last-child {
  grid-auto-flow: column;
  gap: 14px;
  text-align: right;
}

.history-item > svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-detail-table {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.history-detail-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: #3a4952;
  font-size: 12px;
}

.history-detail-row > span,
.history-detail-row > strong {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.history-detail-header {
  min-height: 38px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.week-day-head:hover,
.week-shift-cell:hover {
  background: #f0f5f3;
}

.date-strip-wrap {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.date-strip {
  min-height: 62px;
  display: flex;
  align-items: stretch;
  gap: 3px;
  padding: 7px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.date-arrow {
  width: 35px;
  min-width: 35px;
  align-self: center;
  color: #7b8991;
  font-size: 18px;
}

.date-tab {
  width: 96px;
  min-width: 96px;
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #222e37;
}

.date-tab:hover {
  background: #f4f7f8;
}

.date-tab[aria-current="date"] {
  border-color: #b7dfcc;
  background: var(--green-soft);
  color: var(--green-dark);
}

.date-main {
  font-size: 14px;
  font-weight: 700;
}

.date-side {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.date-side.weekend {
  color: #c44d48;
}

.page-head {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.date-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
}

.date-heading {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.work-total {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-layer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #9cbeb0;
  border-radius: 4px;
  background: #edf7f2;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-layer-badge.is-requested {
  border-color: #a9bfde;
  background: #eef5ff;
  color: #315e91;
}

.schedule-layer-badge.is-confirmed {
  border-color: #a9c7b5;
  background: #e8f5ed;
  color: #176642;
}

.day-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.day-plan-meta {
  margin: 4px 0 0;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}

.day-plan-meta.is-unset {
  color: var(--muted);
  font-weight: 500;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 22px;
  height: 9px;
  border-radius: 2px;
  background: var(--blue);
}

.legend-swatch.break {
  background: var(--break);
}

.store-memo {
  min-height: 44px;
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid #eadfae;
  background: var(--yellow);
}

.store-memo-label {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #39464f;
  font-size: 11px;
  font-weight: 700;
}

.store-memo-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-left: 1px solid #eadfae;
  outline: 0;
  background: transparent;
  color: #39464f;
  resize: none;
  font-size: 11px;
}

.schedule-scroller {
  width: 100%;
  max-height: calc(100dvh - 265px);
  overflow: auto;
  border-bottom: 1px solid var(--line-strong);
  background: #ffffff;
}

.mobile-schedule-sticky-header {
  display: none;
}

.schedule-grid {
  width: calc(var(--name-width) + var(--timeline-width) + var(--field-width) * 4);
  min-width: calc(var(--name-width) + var(--timeline-width) + var(--field-width) * 4);
}

.schedule-header,
.count-row,
.work-row,
.memo-row {
  display: grid;
  grid-template-columns: var(--name-width) var(--timeline-width) repeat(4, var(--field-width));
}

.schedule-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 42px;
  border-bottom: 1px solid var(--line-strong);
  background: #ffffff;
}

.header-name,
.field-header,
.count-name,
.row-name,
.memo-name,
.time-cell {
  border-right: 1px solid var(--line-strong);
}

.header-name,
.field-header,
.count-name {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
}

.field-header {
  justify-content: center;
  padding: 0 4px;
}

.hour-axis,
.timeline-track,
.count-track {
  position: relative;
  width: var(--timeline-width);
  background-image:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 19px,
      #edf1f3 19px,
      #edf1f3 20px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 79px,
      #cbd6dc 79px,
      #cbd6dc 80px
    );
}

.hour-axis {
  border-right: 1px solid var(--line-strong);
}

.hour-label {
  position: absolute;
  top: 11px;
  width: calc(var(--quarter-width) * 4);
  padding-left: 2px;
  color: #52616b;
  font-size: 9px;
  font-weight: 700;
}

.hour-label:last-child {
  transform: translateX(-100%);
  text-align: right;
  padding-right: 3px;
}

.count-row {
  position: sticky;
  top: 42px;
  z-index: 5;
  height: 42px;
  border-bottom: 1px solid var(--line-strong);
  background: #eef2f4;
}

.count-name {
  display: grid;
  align-content: center;
  gap: 1px;
  background: #eef2f4;
}

.count-name small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.count-track {
  display: grid;
  grid-template-columns: repeat(68, var(--quarter-width));
  border-right: 1px solid var(--line-strong);
  background-color: #eef2f4;
}

.count-cell {
  display: grid;
  place-items: center;
  color: #60707a;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.count-cell.is-short {
  background: #fff1ed;
  color: #b05b3f;
  font-weight: 700;
}

.count-cell.is-balanced {
  background: #e8f5ef;
  color: #167550;
  font-weight: 700;
}

.count-cell.is-over {
  background: #fff3df;
  color: #aa6819;
  font-weight: 700;
}

.count-placeholder {
  border-right: 1px solid var(--line-strong);
  background: #eef2f4;
}

.staff-block {
  border-bottom: 1px solid var(--line-strong);
}

.work-row {
  height: 54px;
  background: #ffffff;
}

.row-name {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  background: #ffffff;
}

.header-name,
.count-name,
.row-name,
.memo-name {
  position: sticky;
  left: 0;
  z-index: 4;
}

.header-name {
  background: #ffffff;
}

.staff-name-input {
  width: 100%;
  min-width: 0;
  padding: 7px 2px;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: #26323b;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.staff-name-input::placeholder {
  color: #a7b1b7;
  font-weight: 500;
}

.staff-name-select {
  flex: 0 0 24px;
  width: 24px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #59666c;
  cursor: pointer;
}

.row-delete-button,
.time-clear-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8b979f;
  line-height: 1;
}

.row-delete-button {
  width: 26px;
  height: 28px;
  font-size: 17px;
}

.row-delete-button:hover,
.time-clear-button:not(:disabled):hover {
  background: #f1f4f5;
  color: #3f4d56;
}

.timeline-track {
  height: 54px;
  border-right: 1px solid var(--line-strong);
  background-color: #ffffff;
  touch-action: pan-y;
}

.shift-block {
  position: absolute;
  top: 10px;
  height: 34px;
  min-width: var(--quarter-width);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid var(--blue-border);
  border-radius: 4px;
  background: var(--blue);
  color: var(--blue-ink);
  cursor: grab;
  font-size: 10px;
  font-weight: 700;
  user-select: none;
  touch-action: none;
}

.shift-block.dragging {
  z-index: 3;
  cursor: grabbing;
  box-shadow: 0 3px 9px rgba(38, 72, 91, 0.22);
}

.position-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  background: var(--position-color);
  pointer-events: none;
}

.shift-block.has-position-assignments {
  background: #dcebf4;
}

.shift-label {
  position: relative;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.break-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  border-right: 1px solid #5daf6d;
  border-left: 1px solid #5daf6d;
  background: var(--break);
  pointer-events: none;
}

.position-editor {
  position: sticky;
  left: 0;
  z-index: 5;
  width: min(100vw, 100%);
  display: grid;
  gap: 10px;
  padding: 12px calc(var(--field-width) / 4 + 8px) 14px var(--name-width);
  border-top: 1px solid var(--line);
  background: #f7faf9;
}

.position-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #31424b;
  font-size: 11px;
}

.position-editor-head strong {
  color: #1d3c4b;
}

.position-editor-head span {
  overflow: hidden;
  color: #65757d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-editor-whole {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.position-editor-whole > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.position-choice-button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--position-color) 68%, #5e717a);
  border-radius: 4px;
  background: color-mix(in srgb, var(--position-color) 20%, #ffffff);
  color: #29414d;
  font-size: 10px;
  font-weight: 700;
}

.position-choice-button:hover {
  background: color-mix(in srgb, var(--position-color) 35%, #ffffff);
}

.position-setup-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #9ccdb9;
  border-radius: 4px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
}

.position-setup-button:hover {
  background: var(--green-soft);
}

.position-setup-button svg {
  width: 13px;
  height: 13px;
}

.position-assignment-list {
  display: grid;
  gap: 6px;
}

.position-assignment-row {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) 88px auto 88px 34px;
  align-items: center;
  gap: 6px;
}

.position-assignment-row > span {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.position-assignment-input {
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
  color: #33424b;
  font-size: 11px;
}

.position-assignment-input:focus {
  outline: 2px solid #a8d8c1;
}

.position-editor-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.position-editor-error,
.position-editor-empty {
  margin: 0;
  color: #a64d3b;
  font-size: 10px;
  font-weight: 700;
}

.position-editor-empty {
  color: var(--muted);
}

.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 10px;
  cursor: ew-resize;
}

.resize-handle.start {
  left: 0;
}

.resize-handle.end {
  right: 0;
}

.time-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 4px;
  background: #ffffff;
}

.time-clear-button {
  width: 22px;
  height: 28px;
  font-size: 15px;
}

.time-clear-button:disabled {
  visibility: hidden;
}

.time-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 4px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #52606a;
  font-size: 10px;
  text-align: center;
}

.memo-row {
  min-height: 34px;
  background: var(--memo);
}

.memo-name {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #87949c;
  background: #f5f7f8;
  font-size: 9px;
}

.staff-memo-input {
  grid-column: 2 / 3;
  position: sticky;
  left: var(--name-width);
  width: 100%;
  max-width: calc(100vw - var(--name-width));
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  outline: 0;
  background: var(--memo);
  color: #74828b;
  font-size: 9px;
  resize: none;
}

.memo-filler {
  border-right: 1px solid var(--line-strong);
  background: #f5f7f8;
}

.empty-note {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #263841;
  color: #ffffff;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.import-dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(34, 49, 59, 0.3);
}

.import-dialog {
  width: min(430px, 100%);
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 18px 42px rgba(27, 42, 51, 0.22);
}

.import-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.import-dialog header p {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.import-dialog h2 {
  margin: 4px 0 0;
  color: #26343e;
  font-size: 18px;
}

.import-dialog > label {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.import-store-select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: #26343e;
  font-size: 13px;
}

.import-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .breadcrumb {
    display: none;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  :root {
    --name-width: 132px;
    --quarter-width: 14px;
    --timeline-width: 952px;
    --field-width: 92px;
  }

  .topbar {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  .month-select {
    width: 100%;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand {
    flex-wrap: wrap;
  }

  .sync-account-control {
    width: 100%;
    margin-left: 0;
  }

  .sync-account-trigger {
    flex: 1;
    max-width: none;
    justify-content: space-between;
  }

  .sync-google-button {
    width: 100%;
  }

  .sync-account-panel {
    position: fixed;
    top: 62px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .sync-members-page {
    padding: 20px 12px 36px;
  }

  .sync-members-head {
    flex-direction: column;
    gap: 10px;
  }

  .sync-member-add {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 12px;
  }

  .sync-member-add .toolbar-button {
    justify-content: center;
  }

  .sync-member-labels {
    display: none;
  }

  .sync-member-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .sync-member-row strong,
  .sync-member-row .toolbar-button,
  .sync-member-row .sync-owner-label {
    grid-column: 1 / -1;
  }

  .store-switcher {
    width: 100%;
    margin-left: 0;
  }

  .store-switcher-trigger {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .store-switcher-panel {
    position: fixed;
    top: 62px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 2px;
  }

  .toolbar-menu-trigger {
    min-width: 0;
  }

  .icon-button {
    width: 32px;
    min-height: 34px;
  }

  .toolbar-divider {
    display: none;
  }

  .toolbar-menu-panel {
    position: fixed;
    top: 62px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .toolbar-button {
    min-height: 34px;
    gap: 4px;
    padding: 0 8px;
    font-size: 10px;
  }

  .desktop-action-label {
    display: none;
  }

  .mobile-action-label {
    display: inline;
  }

  .date-strip {
    min-height: 52px;
  }

  .date-tab {
    width: 74px;
    min-width: 74px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }

  .date-heading-row {
    gap: 10px;
  }

  .date-heading {
    font-size: 17px;
  }

  .page-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .store-memo {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .schedule-scroller {
    max-height: none;
    min-height: 0;
  }

  .schedule-header {
    height: 38px;
  }

  .count-row {
    top: 38px;
    height: 38px;
  }

  .header-name,
  .field-header,
  .count-name {
    padding: 0 8px;
    font-size: 9px;
  }

  .hour-label {
    top: 10px;
    font-size: 8px;
  }

  .work-row,
  .timeline-track {
    height: 50px;
  }

  .row-name {
    gap: 2px;
    padding: 0 7px;
  }

  .staff-name-input {
    font-size: 10px;
  }

  .staff-name-select {
    flex-basis: 20px;
    width: 20px;
  }

  .row-delete-button {
    width: 22px;
  }

  .shift-block {
    top: 8px;
    height: 32px;
    padding: 0 7px;
    font-size: 9px;
  }

  .mobile-schedule-sticky-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
    display: none;
    overflow: hidden;
    border-bottom: 1px solid var(--line-strong);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(40, 57, 65, 0.14);
    pointer-events: none;
  }

  .app-shell.has-mobile-schedule-sticky-header .mobile-schedule-sticky-header {
    display: block;
  }

  .mobile-schedule-sticky-row {
    display: grid;
    grid-template-columns: var(--name-width) minmax(0, 1fr);
  }

  .mobile-schedule-sticky-hours {
    height: 38px;
    border-bottom: 1px solid var(--line-strong);
  }

  .mobile-schedule-sticky-counts {
    height: 38px;
    background: #eef2f4;
  }

  .mobile-schedule-sticky-name,
  .mobile-schedule-sticky-count-name {
    display: grid;
    align-content: center;
    padding: 0 8px;
    border-right: 1px solid var(--line-strong);
    color: #394850;
    font-size: 9px;
    font-weight: 700;
  }

  .mobile-schedule-sticky-count-name {
    gap: 1px;
    background: #eef2f4;
  }

  .mobile-schedule-sticky-count-name small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 500;
  }

  .mobile-schedule-sticky-viewport {
    min-width: 0;
    overflow: hidden;
  }

  .mobile-schedule-sticky-timeline {
    transform: translateX(calc(var(--mobile-schedule-scroll-left, 0px) * -1));
  }

  .staff-master-page {
    padding: 20px 12px 36px;
  }

  .staff-master-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-master-actions {
    justify-content: flex-start;
  }

  .staff-master-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 82px;
    gap: 8px;
    padding: 10px 8px;
  }

  .organization-page {
    padding: 20px 12px 36px;
  }

  .organization-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .organization-actions {
    justify-content: flex-start;
  }

  .organization-store-row {
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 8px;
    padding: 9px 8px;
  }

  .organization-store-header {
    display: none;
  }

  .organization-store-row .organization-input {
    grid-column: 1 / -1;
  }

  .position-settings-page {
    padding: 20px 12px 36px;
  }

  .position-settings-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .position-settings-actions {
    justify-content: flex-start;
  }

  .position-settings-header {
    display: none;
  }

  .position-settings-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px 8px;
  }

  .position-name-field {
    grid-column: 1 / -1;
  }

  .position-color-field {
    gap: 5px;
  }

  .position-swatch {
    width: 20px;
    height: 20px;
  }

  .position-editor {
    padding: 10px;
  }

  .position-editor-head {
    grid-template-columns: auto minmax(0, 1fr) 32px;
  }

  .position-assignment-row {
    grid-template-columns: minmax(0, 1fr) 76px 20px 76px 32px;
    gap: 4px;
  }

  .position-assignment-row > span {
    font-size: 9px;
  }

  .position-assignment-input {
    min-height: 30px;
    padding: 4px 5px;
    font-size: 10px;
  }

  .staff-master-header-row {
    display: none;
  }

  .staff-master-input {
    grid-column: 1 / -1;
  }

  .staff-rate-field {
    grid-column: 1 / 3;
  }

  .staff-master-toggle {
    grid-column: 3;
  }

  .staff-master-row-actions {
    grid-column: 3;
  }

  .week-page,
  .half-page,
  .cost-page,
  .month-page,
  .staffing-page,
  .history-page {
    padding: 20px 12px 36px;
  }

  .rate-page {
    padding: 20px 12px 36px;
  }

  .week-head,
  .half-head,
  .cost-head,
  .month-head,
  .staffing-head,
  .history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rate-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rate-actions {
    justify-content: flex-start;
  }

  .week-actions {
    justify-content: flex-start;
  }

  .half-actions {
    justify-content: flex-start;
  }

  .half-grid-row {
    grid-template-columns: 152px repeat(var(--half-days), 96px);
  }

  .cost-totals {
    grid-template-columns: 1fr;
  }

  .cost-table {
    overflow-x: auto;
  }

  .cost-staff-table {
    overflow-x: auto;
  }

  .cost-row {
    min-width: 920px;
  }

  .cost-staff-row {
    min-width: 700px;
  }

  .month-calendar {
    min-width: 630px;
  }

  .month-page {
    overflow-x: auto;
  }

  .staffing-table {
    overflow-x: auto;
  }

  .staffing-row {
    min-width: 620px;
  }

  .history-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .history-item > div:last-child {
    text-align: left;
  }

  .history-detail-table {
    overflow-x: auto;
  }

  .history-detail-row {
    min-width: 620px;
  }
}
