* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #1c2430;
  background: #efe8dc;
  line-height: 1.45;
}
button, select { font: inherit; color: inherit; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 20px 20px 16px;
  background: #1f3a34;
  color: #f7f3ea;
}
h1 { font-size: 1.35rem; margin: 0 0 4px; font-weight: 700; }
.local-note { margin: 0; font-size: 0.82rem; color: #d5e0d8; }
.role-switch { display: flex; gap: 6px; }
.role-switch button, .nav button, .choice, .primary, .ok-btn {
  border: 1px solid transparent;
  background: #f7f3ea;
  color: #1f3a34;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.role-switch button.is-on, .choice.is-on, .primary, .ok-btn {
  background: #c4a35a;
  color: #1c2430;
}
.ok-btn:disabled, .primary:disabled, .choice:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
#app { padding: 16px 20px 40px; max-width: none; }
.toolbar, .nav, .confirm-bar, .month-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}
.meta, .deadline { margin: 0; color: #3d4a44; font-size: 0.92rem; }
.banner {
  background: #8a3d2f;
  color: #fffaf6;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 8px 0 12px;
}
.notice { min-height: 1.2em; margin: 0 0 8px; color: #8a3d2f; }
.days { display: grid; gap: 8px; }
.day, .month-day {
  background: #fffdf8;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  padding: 10px;
}
.day { display: grid; grid-template-columns: 9.5rem 1fr; gap: 8px; align-items: center; }
/* Horizontal calendar band: Mon–Sun cells in one row; parent .week-calendar scrolls. */
.days.week-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 8px;
}
.days.week-strip .day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 9.5rem;
  width: 9.5rem;
  min-width: 9.5rem;
  grid-template-columns: none;
}
.days.week-strip .choices {
  flex-direction: column;
  flex-wrap: nowrap;
}
.day-label { font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.fixed-mark { font-weight: 700; }
.fixed-note, .cell-note { display: block; color: #5c675f; font-size: 0.78rem; font-weight: 500; }
.need { color: #8a3d2f; font-weight: 700; }
.waiting {
  font-size: 1.25rem;
  margin: 0;
}
/* Week calendar band: overflows the viewport; only this strip scrolls sideways (touch-friendly). */
.week-calendar {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  background: #fffdf8;
  margin: 4px 0 16px;
  padding-bottom: 2px;
}
.week-calendar:focus {
  outline: 2px solid #c4a35a;
  outline-offset: 2px;
}
.sheet {
  /* Wider than the scrollport so the week grid peeks off-screen (はみ出し) and scrolls sideways. */
  width: max-content;
  min-width: calc(100% + 8rem);
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdf8;
  table-layout: fixed;
}
.sheet th, .sheet td {
  border: 1px solid #ddd4c4;
  padding: 8px 10px;
  vertical-align: top;
  text-align: center;
  min-width: 9.5rem;
  box-sizing: border-box;
}
.sheet th { background: #f6f1e6; }
/* Sticky employee / corner column while scrolling weekdays sideways */
.sheet thead th:first-child,
.sheet tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 7.25rem;
  max-width: 7.25rem;
  width: 7.25rem;
  background: #ebe4d6;
  box-shadow: 2px 0 0 #ddd4c4;
}
.sheet thead th:first-child { z-index: 4; }
.who { display: block; font-size: 1rem; }
.unit-pick { width: 100%; }
.admin-cell select { width: 100%; margin-bottom: 4px; }
.month-block { margin-top: 22px; }
.month-card { display: block; background: #fffdf8; border: 1px solid #ddd4c4; border-radius: 8px; padding: 12px; margin-top: 12px; }
.month-cal-scroll { margin-top: 8px; }
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(5.5rem, 1fr));
  gap: 6px;
  width: max-content;
  min-width: 100%;
  padding: 8px;
}
.dow { text-align: center; font-size: 0.82rem; color: #3d4a44; }
.month-day.pad { background: transparent; border-color: transparent; }
.summary { margin: 8px 0; padding-left: 1.2rem; }
.summary li { margin: 2px 0; }
.confirmed-flag { font-weight: 700; color: #1f3a34; }
/* 将来、選択肢を足したときの半分塗り。今はどの要素にも付けない。 */
.cell-half {
  background-image: linear-gradient(to top, #e7c36a 50%, #f4f1ea 50%);
}
@media (max-width: 720px) {
  .day { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: stretch; }
  .day-chip {
    flex-basis: 6.75rem;
    width: 6.75rem;
    min-width: 6.75rem;
  }
}


/* Day picker: horizontal dates for the chosen week; overflow scrolls this band only. */
.day-picker-scroll { margin-top: 8px; }
.day-picker {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  min-width: calc(100% + 4rem);
  padding: 10px;
}
.day-chip {
  flex: 0 0 7.5rem;
  width: 7.5rem;
  min-width: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: left;
  border: 1px solid #ddd4c4;
  background: #fffdf8;
  color: #1c2430;
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
}
.day-chip.is-on {
  background: #c4a35a;
  border-color: #a8843a;
  color: #1c2430;
}
.day-chip.need-chip:not(.is-on) {
  border-color: #8a3d2f;
}
.day-chip-date { font-weight: 700; font-size: 0.95rem; }
.day-chip-note { font-size: 0.75rem; color: #5c675f; }
.day-chip.is-on .day-chip-note { color: #3d4a44; }
.day-chip.need-chip:not(.is-on) .day-chip-note { color: #8a3d2f; font-weight: 700; }

.day-detail {
  margin: 12px 0 16px;
  padding: 12px;
  background: #fffdf8;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
}
.day-detail h2 { margin: 0 0 12px; font-size: 1.15rem; }
.day-emp {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #ddd4c4;
}
.day-emp:first-of-type { border-top: none; }
.day-emp-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.day-emp .unit-pick { max-width: 12rem; }
.admin-cell select { width: 100%; max-width: 16rem; margin-bottom: 4px; }
.week-pick-bar {
  align-items: flex-start;
}
.week-pick-bar .meta {
  flex: 0 0 100%;
  margin: 0;
}

.lang-pick { padding: 24px 0; }
.lang-pick .toolbar { gap: 12px; }
.lang-btn { min-width: 9em; font-size: 1.1em; }
.lang-btn.is-on { outline: 3px solid #e0a040; outline-offset: 2px; }

.step-label {
  font-weight: 600;
  margin: 10px 0 4px;
  color: #3d4a44;
  font-size: 0.95rem;
}
.meta, .deadline {
  margin: 0;
  color: #5c675f;
  font-size: 0.88rem;
}
.emp-hint {
  margin: 0 0 8px;
  color: #5c675f;
  font-size: 0.86rem;
}
.admin-lead { margin: 4px 0 10px; }


.locked-flag {
  font-weight: 700;
  color: #5c3d1f;
  background: #e8d9c0;
  border-radius: 4px;
  padding: 2px 8px;
  display: inline-block;
}
.locked-day { display: flex; flex-direction: column; gap: 4px; }
.lock-bar { margin-top: 0; }
.day-chip.locked-chip:not(.is-on) {
  border-color: #b89a6a;
  background: #f3ebe0;
}
.day-chip.locked-chip:not(.is-on) .day-chip-note { color: #5c3d1f; font-weight: 700; }


/* Admin month overview: people = rows, dates = columns; horizontal scroll + sticky name. */
.month-overview-scroll {
  margin-top: 4px;
  overflow-x: auto;
  overflow-y: hidden;
}
.sheet.month-overview {
  min-width: max-content;
  width: max-content;
}
.sheet.month-overview th.date-col,
.sheet.month-overview td.grid-cell {
  min-width: 7.2rem;
  max-width: 8.5rem;
  padding: 6px 6px;
  vertical-align: top;
}
.sheet.month-overview th.date-col.is-on,
.sheet.month-overview td.grid-cell.is-on {
  background: #f3e8d0;
}
.sheet.month-overview th.date-col.is-locked {
  background: #d4d4d4;
}
.date-head-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}
.date-head-label { font-weight: 700; font-size: 0.82rem; }
.sheet.month-overview .name-col .unit-pick { margin-top: 6px; }
.sheet.month-overview .admin-cell select { max-width: none; font-size: 0.82rem; }
/* Work-type color painting: chip shows color + work name. */
.work-type-paint {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.35);
}
.work-type-paint.legend-chip { margin-right: 4px; }
.legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 4px 0 10px;
  padding: 8px 10px;
  background: #fffdf8;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  font-size: 0.85rem;
}
.legend-label { color: #3d4a44; font-weight: 600; margin-right: 4px; }
.legend-works { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.att-symbol {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1c2430;
}
.att-symbol.is-unset { color: #8a3d2f; }
.att-symbol.muted { color: #5c675f; }
.work-assign {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
  margin-top: 4px;
}
.work-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}
.work-multi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  line-height: 1.25;
}
.work-multi-label {
  font-weight: 600;
  color: #3d4a44;
  margin-bottom: 1px;
}
.work-multi-types {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.work-check {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.work-check input { margin: 2px 0 0; flex-shrink: 0; }
.work-use-default { font-weight: 600; }
.default-work-pick.work-multi {
  margin-top: 6px;
  max-width: 9rem;
}
.admin-cell-inner .att-pick,
.admin-cell-inner .work-pick {
  width: 100%;
  max-width: none;
  font-size: 0.75rem;
}
.sheet.month-overview td.grid-cell.has-work {
  /* Thicker bottom work-color bar; slightly overlaps cell text. */
  box-shadow: inset 0 -6px 0 0 var(--work-color, transparent);
}
/* Fade only the bottom strip of summary text that sits on the color bar. */
.sheet.month-overview td.grid-cell.has-work .admin-cell-summary {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 7px),
    rgba(0, 0, 0, 0.42) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 7px),
    rgba(0, 0, 0, 0.42) 100%
  );
}
.sheet.month-overview td.grid-cell.is-locked,
.sheet.month-overview th.date-col.is-locked {
  background: #d4d4d4;
}
.grid-cell.is-locked { background: #d4d4d4; }


/* Admin month grid: employees × days of the displayed month */
.month-sheet-scroll {
  margin-top: 8px;
  overflow-y: auto;
  max-height: none;
}
.month-sheet th.day-col-head,
.month-sheet td {
  min-width: 5.5rem;
  max-width: 6.5rem;
  padding: 4px;
}
.month-sheet .sheet-corner,
.month-sheet .emp-corner {
  min-width: 8.5rem;
  max-width: 9.5rem;
  width: 9rem;
}
.day-col-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 4px 2px;
  cursor: pointer;
  font: inherit;
}
.day-col-btn:hover { background: #efe6d4; }
.day-col-head.is-locked {
  background: #d4d4d4;
}
.day-col-head.is-locked .day-col-btn { color: #5c3d1f; }
.day-col-num { font-weight: 700; }
.day-col-wd { font-size: 0.75rem; color: #5c675f; }
.day-col-lock { font-size: 0.7rem; font-weight: 700; color: #8a3d2f; }
.month-sheet td.is-locked { background: #d4d4d4; }
.week-ok-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 12px;
}
.week-ok-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #fffdf8;
  border: 1px solid #ddd4c4;
  border-radius: 8px;
  padding: 6px 10px;
}
.admin-cell-inner { text-align: center; }
.admin-cell-inner select { width: 100%; max-width: 6rem; font-size: 0.85rem; }

.day-head-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 4px 2px;
  cursor: pointer;
  font: inherit;
}
.day-head-btn:hover { background: #efe6d4; }
.day-head-num { font-weight: 700; }
.day-head-wd { font-size: 0.75rem; color: #5c675f; }
.day-head-lock { font-size: 0.7rem; font-weight: 700; color: #8a3d2f; }
.week-ok-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.week-ok-chip {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: #fffdf8; border: 1px solid #ddd4c4; border-radius: 8px; padding: 6px 10px;
}
.admin-cell-inner { text-align: center; }
.admin-cell-inner select { width: 100%; max-width: 6rem; font-size: 0.85rem; }
.grid-cell.is-locked { background: #d4d4d4; }

/* Default vs day-override chips */
.work-type-paint.is-default {
  outline: 1px dashed rgba(255, 255, 255, 0.85);
  outline-offset: -1px;
  opacity: 0.92;
}
.work-type-paint.is-override {
  box-shadow: 0 0 0 1px rgba(28, 36, 48, 0.35);
  font-weight: 800;
}
.work-override-mark {
  margin-left: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0.95;
}
.work-none-note {
  display: inline-block;
  font-size: 0.7rem;
  color: #5c675f;
  padding: 1px 4px;
}
.work-none-note.is-override { color: #8a3d2f; font-weight: 700; }
.sheet.month-overview td.grid-cell.has-work-override {
  box-shadow: inset 0 -6px 0 0 var(--work-color, transparent), inset 0 0 0 1px rgba(196, 163, 90, 0.55);
}
.work-use-default { font-weight: 600; }

/* Soft cards shared by employee + admin chrome */
.emp-card {
  border: 1px solid #e2d8c8;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(31, 58, 52, 0.06);
}

/* Employee legend chips */
.emp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}
.emp-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2d8c8;
  background: #fffdf8;
  font-size: 0.82rem;
  color: #3d4a44;
}
.emp-legend-mark { font-weight: 800; font-size: 1rem; line-height: 1; }
.emp-legend-chip.is-unset { border-color: #c9a090; background: #faf3ef; }
.emp-legend-chip.is-unset .emp-legend-mark { color: #8a3d2f; }
.emp-legend-chip.is-can { border-color: #6a9a7c; background: #e6f4ec; }
.emp-legend-chip.is-can .emp-legend-mark { color: #1f3a34; }
.emp-legend-chip.is-cannot { border-color: #b07868; background: #f6e6e0; }
.emp-legend-chip.is-cannot .emp-legend-mark { color: #8a3d2f; }
.emp-legend-chip.is-locked { border-color: #9a958c; background: #d4d4d4; color: #5c3d1f; }
.emp-hint {
  margin: 0 0 10px;
  color: #5c675f;
  font-size: 0.88rem;
}

/* Month overview: tap a day/row to pick a week (no ○/× until week focus). */
.emp-month-overview .emp-week-pick-day {
  cursor: pointer;
  min-height: 3.6rem;
  padding: 8px 4px;
}
.emp-month-overview .emp-week-pick-day:hover,
.emp-month-overview .emp-week-pick-day:focus-visible {
  border-color: #c4a35a;
  box-shadow: 0 0 0 2px rgba(196, 163, 90, 0.35);
  outline: none;
}
.emp-month-overview .emp-week-pick-day:active {
  transform: scale(0.97);
}
.emp-month-cal tr.emp-week-row {
  cursor: pointer;
}
.emp-month-cal tr.emp-week-row.is-week-hilite td .emp-week-pick-day,
.emp-week-pick-day.is-week-hilite {
  border-color: #c4a35a;
  box-shadow: inset 0 0 0 2px rgba(196, 163, 90, 0.45);
  background: #fff8e8;
}
.emp-back-month {
  font-weight: 700;
}
.emp-week-strip.is-week-focus,
.emp-week-expand.is-week-focus {
  padding: 14px 12px 16px;
}
.emp-week-strip.is-week-focus .emp-week-day,
.emp-week-expand.is-week-focus .emp-week-day {
  min-height: 6.4rem;
  padding: 10px 6px 12px;
  border-radius: 16px;
}
.emp-week-strip.is-week-focus .emp-week-num,
.emp-week-expand.is-week-focus .emp-week-num {
  font-size: 1.35rem;
}
.emp-week-strip.is-week-focus .emp-choice-btn,
.emp-week-expand.is-week-focus .emp-choice-btn {
  min-height: 2.15rem;
  font-size: 1.15rem;
  border-radius: 11px;
}

/* In-calendar enlarged week ABOVE selected row (other weeks stay collapsed overview). */
.emp-month-cal tr.emp-week-row.is-expanded td .emp-week-pick-day {
  border-color: #c4a35a;
  box-shadow: inset 0 0 0 2px rgba(196, 163, 90, 0.5);
  background: #fff6de;
}
.emp-week-expand-row td.emp-week-expand-cell {
  padding: 0 0 8px;
  border: none;
  vertical-align: top;
}
.emp-week-expand {
  margin: 2px 0 6px;
  border: 1px solid #e0d0a8;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
  box-shadow: 0 8px 22px rgba(60, 48, 20, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.emp-week-expand-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.emp-week-expand-head strong {
  font-size: 0.95rem;
  color: #1f3a34;
}
/* Horizontal scroll is scoped to the enlarged week only. */
.emp-week-expand-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}
.emp-expand-pad {
  min-height: 6.4rem;
  border-radius: 16px;
  background: transparent;
}
.emp-month-overview .emp-week-row.is-collapsed .emp-week-pick-day {
  opacity: 0.92;
}

/* Employee month calendar: weekday columns × week rows (do not use .week-calendar — that clips Y).
   Month overview itself does NOT scroll sideways; only .emp-week-expand-scroll does. */
.emp-month-cal-scroll {
  width: 100%;
  max-width: 100%;
  margin: 4px 0 16px;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 10px 8px 12px;
}
.emp-month-cal-scroll:focus {
  outline: 2px solid #c4a35a;
  outline-offset: 2px;
}
.emp-month-cal {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.emp-month-cal th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #5c675f;
  font-weight: 700;
  padding: 4px 2px 8px;
  text-align: center;
  border: none;
}
.emp-month-cal td {
  padding: 0;
  vertical-align: stretch;
  width: 14.28%;
  min-width: 0;
}
.emp-month-cal td.emp-cal-pad { background: transparent; }
.emp-cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 4.35rem;
  padding: 6px 4px 8px;
  border: 1px solid #e2d8c8;
  border-radius: 12px;
  background: #fffdf8;
  color: #1c2430;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.emp-cal-day.is-can {
  background: #d7ebe0;
  border-color: #6a9a7c;
  box-shadow: inset 0 0 0 1px rgba(106, 154, 124, 0.25);
}
.emp-cal-day.is-cannot {
  background: #f0ddd6;
  border-color: #b07868;
  box-shadow: inset 0 0 0 1px rgba(176, 120, 104, 0.25);
}
.emp-cal-day.need-chip:not(.is-can):not(.is-cannot) {
  border-color: #8a3d2f;
  border-style: dashed;
}
.emp-cal-day.locked-chip,
.emp-cal-day:disabled.locked-chip {
  background: #d4d4d4;
  border-color: #9a958c;
  color: #5c3d1f;
  cursor: not-allowed;
  box-shadow: none;
}
.emp-cal-day.fixed-day,
.emp-cal-day:disabled.fixed-day {
  background: #e8f0ec;
  cursor: not-allowed;
}
.emp-cal-day:disabled { opacity: 0.92; cursor: not-allowed; }
.emp-cal-num { font-weight: 700; font-size: 0.95rem; line-height: 1.1; }
.emp-cal-mark { font-size: 1.15rem; font-weight: 800; color: #3d4a44; }
.emp-cal-day.need-chip:not(.is-can):not(.is-cannot) .emp-cal-mark { color: #8a3d2f; }
.emp-cal-day.locked-chip .emp-cal-mark { color: #5c3d1f; font-size: 0.95rem; }
.emp-cal-day.is-can .emp-cal-mark { color: #1f3a34; }
.emp-cal-day.is-cannot .emp-cal-mark { color: #8a3d2f; }


/* ○ / × choice buttons inside employee day cells */
.emp-choice-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}
.emp-choice-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 1.85rem;
  padding: 4px 2px;
  border: 1px solid #d5cdc0;
  border-radius: 9px;
  background: #f7f3ea;
  color: #5c675f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease, transform 0.08s ease, box-shadow 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.emp-choice-btn:not(:disabled):active { transform: scale(0.95); }
.emp-choice-btn.is-can.is-on {
  background: #cfe8db;
  border-color: #4f8a6a;
  color: #1f3a34;
  box-shadow: inset 0 0 0 1px rgba(79, 138, 106, 0.35);
}
.emp-choice-btn.is-cannot.is-on {
  background: #efd4cb;
  border-color: #a86a58;
  color: #8a3d2f;
  box-shadow: inset 0 0 0 1px rgba(168, 106, 88, 0.35);
}
.emp-choice-btn:not(.is-on) { opacity: 0.78; }
.emp-choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.emp-cal-day.is-readonly,
.emp-week-day.is-readonly {
  cursor: default;
}

/* Employee week strip: 7-day ○/× choice buttons */
.emp-week-strip-scroll,
.emp-week-strip {
  margin: 4px 0 16px;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.emp-week-strip:focus {
  outline: 2px solid #c4a35a;
  outline-offset: 2px;
}
.emp-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
/* Enlarge panel grid: fixed min columns so only this band needs overflow-x. */
.emp-week-expand .emp-week-expand-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(5.2rem, 1fr));
  gap: 8px;
  width: max-content;
  min-width: 100%;
}
.emp-week-expand .emp-week-expand-grid .emp-week-day {
  min-width: 5.2rem;
}
.emp-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 5.6rem;
  padding: 8px 4px 10px;
  border: 1px solid #e2d8c8;
  border-radius: 14px;
  background: #fffdf8;
  color: #1c2430;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.emp-week-wd {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5c675f;
  text-transform: none;
}
.emp-week-num { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.emp-week-mark { font-size: 1.45rem; font-weight: 800; line-height: 1; color: #3d4a44; }
.emp-week-day.is-can {
  background: #d7ebe0;
  border-color: #6a9a7c;
}
.emp-week-day.is-cannot {
  background: #f0ddd6;
  border-color: #b07868;
}
.emp-week-day.need-chip:not(.is-can):not(.is-cannot) {
  border-color: #8a3d2f;
  border-style: dashed;
}
.emp-week-day.need-chip:not(.is-can):not(.is-cannot) .emp-week-mark { color: #8a3d2f; }
.emp-week-day.is-can .emp-week-mark { color: #1f3a34; }
.emp-week-day.is-cannot .emp-week-mark { color: #8a3d2f; }
.emp-week-day.locked-chip,
.emp-week-day:disabled.locked-chip {
  background: #d4d4d4;
  border-color: #9a958c;
  color: #5c3d1f;
  cursor: not-allowed;
}
.emp-week-day.fixed-day,
.emp-week-day:disabled.fixed-day {
  background: #e8f0ec;
  cursor: not-allowed;
}
.emp-week-day:disabled { opacity: 0.92; cursor: not-allowed; }

@media (max-width: 720px) {
  .emp-month-cal td { min-width: 0; width: 14.28%; }
  .emp-cal-day { min-height: 4.1rem; padding: 4px 2px 6px; }
  .emp-choice-btn { min-height: 1.7rem; font-size: 0.95rem; border-radius: 8px; }
  .emp-week-grid { gap: 6px; }
  .emp-week-day { min-height: 5.1rem; padding: 6px 2px 8px; border-radius: 12px; }
  .emp-week-num { font-size: 1.05rem; }
  .emp-week-mark { font-size: 1.25rem; }
  .emp-week-expand .emp-week-expand-grid {
    grid-template-columns: repeat(7, minmax(4.8rem, 1fr));
    gap: 6px;
  }
  .emp-week-expand .emp-week-expand-grid .emp-week-day { min-width: 4.8rem; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .emp-week-day { min-height: 4.2rem; padding: 4px 2px 6px; }
  .emp-cal-day { min-height: 3.5rem; }
  .emp-choice-btn { min-height: 1.55rem; }
}

/* Admin: collapsible people settings */
.admin-fold {
  margin: 10px 0 14px;
  overflow: hidden;
}
.admin-fold-toggle {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.admin-fold-toggle.is-open { border-bottom: 1px solid #eee6d8; }
.admin-fold-title { font-weight: 800; font-size: 1rem; color: #1f3a34; }
.admin-fold-sub { color: #5c675f; font-size: 0.85rem; flex: 1 1 auto; }
.admin-fold-chevron {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f3a34;
  background: #efe6d4;
  border-radius: 999px;
  padding: 4px 10px;
}
.admin-fold-body { padding: 4px 12px 12px; }
.admin-people-settings {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.admin-person-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 14px;
  padding: 10px 0;
  border-top: 1px solid #eee6d8;
}
.admin-person-settings:first-of-type { border-top: none; }
.admin-person-settings .who { font-weight: 700; min-width: 4.5rem; }
.admin-person-settings .unit-pick { width: auto; min-width: 6.5rem; }
.admin-person-settings .default-work-pick { flex: 1 1 12rem; }
.admin-settings-sec {
  padding: 8px 0 12px;
  border-top: 1px solid #eee6d8;
}
.admin-settings-sec:first-child { border-top: none; padding-top: 4px; }
.admin-settings-h {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1f3a34;
}
.admin-settings-hint {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: #5c675f;
  line-height: 1.35;
}

.admin-settings-subh {
  margin: 12px 0 4px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #3d524c;
}
.admin-settings-empty {
  margin: 0;
  padding: 6px 0;
  font-size: 0.78rem;
  color: #7a857e;
}
.lock-chip-label {
  flex: 1 1 auto;
  font-size: 0.88rem;
  font-weight: 650;
  color: #1f3a34;
}
.admin-date-input {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #ddd0b8;
  border-radius: 10px;
  background: #fffdf8;
  font: inherit;
  font-size: 0.88rem;
  color: #1f3a34;
}
.admin-date-input:focus {
  outline: 2px solid #c4a35a;
  outline-offset: 1px;
  border-color: #c4a35a;
}
.admin-settings-list { display: flex; flex-direction: column; gap: 0; }
.admin-settings-row,
.admin-settings-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 0;
  border-top: 1px solid #f0e8da;
}
.admin-settings-row:first-child { border-top: none; }
.admin-settings-add {
  border-top: 1px dashed #e0d5c2;
  margin-top: 4px;
  padding-top: 10px;
}
.admin-name-input {
  flex: 1 1 8rem;
  min-width: 6rem;
  max-width: 16rem;
  padding: 6px 10px;
  border: 1px solid #ddd0b8;
  border-radius: 10px;
  background: #fffdf8;
  font: inherit;
  font-size: 0.9rem;
  color: #1f3a34;
}
.admin-name-input.who-input { font-weight: 700; min-width: 5rem; max-width: 10rem; flex: 0 1 8rem; }
.admin-name-input:focus {
  outline: 2px solid #c4a35a;
  outline-offset: 1px;
  border-color: #c4a35a;
}
.work-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.admin-icon-btn {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #ddd0b8;
  background: #f7f1e6;
  color: #1f3a34;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-icon-btn:hover { border-color: #c4a35a; }
.admin-icon-btn.danger {
  background: #f8efe9;
  border-color: #e0c8bc;
  color: #8a3d2f;
}
.admin-icon-btn.danger:hover { border-color: #c47a68; }
.admin-icon-btn.primary-lite {
  background: linear-gradient(180deg, #2f6b5c, #1f3a34);
  border-color: #1f3a34;
  color: #fffdf8;
}
.admin-person-settings .admin-icon-btn { margin-left: auto; }

.admin-work-move {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.admin-icon-btn.admin-move-btn {
  padding: 2px 7px;
  font-size: 0.72rem;
  line-height: 1.1;
  min-width: 1.6rem;
}
.admin-icon-btn.admin-move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.sheet.month-overview .name-col .who { display: block; }
.admin-lead { max-width: 42rem; }

/* Admin cells: compact summary; pickers tuck into expandable panel */
.admin-cell-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.admin-cell-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.admin-cell-inner .att-symbol {
  font-size: 1.35rem;
  font-weight: 800;
}
.admin-cell-inner .att-symbol.is-can { color: #1f3a34; }
.admin-cell-inner .att-symbol.is-cannot { color: #8a3d2f; }
.admin-cell-edit-toggle {
  align-self: center;
  border: 1px solid #ddd4c4;
  background: #f7f3ea;
  color: #1f3a34;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-cell-edit-toggle.is-open {
  background: #c4a35a;
  border-color: #a8843a;
}
.admin-cell-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 6px;
  margin-top: 2px;
  border-radius: 10px;
  background: #f6f1e6;
  border: 1px solid #e2d8c8;
  text-align: left;
}
.admin-cell-inner.is-editing {
  background: #fbf7ef;
  border-radius: 10px;
  padding: 4px;
}
.sheet.month-overview td.grid-cell {
  min-width: 5.5rem;
  max-width: 7.5rem;
}
.sheet.month-overview td.grid-cell.is-editing,
.admin-cell-inner.is-editing {
  min-width: 9.5rem;
}
.week-ok-bar {
  gap: 8px;
}
.week-ok-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid #e2d8c8;
}
.legend-bar {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(31, 58, 52, 0.04);
}
.month-overview-scroll {
  border-radius: 14px;
  border: 1px solid #e2d8c8;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(31, 58, 52, 0.05);
}


/* Admin polish: modern cards, grid, typography; 出られない non-editable */
.admin-grid-card {
  padding: 12px 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb 0%, #faf6ef 100%);
  border: 1px solid #e4dac8;
  box-shadow: 0 10px 28px rgba(31, 58, 52, 0.07);
}
.admin-lead {
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: #4a554e;
}
.legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  border-radius: 12px;
  background: #fffdf9;
  border: 1px solid #ebe3d4;
}
.legend-label { font-weight: 700; color: #3d4a44; font-size: 0.86rem; }
.week-ok-bar { margin: 4px 0 10px; }
.week-ok-chip {
  background: #fffdf9;
  border: 1px solid #e4dac8;
  box-shadow: 0 2px 8px rgba(31, 58, 52, 0.04);
}
.sheet.month-overview {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.sheet.month-overview th.name-col,
.sheet.month-overview td.grid-cell,
.sheet.month-overview th.date-col {
  border-color: #ebe3d4;
}
.sheet.month-overview th.name-col {
  background: #f4efe6;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1f3a34;
}
.sheet.month-overview th.date-col {
  background: #f7f2e8;
  font-weight: 700;
}
.sheet.month-overview td.grid-cell {
  background: #fffcf7;
  transition: background 0.12s ease;
}
.sheet.month-overview tbody tr:nth-child(even) td.grid-cell {
  background: #fbf7f0;
}
.sheet.month-overview td.grid-cell.is-cannot-day {
  background: #f6ebe6;
}
.sheet.month-overview td.grid-cell.is-cannot-day .admin-cell-inner {
  opacity: 0.92;
}
.admin-cell-inner.is-cannot-readonly {
  gap: 4px;
}
.admin-cell-inner .cannot-note {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8a3d2f;
  letter-spacing: 0.04em;
}
.admin-cell-inner .att-symbol {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.admin-cell-edit-toggle {
  border: 1px solid #ddd0b8;
  background: linear-gradient(180deg, #fffdf8, #f3ebe0);
  box-shadow: 0 1px 2px rgba(31, 58, 52, 0.06);
}
.admin-cell-edit-toggle:hover {
  border-color: #c4a35a;
}
.admin-cell-edit {
  background: #f8f3e9;
  border: 1px solid #e0d5c2;
  border-radius: 12px;
}
.admin-fold {
  border-radius: 14px;
  background: #fffdf9;
  border: 1px solid #e4dac8;
  box-shadow: 0 4px 14px rgba(31, 58, 52, 0.05);
}
.admin-fold-title {
  letter-spacing: 0.02em;
}
.admin-person-settings {
  padding: 12px 2px;
}
.day-head-btn {
  border-radius: 10px;
  padding: 4px 2px;
  transition: background 0.12s ease;
}
.day-head-btn:hover {
  background: rgba(196, 163, 90, 0.18);
}


/* × days: compact attendance-only control (no work editors) */
.admin-att-only {
  padding: 6px 4px;
  margin-top: 0;
  background: #f8efe9;
  border-color: #e0c8bc;
}
.admin-att-only .att-pick {
  width: 100%;
  font-size: 0.75rem;
}
.admin-cell-inner.is-cannot-readonly .admin-att-only {
  border-radius: 10px;
}

/* Soften unselected ○/× so both buttons stay visible from the start */
.emp-choice-btn:not(.is-on):not(:disabled):hover {
  opacity: 1;
  border-color: #c4a35a;
  background: #fff8ea;
}
.emp-cal-day.is-unset,
.emp-week-day.is-unset {
  border-style: dashed;
  border-color: #c9a090;
}


/* Admin dense grids: attendance + work panes */
.admin-pane-switch,
.admin-range-switch {
  gap: 6px;
  margin: 4px 0 8px;
}
.admin-pane-switch button,
.admin-range-switch button {
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}
.admin-range-nav .nav {
  margin: 2px 0 8px;
}
.admin-grid-dense.admin-grid-card {
  padding: 6px 6px 8px;
  border-radius: 12px;
}
.admin-grid-dense.month-overview-scroll {
  margin-top: 2px;
}
.admin-grid-dense .sheet.month-overview th.name-col,
.admin-grid-dense .sheet.month-overview th.date-col,
.admin-grid-dense .sheet.month-overview td.grid-cell {
  padding: 3px 3px;
  min-width: 4.4rem;
  max-width: 5.6rem;
  vertical-align: middle;
}
.admin-grid-dense .sheet.month-overview thead th:first-child,
.admin-grid-dense .sheet.month-overview tbody th:first-child {
  min-width: 5.6rem;
  max-width: 5.6rem;
  width: 5.6rem;
  padding: 3px 6px;
}
.admin-grid-dense .sheet.month-overview .who {
  font-size: 0.86rem;
  line-height: 1.2;
}
.admin-grid-dense .sheet.month-overview .fixed-note {
  font-size: 0.68rem;
  line-height: 1.15;
}
.admin-grid-dense .day-head-btn {
  gap: 0;
  padding: 1px 0;
  border-radius: 6px;
}
.admin-grid-dense .day-head-num {
  font-size: 0.82rem;
  line-height: 1.15;
}
.admin-grid-dense .day-head-wd {
  font-size: 0.68rem;
  line-height: 1.1;
}
.admin-grid-dense .day-head-lock {
  font-size: 0.62rem;
}
.admin-grid-dense .admin-cell-inner {
  gap: 2px;
}
.admin-grid-dense .admin-cell-summary {
  gap: 1px;
}
.admin-grid-dense .admin-cell-inner .att-symbol {
  font-size: 1.05rem;
  line-height: 1.1;
  font-weight: 800;
}
.admin-grid-dense .admin-cell-inner .cannot-note,
.admin-grid-dense .admin-cell-inner .cell-note,
.admin-grid-dense .work-none-note {
  font-size: 0.62rem;
  line-height: 1.1;
  padding: 0;
}
.admin-grid-dense .work-type-paint {
  font-size: 0.62rem;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.15;
}
.admin-grid-dense .work-chip-row {
  gap: 1px;
  justify-content: center;
}
.admin-grid-dense .admin-cell-edit-toggle {
  padding: 2px 7px;
  font-size: 0.66rem;
  margin-top: 1px;
}
.admin-grid-dense .admin-cell-edit {
  gap: 3px;
  padding: 4px 4px;
  margin-top: 1px;
  border-radius: 8px;
}
.admin-grid-dense .admin-cell-inner.is-editing {
  padding: 2px;
  border-radius: 8px;
}
.admin-grid-dense .sheet.month-overview td.grid-cell.is-editing,
.admin-grid-dense .admin-cell-inner.is-editing {
  min-width: 7.5rem;
}
.admin-grid-dense .admin-att-only {
  padding: 3px 2px;
}
.admin-grid-dense .admin-att-only .att-pick,
.admin-grid-dense .admin-cell-inner .att-pick,
.admin-grid-dense .admin-cell-inner .work-pick {
  font-size: 0.7rem;
}
.admin-grid-dense .locked-flag {
  padding: 1px 5px;
  font-size: 0.62rem;
}
.admin-grid-dense.admin-pane-attendance .work-chip-row {
  display: none;
}
.admin-grid-dense.admin-pane-work .att-symbol {
  font-size: 0.92rem;
}
.admin-lead {
  margin: 2px 0 6px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.legend-bar {
  padding: 6px 8px;
  margin: 4px 0 8px;
  gap: 6px 10px;
  font-size: 0.8rem;
}
.week-ok-bar {
  margin: 2px 0 6px;
  gap: 6px;
}
.week-ok-chip {
  padding: 4px 8px;
  gap: 6px;
  font-size: 0.82rem;
  border-radius: 8px;
}


/* Departments + employee long-press reorder */
.dep-pick { min-width: 7rem; }
.emp-reorder-list { touch-action: pan-y; }
.emp-reorder-list.is-reordering { touch-action: none; user-select: none; }
.emp-reorder-row {
  position: relative;
  transition: background 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.emp-drag-handle {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 1px solid #ddd0b8;
  border-radius: 8px;
  background: #f7f1e6;
  color: #5c675f;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  cursor: grab;
  touch-action: none;
  line-height: 1;
}
.emp-drag-handle:active { cursor: grabbing; }
.emp-reorder-row.is-hold-ready {
  background: #fff8ea;
  outline: 2px dashed #c4a35a;
  outline-offset: 1px;
  border-radius: 10px;
}
.emp-reorder-row.is-dragging {
  background: #fffdf8;
  box-shadow: 0 8px 22px rgba(31, 58, 52, 0.16);
  opacity: 0.96;
  z-index: 2;
  border-radius: 10px;
}
.dept-group-row th.dept-group-label {
  text-align: left;
  background: #eef4f1;
  color: #1f3a34;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 6px 8px !important;
  border-bottom: 1px solid #d5e0da;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: unset !important;
  max-width: none !important;
  width: auto !important;
}
.dept-group-name { margin-right: 8px; }
.dept-group-count {
  font-weight: 600;
  color: #5c675f;
  font-size: 0.75rem;
}
.admin-grid-dense .sheet.month-overview tr.dept-group-row th {
  min-width: unset;
  max-width: none;
}

.work-group-row th.work-group-label {
  text-align: left;
  background: #f7faf8;
  color: #1f3a34;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 8px 4px 14px !important;
  border-bottom: 1px solid #e2ebe6;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: unset !important;
  max-width: none !important;
  width: auto !important;
}
.work-group-row.has-work-tint th.work-group-label {
  border-left: 4px solid var(--work-group-color, #94a3b8);
  background: color-mix(in srgb, var(--work-group-color, #94a3b8) 12%, #f7faf8);
}
.work-group-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: -1px;
  background: var(--work-group-color, #94a3b8);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.work-group-name { margin-right: 6px; }
.work-group-count {
  font-weight: 700;
  color: #3d524a;
  font-size: 0.75rem;
}
.admin-grid-dense .sheet.month-overview tr.work-group-row th {
  min-width: unset;
  max-width: none;
}
.admin-pane-work tr.work-cluster-member th.name-col {
  padding-left: 12px;
}

/* Per-department date/weekday header above each dept block */
.dept-date-head-row th.dept-date-head-label {
  text-align: left;
  background: #e8efe9;
  color: #3d524a;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 8px !important;
  border-bottom: 1px solid #d0ddd4;
  position: sticky;
  left: 0;
  z-index: 2;
  vertical-align: middle;
  min-width: unset !important;
  max-width: none !important;
  width: auto !important;
}
.dept-date-head-hint {
  display: block;
  font-weight: 800;
  color: #1f3a34;
  letter-spacing: 0.02em;
}
.dept-date-head-scope {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #5c675f;
}
.dept-date-head-scope.muted { color: #8a918c; }
.sheet.month-overview th.dept-date-col {
  background: #eef4f0;
  padding: 2px 2px;
  vertical-align: middle;
}
.sheet.month-overview th.dept-date-col.is-locked {
  background: #d4d4d4;
}
.sheet.month-overview th.dept-date-col.is-dept-locked {
  background: #e4d5c8;
}
.sheet.month-overview th.dept-date-col.is-global-locked {
  background: #cfcfcf;
}
.dept-day-head-btn {
  min-height: 2.4rem;
}
.dept-day-head-btn:disabled,
.dept-day-head-btn.is-readonly {
  cursor: not-allowed;
  opacity: 0.85;
}
.dept-day-head-btn:disabled:hover,
.dept-day-head-btn.is-readonly:hover {
  background: transparent;
}
.admin-grid-dense .dept-date-head-row th.dept-date-head-label {
  padding: 3px 6px !important;
}
.admin-grid-dense .dept-day-head-btn {
  min-height: 0;
  gap: 0;
  padding: 1px 0;
}

/* ---- Login gate ---- */
.session-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.session-who {
  font-size: 0.9rem;
  color: #d5e0d8;
}
#logout-btn {
  border: 1px solid #d5e0d8;
  background: transparent;
  color: #f7f3ea;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
#logout-btn:hover { background: rgba(247, 243, 234, 0.12); }
.login-card {
  max-width: 28rem;
  margin: 24px auto;
  padding: 20px;
  background: #fffdf8;
  border: 1px solid #ddd4c4;
  border-radius: 10px;
}
.login-title { margin: 0 0 8px; font-size: 1.2rem; }
.login-form {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.login-label { font-size: 0.9rem; color: #3d4a44; }
.login-form input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #c9c0b0;
  border-radius: 6px;
  background: #fff;
}
.login-submit { margin-top: 8px; width: 100%; }
.login-hint { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e6ddd0; }
.login-demo-list {
  margin: 6px 0 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: #3d4a44;
  word-break: break-all;
}
.session-self { font-size: 1.05rem; }
