:root {
  --primary:       #2563eb;
  --primary-hover: #1d4ed8;
  --primary-bg:    #eff6ff;
  --success:       #16a34a;
  --success-bg:    #f0fdf4;
  --danger:        #dc2626;
  --danger-bg:     #fef2f2;
  --warning:       #d97706;
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --text:          #0f172a;
  --muted:         #64748b;
  --nav-bg:        #0f172a;
  --radius:        8px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ── */
.nav {
  background: var(--nav-bg);
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.nav-brand {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover  { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.active { color: #fff; background: rgba(255,255,255,.12); }

/* ── Layout ── */
.main {
  flex: 1;
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title    { font-size: 20px; font-weight: 700; }
.page-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 20px; }

/* ── KPI grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.kpi-sub   { font-size: 11px; color: var(--muted); margin-top: 3px; }
.kpi-card.blue   .kpi-value { color: var(--primary); }
.kpi-card.green  .kpi-value { color: var(--success); }
.kpi-card.orange .kpi-value { color: #ea580c; }
.kpi-card.red    .kpi-value { color: var(--danger); }

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.chart-wrap { position: relative; height: 240px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-primary  { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }

/* ── Filter bar ── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.fg { display: flex; flex-direction: column; gap: 4px; }
.fg label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.filter-control {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  min-width: 120px;
}
.filter-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ── Form ── */
.form-card { max-width: 860px; }
.form-card .card-body { padding: 16px; }
.form-section {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 10px;
  border-left: 4px solid var(--border);
  background: var(--bg);
}
.form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* セクション別カラー */
.fs-basic     { background: #eff6ff; border-left-color: #2563eb; }
.fs-calls     { background: #f5f3ff; border-left-color: #7c3aed; }
.fs-meetings  { background: #fff7ed; border-left-color: #ea580c; }
.fs-contracts { background: #f0fdf4; border-left-color: #16a34a; }
.fs-cancel    { background: #fef2f2; border-left-color: #dc2626; }
.fs-memo      { background: #f8fafc; border-left-color: #94a3b8; }

.fs-basic     .form-section-title { color: #1d4ed8; border-bottom-color: #bfdbfe; }
.fs-calls     .form-section-title { color: #6d28d9; border-bottom-color: #ddd6fe; }
.fs-meetings  .form-section-title { color: #c2410c; border-bottom-color: #fed7aa; }
.fs-contracts .form-section-title { color: #15803d; border-bottom-color: #bbf7d0; }
.fs-cancel    .form-section-title { color: #b91c1c; border-bottom-color: #fecaca; }
.fs-memo      .form-section-title { color: #475569; border-bottom-color: #cbd5e1; }

/* セクション内の input 背景をセクション色に合わせる */
.fs-basic .form-control,
.fs-calls .form-control,
.fs-meetings .form-control,
.fs-contracts .form-control,
.fs-cancel .form-control,
.fs-memo .form-control { background: rgba(255,255,255,.85); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-control[type="number"] { text-align: right; }
textarea.form-control { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { border-bottom: 2px solid var(--border); }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child { border-bottom: none; }
tfoot tr { border-top: 2px solid var(--border); background: #f8fafc; }
th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
td { padding: 9px 12px; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  border-top: 1px solid var(--border);
}
.pg-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
}
.pg-btn:hover    { background: var(--bg); }
.pg-btn.active   { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── Misc ── */
.avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.person-cell { display: flex; align-items: center; gap: 7px; font-weight: 500; }

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fecaca; }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-text { font-size: 15px; font-weight: 600; }
.empty-sub  { font-size: 13px; margin-top: 4px; }

.loading-cell { text-align: center; padding: 32px; color: var(--muted); }

.actions { display: flex; gap: 6px; }

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 0;
}
.tab {
  padding: 9px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: none;
  background: transparent;
  white-space: nowrap;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
.tab:hover  { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Progress bar ── */
.goal-row { margin-bottom: 14px; }
.goal-row:last-child { margin-bottom: 0; }
.goal-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 13px; }
.goal-name   { font-weight: 500; }
.goal-nums   { color: var(--muted); font-size: 12px; }
.goal-pct    { font-weight: 700; margin-left: 6px; }
.progress-bar  { background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width .4s ease; min-width: 2px; }

/* ── Tasks ── */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  transition: all .15s;
}
.task-check.in_progress { border-color: var(--primary); background: var(--primary); color: white; }
.task-check.done        { border-color: var(--success); background: var(--success); color: white; }
.task-body  { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 14px; }
.task-title.done { text-decoration: line-through; color: var(--muted); }
.task-meta  { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.task-memo  { font-size: 12px; color: var(--muted); margin-top: 3px; }

.task-editing { background: var(--bg); border-radius: 8px; padding: 12px; }
.task-edit-form { width: 100%; }
.task-edit-row { margin-bottom: 10px; }
.task-edit-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.task-edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.s-pending     { background: #f1f5f9; color: var(--muted); }
.s-in_progress { background: var(--primary-bg); color: var(--primary); }
.s-done        { background: var(--success-bg); color: var(--success); }

/* ── テーブル列幅クラス (colgroup で使用) ── */
.col-date   { width: 86px; }
.col-person { width: 120px; }
.col-num    { width: 62px; }
.col-yen    { width: 92px; }
.col-memo   { /* auto stretch */ }
.col-action { width: 88px; }

/* 日報一覧テーブル */
.list-table { table-layout: fixed; min-width: 1120px; }
.list-table th { white-space: normal; }

/* ダッシュボード担当者別テーブル */
.person-table { table-layout: fixed; min-width: 760px; }
.person-table th { white-space: normal; }

/* ── モーダル ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 12px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-weight: 700; font-size: 15px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg); }

/* ── 担当者セレクター（トグルボタン） ── */
.person-selector { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.person-btn {
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600;
  border: 2px solid var(--border); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.person-btn:hover { border-color: var(--p-color, var(--primary)); color: var(--p-color, var(--primary)); }
.person-btn.selected {
  background: var(--p-color, var(--primary));
  border-color: var(--p-color, var(--primary));
  color: #fff;
}
.all-btn { --p-color: #64748b; }
.person-badge {
  display: inline-flex; align-items: center; padding: 1px 7px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
}

/* ── 定型タスク行 ── */
.rec-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--border); }
.rec-row:last-of-type { border-bottom:none; }
.rec-badge { font-size:10px; font-weight:600; padding:1px 6px; border-radius:99px; white-space:nowrap; flex-shrink:0; }

/* ── 担当者カラーピッカー ── */
.color-swatch-label { cursor: pointer; position: relative; display: inline-flex; }
.color-input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.color-swatch {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8); box-shadow: 0 0 0 2px rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .15s;
}
.color-swatch-label:hover .color-swatch { transform: scale(1.18); box-shadow: 0 0 0 3px rgba(0,0,0,.2); }

/* ── ビュー切り替え ── */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.view-btn { padding: 5px 14px; font-size: 13px; font-weight: 500; background: var(--surface); color: var(--muted); border: none; cursor: pointer; transition: all .15s; }
.view-btn:hover { background: var(--bg); color: var(--text); }
.view-btn.active { background: var(--primary); color: #fff; }

/* ── カレンダー ── */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-size: 16px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cal-weekday { background: var(--bg); text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.cal-weekday.cal-weekend { color: #e04040; }
.cal-cell { background: var(--surface); min-height: 90px; padding: 6px; vertical-align: top; min-width: 0; overflow: hidden; }
.cal-cell.cal-other { background: var(--bg); }
.cal-cell.cal-today { background: #eff6ff; }
.cal-cell.cal-weekend .cal-day-num { color: #e04040; }
.cal-cell.cal-other .cal-day-num { color: #ccc; }
.cal-day-num { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cal-cell.cal-today .cal-day-num { background: var(--primary); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cal-task-chip { font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; transition: filter .1s, opacity .15s; border-left: 3px solid; }
.cal-task-chip:hover { filter: brightness(.93); }
.cal-task-chip[draggable="true"] { cursor: grab; }
.cal-task-chip[draggable="true"]:active { cursor: grabbing; }
.cal-task-chip.done-chip { opacity: .55; text-decoration: line-through; }
.cal-cell.drag-over { background: var(--primary-bg) !important; outline: 2px dashed var(--primary); outline-offset: -3px; }
.cal-task-avatar { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; font-size: 8px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.cal-nodue-section { margin-top: 16px; }
.cal-nodue-header { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.cal-nodue-header::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.cal-nodue-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── ハンバーガーナビ ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #94a3b8;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #fff; }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #fff; }

/* ── Responsive 768px ── */
@media (max-width: 768px) {
  /* ナビ */
  .nav { padding: 0 16px; flex-wrap: nowrap; position: relative; z-index: 200; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 54px; left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 6px 16px 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 6px; font-size: 14px; border-radius: 6px; }

  /* レイアウト */
  .main { padding: 12px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-body { padding: 14px; }
  .card-header { padding: 11px 14px; }

  /* KPI */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-value { font-size: 24px; }
  .kpi-card { padding: 13px 14px; }

  /* チャート */
  .charts-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 200px; }

  /* ダッシュボード中段グリッド（インラインスタイル上書き） */
  #mid-grid { grid-template-columns: 1fr !important; }

  /* テーブル */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .person-table { min-width: 680px; }

  /* フォーム */
  .form-card { max-width: 100%; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-section { margin-bottom: 20px; }

  /* フィルターバー */
  .filter-bar { padding: 12px; gap: 8px; }
  .fg { flex: 1 1 calc(50% - 4px); }
  .filter-control { min-width: 0; width: 100%; }

  /* ビュー切り替え（フィルターバー内） */
  .view-toggle-fg { flex: 1 1 100%; display: flex; justify-content: flex-end; }

  /* タスク追加フォームグリッド（インラインスタイル上書き） */
  #task-add-grid { grid-template-columns: 1fr !important; }
  #task-add-grid .form-group:last-child { align-items: flex-end; }

  /* タスク item */
  .task-item { align-items: flex-start; }

  /* 担当者セレクター */
  .person-selector { gap: 5px; }
  .person-btn { font-size: 11px; padding: 4px 9px; }

  /* モーダル：下から出るシート形式 */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92dvh; overflow-y: auto; }

  /* カレンダー */
  .cal-cell { min-height: 60px; padding: 3px; }
  .cal-weekday { font-size: 10px; padding: 5px 0; }
  .cal-day-num { font-size: 10px; margin-bottom: 2px; }
  .cal-cell.cal-today .cal-day-num { width: 18px; height: 18px; font-size: 9px; }
  .cal-task-chip { font-size: 10px; padding: 1px 3px; margin-bottom: 2px; }
  .cal-task-avatar { width: 12px; height: 12px; font-size: 7px; }

  /* タブ（分析） */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 1px; }
  .tab { white-space: nowrap; flex-shrink: 0; }

  /* 目標達成バー */
  .goal-row { margin-bottom: 12px; }

  /* 設定ページ */
  .color-swatch { width: 22px; height: 22px; }
}

/* ── Responsive 480px ── */
@media (max-width: 480px) {
  .main { padding: 10px; }
  .nav-brand { font-size: 13px; }

  /* KPI */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-value { font-size: 20px; }
  .kpi-label { font-size: 10px; }
  .kpi-card { padding: 11px 12px; }

  /* フォーム */
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }

  /* テーブル */
  .list-table { min-width: 800px; }

  /* カレンダー小画面：チップはタイトルを省略 */
  .cal-cell { min-height: 50px; }
  .cal-task-chip { gap: 2px; }

  /* フィルター */
  .fg { flex: 1 1 100%; }
}
