/* ===== 入力率ダッシュボード ===== */

/* 月ナビ */
.month-nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-bottom: 14px;
}
.month-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 16px;
}
.month-btn:active { background: #f3f4f6; }
.month-btn:disabled { opacity: 0.35; }
.month-label { font-size: 17px; font-weight: 700; min-width: 120px; text-align: center; }

/* 社員別入力率 */
.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-item { font-size: 14px; }
.summary-item .summary-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.summary-item .summary-name { font-weight: 700; }
.summary-item .summary-stat { color: var(--muted); font-size: 12px; }
.summary-item .summary-stat strong { color: var(--text); font-size: 15px; }
.bar {
  height: 10px; background: #eef0f2; border-radius: 999px; overflow: hidden;
}
.bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #06C755, #04a847);
}
.bar > span.low { background: linear-gradient(90deg, #f59e0b, #d97706); }
.bar > span.zero { background: #e5e7eb; }

/* 日別ヒートマップ */
.heatmap-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.heatmap {
  border-collapse: collapse; font-size: 11px;
}
.heatmap th, .heatmap td {
  border: 1px solid #eef0f2; text-align: center;
  padding: 0; white-space: nowrap;
}
.heatmap th.hm-name, .heatmap td.hm-name {
  position: sticky; left: 0; background: #fff; z-index: 1;
  padding: 4px 8px; text-align: left; font-weight: 700;
  min-width: 76px; box-shadow: 1px 0 0 #e5e7eb;
}
.heatmap th.hm-day {
  padding: 3px 0; min-width: 20px; color: var(--muted); font-weight: 500;
}
.heatmap th.hm-day.weekend { color: var(--danger); }
.heatmap td.hm-cell { width: 20px; height: 22px; }
.heatmap td.hm-cell.complete { background: #16a34a; }
.heatmap td.hm-cell.partial  { background: #f59e0b; }
.heatmap td.hm-cell.none     { background: #f3f4f6; }
.heatmap td.hm-cell.future   { background: #fff; }

/* 拠点別 */
.by-location-list { display: flex; flex-direction: column; gap: 6px; }
.loc-bar-item {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
}
.loc-bar-item .loc-bar-name { min-width: 96px; font-weight: 600; }
.loc-bar-item .loc-bar-track {
  flex: 1; height: 18px; background: #eef0f2; border-radius: 4px; overflow: hidden;
}
.loc-bar-item .loc-bar-fill {
  height: 100%; background: var(--accent); border-radius: 4px;
}
.loc-bar-item .loc-bar-fill.field { background: #8b5cf6; }
.loc-bar-item .loc-bar-count { min-width: 32px; text-align: right; color: var(--muted); }

/* 直近の打刻 */
.recent-logs { display: flex; flex-direction: column; gap: 4px; }
.recent-log {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  padding: 6px 8px; background: #F9FAFB; border-radius: 6px;
}
.recent-log .rl-badge {
  font-size: 10px; padding: 2px 6px; border-radius: 999px; font-weight: 700;
}
.recent-log .rl-badge.IN { background: #DCFCE7; color: #166534; }
.recent-log .rl-badge.OUT { background: #FEE2E2; color: #991b1b; }
.recent-log .rl-name { font-weight: 700; }
.recent-log .rl-time { color: var(--muted); }
.recent-log .rl-loc { color: var(--muted); margin-left: auto; font-size: 11px; }

.empty-hint { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }

/* ===== 修正・変更履歴 ===== */
.audit-logs { display: flex; flex-direction: column; gap: 6px; }
.audit-log {
  display: flex; align-items: baseline; gap: 8px; font-size: 12px;
  padding: 7px 9px; background: #F9FAFB; border-radius: 6px;
  border-left: 3px solid var(--border);
}
.audit-log.log_add { border-left-color: #16a34a; }
.audit-log.log_edit { border-left-color: #f59e0b; }
.audit-log.log_delete { border-left-color: #ef4444; }
.audit-log.holiday_add, .audit-log.holiday_remove { border-left-color: #8b5cf6; }
.audit-log .al-time { color: var(--muted); white-space: nowrap; font-size: 11px; }
.audit-log .al-actor { font-weight: 700; white-space: nowrap; }
.audit-log .al-detail { color: var(--text); flex: 1; }
.audit-log .al-target { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ===== 個人別 月次勤怠表（dashboard / LIFF 共通スタイル） ===== */
.detail-emp-select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; background: #fff; color: var(--text); margin-bottom: 12px;
}
.att-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.att-table th, .att-table td {
  border: 1px solid #eef0f2; padding: 6px 8px; text-align: center;
}
.att-table th {
  background: #F9FAFB; color: var(--muted); font-weight: 600; font-size: 11px;
}
.att-table td.att-date { font-weight: 700; white-space: nowrap; }
.att-table td.att-date.weekend { color: var(--danger); }
.att-table td.att-loc {
  text-align: left; color: var(--muted); font-size: 11px;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-table td.att-work { font-weight: 700; white-space: nowrap; }
.att-summary {
  display: flex; gap: 16px; justify-content: flex-end;
  margin-top: 10px; padding: 10px 12px;
  background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 8px;
  font-size: 13px;
}
.att-summary strong { font-size: 16px; color: var(--ok); }
