/* 各分頁共用：標題區、篩選面板、資料列表外殼、儀表板／財務／預約確認等 */

/* ─── 共用頁首 ─── */
.pane-page__head {
  margin-bottom: 20px;
}

.pane-page__title {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.pane-page__lead {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  max-width: 52rem;
}

/* ─── 儀表板 ─── */
.dashboard-page__stats {
  margin-bottom: 20px;
}

.dashboard-page__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 960px) {
  .dashboard-page__grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-page__grid--tables {
  align-items: start;
}

.dashboard-panel__body {
  padding: 16px 18px 18px;
}

.dashboard-chart-panel {
  height: 250px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
}

/* ─── 新增預約 ─── */
.booking-page__head {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.booking-page__head-text {
  flex: 1;
  min-width: 200px;
}

.booking-page__gcal-btn {
  flex-shrink: 0;
}

.today-suggestion-body {
  max-height: min(68vh, 640px);
  overflow: auto;
  padding-right: 4px;
}

.today-suggestion-loading,
.today-suggestion-empty {
  margin: 0;
  padding: 14px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
}

.today-suggestion-summary {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f0f9ff;
}

.today-suggestion-summary__date,
.today-suggestion-summary__text,
.today-suggestion-summary__meta {
  margin: 0;
}

.today-suggestion-summary__text {
  margin-top: 6px;
  color: #0f172a;
}

.today-suggestion-summary__meta {
  margin-top: 8px;
  color: #334155;
  font-size: 13px;
}

.today-suggestion-summary__meta--rule {
  color: #64748b;
  font-size: 12px;
}

.today-suggestion-card__badge--pending {
  color: #b45309;
  background: #fffbeb;
}

.today-suggestion-card__actions {
  margin-top: 8px;
}

.today-suggestion-summary__meta--pending {
  color: #b45309;
  font-weight: 500;
}

.today-suggestion-pool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px 0;
}

.today-suggestion-pool-chip {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.today-suggestion-pool-chip:hover {
  background: #e0f2fe;
}

.today-suggestion-pool-h-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px 0;
}

.today-suggestion-pool-h-wrap .today-suggestion-pool-h {
  margin: 0;
  flex: 1 1 auto;
}

.today-suggestion-pool-filter-btn,
.today-suggestion-pool-next-btn {
  flex-shrink: 0;
}

.progress-toolbar__next-pending-pool[hidden],
.progress-toolbar__pending-badge[hidden] {
  display: none !important;
}

.today-suggestion-pending-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
}

.today-suggestion-pending-filter-btn.is-active,
.today-suggestion-view-chip.is-active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.today-suggestion-card__badge--done {
  color: #15803d;
  background: #f0fdf4;
}

.today-suggestion-card__badge--after {
  color: #c2410c;
  background: #fff7ed;
}

.today-suggestion-pending-toolbar__meta {
  font-size: 13px;
  color: #64748b;
}

.today-suggestion-empty--done {
  color: #15803d;
  font-weight: 500;
}

.today-suggestion-pool-h {
  margin: 14px 0 8px 0;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 8px;
  border-left: 4px solid #38bdf8;
}

.today-suggestion-pool-h-wrap:first-child,
.today-suggestion-pool-chips + .today-suggestion-cards .today-suggestion-pool-h-wrap:first-child {
  margin-top: 0;
}

.today-suggestion-card__slot {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.today-suggestion-cards {
  display: grid;
  gap: 10px;
}

.today-suggestion-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.today-suggestion-card.is-highlight {
  border-color: #fbbf24;
  background: #fffbeb;
}

.today-suggestion-card__head h4 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.today-suggestion-card__head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.today-suggestion-card__list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.today-suggestion-card__list li + li {
  margin-top: 5px;
}

.today-suggestion-expand-wrap {
  margin: 10px 0 4px;
  display: flex;
  justify-content: center;
}

.today-suggestion-expand-btn {
  width: 100%;
  max-width: 320px;
}

.today-suggestion-cards--extra {
  margin-top: 8px;
}

.today-summary-disclaimer {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 12px 0;
}

/* 預約分頁底為淺色：勿沿用頂欄 .hdr-btn 的白字＋半透明底（白底上會看不見） */
#booking .hdr-btn {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  backdrop-filter: none;
}

#booking .hdr-btn:hover {
  background: #0284c7;
  border-color: #0369a1;
  color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

#booking .hdr-btn:focus-visible {
  outline: 3px solid rgba(2, 132, 199, 0.35);
  outline-offset: 2px;
}

.booking-page__title {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.booking-page__lead {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.booking-page__form {
  max-width: 900px;
}

/* 由 JS 切換顯示（取代 #booking 內聯 style） */
.bk-hidden {
  display: none !important;
}

.booking-callout--visible {
  display: block;
}

.booking-student-row__tight {
  height: auto;
  white-space: nowrap;
}

.booking-course-fg {
  flex: 1;
  min-width: 220px;
}

.bLeadSourceOtherWrap {
  margin-top: 6px;
}

.booking-dates-toolbar {
  margin-top: 6px;
  margin-bottom: 6px;
}

.booking-btn--month {
  width: auto;
  padding: 8px 14px;
  margin-top: 0;
  background: #5a6c9e;
  color: #fff;
}

.booking-cal-card {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 13px;
  margin-top: 5px;
}

.booking-time-section {
  margin-top: 11px;
}

.booking-time-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.booking-time-legend-row .fg-field-label {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: min(100%, 220px);
}

.booking-btn--clear-time {
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
}

.custom-time-label {
  margin: 0;
  min-width: 80px;
}

.custom-time-inner .custom-time-select {
  flex: 1;
}

#booking .booking-dt-list {
  margin-top: 8px;
}

.booking-dt-title {
  font-size: 13px;
}

.booking-fee-total {
  font-size: 17px;
}

.booking-credit-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

/* ─── 預約嚮導（booking_enhanced.js 字串，與主表單 class 對齊，無內聯 style）─── */
.booking-wizard.wz-shell:not(.bk-accordion-shell) {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

/* 收合式預約：淺色卡片版面（避免深藍疊半透明） */
.booking-wizard.bk-accordion-shell {
  background: linear-gradient(180deg, #f8fafc 0%, #f0f9ff 55%, #e0f2fe 100%);
  border: 1px solid var(--sw-border);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(2, 132, 199, 0.08);
}

.booking-wizard.bk-accordion-shell #bookingWizardModeBadge.wz-mode-badge {
  background: #e0f2fe;
  color: var(--sw-primary-deep);
  border: 1px solid #bae6fd;
}

.booking-wizard.bk-accordion-shell #bookingDateAccessHint.booking-wizard__date-hint {
  color: var(--sw-text);
}

.booking-wizard.bk-accordion-shell #bookingDateAccessHint.booking-wizard__date-hint--all {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.booking-wizard.bk-accordion-shell #bookingDateAccessHint.booking-wizard__date-hint--limited {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

#bookingWizardModeBadge.wz-mode-badge {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #e0f2fe;
  color: var(--sw-primary-deep);
  border: 1px solid #bae6fd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

#bookingDateAccessHint.booking-wizard__date-hint {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--sw-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

#bookingDateAccessHint.booking-wizard__date-hint--all {
  background: var(--sw-status-ok-bg);
  color: var(--sw-status-ok-text);
  border: 1px solid var(--sw-status-ok-border);
}

#bookingDateAccessHint.booking-wizard__date-hint--limited {
  background: var(--sw-status-warn-bg);
  color: var(--sw-status-warn-text);
  border: 1px solid var(--sw-status-warn-border);
}

/* ─── 預約收合式兩段 accordion ─── */
.bk-accordion-shell .bk-student-bar {
  background: #fff;
  border: 1px solid var(--sw-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* 月曆併入「二、時間安排」展開區 */
.bk-accordion-section .bk-main-calendar {
  margin: 0;
  padding: 16px 18px 18px;
  border: none;
  border-top: 1px solid var(--sw-border);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.bk-accordion-section .bk-main-calendar .wz-card-title {
  margin-top: 0;
}

.bk-main-date-count {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-primary-dark);
}

.bk-selected-slots-list {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--sw-border);
}

.bk-selected-slots__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--sw-primary-deep);
  margin-bottom: 10px;
}

.bk-selected-slots__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bk-selected-slots__item {
  display: grid;
  grid-template-columns: minmax(118px, 1.1fr) minmax(88px, 0.9fr) minmax(0, 1.4fr) minmax(72px, 0.8fr);
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  font-size: 13px;
  line-height: 1.35;
}

.bk-selected-slots__date {
  font-weight: 700;
  color: var(--sw-primary-deep);
}

.bk-selected-slots__time {
  font-weight: 600;
  color: #0f766e;
}

.bk-selected-slots__loc {
  color: var(--sw-text-muted);
  word-break: break-word;
}

.bk-selected-slots__coach {
  font-weight: 600;
  color: var(--sw-primary-dark);
  text-align: right;
}

.bk-selected-slots__coach--none {
  font-weight: 400;
  color: #94a3b8;
}

.bk-selected-slots__empty {
  font-size: 13px;
  color: var(--sw-text-muted);
  padding: 8px 0;
}

.bk-schedule-collapsed-preview .bk-selected-slots__item {
  background: #fff;
  border-color: var(--sw-border);
}

@media (max-width: 640px) {
  .bk-selected-slots__item {
    grid-template-columns: 1fr 1fr;
  }

  .bk-selected-slots__loc {
    grid-column: 1 / -1;
  }

  .bk-selected-slots__coach {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.bk-schedule-collapsed-preview {
  padding: 12px 16px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--sw-border);
  border-bottom: 1px solid var(--sw-border);
}

.bk-schedule-collapsed-preview__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.bk-schedule-collapsed-preview__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bk-schedule-collapsed-preview__item {
  font-size: 13px;
  line-height: 1.45;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
  color: var(--sw-text);
}

.bk-schedule-collapsed-preview__item:last-child {
  border-bottom: none;
}

.bk-schedule-collapsed-preview__date {
  font-weight: 700;
  color: var(--sw-primary-deep);
  margin-right: 6px;
}

.bk-schedule-collapsed-preview__time {
  font-weight: 600;
  color: #0f766e;
  margin-right: 6px;
}

.bk-schedule-collapsed-preview__loc {
  color: var(--sw-text-muted);
}

.bk-schedule-collapsed-preview__coach {
  color: var(--sw-primary-dark);
  font-weight: 500;
}

.bk-schedule-collapsed-preview__empty,
.bk-schedule-collapsed-preview__more {
  font-size: 12px;
  color: var(--sw-text-muted);
}

.bk-schedule-collapsed-preview__more {
  margin-top: 6px;
}

.bk-accordion-shell .bk-student-bar {
  margin-bottom: 14px;
  padding: 16px 18px;
}

.bk-student-bar__inner {
  display: grid;
  grid-template-columns: minmax(100px, auto) 1fr;
  gap: 10px 14px;
  align-items: center;
}

.bk-accordion-shell .bk-student-bar .wz-label {
  color: var(--sw-text-muted);
  font-weight: 600;
}

.bk-compact-summary {
  color: var(--sw-text);
}

/* 併入「一、學生基本信息」收合區（取代獨立摘要卡） */
.bk-accordion-section .bk-basic-collapsed-summary {
  margin: 0;
  padding: 12px 16px 14px;
  border: none;
  border-top: 1px solid var(--sw-border);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.bk-accordion-section.is-open .bk-basic-collapsed-summary {
  display: none !important;
}

.bk-compact-summary__empty {
  font-size: 13px;
  color: var(--sw-text-muted);
}

.bk-compact-summary__grid {
  display: grid;
  grid-template-columns: auto 1fr minmax(120px, 28%);
  gap: 14px 16px;
  align-items: start;
}

.bk-compact-summary__photo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: var(--sw-surface-subtle);
}

.bk-compact-summary__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #94a3b8;
}

.bk-compact-summary__name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--sw-text);
}

.bk-compact-summary__row {
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--sw-text-muted);
}

.bk-compact-summary__label {
  display: inline-block;
  min-width: 2.5em;
  color: #64748b;
  margin-right: 6px;
}

.bk-compact-summary__aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.bk-compact-summary__chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-compact-summary__chip--slots {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
  font-weight: 600;
}

.bk-compact-summary__payable {
  font-size: 14px;
  font-weight: 700;
  color: var(--sw-primary-dark);
}

.bk-compact-dates {
  margin-bottom: 16px;
  padding: 14px 16px 16px;
  border-radius: 10px;
}

.bk-compact-dates__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.bk-compact-dates__title {
  color: var(--sw-text);
  font-size: 14px;
  font-weight: 700;
}

.bk-compact-dates__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.bk-compact-month-label {
  color: var(--sw-primary-deep);
  font-size: 13px;
  font-weight: 700;
  min-width: 6.5em;
  text-align: center;
}

.bk-compact-month-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--sw-primary-dark);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bk-compact-month-btn:hover {
  background: #f0f9ff;
  border-color: var(--sw-accent);
}

.bk-compact-month-btn--today {
  background: var(--sw-primary);
  border-color: var(--sw-primary);
  color: #fff;
}

.bk-compact-month-btn--today:hover {
  background: var(--sw-primary-dark);
  border-color: var(--sw-primary-dark);
}

.bk-compact-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.bk-compact-weekname,
.bk-compact-filler {
  font-size: 10px;
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
}

.bk-compact-date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 4px 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--sw-text);
  cursor: pointer;
  font: inherit;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.bk-compact-date-cell:hover:not(.disabled) {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.bk-compact-date-cell .bk-compact-dayname {
  font-size: 9px;
  color: #64748b;
}

.bk-compact-date-cell .bk-compact-daynum {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--sw-text);
}

.bk-compact-date-cell.selected {
  background: var(--sw-primary);
  border-color: var(--sw-primary-dark);
  color: #fff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.bk-compact-date-cell.selected .bk-compact-dayname,
.bk-compact-date-cell.selected .bk-compact-daynum {
  color: #fff;
}

.bk-compact-date-cell.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f1f5f9;
}

.bk-compact-date-cell.today:not(.selected) {
  border-color: var(--sw-accent);
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.35);
}

.bk-compact-date-count {
  margin-top: 10px;
  font-size: 12px;
  color: var(--sw-text-muted);
}

.bk-accordion-host {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bk-accordion-section {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--sw-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bk-accordion-head {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px 16px;
  border: none;
  background: #f8fafc;
  color: var(--sw-text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.bk-accordion-head:hover {
  background: #f1f5f9;
}

.bk-accordion-section.is-open .bk-accordion-head {
  background: #e0f2fe;
  color: var(--sw-primary-deep);
  border-bottom: 1px solid #bae6fd;
}

.bk-accordion-head-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-text-muted);
  white-space: nowrap;
}

.bk-accordion-section.is-open .bk-accordion-head-meta {
  color: var(--sw-primary-dark);
}

.bk-accordion-chevron {
  color: var(--sw-primary);
}

.bk-accordion-chevron::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.2s ease;
}

.bk-accordion-section.is-open .bk-accordion-chevron::before {
  transform: rotate(90deg);
}

.bk-accordion-panel {
  background: #fff;
  padding: 0 0 4px;
}

.bk-accordion-panel[hidden] {
  display: none !important;
}

.bk-accordion-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--sw-border);
}

/* 收合時不顯示「儲存進度」「確認預約」等區塊底部按鈕 */
.bk-accordion-section:not(.is-open) .bk-accordion-section-actions {
  display: none;
}

.bk-accordion-section-actions--basic {
  justify-content: flex-start;
}

.bk-accordion-section-actions--schedule .bk-accordion-actions__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.booking-wizard-footer-hint {
  margin-top: 12px;
  padding: 8px 4px 0;
}

.booking-wizard-footer-hint .progress-indicator {
  color: var(--sw-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.bk-schedule-collapsed-preview__scroll {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.bk-selected-slots__month-group {
  margin-bottom: 12px;
}

.bk-selected-slots__month-group:last-child {
  margin-bottom: 0;
}

.bk-selected-slots__month-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--sw-primary-deep);
  margin-bottom: 6px;
  padding: 4px 2px;
}

.booking-wizard.bk-accordion-shell .wz-btn-save-progress {
  background: #fff;
  color: var(--sw-primary-dark);
  border: 1px solid #cbd5e1;
}

.booking-wizard.bk-accordion-shell .wz-btn-save-progress:hover {
  background: #f8fafc;
  border-color: var(--sw-accent);
}

.booking-wizard.bk-accordion-shell .wz-btn-confirm-now {
  background: var(--sw-primary-deep);
  border: none;
}

.booking-wizard.bk-accordion-shell .wz-btn-confirm-now:hover {
  background: #075985;
}

.booking-wizard-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 16px;
  padding: 12px 0 4px;
  background: linear-gradient(to top, rgba(15, 76, 129, 0.92) 70%, transparent);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .bk-compact-summary__grid {
    grid-template-columns: auto 1fr;
  }

  .bk-compact-summary__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .bk-student-bar__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .bk-compact-summary__grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .bk-compact-summary__media {
    justify-self: start;
  }

  .bk-compact-date-grid {
    gap: 3px;
  }

  .bk-compact-date-cell {
    min-height: 38px;
  }

  .bk-accordion-head {
    grid-template-columns: 1fr auto;
  }

  .bk-accordion-head-title {
    font-size: 14px;
  }

  .bk-accordion-section-actions--schedule .bk-accordion-actions__end {
    flex-direction: column;
    align-items: stretch;
  }

  .bk-accordion-section-actions--schedule .wz-btn-next,
  .bk-accordion-section-actions--schedule .wz-btn-save-progress,
  .bk-accordion-section-actions--schedule .wz-btn-confirm-now {
    width: 100%;
  }
}

.booking-wizard .step {
  flex: 1;
  text-align: center;
  color: #fff;
}

.booking-wizard .step.step--pending {
  opacity: 0.5;
}

.booking-wizard .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: bold;
}

.booking-wizard .step-number.step-number--on {
  background: rgba(255, 255, 255, 0.4);
}

.booking-wizard .step-title {
  font-size: 14px;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  row-gap: 8px;
  column-gap: 12px;
}

/* 第 4 步：主按鈕與「預約並確認課堂」並排 */
.wizard-actions__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

.wz-btn-prev {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.wz-btn-prev:hover {
  background: rgba(255, 255, 255, 0.3);
}

.wz-btn-next {
  background: #4caf50;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.wz-btn-next:hover {
  background: #45a049;
}

.wz-btn-save-progress {
  background: rgba(255, 255, 255, 0.92);
  color: #0f4c81;
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.wz-btn-save-progress:hover {
  background: #fff;
  border-color: #fff;
}

#publicEnrollAdminPanel.pe-admin-collapsible .pe-admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1rem;
}

#publicEnrollAdminPanel .pe-admin-toggle {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

#publicEnrollAdminPanel .pe-admin-toggle:hover {
  background: #f1f5f9;
}

#publicEnrollAdminPanel.is-collapsed .pe-admin-heading {
  margin-bottom: 0;
}

.wz-btn-confirm-now {
  background: #1565c0;
}
.wz-btn-confirm-now:hover {
  background: #0d47a1;
}

.wizard-actions .progress-indicator {
  color: #fff;
  font-size: 14px;
}

/* 嚮導步驟內白底卡片與表單格線 */
.wz-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
}

.wz-card-title {
  margin: 0 0 20px 0;
  color: #333;
}

.wz-lead {
  margin: -8px 0 14px 0;
  font-size: 13px;
  color: #64748b;
}

.wz-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.wz-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.wz-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #495057;
}

.wz-label--spaced {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #495057;
}

.wz-input,
.wz-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}

.wz-input--other {
  padding: 8px;
  font-size: 13px;
}

.wz-mb-15 {
  margin-bottom: 15px;
}

.wz-photo-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.img-up.wz-photo-tile {
  position: relative;
  width: 120px;
  height: 120px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.img-up.wz-photo-tile:hover {
  border-color: var(--sw-primary);
}

.wz-photo-emoji {
  font-size: 24px;
  margin-bottom: 5px;
}

.wz-hint-12 {
  font-size: 12px;
  color: #666;
}

.wz-hint-12b {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.wz-hint-muted {
  font-size: 12px;
  color: #999;
}

.img-prev.wz-photo-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.sen-grid-enhanced.wz-sen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

/* 嚮導付款：與 pickPM 整合，:hover 取代 onmouseover */
.payment-options.wz-payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

#wizardContent .payment-option {
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.2s;
}

#wizardContent .payment-option:hover {
  background: #f0f0f0;
}

#wizardContent .payment-option.sel,
#wizardContent .payment-option.payment-option--on {
  border-color: #4caf50;
  background: #f8fff8;
}

#wizardContent .payment-option.sel:hover {
  background: #e8f5e8;
}

.wz-pay-title-cash {
  font-weight: 600;
  color: #4caf50;
}

.wz-pay-title-fps {
  font-weight: 600;
  color: #ff9800;
}

.wz-pay-title-payme {
  font-weight: 600;
  color: #2196f3;
}

#wizardContent .booking-callout--wizard {
  margin-bottom: 15px;
}

.wz-credit-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wz-input--credit {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
}

.wz-btn-autofill {
  padding: 8px 16px;
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}

.wz-credit-footnote {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.wz-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-height: 80px;
  resize: vertical;
  font: inherit;
  box-sizing: border-box;
}

.wz-smart-panel {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
}

.wz-smart-panel h4 {
  margin: 0 0 10px 0;
  color: #495057;
}

#smartRecommendations.wz-smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.wz-month-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wz-btn-month-prev {
  padding: 8px 16px;
  background: var(--sw-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  font: inherit;
}

.wz-btn-month-prev:hover {
  background: #5a6fd8;
}

.wz-btn-month-current {
  padding: 8px 16px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  font: inherit;
}

.wz-btn-month-current:hover {
  background: #45a049;
}

.wz-btn-month-next {
  padding: 8px 16px;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  font: inherit;
}

.wz-btn-month-next:hover {
  background: #f57c00;
}

#wizardMonthLabel.wz-month-label {
  margin-bottom: 10px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

#dateSelector.wz-date-grid,
#timeSlotSelector.wz-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

#timeSlotSelector.wz-slot-grid {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.wz-custom-time-wrap {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.wz-custom-time-title {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.wz-custom-time-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.wz-flex-gap {
  display: flex;
  gap: 6px;
}

.wz-custom-mid {
  text-align: center;
  color: #666;
}

#wizardContent .wz-select--sm {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
  min-width: 0;
}

#wizardContent .wz-select--narrow {
  width: 90px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
}

.wz-btn-apply-time {
  padding: 8px 14px;
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

#wizardBulkPoolWrap.wz-pool-bulk {
  margin-bottom: 12px;
  padding: 12px;
  background: #eef6ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.wz-pool-bulk-title {
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 4px;
}

.wz-pool-bulk-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.wz-pool-bulk-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#wizardBulkLoc.wz-bulk-loc {
  min-width: 170px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font: inherit;
}

#wizardBulkLocCustom.wz-bulk-custom {
  max-width: 200px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font: inherit;
}

#wizardBulkLocCustom.wz-bulk-custom:not(.bk-hidden) {
  display: inline-block;
}

#scheduleList.wz-schedule-hold {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  min-height: 100px;
}

.wz-schedule-loc-row .wiz-loc-select {
  min-width: 150px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  font: inherit;
}

.wz-schedule-loc-row .wiz-loc-custom {
  margin-left: 8px;
  max-width: 160px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  font: inherit;
}

.wz-schedule-loc-row .wiz-loc-custom:not(.bk-hidden) {
  display: inline-block;
}

.wz-schedule-empty {
  text-align: center;
  color: #999;
  padding: 20px;
}

#conflictAlert.wz-conflict {
  display: none;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

#conflictAlert.wz-conflict.is-visible {
  display: block;
}

.wz-conflict-title {
  font-weight: 600;
  color: #856404;
  margin-bottom: 5px;
}

#conflictDetails {
  color: #856404;
  font-size: 13px;
}

.wz-tip-box {
  background: #e8f5e8;
  border-left: 4px solid #4caf50;
  padding: 15px;
  border-radius: 4px;
}

.wz-tip-title {
  font-weight: 600;
  color: #2e7d32;
  margin-bottom: 5px;
}

.wz-tip-body {
  color: #2e7d32;
  font-size: 13px;
}

/* 確認步 */
#bookingSummary.wz-summary-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.wz-confirm-section .wz-confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.wz-slot-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wz-slot-line {
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.wz-slot-loc {
  color: #64748b;
  font-size: 13px;
}

.wz-slot-status {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.wz-slot-status--pending {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

.wz-slot-status--ok {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.wz-slot-confirm-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #616161;
  line-height: 1.45;
}

.wz-slot-confirm-note--schedule {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
}

.wz-slot-line--empty {
  color: #757575;
  font-style: italic;
}

.wz-conflict-line {
  margin-bottom: 5px;
}

#feeCalculation.wz-fee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.wz-fee-block {
  line-height: 1.65;
}

.wz-fee-block > div {
  margin-bottom: 6px;
}

.wz-fee-payable {
  margin-top: 10px;
  padding: 10px 12px;
  background: #e8f5e9;
  border-radius: 6px;
  border: 1px solid #a5d6a7;
  font-size: 15px;
}

.wz-fee-muted {
  margin-top: 8px;
  font-size: 12px;
  color: #546e7a;
  line-height: 1.45;
}

.wz-fee-footnote {
  margin: 12px 0 0;
  font-size: 11px;
  color: #757575;
  line-height: 1.45;
}

.wz-confirm-section {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.wz-confirm-section h4 {
  margin: 0 0 10px 0;
  color: #495057;
}

.wz-notify-panel {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.wz-notify-panel h4 {
  margin: 0 0 10px 0;
  color: #1565c0;
}

.wz-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wz-check-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.wz-check-row label {
  cursor: pointer;
}

.wz-warn-box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 4px;
}

.wz-warn-body {
  color: #856404;
  font-size: 13px;
}

.wz-notify-panel .wz-check-row + .wz-check-row {
  margin-top: 8px;
}

/* 智能推薦卡片、月曆格等 */
.wz-rec-card {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.3s ease;
}

.wz-rec-card:hover {
  background: #f0f0f0;
}

.wz-rec-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.wz-rec-desc {
  font-size: 12px;
  color: #666;
}

.wz-cal-weekname {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-radius: 6px;
}

.wz-cal-filler {
  min-height: 86px;
}

/* 嚮導月曆日期格（狀態以 class 表達，不再依賴內聯背景色） */
#dateSelector.date-option-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

#dateSelector .date-option.wz-cal-cell {
  min-height: 86px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  box-sizing: border-box;
}

#dateSelector .date-option.wz-cal-cell.today:not(.selected):not(.editing) {
  background: #e3f2fd;
}

#dateSelector .date-option.wz-cal-cell.selected:not(.editing) {
  background: #e8f5e8;
  border-color: #4caf50;
}

#dateSelector .date-option.wz-cal-cell.pending:not(.editing) {
  background: #fff7ed;
  border-color: #fdba74;
}

#dateSelector .wz-cal-badge--pending {
  background: #ffedd5;
  color: #c2410c;
}

#dateSelector .date-option.wz-cal-cell.editing {
  background: #fff7ed;
  border-color: #f97316;
}

#dateSelector .date-option.wz-cal-cell.locked {
  border-color: #e5e7eb;
}

#dateSelector .date-option.wz-cal-cell.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#dateSelector .date-option.wz-cal-cell.enabled {
  cursor: pointer;
}

#dateSelector .wz-cal-dayname {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

#dateSelector .wz-cal-daynum {
  font-weight: 700;
  color: #334155;
  font-size: 18px;
  line-height: 1;
}

#dateSelector .wz-cal-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

#dateSelector .wz-cal-badge {
  font-size: 10px;
  margin-top: 4px;
}

#dateSelector .wz-cal-badge--edit {
  color: #f97316;
}

#dateSelector .wz-cal-badge--lock {
  color: #ef4444;
}

#dateSelector .wz-cal-badge--today {
  color: #2196f3;
}

.wz-cal-holiday-footnote {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #57534e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

#dateSelector .date-option.wz-cal-cell.wz-cal-holiday:not(.selected):not(.editing) {
  background: #fff7ed;
  border-color: #fdba74;
}

#dateSelector .date-option.wz-cal-cell.wz-cal-holiday.disabled {
  opacity: 0.75;
}

#dateSelector .date-option.wz-cal-cell.wz-cal-holiday.selected:not(.editing) {
  border-color: #4caf50;
  box-shadow: inset 0 -4px 0 #fb923c;
}

#dateSelector .wz-cal-holname {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: #c2410c;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dateSelector .date-option.wz-cal-cell.selected:not(.editing) .wz-cal-holname {
  color: #9a3412;
}

/* 選中日期：格仔大小不變，僅高亮（詳情在浮動放大鏡） */
#dateSelector .date-option.wz-cal-cell.wz-cal-cell--focused {
  z-index: 1;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
}

#dateSelector .wz-cal-head {
  display: block;
}

/* 浮動放大鏡（不撐開月曆格線） */
.wz-cal-zoom {
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.wz-cal-zoom::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.wz-cal-zoom__lens {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  transform: scale(0.72);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.18s ease;
  transform-origin: center center;
}

.wz-cal-zoom--open .wz-cal-zoom__lens {
  transform: scale(1);
  opacity: 1;
}

.wz-cal-zoom__card {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 2px solid #0ea5e9;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.28), 0 4px 12px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

.wz-cal-zoom__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.wz-cal-zoom__title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  text-align: center;
  padding-right: 24px;
}

.wz-cal-zoom__mini {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #bae6fd;
}

.wz-cal-zoom__dow {
  font-size: 14px;
  color: #64748b;
  font-weight: 700;
}

.wz-cal-zoom__num {
  font-size: 36px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
  color: #0284c7;
}

.wz-cal-zoom .wz-cal-detail {
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}

.wz-cal-zoom .wz-cal-detail__hol {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #ffedd5;
  color: #9a3412;
  font-weight: 700;
  text-align: center;
}

.wz-cal-zoom .wz-cal-detail__row {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.wz-cal-zoom .wz-cal-detail__lbl {
  flex: 0 0 3em;
  color: #64748b;
  font-weight: 600;
}

.wz-cal-zoom .wz-cal-detail__hint--cancel {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  text-align: center;
}

.wz-cal-zoom__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.wz-cal-zoom__confirm {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #0ea5e9;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.wz-cal-zoom__confirm:active {
  background: #0284c7;
}

.wz-cal-zoom__cancel {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.wz-cal-zoom__cancel:active {
  background: #fee2e2;
}

.wz-schedule-hol {
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 6px;
  border: 1px solid #fdba74;
}

#timeSlotSelector .wizard-time-slot {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

#timeSlotSelector .wizard-time-slot:hover {
  background: #f0f0f0;
}

#timeSlotSelector .time-slot-option.selected {
  border-color: #4caf50;
  background: #e8f5e8;
}

#timeSlotSelector .wizard-time-slot-label {
  font-weight: 600;
  color: #333;
  font-size: 12px;
}

.wz-schedule-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.wz-schedule-row.wz-schedule-row--editing {
  border-color: #f97316;
}

.wz-schedule-main {
  flex: 1;
  min-width: 0;
}

.wz-schedule-title {
  font-weight: 600;
  color: #333;
}

.wz-schedule-sub {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.wz-schedule-loc-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wz-schedule-loc-label {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.wz-schedule-override-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
  align-items: end;
}

.wz-schedule-override-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wz-schedule-override-field .wiz-slot-ov-fee,
.wz-schedule-override-field .wiz-slot-ov-dur,
.wz-schedule-override-field .wiz-slot-ov-course,
.wz-schedule-override-field .wiz-slot-ov-coach {
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  width: 100%;
  box-sizing: border-box;
}

.wz-schedule-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.wz-btn-sched-edit {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font: inherit;
}

.wz-btn-sched-edit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.wz-btn-sched-remove {
  background: #f44336;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font: inherit;
}

.wz-btn-sched-remove:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.wz-booking-student-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.booking-student-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.booking-student-row select {
  flex: 1;
  min-width: 180px;
}

.pane-accent-text {
  color: #0284c7 !important;
  font-weight: 700;
}

.booking-callout {
  display: none;
  background: #f1f5f9;
  padding: 16px;
  border-radius: 12px;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
}

.booking-callout h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #0f172a;
}

.booking-callout > p {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #64748b;
}

/* ─── 點名／課程表：淺色控制面板（見 main.css .sw-light-toolbar） ─── */
.attendance-control-panel,
.sw-panel {
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 20px;
}

/* 統一篩選格線 - 單列顯示（與學生頁一致） */
.attend-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 16px;
  margin-bottom: 18px;
}

.attend-filter-field {
  display: flex;
  flex-direction: column;
}

.attend-filter-label {
  display: block;
  color: var(--sw-text-on-panel);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.attend-filter-input,
.attend-filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sw-border-strong);
  border-radius: 10px;
  background: var(--sw-surface);
  color: var(--sw-text);
  font-size: 14px;
  font-family: inherit;
  box-shadow: var(--sw-shadow-sm);
}

.attend-filter-input:focus,
.attend-filter-select:focus {
  outline: 2px solid var(--sw-primary);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .attend-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .attend-filters-grid {
    grid-template-columns: 1fr;
  }
}

/* 統一批次操作按鈕列 */
.attend-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-att-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-att-tool:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  filter: brightness(1.08);
}

.btn-att-tool__icon {
  font-size: 15px;
  line-height: 1;
}

.btn-att-tool__label {
  font-size: 13px;
}

.btn-att-tool--success { background: linear-gradient(135deg, #16a34a, #22c55e); }
.btn-att-tool--warn { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.btn-att-tool--danger { background: linear-gradient(135deg, #dc2626, #ef4444); }
.btn-att-tool--export { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.btn-att-tool--analytics { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }

/* ─── 課程表管理篩選列 ─── */
.sched-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 16px;
  margin-bottom: 16px;
}

.sched-filter-field {
  display: flex;
  flex-direction: column;
}

.sched-filter-label {
  display: block;
  color: var(--sw-text-on-panel);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.sched-filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sw-border-strong);
  border-radius: 10px;
  background: var(--sw-surface);
  color: var(--sw-text);
  font-size: 14px;
  font-family: inherit;
  box-shadow: var(--sw-shadow-sm);
}

.sched-options-bar,
.sched-week-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sched-option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sw-text-on-panel);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}

.sched-week-nav {
  display: flex;
  gap: 8px;
}

.sched-week-nav .btn {
  padding: 8px 16px;
  font-size: 13px;
}

.pane-panel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.pane-panel-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.pane-panel-check input {
  width: 18px;
  height: 18px;
}

.pane-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-pane-tool {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-pane-tool:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.btn-pane-tool--success { background: #16a34a; }
.btn-pane-tool--warn { background: #ea580c; }
.btn-pane-tool--danger { background: #dc2626; }
.btn-pane-tool--info { background: #2563eb; }
.btn-pane-tool--purple { background: #7c3aed; }

.quick-attend-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.att-leave-panel {
  margin-top: 12px;
}

.att-modal-select,
.att-modal-textarea {
  width: 100%;
  margin-top: 5px;
}

.att-modal-textarea {
  min-height: 60px;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  resize: vertical;
  font-family: inherit;
}

.mc--wide {
  max-width: 800px;
}

.batch-student-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-top: 5px;
  background: #fff;
}

.batch-att-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.batch-att-actions > .btn {
  flex: 1;
}

/* 白色列表外殼 */
.data-list-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.data-list-panel .tbl-wrap {
  margin-top: 0;
  box-shadow: none;
  border-radius: 0;
}

.data-list-panel__head {
  background: #f1f5f9;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.data-list-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.data-list-panel__hint {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.attend-page__stats {
  margin-bottom: 20px;
}

/* 統一統計卡片 - 與學生／教練頁面風格一致 */
.attendance-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.attendance-stat-card {
  color: #fff;
  padding: 18px 16px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease;
}

.attendance-stat-card:hover {
  transform: translateY(-3px);
}

.attendance-stat-card__icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
  opacity: 0.95;
}

.attendance-stat-card__val {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 2px;
  line-height: 1;
}

.attendance-stat-card__label {
  font-size: 13px;
  opacity: 0.95;
  font-weight: 600;
  margin-bottom: 4px;
}

.attendance-stat-card__sub {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 500;
}

.attendance-stat-card--present {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.attendance-stat-card--leave {
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
}

.attendance-stat-card--absent {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.attendance-stat-card--pending {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

.attend-page__stats--compact-host {
  margin-bottom: 12px;
}

.attend-page__stats--compact-host .attendance-stats-cards {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.attend-page__stats--compact-host .attendance-stat-card {
  padding: 10px 12px;
}

.attend-page__stats--compact-host .attendance-stat-card__icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.attend-page__stats--compact-host .attendance-stat-card__val {
  font-size: 22px;
}

.attend-page__stats--compact-host .attendance-stat-card__label {
  font-size: 11px;
}

.attend-page__stats--compact-host .attendance-stat-card__sub {
  font-size: 10px;
}

.attend-stats-footnote {
  margin-top: 8px !important;
  text-align: center;
  font-size: 11px !important;
  color: #64748b !important;
  line-height: 1.4;
}

/* 點名表格 */
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.attendance-table thead {
  background: #f8fafc;
}

.attendance-table th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  color: #334155;
  font-size: 13px;
  border-bottom: 2px solid #e2e8f0;
}

.attendance-table th.th-center {
  text-align: center;
}

.attendance-table th.th-actions {
  text-align: center;
  min-width: 260px;
  font-size: 13px;
}

.attendance-table tbody tr.attendance-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.attendance-table tbody tr.attendance-row:hover {
  background: #f8fafc;
}

.att-cell {
  padding: 14px 12px;
  vertical-align: middle;
  color: #334155;
}

.att-cell--center {
  text-align: center;
  vertical-align: top;
  padding-top: 18px;
  padding-bottom: 18px;
}

.att-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.att-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.att-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}

.att-sen-tag {
  font-size: 11px;
  color: #ea580c;
  margin-top: 2px;
}

.att-metric-val {
  font-size: 14px;
  font-weight: 800;
}

.att-metric-val--green { color: #16a34a; }
.att-metric-val--orange { color: #ea580c; }
.att-metric-val--red { color: #dc2626; }
.att-metric-val--blue { color: #6366f1; }

.att-metric-hint {
  font-size: 11px;
  color: #475569;
}

.att-rate-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.att-rate-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  border-radius: 2px;
}

.att-quick-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

.att-status-pill {
  padding: 6px 14px;
  border-radius: 999px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.att-status-pill--block {
  width: 100%;
  box-sizing: border-box;
  max-width: 160px;
}

/* 快速操作列：統一使用單列 + 橫向捲動，避免換行遮蓋標籤 */
.att-actions-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.att-actions-row::-webkit-scrollbar {
  display: none;
}

.att-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 52px;
  flex-shrink: 0;
}

.att-action-label {
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  line-height: 1.1;
  text-align: center;
  max-width: 52px;
  white-space: nowrap;
}

.btn-att-act {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 6px 8px;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-att-act:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-att-act--ok { background: #16a34a; }
.btn-att-act--leave { background: #ea580c; }
.btn-att-act--absent { background: #dc2626; }
.btn-att-act--detail { background: #6366f1; }

.attendance-table .att-empty-row td {
  text-align: center;
  color: #94a3b8;
  padding: 40px 16px;
}

/* 依學生點名 */
.att-by-student-panel {
  margin-bottom: 20px;
}

.att-by-student-panel__head {
  margin-bottom: 12px;
}

.att-by-student-panel__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.att-by-student-panel__hint {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.att-by-student-panel__picker {
  margin-bottom: 14px;
  max-width: 420px;
}

select.att-by-student-select {
  width: 100%;
  max-width: 420px;
}

.att-by-student-table-wrap {
  margin-top: 4px;
}

.att-by-student-table .att-by-student-act-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.att-by-student-table .btn-att-by-day {
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: filter 0.15s ease;
}

.att-by-student-table .btn-att-by-day:hover {
  filter: brightness(1.06);
}

.att-by-student-table .btn-att-by-day--ok {
  background: #16a34a;
}

.att-by-student-table .btn-att-by-day--leave {
  background: #ea580c;
}

.att-by-student-table .btn-att-by-day--absent {
  background: #dc2626;
}

.att-by-student-table .btn-att-by-day--detail {
  background: #6366f1;
}

/* 學生課程管理：內嵌小節標題 */
.attend-embed-section {
  margin: 4px 0 8px;
}
.attend-embed-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.attend-embed-confirmations .sched-subsection__head {
  flex-direction: column;
  align-items: flex-start;
}
.attend-embed-confirmations .sched-subsection__head .pane-page__lead {
  max-width: 52rem;
}

/* 課程表子區 */
.sched-subsection {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
}

.sched-subsection__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.sched-subsection__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.sched-subsection__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn--sched-sub-export {
  background: #16a34a;
  color: #fff;
}
.btn--sched-sub-print {
  background: #2563eb;
  color: #fff;
}

.btn--sched-sub-gcal {
  background: #1e3a5f;
  color: #fff;
}

.btn--sched-toolbar,
.btn--compact-toolbar {
  width: auto !important;
  margin-top: 0 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600;
  border-radius: 8px;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sw-btn-refresh {
  padding: 8px 18px;
}

.sched-btn-refresh {
  padding: 6px 12px !important;
  font-size: 12px !important;
  flex-shrink: 0;
}

/* 課程表：篩選與週次同一區，減少直向堆疊 */
.sw-panel--schedule {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.sw-panel--schedule .sched-filters-grid {
  gap: 10px 12px;
  margin-bottom: 10px;
}

.sw-panel--schedule .sched-filter-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.sw-panel--schedule .sched-filter-select {
  padding: 7px 10px;
  font-size: 13px;
}

.sched-controls-merge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 0;
}

.sw-panel--schedule .sched-controls-merge .btn.sw-btn-on-panel {
  width: auto !important;
  margin-top: 0 !important;
}

.sched-controls-merge .sched-option-check {
  font-size: 13px;
  margin: 0;
}

.sched-week-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1 1 220px;
  min-width: min(100%, 280px);
}

.sched-week-inline__label {
  margin-bottom: 0 !important;
  white-space: nowrap;
}

.sched-week-inline .sched-week-select {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 420px;
}

.sched-week-nav__btn {
  padding: 6px 12px !important;
  font-size: 14px !important;
  font-weight: 700;
  min-width: 40px;
}

.sched-week-hint {
  display: none;
  flex: 1 1 100%;
  margin: 0;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.sched-week-hint--visible {
  display: block;
}

.sched-week-select {
  min-width: 120px;
}

.sched-stat-cards {
  margin-bottom: 20px;
}

.sched-stat-cards--compact.cards {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sched-stat-cards--compact .card {
  padding: 10px 12px;
}

.sched-stat-cards--compact .card h3 {
  font-size: 11px;
  margin: 0 0 4px 0;
}

.sched-stat-cards--compact .card .val {
  font-size: 20px;
}

/* 全站統計卡緊湊列（與課程表 sched-stat-cards--compact 相同邏輯） */
.sw-stats-cards--compact.cards {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sw-stats-cards--compact .card {
  padding: 10px 12px;
}

.sw-stats-cards--compact .card h3 {
  font-size: 11px;
  margin: 0 0 4px 0;
}

.sw-stats-cards--compact .card .val {
  font-size: 20px;
}

/* 漸層篩選面板緊湊：學生／教練／點名 */
.control-panel--compact.student-control-panel,
.control-panel--compact.coach-control-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.control-panel--compact .student-filters-grid,
.control-panel--compact .coach-filters-grid {
  gap: 10px 12px;
  margin-bottom: 0;
}

.control-panel--compact .student-filter-label,
.control-panel--compact .coach-filter-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.control-panel--compact .student-filter-select,
.control-panel--compact .coach-filter-select {
  padding: 7px 10px;
  font-size: 13px;
}

.panel-filters-actions-merge {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-panel--compact .student-actions-bar,
.control-panel--compact .coach-actions-bar {
  margin-top: 0;
  padding-top: 2px;
  gap: 8px;
}

.control-panel--compact .btn-student-tool,
.control-panel--compact .btn-coach-tool {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.control-panel--compact .student-toolbar-item {
  gap: 2px;
}

.attendance-control-panel.control-panel--compact {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.attendance-control-panel.control-panel--compact .attend-filters-grid {
  gap: 10px 12px;
  margin-bottom: 0;
}

.attendance-control-panel.control-panel--compact .attend-filter-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.attendance-control-panel.control-panel--compact .attend-filter-input,
.attendance-control-panel.control-panel--compact .attend-filter-select {
  padding: 7px 10px;
  font-size: 13px;
}

.attendance-control-panel.control-panel--compact .attend-actions-bar {
  gap: 8px;
  margin-top: 0;
  padding-top: 2px;
}

.attendance-control-panel.control-panel--compact .btn-att-tool {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.attendance-control-panel.control-panel--compact .btn-att-tool__icon {
  font-size: 14px;
}

.attendance-control-panel.control-panel--compact .btn-att-tool__label {
  font-size: 12px;
}

/* 頁首／工具列緊湊 */
.pane-page__head--compact {
  margin-bottom: 12px;
}

.pane-page__head--compact .pane-page__lead {
  font-size: 13px;
  max-width: 48rem;
}

.page-head-row--compact h2 {
  margin-bottom: 4px;
}

.finance-toolbar--compact {
  margin-top: 8px;
  gap: 10px;
}

.finance-toolbar--compact .finance-billing-label,
.finance-toolbar--compact .finance-check-label,
.finance-toolbar--compact .finance-inline-label {
  font-size: 13px;
}

.finance-inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.fin-filter-select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  min-width: 7rem;
}

.fin-filter-select--coach {
  min-width: 9rem;
}

.fin-filter-search {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  min-width: 10rem;
  flex: 1;
  max-width: 18rem;
}

.fin-sub-toolbar {
  font-size: 13px;
}

.fin-sub-toolbar .finance-check-label,
.fin-sub-toolbar .finance-inline-label {
  margin: 0;
}

.finance-lead--billing.finance-lead--compact {
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.notices-page__head.notices-page__head--compact {
  margin-bottom: 12px;
  align-items: center;
}

.notices-toolbar--compact {
  gap: 8px;
}

.notices-toolbar--compact .notices-toolbar-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  margin-top: 0 !important;
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.booking-page__gcal-btn--compact {
  padding: 8px 14px !important;
  font-size: 12px !important;
  border-radius: 8px;
  margin-top: 0 !important;
}

.sched-footer-actions--compact {
  margin-top: 12px;
  gap: 8px;
}

.sched-footer-actions--compact .btn {
  flex: 0 1 auto;
  min-width: 0;
  width: auto !important;
  margin-top: 0 !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
}

.students-progress-section .sw-stats-cards--compact {
  margin-bottom: 10px;
}

.progress-toolbar--compact {
  gap: 8px;
  margin-bottom: 10px;
}

.progress-toolbar--compact .progress-toolbar__search,
.progress-toolbar--compact .progress-toolbar__level {
  padding: 8px 10px;
  font-size: 13px;
}

.progress-toolbar--compact .progress-toolbar__reset-sort,
.progress-toolbar--compact .progress-toolbar__export-csv {
  flex-shrink: 0;
  white-space: nowrap;
}

.dashboard-page__head--compact {
  margin-bottom: 12px;
}

.dashboard-page__head--compact .students-page__lead {
  font-size: 13px;
}

.btn-confirm-gcal {
  background: #4285f4 !important;
  color: #fff !important;
  font-weight: 600;
  border: none;
  align-self: end;
}

.sysmgmt-page__hero--compact {
  gap: 12px;
  margin-bottom: 16px !important;
  padding-bottom: 14px !important;
}

.sysmgmt-page__hero--compact .sysmgmt-page__title {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.sysmgmt-page__hero--compact .sysmgmt-page__lead {
  font-size: 0.85rem;
  max-width: 40rem;
}

.sysmgmt-page__hero--compact .sysmgmt-page__pill {
  padding: 6px 11px;
  font-size: 0.75rem;
}

#attend .attend-list__hint {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

.sched-footer-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sched-footer-actions .btn {
  flex: 1;
  min-width: 140px;
}

.btn-sched--teal { background: #0d9488 !important; color: #fff !important; }
.btn-sched--red { background: #dc2626 !important; color: #fff !important; }
.btn-sched--purple { background: #7c3aed !important; color: #fff !important; }
.btn-sched--orange { background: #ea580c !important; color: #fff !important; }

.schedule-container-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* 課程表：表頭與內容必須同一個 <table>，否則 Grid 與 table 欄寬無法對齊 */
.schedule-table-wrap {
  max-height: 600px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule-table-unified {
  table-layout: fixed;
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.schedule-table-unified col.schedule-col-time {
  width: 88px;
}

.schedule-table-unified col.schedule-col-day {
  width: auto;
}

.schedule-table-unified thead th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 6px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 #e2e8f0;
}

.schedule-table-unified thead th:first-child {
  text-align: left;
}

.schedule-table-unified .sched-th-date {
  display: block;
  margin-top: 3px;
  font-weight: 600;
  font-size: 11px;
  color: #64748b;
  line-height: 1.25;
}

.schedule-table-unified tbody tr {
  background: #f8f9fa;
}

.schedule-table-unified td {
  border: 1px solid #e9ecef;
  padding: 6px 4px;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.schedule-table-unified td.sched-time-cell {
  font-weight: 600;
  color: #495057;
  font-size: 13px;
  background: #f8f9fa;
  white-space: nowrap;
}

.schedule-table-unified td.sched-day-cell {
  min-width: 0;
}

.schedule-body-scroll {
  max-height: 600px;
  overflow-y: auto;
}

.schedule-body-scroll table {
  width: 100%;
  border-collapse: collapse;
}

/* ─── 財務 ─── */
.finance-page__stats {
  margin-bottom: 8px;
}

.finance-page .finance-lead--billing {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

.finance-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.finance-billing-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.fin-input-month {
  padding: 8px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
}

.finance-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.finance-page__stats--pl {
  margin-top: 12px;
}

.finance-card__pl-note {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* 學生月費：覆檢橫幅 */
.finance-billing-warnings {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #78350f;
  font-size: 13px;
  line-height: 1.45;
}
.finance-billing-warnings__lead {
  margin: 0 0 8px;
}
.finance-billing-warnings__list {
  margin: 0;
  padding-left: 1.2em;
}
.finance-billing-warnings__name {
  font-weight: 600;
  color: #92400e;
}
.finance-billing-warnings__msg {
  color: #451a03;
}
.finance-billing-warnings__more {
  color: #78716c;
  font-style: italic;
}

.finance-table-panel .student-table tbody tr.finance-row--billing-warn > td {
  background: #fff7ed !important;
  box-shadow: inset 3px 0 0 #fb923c;
}

.finance-table-panel {
  margin-top: 8px;
}

/* 會計（收入/支出）：標題獨占一行；下方三鍵單列等寬、不橫向捲動 */
.fin-acct-section .student-list-container__head--fin-acct {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.fin-acct-section .student-list-container__head--fin-acct .student-list-container__title {
  flex: none;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.fin-acct-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  overflow: visible;
  flex: none;
  max-width: none;
  min-width: 0;
}

.fin-acct-toolbar .fin-acct-act-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.fin-acct-toolbar .fin-acct-act-btn:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* 學生月費表：橫向捲動、凍結首欄（姓名） */
.finance-table-panel.tbl-wrap {
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.finance-table-panel.tbl-wrap .student-table.finance-fees-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1040px;
}

.finance-fees-table col.fin-col-select {
  width: 40px;
}

.finance-fees-table col.fin-col-name {
  width: 96px;
}

.finance-fees-table col.fin-col-count {
  width: 52px;
}

.finance-fees-table col.fin-col-money {
  width: 76px;
}

.finance-fees-table col.fin-col-credit {
  width: auto;
  min-width: 160px;
}

.finance-fees-table col.fin-col-tag {
  width: 48px;
}

.finance-fees-table col.fin-col-status {
  width: 72px;
}

.finance-fees-table col.fin-col-actions {
  width: 108px;
}

.finance-fees-table .fin-col-select,
.finance-fees-table td.fin-col-select {
  width: 40px;
  max-width: 40px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  vertical-align: middle;
}

.finance-fees-table .fin-col-select input[type="checkbox"],
.finance-fees-table td.fin-col-select .fin-student-pay-cb {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
}

.finance-fees-table .fin-col-name,
.finance-fees-table td.fin-col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-fees-table .fin-col-credit,
.finance-fees-table td.fin-col-credit {
  white-space: normal;
  line-height: 1.35;
  font-size: 12px;
}

.finance-fees-table .fin-col-money,
.finance-fees-table td.fin-col-money,
.finance-fees-table .fin-col-count,
.finance-fees-table td.fin-col-count {
  white-space: nowrap;
}

.finance-fees-table .fin-col-actions,
.finance-fees-table td.fin-col-actions {
  white-space: nowrap;
}

/* 學生月費表：壓縮行距，盡量一位學生一行完成 */
.finance-table-panel.tbl-wrap .finance-fees-table th,
.finance-table-panel.tbl-wrap .finance-fees-table td {
  padding-top: 6px;
  padding-bottom: 6px;
  line-height: 1.2;
  vertical-align: middle;
}

.finance-table-panel.tbl-wrap .finance-fees-table tbody tr.student-row {
  height: 38px;
}

.finance-table-panel.tbl-wrap .finance-fees-table .fin-col-credit,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 11px;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit br {
  display: none;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit small {
  display: inline !important;
  max-width: none !important;
  margin-left: 4px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table .fin-col-status,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-status,
.finance-table-panel.tbl-wrap .finance-fees-table .fin-col-tag,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-tag {
  white-space: nowrap;
  line-height: 1.2;
  font-size: 11px !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions {
  padding-left: 4px;
  padding-right: 4px;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions > div {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  justify-content: center !important;
  align-items: center !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions .bs {
  min-width: 34px;
  padding: 3px 7px !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  border-radius: 6px;
}

/* 學生月費表：再壓縮行高，桌面盡量一位學生一行完成 */
.finance-table-panel.tbl-wrap .finance-fees-table > thead > tr > th,
.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > td {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  padding-left: 7px !important;
  padding-right: 7px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr.student-row {
  height: 30px !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-name,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-status,
.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-tag {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit {
  font-size: 10.5px !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions .bs {
  min-width: 30px;
  min-height: 24px;
  padding: 2px 6px !important;
  font-size: 10px !important;
  line-height: 1.05 !important;
}

.finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions > div {
  gap: 3px !important;
}

/* 橫向捲動時凍結：勾選欄 + 姓名 */
.finance-table-panel.tbl-wrap .finance-fees-table > thead > tr > .fin-col-select,
.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > .fin-col-select {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.06);
}

.finance-table-panel.tbl-wrap .finance-fees-table > thead > tr > .fin-col-name,
.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > .fin-col-name {
  position: sticky;
  left: 40px;
  z-index: 2;
  box-shadow: 4px 0 8px rgba(15, 23, 42, 0.08);
}

.finance-table-panel.tbl-wrap .finance-fees-table > thead > tr > .fin-col-select,
.finance-table-panel.tbl-wrap .finance-fees-table > thead > tr > .fin-col-name {
  z-index: 3;
  background: #f8fafc;
}

.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > .fin-col-select,
.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > .fin-col-name {
  background: #fff;
}

.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr.student-row:hover > .fin-col-select,
.finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr.student-row:hover > .fin-col-name {
  background: #f8fafc;
}

/* 預約確認：單列篩選（搜尋 + 狀態 + 日曆同排，避免第三格換行） */
.confirmations-filter-panel.control-panel--compact {
  max-width: none;
}

.confirmations-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

.confirmations-filter-row__search {
  flex: 1 1 min(360px, 100%);
  min-width: min(200px, 100%);
}

.confirmations-filter-row__status {
  flex: 0 1 200px;
  min-width: 140px;
}

.confirmations-filter-row__month {
  flex: 0 1 168px;
  min-width: 150px;
}

.confirmations-filter-row__month .confirmations-month-input {
  width: 100%;
  max-width: 100%;
}

.confirmations-filter-row__monthchk {
  flex: 0 0 auto;
  align-self: flex-end;
  padding-bottom: 2px;
}

.confirmations-month-only-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.confirmations-filter-row__coach {
  flex: 0 1 180px;
  min-width: 120px;
}

.confirmations-filter-row__course,
.confirmations-filter-row__location {
  flex: 0 1 200px;
  min-width: 140px;
}

.confirmations-filter-row__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
}

.confirmations-filter-row__actions .btn {
  margin-top: 0 !important;
  white-space: nowrap;
}

.confirmations-filter-row .student-filter-field {
  margin-bottom: 0;
}

/* ─── 預約確認 ─── */
.confirmations-page__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 520px) {
  .confirmations-page__stats {
    grid-template-columns: 1fr;
  }
}

.confirmations-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.confirmations-toolbar input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #f8fafc;
}

.confirmations-toolbar input:focus {
  outline: none;
  border-color: #0284c7;
  background: #fff;
}

.confirmations-toolbar select {
  min-width: 160px;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  background: #f8fafc;
  color: #0f172a;
}

.confirmations-toolbar select:focus {
  outline: none;
  border-color: #0284c7;
}

/* 預約確認表：橫向捲動、凍結首欄（姓名）、操作欄緊湊；圖示列與學生列表一致 */
.confirmations-table-wrap.tbl-wrap {
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.confirmations-table-wrap.tbl-wrap .student-table {
  min-width: 980px;
}

.confirmations-table-wrap.tbl-wrap .student-table > thead > tr > th:first-child,
.confirmations-table-wrap.tbl-wrap .student-table > tbody > tr > td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: none;
  border-right: none;
}

.confirmations-table-wrap.tbl-wrap .student-table > thead > tr > th:first-child {
  z-index: 3;
  background: #f8fafc;
}

.confirmations-table-wrap.tbl-wrap .student-table > tbody > tr > td:first-child {
  background: #fff;
}

.confirmations-table-wrap.tbl-wrap .student-table > tbody > tr.student-row:hover > td:first-child {
  background: #f8fafc;
}

.confirmations-table-wrap .student-table thead th.th-confirm-actions {
  width: 204px;
  min-width: 0;
  max-width: 220px;
  padding-left: 6px;
  padding-right: 6px;
}

.confirmations-table-wrap .student-table tbody td.student-td--confirm-actions {
  min-width: 0;
  width: 204px;
  max-width: 220px;
  padding: 8px 4px;
  vertical-align: middle;
}

.confirmations-table-wrap .confirm-actions-row--compact.student-actions-row {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding-bottom: 0;
  overflow: visible;
}

.confirmations-table-wrap .confirm-actions-row--compact .student-action-item {
  min-width: 44px;
  flex: 0 0 auto;
}

.confirmations-table-wrap .confirm-actions-row--compact .student-action-item--booking-confirm {
  min-width: 52px;
  max-width: 58px;
}

.confirmations-table-wrap .student-action-label--booking-confirm {
  max-width: none;
  white-space: normal;
  word-break: keep-all;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

.confirmations-table-wrap .confirm-actions-row--compact .btn-student-act {
  min-width: 40px;
  width: 40px;
  height: 36px;
  padding: 4px 6px;
  font-size: 15px;
  line-height: 1;
  box-sizing: border-box;
}

.confirmations-table-wrap .confirm-actions-row--compact .student-action-label {
  font-size: 10px;
  max-width: 46px;
  line-height: 1.05;
}

.confirmations-table-wrap .btn-student-act--booking-confirm {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.confirmations-page--integrated {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.confirmations-page--integrated > .students-page__head,
.confirmations-page--integrated > .cards,
.confirmations-page--integrated > .student-control-panel,
.confirmations-page--integrated > .student-list-container {
  margin-bottom: 0;
}

.confirmations-merged-block {
  margin-top: 6px;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.confirmations-workspace {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.confirmations-workspace__head {
  padding: 16px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.confirmations-workspace__title {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.confirmations-workspace__lead {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.confirmations-workspace .attend-page__stats,
.confirmations-workspace .attendance-control-panel,
.confirmations-workspace .attendance-list-container {
  margin: 0;
}

.confirmations-workspace .attend-page__stats {
  padding: 16px 16px 0;
}

.confirmations-workspace .attendance-control-panel {
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.confirmations-workspace--list .attendance-list-container {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.confirmations-workspace--list .data-list-panel__head {
  display: none;
}

.confirmations-page--integrated .confirmations-page__stats {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .confirmations-filter-row__search,
  .confirmations-filter-row__status,
  .confirmations-filter-row__month,
  .confirmations-filter-row__coach,
  .confirmations-filter-row__course,
  .confirmations-filter-row__location {
    flex: 1 1 100%;
    min-width: 0;
  }

  .confirmations-filter-row__monthchk {
    flex: 1 1 100%;
  }

  .confirmations-filter-row__actions {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

/* 系統管理：課程模版篩選（三欄 → 單欄） */
.course-mgmt-filters {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .course-mgmt-filters {
    grid-template-columns: 1fr;
  }
}

/* 漸層面板上的次要按鈕（主樣式未載入時後備） */
.sw-btn-on-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0c4a6e !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.sw-btn-on-panel:hover {
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

/* 課程表管理面板：比點名區更精簡，避免佔位過高 */
.sw-panel {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sw-panel .attend-filters-grid {
  gap: 10px 12px;
  margin-bottom: 10px;
}

.sw-panel .student-filter-label,
.sw-panel .attend-filter-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.sw-panel .attend-filter-input,
.sw-panel .attend-filter-select {
  padding: 8px 10px;
}

.sw-panel .attend-actions-bar {
  gap: 8px;
}

.sw-panel + .sched-subsection {
  margin-top: 22px;
  padding-top: 20px;
}

/* 預約確認：緊湊統計卡 */
.confirmations-stats-compact {
  gap: 12px;
}
.confirmations-stats-compact .card {
  padding: 12px 16px;
}
.confirmations-stats-compact .card h3 {
  font-size: 12px;
  margin-bottom: 4px;
}
.confirmations-stats-compact .card .val {
  font-size: 22px;
}

.confirmations-stats-strip.confirmations-page__stats {
  gap: 8px;
  margin-bottom: 10px;
  margin-top: 0;
}

.confirmations-stats-strip .card {
  padding: 8px 10px;
}

.confirmations-stats-strip .card h3 {
  font-size: 11px;
  margin-bottom: 2px;
}

.confirmations-stats-strip .card .val {
  font-size: 18px;
}

/* 點名篩選：2行固定網格 */
.attend-filters-grid--2row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}
@media (max-width: 720px) {
  .attend-filters-grid--2row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .attend-filters-grid--2row {
    grid-template-columns: 1fr;
  }
}

/* 預約確認與點名：子分頁切換 */
.confirmations-tabs {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 20px;
  width: fit-content;
}
.confirmations-tab {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.confirmations-tab:hover {
  color: #0f172a;
}
.confirmations-tab.active {
  background: #fff;
  color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.confirmations-view {
  display: none;
  animation: fadeIn 0.3s ease;
}
.confirmations-view.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 財務統計內所有列表：回到「學生列表」基準尺寸與對齊 */
#fin .student-table {
  font-size: 14px;
}

#fin .student-table th {
  padding: 14px 12px !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
}

#fin .student-table tbody tr.student-row,
#fin .finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr.student-row {
  height: auto !important;
  min-height: 0 !important;
}

#fin .student-table td,
#fin .finance-table-panel.tbl-wrap .finance-fees-table > tbody > tr > td {
  padding: 14px 12px !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
  font-size: 13px !important;
}

#fin .student-table td.fin-col-credit,
#fin .finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-credit {
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fin .student-table td.fin-col-actions,
#fin .finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions {
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center;
}

#fin .student-table td.fin-col-actions > div,
#fin .finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions > div,
#fin .student-table td.student-td--center > div {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  justify-content: center !important;
  align-items: center !important;
}

#fin .student-table .bs,
#fin .finance-table-panel.tbl-wrap .finance-fees-table td.fin-col-actions .bs {
  min-width: 34px !important;
  min-height: 0 !important;
  padding: 6px 10px !important;
  margin: 0 2px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
}

/* 全站資訊方格：統一尺寸、淺色品牌卡、手機友善 */
.cards,
.dashboard-page__stats,
.attendance-stats-cards,
.student-stats-cards,
.coach-stats-cards,
.sched-stat-cards,
.confirmations-stats-compact,
.confirmations-stats-strip,
.finance-page__stats,
.students-progress__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.cards .card,
.attendance-stat-card,
.student-stat-card,
.coach-stat-card,
.schedule-container .stat-card,
.stat-card {
  position: relative;
  min-height: 104px;
  padding: 16px 18px 14px !important;
  border-radius: 16px !important;
  border: 1px solid var(--sw-border) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: var(--sw-text) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(2, 132, 199, 0.08) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cards .card::before,
.attendance-stat-card::before,
.student-stat-card::before,
.coach-stat-card::before,
.schedule-container .stat-card::before,
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sw-primary);
}

.cards .card::after,
.attendance-stat-card::after,
.student-stat-card::after,
.coach-stat-card::after,
.schedule-container .stat-card::after,
.stat-card::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -36px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  pointer-events: none;
}

.cards .card:hover,
.attendance-stat-card:hover,
.student-stat-card:hover,
.coach-stat-card:hover,
.schedule-container .stat-card:hover,
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #bae6fd !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 14px 32px rgba(2, 132, 199, 0.12) !important;
}

.cards .card h3,
.attendance-stat-card__label,
.student-stat-card__label,
.coach-stat-card__label,
.schedule-container .stat-card h3,
.stat-card h3 {
  order: 1;
  margin: 0 0 6px !important;
  color: var(--sw-text-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  opacity: 1 !important;
}

.cards .card .val,
.attendance-stat-card__val,
.student-stat-card__val,
.coach-stat-card__val,
.schedule-container .stat-card .val,
.stat-card .val {
  order: 2;
  color: var(--sw-primary-deep) !important;
  font-size: clamp(24px, 3vw, 32px) !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em;
  margin: 0 0 4px !important;
}

.attendance-stat-card__icon,
.student-stat-card__icon,
.coach-stat-card__icon {
  position: absolute;
  top: 12px;
  right: 14px;
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  opacity: 0.42 !important;
}

.attendance-stat-card__sub,
.student-stat-card__sub,
.coach-stat-card__sub {
  order: 3;
  color: var(--sw-text-subtle) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  opacity: 1 !important;
  margin-top: 2px !important;
}

.card.sw-tone-success::before,
.attendance-stat-card--present::before,
.student-stat-card--total::before,
.coach-stat-card--coaches::before { background: #10b981; }

.card.sw-tone-warm::before,
.attendance-stat-card--leave::before,
.student-stat-card--revenue::before,
.coach-stat-card--salary::before { background: #f59e0b; }

.card.sw-tone-danger::before,
.attendance-stat-card--absent::before { background: #ef4444; }

.card.sw-tone-neutral::before,
.attendance-stat-card--pending::before { background: #64748b; }

.card.sw-tone-sen::before,
.student-stat-card--sen::before,
.coach-stat-card--rating::before { background: #14b8a6; }

.card.sw-tone-2::before,
.card.sw-tone-3::before,
.student-stat-card--classes::before,
.coach-stat-card--classes::before { background: #06b6d4; }

.card.sw-tone-warm::after,
.attendance-stat-card--leave::after,
.student-stat-card--revenue::after,
.coach-stat-card--salary::after { background: rgba(245, 158, 11, 0.1); }

.card.sw-tone-danger::after,
.attendance-stat-card--absent::after { background: rgba(239, 68, 68, 0.08); }

.card.sw-tone-success::after,
.attendance-stat-card--present::after,
.student-stat-card--total::after,
.coach-stat-card--coaches::after { background: rgba(16, 185, 129, 0.1); }

.card.sw-tone-sen::after,
.student-stat-card--sen::after,
.coach-stat-card--rating::after { background: rgba(20, 184, 166, 0.1); }

.sched-stat-cards--compact.cards,
.sw-stats-cards--compact.cards,
.confirmations-stats-strip.confirmations-page__stats,
.attend-page__stats--compact-host .attendance-stats-cards,
.students-page__stats--compact-host .student-stats-cards,
.coaches-page__stats--compact-host .coach-stats-cards {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.sched-stat-cards--compact .card,
.sw-stats-cards--compact .card,
.confirmations-stats-strip .card,
.attend-page__stats--compact-host .attendance-stat-card,
.students-page__stats--compact-host .student-stat-card,
.coaches-page__stats--compact-host .coach-stat-card {
  min-height: 88px;
  padding: 13px 15px 12px !important;
}

/* Monica 進度匯入 */
.progress-monica-section {
  border: 1px solid var(--sw-border, #e2e8f0);
  border-radius: 10px;
  padding: 0 12px 12px;
  background: var(--sw-panel-soft, #f8fafc);
}

.progress-monica-section__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--sw-text, #0f172a);
  padding: 12px 0 8px;
  list-style: none;
}

.progress-monica-section__summary::-webkit-details-marker {
  display: none;
}

.progress-monica-section__hint {
  font-size: 12px;
  color: var(--sw-text-muted, #64748b);
  margin: 0 0 4px;
  line-height: 1.45;
}

.progress-monica-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--sw-border, #e2e8f0);
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.progress-monica-preview-ok {
  color: #059669;
  margin: 0 0 8px;
  font-weight: 600;
}

.progress-monica-preview-warn {
  color: #d97706;
  margin: 0 0 8px;
  font-weight: 600;
}

.progress-monica-preview-raw {
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #475569;
}

.progress-monica-setup-intro,
.progress-monica-setup-hint {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 10px;
}

.progress-monica-setup-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-monica-setup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 10px;
}

.progress-monica-setup-row--stack {
  flex-direction: column;
  align-items: stretch;
}

.progress-monica-setup-k {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  min-width: 88px;
}

.progress-monica-setup-v {
  flex: 1;
  font-size: 12px;
  word-break: break-all;
  background: #f1f5f9;
  padding: 6px 8px;
  border-radius: 6px;
}

.progress-monica-setup-v--wrap {
  display: block;
}

.progress-monica-setup-pre {
  margin: 0;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.progress-monica-setup-ol {
  margin: 6px 0 0;
  padding-left: 1.25rem;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.btn-pane-tool--sm {
  font-size: 12px;
  padding: 4px 10px;
}

/* 進度：選學員紀錄（不限今日有課） */
.progress-session-pick-intro {
  font-size: 13px;
  color: #475569;
  margin: 0 0 12px;
  line-height: 1.45;
}

.progress-session-pick-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.progress-session-pick-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.progress-session-pick-item:last-child {
  border-bottom: none;
}

.progress-session-pick-item:hover {
  background: #f0f9ff;
}

.progress-session-pick-item__name {
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}

.progress-session-pick-item__meta {
  font-size: 12px;
  color: #64748b;
}

.progress-session-pick-empty,
.progress-session-pick-more {
  margin: 0;
  padding: 14px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

.progress-empty-actions {
  margin-top: 12px;
}

.progress-empty-actions__hint {
  font-size: 13px;
  color: #475569;
  margin: 0 0 10px;
}

.progress-empty-actions__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.progress-card-list__empty-wrap {
  padding: 8px 4px 16px;
}
