/* =========================================================================
 * 📋 日報／加班申請共用表單樣式 (report-form-shared.css)
 * 來源：DailyReport 與 OvertimeApply 兩份 style.css 中「本體逐字相同」的規則，統一收斂於此。
 * 命名：.hub-rpt-* (中性前綴)；一律掛在 .hub-rpt-root (模組最外層容器) 之下，不污染全域。
 * 載入：public/index.html 於 hub.css 之後載入，早於各模組 style.css (模組特有規則仍可覆寫)。
 * 規範：docs/系統架構與微前端規範.md、.agents/rules/dead-code-and-duplication.md (共用元件表)
 * ========================================================================= */

.hub-rpt-root .hub-rpt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.hub-rpt-root .hub-rpt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hub-rpt-root .hub-rpt-btn-shift-day {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.hub-rpt-root .hub-rpt-btn-shift-day:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.hub-rpt-root .hub-rpt-btn-shift-day svg {
  width: 18px;
  height: 18px;
}

.hub-rpt-root .hub-rpt-date-picker-wrap:hover {
  border-color: #38a5f6;
  background: rgba(224, 239, 255, 0.8);
}

.hub-rpt-root .hub-rpt-date-icon {
  color: #0284c7;
  margin-right: 8px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.hub-rpt-root .hub-rpt-date-display-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0b3a6b;
  white-space: nowrap !important;
  letter-spacing: -0.01em;
}

.hub-rpt-root .hub-rpt-native-date-input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.hub-rpt-root .hub-rpt-native-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.hub-rpt-root .hub-rpt-btn-toggle-progress svg {
  color: #0284c7;
  transition: transform 0.2s ease;
  width: 16px;
  height: 16px;
}

.hub-rpt-root .hub-rpt-btn-toggle-progress:hover svg {
  transform: scale(1.1);
}

.hub-rpt-root .hub-rpt-quick-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.hub-rpt-root .hub-rpt-quick-date-btn--yesterday {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.hub-rpt-root .hub-rpt-quick-date-btn--yesterday:hover {
  background: #f1f5f9;
}

.hub-rpt-root .hub-rpt-quick-dot-slate {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.hub-rpt-root .hub-rpt-summary-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0284c7;
}

.hub-rpt-root .hub-rpt-conflict-badge {
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}

.hub-rpt-root .hub-rpt-summary-top {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  align-items: center;
}

.hub-rpt-root .hub-rpt-ring {
  position: relative;
  width: 150px;
  height: 150px;
}

.hub-rpt-root .hub-rpt-ring svg {
  display: block;
  transform: rotate(-90deg);
}

.hub-rpt-root .hub-rpt-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hub-rpt-root .hub-rpt-ring-center b {
  font-size: 30px;
  line-height: 1.1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.hub-rpt-root .hub-rpt-ring-center span {
  font-size: 12px;
  color: #64748b;
}

.hub-rpt-root .hub-rpt-summary-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hub-rpt-root .hub-rpt-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.hub-rpt-root .hub-rpt-summary-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13px;
}

.hub-rpt-root .hub-rpt-summary-tip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.hub-rpt-root .hub-rpt-summary-tip strong {
  font-variant-numeric: tabular-nums;
}

.hub-rpt-root .hub-rpt-summary-tip--bad {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.hub-rpt-root .hub-rpt-today-list {
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.hub-rpt-root .hub-rpt-today-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 2px;
  font-size: 12px;
  color: #64748b;
}

.hub-rpt-root .hub-rpt-today-record-row {
  display: grid;
  grid-template-columns: 4px 104px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.hub-rpt-root .hub-rpt-today-record-row:last-child {
  border-bottom: 0;
}

.hub-rpt-root .hub-rpt-today-record-row:hover {
  background: #f8fafc;
}

.hub-rpt-root .hub-rpt-today-record-row--rejected .hub-rpt-today-time {
  color: #991b1b;
}

.hub-rpt-root .hub-rpt-today-bar {
  align-self: stretch;
  border-radius: 3px;
  background: #0284c7;
}

.hub-rpt-root .hub-rpt-today-record-row[data-kind="ot"] .hub-rpt-today-bar {
  background: #6366f1;
}

.hub-rpt-root .hub-rpt-today-record-row--rejected .hub-rpt-today-bar {
  background: #dc2626;
}

.hub-rpt-root .hub-rpt-today-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: #0f172a;
}

.hub-rpt-root .hub-rpt-today-time small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}

.hub-rpt-root .hub-rpt-today-what b {
  display: block;
  color: #0f172a;
}

.hub-rpt-root .hub-rpt-today-what small {
  display: block;
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-rpt-root .hub-rpt-today-hours {
  min-width: 44px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.hub-rpt-root .hub-rpt-today-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.hub-rpt-root .hub-rpt-today-status-badge {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.hub-rpt-root .hub-rpt-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.hub-rpt-root .hub-rpt-slot-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-rpt-root .hub-rpt-slot-hours-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0284c7;
  background: #f0f7ff;
  border: 1px solid rgba(186, 224, 255, 0.8);
  padding: 2px 10px;
  border-radius: 6px;
  margin-left: 6px;
}

.hub-rpt-root .hub-rpt-time-range-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.hub-rpt-root .hub-rpt-time-picker-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hub-rpt-root .hub-rpt-field-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.hub-rpt-root .hub-rpt-time-box {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 2px 6px;
  transition: all 0.15s ease;
}

.hub-rpt-root .hub-rpt-time-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  padding: 6px 6px;
  min-width: 46px;
  cursor: pointer;
  outline: none;
  text-align: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.hub-rpt-root .hub-rpt-time-select:hover {
  background: #f1f5f9;
}

.hub-rpt-root .hub-rpt-time-colon {
  font-weight: 700;
  color: #475569;
  margin: 0 2px;
  font-size: 16px;
}

.hub-rpt-root .hub-rpt-time-separator {
  font-size: 18px;
  font-weight: 700;
  color: #94a3b8;
  margin: 0 4px;
  user-select: none;
}

.hub-rpt-root .hub-rpt-rest-toggles-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.hub-rpt-root .hub-rpt-rest-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hub-rpt-root .hub-rpt-rest-btn {
  height: 36px;
  min-width: 50px;
  padding: 5px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.hub-rpt-root .hub-rpt-rest-btn.active {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
  font-weight: 700;
}

.hub-rpt-root .hub-rpt-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-rpt-root .hub-rpt-job-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hub-rpt-root .hub-rpt-meal-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hub-rpt-root .hub-rpt-toolbar-left {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 0 !important;
  }

  .hub-rpt-root .hub-rpt-btn-shift-day {
    display: none !important;
  }

  .hub-rpt-root .hub-rpt-date-picker-wrap {
    min-width: 0 !important;
    width: 100% !important;
    padding: 8px 10px !important;
  }

  .hub-rpt-root .hub-rpt-date-display-text {
    font-size: 13.5px !important;
  }

  .hub-rpt-root .hub-rpt-date-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 6px !important;
  }

  .hub-rpt-root .hub-rpt-btn-toggle-progress {
    padding: 8px 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    gap: 5px !important;
  }

  .hub-rpt-root .hub-rpt-summary-side {
    width: 100%;
  }

  .hub-rpt-root .hub-rpt-today-record-row {
    grid-template-columns: 4px minmax(0, 1fr) auto;
    row-gap: 2px;
  }

  .hub-rpt-root .hub-rpt-today-record-row .hub-rpt-today-time {
    grid-column: 2;
  }

  .hub-rpt-root .hub-rpt-today-record-row .hub-rpt-today-what {
    grid-column: 2;
    grid-row: 2;
  }

  .hub-rpt-root .hub-rpt-today-record-row .hub-rpt-today-hours {
    grid-column: 3;
    grid-row: 1;
  }

  .hub-rpt-root .hub-rpt-today-record-row .hub-rpt-today-state {
    grid-column: 3;
    grid-row: 2;
  }
}

/* =========================================================================
 * 🪟 核對彈窗摘要卡 (日報「核對日報填寫內容」／加班申請「核對加班申報內容」共用)
 * 彈窗特異度策略統一：外層 .hub-rpt-modal-mask + 內層 .hub-rpt-* (0,2,0)，原有 !important 逐字保留 (行內 style 仍須被壓過)
 * ========================================================================= */
.hub-rpt-modal-mask .hub-rpt-modal-item-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-item-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-item-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-seq-title {
  font-family: "Noto Serif TC", serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  color: #1e293b !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-time-range {
  font-family: "JetBrains Mono", monospace !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  background: #f1f5f9 !important;
  padding: 2px 10px !important;
  border-radius: 8px !important;
  color: #334155 !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-item-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-rest-chip {
  font-size: 11px !important;
  font-weight: 600 !important;
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-item-hours {
  font-family: "JetBrains Mono", monospace !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  background: #f0f7ff !important;
  color: #0284c7 !important;
  border: 1px solid rgba(186, 224, 255, 0.8) !important;
  padding: 2px 10px !important;
  border-radius: 8px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-task-row {
  background: rgba(248, 250, 252, 0.9) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-task-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-task-icon-box {
  width: 24px !important;
  height: 24px !important;
  border-radius: 8px !important;
  background: #f0f7ff !important;
  color: #0284c7 !important;
  border: 1px solid #bae0ff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-task-name {
  font-family: "Noto Serif TC", serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #0284c7 !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-desc-box {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-desc-label {
  font-family: "Noto Serif TC", serif !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
}

.hub-rpt-modal-mask .hub-rpt-modal-desc-text {
  font-size: 13px !important;
  color: #1e293b !important;
  line-height: 1.5 !important;
  padding-left: 8px !important;
  margin: 0 !important;
}

.hub-rpt-modal-mask .hub-rpt-audit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================================================
 * 🔘 核對彈窗按鈕列 (AGENTS.md 鐵則八：左藍確定、右灰取消)
 * 確定 #068fd6 (hover #0581c2) 白字加粗；返回 #64748b 白字 (hover #475569)。日報／加班申請共用。
 * ========================================================================= */
.hub-rpt-modal-mask .hub-rpt-modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  flex-shrink: 0;
}

.hub-rpt-modal-mask .hub-rpt-btn-modal-confirm {
  flex: 1;
  background: #068fd6;
  color: #ffffff;
  border: none;
  font-family: "Noto Serif TC", serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 103, 193, 0.2);
  transition: all 0.15s ease;
}

.hub-rpt-modal-mask .hub-rpt-btn-modal-confirm:hover:not(:disabled) {
  background: #0581c2;
}

.hub-rpt-modal-mask .hub-rpt-btn-modal-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hub-rpt-modal-mask .hub-rpt-btn-modal-back {
  flex: 1;
  background: #64748b;
  color: #ffffff;
  border: none;
  font-family: "Noto Serif TC", serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hub-rpt-modal-mask .hub-rpt-btn-modal-back:hover {
  background: #475569;
}

/* 審核進度卡片狀態徽章 (形狀共用，顏色由 global.css 的 .hub-chip--* 提供) */
.hub-rpt-modal-mask .hub-rpt-record-status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
