/* 🖥️ 大螢幕：左中右 */
.excel-tools {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.excel-tools-left,
.excel-tools-center,
.excel-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 中間撐開 */
.excel-tools-center {
  justify-content: center;
  flex-wrap: wrap;
}

/* 左右 */
.excel-tools-left {
  justify-content: flex-start;
}

.excel-tools-right {
  justify-content: flex-end;
}

.schedule-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.schedule-mode-btn {
  min-width: 34px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.schedule-mode-btn:hover {
  color: var(--text);
  background: var(--surface3);
}

.schedule-mode-btn.active {
  color: var(--text);
  background: var(--accent);
}

.excel-grid-wrapper.mode-day .excel-table,
.excel-grid-wrapper.mode-week .excel-table {
  min-width: 100%;
}

/* 📱 小螢幕：全部變一排 flow */
@media (max-width: 900px) {
  .excel-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .schedule-toolbar-actions {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .excel-tools-left,
  .excel-tools-center,
  .excel-tools-right {
    display: contents; /* ⭐ 關鍵：打散群組 */
  }
}
.cell-has-note {
  position: relative;
}

.cell-note-mark {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 10px;
  color: var(--amber);
  opacity: 0.9;
}
