* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif; }
:root {
  --sidebar-width: 260px;
  --right-panel-width: 280px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* =====================================================
   APP SHELL — 3-column fixed layout
   Left(260px) | Center(flex-1) | Right(280px)
   ===================================================== */
#app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* COL 1 — Sidebar */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

/* COL 2 — Main content */
#main-content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* COL 3 — Right panel */
#right-panel-col {
  width: var(--right-panel-width);
  min-width: var(--right-panel-width);
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

/* Mobile header: hidden by default, shown only on mobile */
#mobile-header {
  display: none;
}

/* Mobile — sidebar slides in, right panel hidden */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 40;
}

@media (max-width: 767px) {
  #sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    overflow-y: auto; /* サイドバー全体をスクロール可能に */
  }
  #sidebar.open { transform: translateX(0); }
  #sidebar-overlay.open { display: block; }
  #mobile-header { display: flex !important; visibility: visible !important; opacity: 1 !important; }
  #right-panel-col { display: none; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  #mobile-header { display: none !important; }
  #sidebar { transform: translateX(0) !important; }
  #right-panel-col { display: none; }
}
@media (min-width: 1200px) {
  #mobile-header { display: none !important; }
  #sidebar { transform: translateX(0) !important; }
}

/* Status badges */
.status-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 9999px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}
/* ── 今日実行ボタン（締切ページ） ── */
.exec-today-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  background: #f0fdf4; color: #15803d;
  border: 1.5px solid #86efac; border-radius: 8px;
  padding: 2px 9px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap; font-family: inherit;
}
.exec-today-btn:hover { background: #dcfce7; border-color: #4ade80; }
.exec-today-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  background: #dcfce7; color: #15803d;
  border-radius: 8px; padding: 2px 9px; white-space: nowrap;
}

/* ── 作業時間タグ ── */
.time-tag-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; border-radius: 6px;
  padding: 2px 7px; white-space: nowrap; flex-shrink: 0;
}
.tt-5min   { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.tt-15min  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tt-30min  { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.tt-1h     { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }
.tt-over1h { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* タグ選択ボタン（モーダル内） */
.time-tag-select-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; border-radius: 8px;
  padding: 4px 11px; cursor: pointer; border: 1.5px solid #e2e8f0;
  background: #f8fafc; color: #64748b; transition: all 0.12s;
  font-family: inherit;
}
.time-tag-select-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.time-tag-select-btn.active { background: #eef2ff; color: #4338ca; border-color: #818cf8; font-weight: 700; }

.status-未着手 { background: #f1f5f9; color: #64748b; }
.status-進行中 { background: #dbeafe; color: #1d4ed8; }
.status-保留   { background: #f3e8ff; color: #7e22ce; }
.status-確認待ち { background: #fef9c3; color: #854d0e; }
.status-終了 { background: #dcfce7; color: #166534; }
.status-MTG確認 { background: #fce7f3; color: #9d174d; }
.status-btn:hover { opacity: 0.8; transform: scale(1.04); }

/* Deadline badges */
.dl-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 9999px; font-size: 11px; font-weight: 500;
}
.dl-urgent { background: #fef2f2; color: #dc2626; }
.dl-warning { background: #fffbeb; color: #d97706; }
.dl-normal { background: #f0fdf4; color: #16a34a; }
.dl-none { background: #f1f5f9; color: #94a3b8; }

/* Cards */
.task-row {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 12px 14px;
  transition: all 0.15s;
}
.task-row:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.06); border-color: #c7d2fe; }
.task-row.selected { border-color: #6366f1; background: #fafaff; }

/* Section card */
.section-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 14px;
}
.section-header {
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  border-radius: 12px;
}
.section-header:hover { background: rgba(99,102,241,0.04); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
}

/* Inputs */
.inp {
  width: 100%; padding: 8px 12px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
  font-family: inherit;
}
.inp:focus { border-color: #6366f1; background: white; }
.inp-sm { padding: 5px 10px; font-size: 12px; }
textarea.inp { resize: vertical; min-height: 80px; }
input[type="date"] { color-scheme: light; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: #6366f1; color: white;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}
.btn-primary:hover { background: #4f46e5; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: white; color: #374151;
  font-size: 14px; font-weight: 500;
  border: 1px solid #d1d5db; cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-secondary:hover { background: #f9fafb; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: #fef2f2; color: #dc2626;
  font-size: 14px; font-weight: 500;
  border: 1px solid #fecaca; cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-danger:hover { background: #fee2e2; }
.btn-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; border: none;
  cursor: pointer; font-size: 12px;
  transition: all 0.15s;
  background: transparent;
  font-family: inherit;
}

/* Sidebar items */
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: #475569;
  transition: all 0.15s;
  user-select: none;
}
.sidebar-item:hover { background: #f1f5f9; color: #1e293b; }
.sidebar-item.active { background: #eef2ff; color: #4f46e5; font-weight: 600; }
.sidebar-item .icon { width: 18px; text-align: center; font-size: 13px; flex-shrink: 0; }

/* Project tabs */
.project-tab {
  padding: 10px 18px; font-size: 14px; font-weight: 500;
  color: #64748b; border-bottom: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
}
.project-tab.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 600; }
.project-tab:hover:not(.active) { color: #1e293b; }

/* Progress memo timeline */
.memo-timeline-item {
  border-left: 2px solid #e2e8f0;
  padding-left: 14px; margin-left: 8px;
  position: relative; margin-bottom: 10px;
}
.memo-timeline-item::before {
  content: '';
  width: 8px; height: 8px;
  background: #6366f1; border-radius: 50%;
  position: absolute; left: -5px; top: 5px;
}

/* Collapse */
.collapse-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.collapse-content.collapsed { max-height: 0 !important; }

/* Custom checkbox */
.custom-check {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid #d1d5db; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.custom-check.checked { background: #6366f1; border-color: #6366f1; color: white; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: #94a3b8; font-size: 14px;
}
.empty-state i { font-size: 40px; margin-bottom: 16px; display: block; opacity: 0.3; }

/* Toast */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #1e293b; color: white;
  padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s; z-index: 999;
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* Tags */
.tag {
  padding: 2px 8px; border-radius: 9999px;
  font-size: 11px; font-weight: 600;
}
.tag-MTG { background: #dbeafe; color: #1d4ed8; }
.tag-評価日 { background: #fce7f3; color: #9d174d; }
.tag-施策トリガー { background: #fef9c3; color: #854d0e; }
.tag-その他 { background: #f1f5f9; color: #64748b; }

/* MTG item */
.mtg-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: white; border: 1px solid #e2e8f0;
  border-radius: 10px; margin-bottom: 8px;
  transition: all 0.15s;
}
.mtg-item.done { opacity: 0.55; }
.mtg-item.done .mtg-text { text-decoration: line-through; color: #94a3b8; }
.mtg-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

/* Schedule item */
.schedule-item {
  background: white; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
  transition: all 0.15s;
}
.schedule-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-color: #c7d2fe; }

/* Memo note */
.memo-note {
  background: white; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 16px 18px;
  margin-bottom: 10px; transition: all 0.15s;
}
.memo-note:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-color: #c7d2fe; }

/* Day group header */
.day-group-header {
  padding: 7px 14px; margin-bottom: 8px;
  background: #f8fafc; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #475569;
  border: 1px solid #f1f5f9;
  display: flex; align-items: center;
}

/* Fade in */
.fade-in { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

/* Page header */
.page-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.page-header-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Filter buttons */
.filter-btn {
  padding: 6px 16px; border-radius: 9999px;
  font-size: 13px; font-weight: 500;
  border: 1px solid #e2e8f0; cursor: pointer;
  transition: all 0.15s; background: white; color: #475569;
  font-family: inherit;
}
.filter-btn.active { background: #6366f1; color: white; border-color: #6366f1; }
.filter-btn:not(.active):hover { border-color: #c7d2fe; color: #4f46e5; }

/* Right panel wrapper */
.right-panel {
  padding: 18px 14px;
}
.right-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Stat cards grid */
.rp-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.rp-stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 10px 9px;
  transition: box-shadow 0.15s;
}
.rp-stat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.rp-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.rp-stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #1e293b;
}
.rp-stat-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
}

/* Generic right-panel section card */
.rp-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 13px 13px 8px;
  margin-bottom: 10px;
}
.rp-section-header {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
}

/* Task rows inside right panel */
.rp-task-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s;
}
.rp-task-row:last-child { border-bottom: none; }
.rp-task-row:hover { background: #f8fafc; border-radius: 6px; }
.rp-task-name {
  font-size: 12px;
  color: #334155;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-task-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.rp-task-project {
  font-size: 10px;
  color: #94a3b8;
  flex-shrink: 0;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Project rows inside right panel */
.rp-project-row {
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.rp-project-row:last-child { border-bottom: none; }
.rp-project-row:hover { opacity: 0.8; }
.rp-project-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-progress-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.rp-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.3s;
}
.rp-progress-label {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
}

/* Schedule rows inside right panel */
.rp-sched-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
}
.rp-sched-row:last-child { border-bottom: none; }
.rp-sched-date {
  font-size: 10px;
  font-weight: 700;
  color: #6366f1;
  flex-shrink: 0;
  min-width: 36px;
}
.rp-sched-name {
  font-size: 12px;
  color: #334155;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state */
.rp-empty {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 8px 0;
}

/* Progress bar in today's progress widget */
.rp-today-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0 10px;
}
.rp-today-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 4px;
  transition: width 0.4s;
}

/* Small outline button (used in page headers) */
.btn-sm-outline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d1d5db;
  background: white;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-sm-outline:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #f5f3ff;
}

/* =====================================================
   Status Picker dropdown
   ===================================================== */
.status-picker {
  position: absolute;
  z-index: 200;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 6px;
  min-width: 160px;
  animation: fadeIn 0.12s ease;
}
.sp-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: #374151;
  text-align: left;
  transition: background 0.1s;
}
.sp-option:hover { background: #f1f5f9; }
.sp-active { background: #f5f3ff !important; color: #4f46e5 !important; }
.sp-icon { font-size: 11px; width: 14px; text-align: center; flex-shrink: 0; }
.sp-check { font-size: 10px; margin-left: auto; color: #6366f1; flex-shrink: 0; }

/* per-status accent colors in picker */
.sp-未着手 .sp-icon  { color: #64748b; }
.sp-進行中 .sp-icon  { color: #1d4ed8; }
.sp-保留 .sp-icon    { color: #7e22ce; }
.sp-確認待ち .sp-icon { color: #b45309; }
.sp-MTG確認 .sp-icon { color: #9d174d; }
.sp-終了 .sp-icon    { color: #166534; }

/* =====================================================
   Review target badge (inside status button)
   ===================================================== */
.review-target-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(180,83,9,0.12);
  color: #92400e;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

/* Review target picker sub-panel */
.review-target-picker { min-width: 180px; }
.rtp-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rtp-divider { height: 1px; background: #f1f5f9; margin: 4px 0; }
.rtp-skip { color: #94a3b8 !important; font-size: 12px !important; }
.rtp-skip .sp-icon { color: #94a3b8 !important; }

/* Review target radio buttons in modal */
.review-target-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  transition: all 0.15s;
  background: white;
  user-select: none;
}
.review-target-radio:hover { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.review-target-radio input[type="radio"] { display: none; }
.review-target-radio:has(input:checked) {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

/* ==========================================
   OVERVIEW TAB
   ========================================== */
.ov-page-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; padding: 20px 22px; background: white; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.ov-header-left { display: flex; align-items: center; gap: 16px; }
.ov-avatar { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ov-avatar i { font-size: 22px; color: white; }
.ov-project-name { font-size: 20px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; cursor: pointer; line-height: 1.3; }
.ov-project-name:hover .ov-name-edit-icon { opacity: 1; }
.ov-name-edit-icon { font-size: 12px; color: #94a3b8; opacity: 0; transition: opacity 0.15s; }
.ov-sub-info { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.ov-company { font-size: 13px; font-weight: 600; color: #4f46e5; background: #eef2ff; padding: 2px 10px; border-radius: 20px; }
.ov-person { font-size: 13px; color: #64748b; }
.ov-header-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.ov-meta-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #94a3b8; }
.ov-section-title { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; margin-bottom: 10px; margin-top: 24px; }
.ov-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov-grid-1 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (max-width: 640px) { .ov-grid-2 { grid-template-columns: 1fr; } }
.ov-field-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 13px 15px 11px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; position: relative; }
.ov-field-card:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,0.08); }
.ov-field-card:hover .ov-edit-btn { opacity: 1; }
.ov-field-header { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.ov-field-icon { width: 22px; height: 22px; border-radius: 6px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6366f1; flex-shrink: 0; }
.ov-field-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; flex: 1; }
.ov-edit-btn { width: 22px; height: 22px; border-radius: 5px; border: none; background: #f1f5f9; color: #94a3b8; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s, background 0.15s; }
.ov-edit-btn:hover { background: #e0e7ff; color: #4f46e5; }
.ov-field-value { padding-left: 2px; }
.ov-val { font-size: 14px; font-weight: 500; color: #1e293b; line-height: 1.5; word-break: break-all; }
.ov-empty { font-size: 13px; color: #cbd5e1; font-style: italic; }
.ov-link { font-size: 13px; color: #4f46e5; text-decoration: none; word-break: break-all; display: inline-flex; align-items: center; gap: 3px; }
.ov-link:hover { text-decoration: underline; color: #4338ca; }
.ov-textarea-val { font-size: 13px; color: #374151; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-title { font-size: 16px; font-weight: 700; color: #1e293b; }
.modal-close { width: 28px; height: 28px; border-radius: 6px; border: none; background: #f1f5f9; color: #64748b; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #e2e8f0; }

/* ==========================================
   MEMO TAB — NEW TYPES
   ========================================== */
.memo-filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; border: 1px solid #e2e8f0; background: white; color: #64748b; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.memo-filter-btn:hover { border-color: #c7d2fe; color: #4f46e5; }
.memo-filter-btn.active { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; font-weight: 600; }
.memo-filter-cnt { background: #f1f5f9; color: #64748b; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.memo-filter-btn.active .memo-filter-cnt { background: #c7d2fe; color: #4338ca; }
.memo-contact-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; transition: box-shadow 0.15s, border-color 0.15s; }
.memo-contact-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); border-color: #c7d2fe; }
.memo-contact-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #818cf8); display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; flex-shrink: 0; }
.memo-cat-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.memo-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
@media (max-width: 480px) { .memo-contact-grid { grid-template-columns: 1fr; } }
.memo-contact-item { display: flex; align-items: center; gap: 6px; background: #f8fafc; border-radius: 7px; padding: 5px 9px; }
.memo-contact-icon { font-size: 11px; flex-shrink: 0; }
.memo-contact-val { font-size: 12px; color: #374151; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-type-badge-other { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; background: #f1f5f9; color: #64748b; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; }
.pmemo-type-btn { background: white; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit; width: 100%; text-align: left; }
.pmemo-type-btn:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,0.1); }
.pmemo-type-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }

/* completed task styles */
.status-完了 { background: #dcfce7; color: #166534; }
.sp-完了 .sp-icon { color: #166534; }
.completed-task-row { opacity: 0.85; }
.completed-check-icon { width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* task inner filter tabs */
.task-filter-bar { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; background: #f1f5f9; border-radius: 10px; }
.task-filter-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 500; color: #64748b; border: none; background: transparent; cursor: pointer; transition: all 0.15s; font-family: inherit; white-space: nowrap; }
.task-filter-tab:hover { background: white; color: #1e293b; }
.task-filter-tab.active { background: white; color: #4f46e5; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.task-filter-cnt { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #e2e8f0; color: #64748b; }
.task-filter-cnt.active { background: #e0e7ff; color: #4338ca; }

/* sidebar quick-add button & task count badge */
.sidebar-task-cnt { font-size: 10px; font-weight: 700; background: #e0e7ff; color: #4338ca; padding: 1px 7px; border-radius: 10px; flex-shrink: 0; line-height: 1.5; }
.sidebar-item:hover .sidebar-task-cnt { display: none; }
.sidebar-quick-add { display: none; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; background: transparent; border: 1.5px solid #c7d2fe; color: #6366f1; font-size: 11px; cursor: pointer; transition: background 0.15s, color 0.15s; flex-shrink: 0; padding: 0; font-family: inherit; }
.sidebar-item:hover .sidebar-quick-add { display: flex; }
.sidebar-quick-add:hover { background: #6366f1; color: white; border-color: #6366f1; }

/* unassigned tasks section */
.unassigned-section { border: 1.5px dashed #fcd34d !important; background: #fffbeb !important; }
.unassigned-section .section-header { background: #fef9c3 !important; border-radius: 10px 10px 0 0; }

/* assign-to-parent button */
.assign-to-parent-btn { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: #d97706; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 3px 8px; cursor: pointer; transition: background 0.15s, color 0.15s; font-family: inherit; white-space: nowrap; flex-shrink: 0; }
.assign-to-parent-btn:hover { background: #fbbf24; color: white; border-color: #fbbf24; }

/* assign parent overlay */
.assign-parent-btn { display: flex; align-items: center; width: 100%; background: white; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit; gap: 4px; }
.assign-parent-btn:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(99,102,241,0.1); background: #f5f3ff; }

/* ── View toggle buttons (list / calendar) ─────────────────────────── */
.view-toggle-btns { display: flex; background: #f1f5f9; border-radius: 8px; padding: 3px; gap: 2px; }
.view-toggle-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 28px; border: none; border-radius: 6px; background: transparent; color: #94a3b8; font-size: 13px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.view-toggle-btn:hover { color: #475569; }
.view-toggle-btn.active { background: white; color: #4f46e5; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ── Calendar wrap ──────────────────────────────────────────────────── */
.cal-wrap { background: white; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; border-bottom: 1px solid #f1f5f9; }
.cal-month-label { font-size: 15px; font-weight: 700; color: #1e293b; }
.cal-nav-btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; color: #64748b; font-size: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.cal-nav-btn:hover { background: #f8fafc; border-color: #c7d2fe; color: #4f46e5; }

/* ── Calendar grid ──────────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: 8px 0 6px; text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8; background: #f8fafc; }
.cal-dow-sun { color: #f87171; }
.cal-dow-sat { color: #60a5fa; }

.cal-cell { min-height: 72px; padding: 5px 5px 4px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.1s; box-sizing: border-box; }
.cal-cell:hover { background: #f5f3ff; }
.cal-cell-empty { min-height: 72px; background: #fafafa; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell-sun .cal-day-num { color: #f87171; }
.cal-cell-sat .cal-day-num { color: #60a5fa; }
.cal-cell-today { background: #eef2ff; }
.cal-cell-today .cal-day-num { background: #4f46e5; color: white; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }

.cal-day-num { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 3px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }

/* ── Dot items inside calendar cells ───────────────────────────────── */
.cal-dots { display: flex; flex-direction: column; gap: 2px; }
.cal-dot-item { font-size: 10px; font-weight: 500; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.5; }
.cal-dot-violet  { background: #ede9fe; color: #5b21b6; }
.cal-dot-blue    { background: #dbeafe; color: #1d4ed8; }
.cal-dot-green   { background: #dcfce7; color: #15803d; }
.cal-dot-red     { background: #fee2e2; color: #b91c1c; }
.cal-dot-default { background: #f1f5f9; color: #475569; }
.cal-dot-more    { background: #f1f5f9; color: #94a3b8; font-style: italic; }

/* ── Detail panel below calendar ───────────────────────────────────── */
.cal-day-detail { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-top: 4px; }
.cal-day-detail-header { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }

/* ── Exec schedule page: 2-month calendar grid + list ── */
.exec-cal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .exec-cal-grid { grid-template-columns: 1fr; } }
.exec-list-section { margin-top: 8px; }
.exec-list-title { font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 16px; display: flex; align-items: center; }
.today-header { background: #ede9fe; color: #5b21b6; border-radius: 8px; padding: 6px 12px; }

/* ── Exec schedule: full-width single-month calendar ── */
.exec-cal-wrap { background: white; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
.exec-cal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid #f1f5f9; }
.exec-cal-month { font-size: 17px; font-weight: 800; color: #1e293b; letter-spacing: 0.01em; }
.exec-cal-nav { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1.5px solid #e2e8f0; border-radius: 10px; background: white; color: #64748b; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.exec-cal-nav:hover { background: #eef2ff; border-color: #a5b4fc; color: #4f46e5; }

.exec-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.exec-cal-dow { padding: 10px 0 8px; text-align: center; font-size: 12px; font-weight: 700; color: #94a3b8; background: #f8fafc; }
.exec-dow-sun { color: #f87171; }
.exec-dow-sat { color: #60a5fa; }

.exec-cal-cell { min-height: 100px; padding: 6px 5px 5px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.12s; box-sizing: border-box; vertical-align: top; }
.exec-cal-cell:hover { background: #f5f3ff; }
.exec-cal-empty { min-height: 90px; background: #fafafa; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; cursor: default; }
.exec-cal-grid > div:nth-child(7n) { border-right: none; }
.exec-cell-sun .exec-day-num { color: #f87171; }
.exec-cell-sat .exec-day-num { color: #60a5fa; }
.exec-cell-today { background: #f5f3ff; }
.exec-cell-selected { background: #eef2ff; outline: 2px solid #6366f1; outline-offset: -2px; }

.exec-day-num { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.exec-day-today { background: #4f46e5; color: white !important; }

.exec-cell-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.exec-cell-cnt { font-size: 9px; font-weight: 700; background: #e0e7ff; color: #4338ca; padding: 1px 5px; border-radius: 8px; line-height: 1.5; flex-shrink: 0; }
.exec-dots { display: flex; flex-direction: column; gap: 2px; }
.exec-dot-item { font-size: 10px; font-weight: 500; background: #ede9fe; color: #5b21b6; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.exec-card-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.exec-dot-more { font-size: 10px; font-weight: 600; color: #6366f1; padding: 1px 4px; }

/* ── 締切カレンダー ドット色 ── */
.dl-dot-over      { font-size: 10px; font-weight: 600; background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.dl-dot-soon      { font-size: 10px; font-weight: 600; background: #ffedd5; color: #c2410c; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.dl-dot-normal    { font-size: 10px; font-weight: 500; background: #dbeafe; color: #1d4ed8; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
/* カードカレンダー用 -pill バリアント（締切・実行日ページ共通） */
.dl-dot-over-pill   { font-size: 10px; font-weight: 600; background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; display: block; }
.dl-dot-soon-pill   { font-size: 10px; font-weight: 600; background: #ffedd5; color: #c2410c; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; display: block; }
.dl-dot-normal-pill { font-size: 10px; font-weight: 500; background: #dbeafe; color: #1d4ed8; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; display: block; }
.cal-dot-violet-pill { font-size: 10px; font-weight: 500; background: #ede9fe; color: #5b21b6; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; display: block; }
/* 締切リスト グループヘッダー */
.dl-header-over { background: #fee2e2 !important; color: #b91c1c !important; border-radius: 8px; }
.dl-header-soon { background: #ffedd5 !important; color: #c2410c !important; border-radius: 8px; }

/* ── スケジュールカレンダー ドット色 ── */
.sched-dot-mtg-pill      { font-size: 10px; font-weight: 500; background: #dbeafe; color: #1d4ed8; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.sched-dot-release-pill  { font-size: 10px; font-weight: 500; background: #dcfce7; color: #15803d; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.sched-dot-dl-pill       { font-size: 10px; font-weight: 500; background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.sched-dot-other-pill    { font-size: 10px; font-weight: 500; background: #f1f5f9; color: #475569; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }

/* ── Calendar Day Panel (.cdp-*) ── */
.cal-day-panel { display: flex; flex-direction: column; gap: 0; height: 100%; }

.cdp-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.cdp-title { display: flex; align-items: center; font-size: 14px; font-weight: 600; color: #1e293b; flex: 1; min-width: 0; }
.cdp-today-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 9999px; background: #4f46e5; color: white; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.cdp-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #94a3b8; background: transparent; border: none; cursor: pointer; flex-shrink: 0; transition: background 0.12s, color 0.12s; }
.cdp-close:hover { background: #f1f5f9; color: #475569; }

.cdp-empty { padding: 24px 16px; text-align: center; color: #94a3b8; font-size: 13px; }

.cdp-task-row { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.1s; display: flex; flex-direction: column; gap: 4px; }
.cdp-task-row:hover { background: #f8fafc; }
.cdp-task-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cdp-task-name { font-size: 13px; font-weight: 500; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cdp-proj-name { font-size: 11px; color: #94a3b8; padding-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ステータスバッジ */
.cdp-badge-todo { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #f1f5f9; color: #475569; }
.cdp-badge-prog { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #dbeafe; color: #1d4ed8; }
.cdp-badge-pend { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #fef9c3; color: #a16207; }
.cdp-badge-done { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #dcfce7; color: #15803d; }
.cdp-badge-mtg  { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #ede9fe; color: #6d28d9; }
.cdp-badge-hold { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9999px; font-size: 10px; font-weight: 600; flex-shrink: 0; background: #f3e8ff; color: #7e22ce; }

.cdp-sched-row { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 4px; }
.cdp-sched-memo { font-size: 12px; color: #64748b; background: #f8fafc; border-radius: 6px; padding: 6px 10px; margin-top: 2px; white-space: pre-wrap; }
.cdp-sched-actions { display: flex; gap: 6px; margin-top: 4px; }

/* ── Right Panel Timeline (.rpt-*) ── */
.rpt-panel { display: flex; flex-direction: column; gap: 0; min-height: 100%; }

.rpt-header { display: flex; align-items: center; padding: 14px 16px 12px; border-bottom: 2px solid #e2e8f0; flex-shrink: 0; gap: 4px; }
.rpt-title  { font-size: 13px; font-weight: 700; color: #1e293b; flex: 1; }
.rpt-add-btn { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #f1f5f9; color: #64748b; border: none; cursor: pointer; transition: background 0.12s; flex-shrink: 0; }
.rpt-add-btn:hover { background: #e0e7ff; color: #4f46e5; }

.rpt-empty { padding: 24px 16px; text-align: center; color: #94a3b8; font-size: 13px; }

.rpt-group { border-bottom: 1px solid #f1f5f9; }

.rpt-day-header { display: flex; align-items: center; justify-content: space-between; padding: 7px 16px 5px; background: #f8fafc; }
.rpt-day-label  { font-size: 11px; font-weight: 700; color: #64748b; }
.rpt-day-count  { font-size: 10px; font-weight: 600; color: #94a3b8; }

.rpt-day-today .rpt-day-label { color: #4f46e5; }
.rpt-day-today  { background: #eef2ff; }
.rpt-day-past   { opacity: 0.55; }
.rpt-day-over   { background: #fff1f2; }
.rpt-day-over .rpt-day-label { color: #be123c; }
.rpt-day-soon   { background: #fff7ed; }
.rpt-day-soon .rpt-day-label { color: #c2410c; }
.rpt-day-none   { background: #f8fafc; }
.rpt-day-none .rpt-day-label { color: #94a3b8; }

.rpt-item { display: flex; flex-direction: column; border-bottom: 1px solid #f0f4f8; transition: background 0.1s; }
.rpt-item:last-child { border-bottom: none; }

/* トグル展開タスク行 */
.rpt-task-toggle { cursor: default; }
.rpt-task-toggle:hover { background: transparent; }
.rpt-task-expanded { background: #f8faff; }

.rpt-task-summary { display: flex; align-items: flex-start; gap: 7px; padding: 9px 14px 8px; cursor: pointer; transition: background 0.1s; border-radius: 6px; }
.rpt-task-summary:hover { background: #f0f4ff; }

.rpt-toggle-icon { display: flex; align-items: center; justify-content: center; width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* 展開詳細パネル */
.rpt-task-detail { padding: 0 14px 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #e8edf5; background: #f8faff; margin: 0 6px; border-radius: 0 0 8px 8px; }
.rpt-detail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.rpt-detail-label { font-size: 10px; color: #94a3b8; font-weight: 500; flex-shrink: 0; }
.rpt-detail-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rpt-detail-dates > div { display: flex; flex-direction: column; gap: 3px; }

/* 進捗メモ（展開パネル内） */
.rpt-detail-memos { display: flex; flex-direction: column; gap: 4px; }
.rpt-detail-memo-header { font-size: 10px; font-weight: 600; color: #6366f1; }
.rpt-memo-item { background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 5px 8px; }
.rpt-memo-body { font-size: 11px; color: #374151; white-space: pre-wrap; word-break: break-all; }
.rpt-memo-date { font-size: 9px; color: #94a3b8; margin-top: 2px; }

/* 案件ジャンプボタン */
.rpt-jump-btn { display: inline-flex; align-items: center; font-size: 10px; font-weight: 500; color: #6366f1; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 6px; padding: 2px 8px; cursor: pointer; transition: background 0.12s; }
.rpt-jump-btn:hover { background: #e0e7ff; }

/* メモ追加ボタン */
.rpt-memo-add-btn { display: inline-flex; align-items: center; font-size: 10px; font-weight: 500; color: #6366f1; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 6px; padding: 3px 10px; cursor: pointer; transition: background 0.12s; }
.rpt-memo-add-btn:hover { background: #e0e7ff; }

.rpt-sched-item { cursor: default; padding: 8px 14px; }
.rpt-sched-item:hover { background: transparent; }

.rpt-item-body  { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rpt-item-name  { font-size: 12px; font-weight: 500; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-item-proj  { font-size: 10px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpt-item-memo  { font-size: 11px; color: #64748b; background: #f8fafc; border-radius: 5px; padding: 4px 8px; margin-top: 3px; white-space: pre-wrap; word-break: break-all; }
.rpt-item-actions { display: flex; gap: 4px; flex-shrink: 0; align-self: flex-start; margin-top: 1px; }

/* ── Schedule Calendar Cell (+ボタン) ── */
.sched-cal-cell { position: relative; }
.sched-cal-cell-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.sched-cal-add-btn {
  opacity: 0;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: #e0e7ff; color: #4f46e5;
  border: none; cursor: pointer;
  font-size: 9px;
  transition: opacity 0.15s, background 0.12s;
  flex-shrink: 0;
}
.sched-cal-cell:hover .sched-cal-add-btn { opacity: 1; }
.sched-cal-add-btn:hover { background: #4f46e5; color: #fff; }

/* ── Schedule Linked Tasks (.slt-*) ── */
/* モーダル内チェックリスト */
.slt-list { max-height: 180px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fafafa; }
.slt-group-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 10px 3px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.slt-row { display: flex; align-items: center; gap-8px; padding: 6px 10px; cursor: pointer; transition: background 0.1s; border-bottom: 1px solid #f1f5f9; gap: 8px; }
.slt-row:last-child { border-bottom: none; }
.slt-row:hover { background: #f0f4ff; }
.slt-check { width: 14px; height: 14px; flex-shrink: 0; accent-color: #4f46e5; cursor: pointer; }
.slt-task-name { font-size: 12px; color: #374151; flex: 1; min-width: 0; }
.slt-dl { display: inline-block; margin-left: 5px; font-size: 10px; font-weight: 600; color: #c2410c; background: #fff7ed; padding: 0 5px; border-radius: 9999px; }

/* 表示側（scheduleItemHTML / rpTimeline / cdp）の紐づけブロック */
.slt-linked-block { margin-top: 6px; border-top: 1px dashed #e2e8f0; padding-top: 5px; }
.slt-linked-label { font-size: 10px; font-weight: 700; color: #a5b4fc; margin-bottom: 3px; letter-spacing: 0.03em; }
.slt-linked-row { display: flex; align-items: center; gap: 5px; padding: 3px 0; cursor: pointer; }
.slt-linked-row:hover .slt-linked-name { text-decoration: underline; }
.slt-linked-name { font-size: 11px; color: #475569; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── slt inline new-task form ── */
.slt-new-form { background: #f0f4ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.inp-sm { padding: 4px 8px; font-size: 12px; }

/* ── 場所バッジ（スケジュール） ── */
.sched-loc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 1px 8px; border-radius: 9999px; flex-shrink: 0; }
.sched-site-detail { font-size: 11px; color: #15803d; background: #f0fdf4; border-radius: 6px; padding: 4px 8px; margin-top: 3px; white-space: pre-wrap; word-break: break-all; }
.sched-loc-online { background: #dbeafe; color: #1d4ed8; }
.sched-loc-mtg    { background: #fef9c3; color: #854d0e; }
.sched-loc-site   { background: #dcfce7; color: #166534; }
.sched-loc-none   { background: #f1f5f9; color: #64748b; }

/* ── 設定ページ ── */
.settings-section { background: white; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; }
.settings-section-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.settings-type-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; margin-bottom: 6px; cursor: grab; }
.settings-type-name { flex: 1; font-size: 13px; color: #334155; }
.settings-type-drag { color: #94a3b8; font-size: 12px; }
.settings-add-row { display: flex; gap: 8px; margin-top: 10px; }
.settings-custom-field-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; margin-bottom: 6px; }
.settings-custom-field-label { flex: 1; font-size: 13px; color: #334155; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background 0.15s; font-size: 13px; color: #475569; font-weight: 500; }
.settings-nav-item:hover { background: #f1f5f9; }
.settings-nav-item.active { background: #ede9fe; color: #4f46e5; font-weight: 700; }

/* ── 明日ボタン（今日ページ） ── */
.exec-tomorrow-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  background: #f0f4ff; color: #4338ca;
  border: 1.5px solid #a5b4fc; border-radius: 8px;
  padding: 2px 9px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap; font-family: inherit;
}
.exec-tomorrow-btn:hover { background: #e0e7ff; border-color: #818cf8; }

/* ── 今日ページ: インライン作業時間タグ行 ── */
.today-timetag-row {
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 5px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.today-timetag-label {
  font-size: 10px; font-weight: 700;
  color: #94a3b8; white-space: nowrap;
  flex-shrink: 0;
}
.today-timetag-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600;
  background: #f1f5f9; color: #64748b;
  border: 1.5px solid #e2e8f0; border-radius: 6px;
  padding: 2px 8px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap; font-family: inherit;
}
.today-timetag-btn:hover { background: #e2e8f0; border-color: #cbd5e1; }
.today-timetag-btn.active {
  background: #eef2ff; color: #4338ca;
  border-color: #818cf8;
}
.today-timetag-clear {
  color: #94a3b8; border-style: dashed;
}
.today-timetag-clear.active {
  background: #f8fafc; color: #94a3b8;
  border-color: #cbd5e1;
}

/* ── Google Drive 同期セクション ── */
.gdrive-status-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 10px;
  margin-bottom: 14px;
}
.gdrive-status-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.gdrive-connected    { background: #dcfce7; color: #16a34a; }
.gdrive-disconnected { background: #f1f5f9; color: #94a3b8; }
.gdrive-status-info  { flex: 1; min-width: 0; }
.gdrive-status-text  { font-size: 13px; font-weight: 600; color: #1e293b; word-break: break-all; }
.gdrive-status-sub   { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.gdrive-autosave-label { font-size: 11px; color: #16a34a; margin-top: 2px; font-weight: 500; }

.gdrive-btn-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.gdrive-signin-btn { gap: 6px; }

.btn-gdrive-save {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: #1a73e8; color: white;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn-gdrive-save:hover:not(:disabled) { background: #1557b0; }
.btn-gdrive-save:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-gdrive-load {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: #f1f8ff; color: #1a73e8;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid #93c5fd; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn-gdrive-load:hover:not(:disabled) { background: #dbeafe; border-color: #60a5fa; }
.btn-gdrive-load:disabled { opacity: 0.4; cursor: not-allowed; }

.gdrive-signout-btn {
  font-size: 12px;
  padding: 6px 12px;
}

.gdrive-note {
  font-size: 11px; color: #94a3b8;
  background: #f8fafc; border-radius: 8px;
  padding: 8px 12px; margin-top: 4px;
  line-height: 1.6;
}

/* ── 親タスク：全子完了時のハイライト ── */
.complete-parent-ready { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
@keyframes completePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  60%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
