/* Daily booking controls stay visible; supporting actions expand on demand. */
@media (min-width: 861px) {
  .planner-main:has(.compact-toolbar) { grid-template-rows: auto minmax(0, 1fr); }
}
.planner-toolbar.compact-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 8px 12px;
  padding: 9px 12px;
  overflow: visible;
}
.compact-toolbar .toolbar-context,
.compact-toolbar .toolbar-frequent,
.compact-toolbar .toolbar-density,
.compact-toolbar .toolbar-more-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.compact-toolbar .toolbar-context { margin-right: auto; }
.compact-toolbar .store-select { width: 190px; flex: 0 0 190px; }
.compact-toolbar .toolbar-date { width: 144px !important; flex: 0 0 144px; }
.compact-toolbar .slot-select { width: 124px; flex: 0 0 124px; }
.compact-toolbar .toolbar-density { flex-wrap: nowrap; font-size: 12px; white-space: nowrap; }
.compact-toolbar .danger-create {
  color: var(--toolbar-control-text, #374151);
  background: var(--toolbar-control-bg, #fff);
  border: 1px solid var(--toolbar-control-border, #d6dce4);
  box-shadow: none;
}
.toolbar-more { flex: 0 0 auto; min-width: 0; }
.toolbar-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.toolbar-more > summary::-webkit-details-marker,
.tech-header-details > summary::-webkit-details-marker { display: none; }
.toolbar-more > summary::after { content: '▾'; }
.toolbar-more[open] { flex: 1 1 100%; order: 3; }
.toolbar-more[open] > summary::after { content: '收起 ▴'; font-size: 12px; }
.toolbar-more-body {
  margin-top: 8px;
  padding: 10px;
  background: var(--toolbar-bg, #fff);
  border: 1px solid var(--toolbar-border, #e5ddd5);
  border-radius: 6px;
}
.toolbar-more:not([open]) > .toolbar-more-body { display: none; }
.toolbar-more-actions .logout-btn { margin-left: auto; }
.toolbar-filter-title { margin: 10px 0 6px; font-size: 12px; color: #667085; }
.panel-filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.toolbar-more summary:focus-visible,
.tech-header-details summary:focus-visible { outline: 2px solid #6c2714; outline-offset: 2px; }

/* Two compact header lines: name and shift, with stats and guidance available on demand. */
.schedule .header:has(.tech-header-details),
.schedule .col-header:has(.tech-header-details) { min-height: 0; height: auto; }
.schedule .col-header:has(.tech-header-details) { padding: 6px 8px; }
.schedule .tech-header-details > summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
}
.schedule .tech-header-details > summary .tech-shift { margin-top: 2px; white-space: normal; }
.schedule .tech-header-details > summary .tech-detail-chevron { display: inline; flex: 0 0 auto; font-size: 11px; color: #667085; }
.schedule .tech-header-details[open] .tech-detail-chevron { transform: rotate(180deg); }
.schedule .tech-header-details:not([open]) > .tech-header-extra { display: none; }
.schedule .tech-header-extra { padding-top: 5px; white-space: normal; }
.schedule .tech-header-extra .tech-day-state,
.schedule .tech-header-extra .tech-next-slot,
.schedule .tech-header-extra .planning-note { white-space: normal; overflow: visible; text-overflow: clip; }
.schedule .tech-header-extra .column-order-heading { margin-top: 5px; }
@media (max-width: 860px) {
  .compact-toolbar .toolbar-context { flex: 1 1 100%; }
  .compact-toolbar .toolbar-frequent { flex: 1 1 auto; }
}

.toolbar-date-nav { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 6px; }

/* One shared date beside the workspace tabs; no repeated date pickers below. */
.workspace-switcher .shared-business-date {
  display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin-left: 24px;
}
.shared-business-date .finance-date-label { color: #625249; font-size: 13px; white-space: nowrap; }
.shared-business-date .finance-date-picker { width: 144px !important; flex: 0 0 144px; }
.workspace-switcher .shared-business-date button { min-width: 32px; min-height: 32px; padding: 0 10px; border-radius: 6px; }
.workspace-switcher:has(.shared-business-date) { gap: 8px; overflow-x: auto; }
.workspace-switcher:has(.shared-business-date) > button { flex: 0 0 auto; white-space: nowrap; }
.schedule .column-order-heading { flex-wrap: nowrap; }
.schedule .column-order-heading button { flex: 0 0 auto; }
.finance-refresh-status { font-size: 12px; color: #667085; }
@media (max-width: 960px) {
  .workspace-switcher:has(.shared-business-date) { justify-content: flex-start; }
  .workspace-switcher .shared-business-date { margin-left: 12px; }
}

/* Keep the More toggle in its original cell while its panel spans the next row. */
.planner-toolbar.compact-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.compact-toolbar .toolbar-context { grid-column: 1; grid-row: 1; }
.compact-toolbar .toolbar-frequent { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.compact-toolbar .toolbar-more { display: contents; }
.compact-toolbar .toolbar-more::details-content { display: contents; }
.compact-toolbar .toolbar-more > summary { grid-column: 3; grid-row: 1; justify-self: end; justify-content: center; min-width: 112px; box-sizing: border-box; }
.compact-toolbar .toolbar-more-body { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
@media (max-width: 700px) {
  .planner-toolbar.compact-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .compact-toolbar .toolbar-context { grid-column: 1; grid-row: 1; }
  .compact-toolbar .toolbar-more > summary { grid-column: 2; grid-row: 1; }
  .compact-toolbar .toolbar-frequent { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .compact-toolbar .toolbar-more-body { grid-row: 3; }
}
.workspace-switcher > .logout-btn { margin-left: auto; font-weight: 500; color: #625249; }
.workspace-switcher > .shared-business-date { margin-right: auto; }
