:root {
  --dt9-primary: #2B7FE8;
  --dt9-border: #E2E8F0;
  --dt9-text: #1A2332;
  --dt9-text-sub: #5A6A7A;
  --dt9-head-bg: #F4F7FF;
  --dt9-selected-bg: #EBF2FF;
}

.dt9-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== ツールバー ===== */
.dt9-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dt9-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--dt9-text-sub);
}

.dt9-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.dt9-status-select {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--dt9-text);
  background: #fff;
  border: 1.5px solid var(--dt9-border);
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
}

/* プライマリボタン（適用） */
.dt9-apply-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--dt9-primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
}
.dt9-apply-btn:hover:not(:disabled) { background: #1E63C4; }
.dt9-apply-btn:disabled { background: #E2E8F0; color: #A9B4C2; cursor: not-allowed; }

.dt9-clear-btn {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--dt9-primary);
  background: #fff;
  border: 1.5px solid #C7D9F5;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.dt9-clear-btn:hover:not(:disabled) { background: #F0F6FF; border-color: var(--dt9-primary); }
.dt9-clear-btn:disabled { color: #A9B4C2; border-color: #E2E8F0; background: #F7F9FC; cursor: not-allowed; }

/* ===== テーブル ===== */
.dt9-table-scroll { overflow-x: auto; }

.dt9-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--dt9-text);
  background: #fff;
}

.dt9-table th,
.dt9-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--dt9-border);
  white-space: nowrap;
}

.dt9-table thead th {
  background: var(--dt9-head-bg);
  font-weight: 600;
  color: var(--dt9-text-sub);
}

.dt9-check-col { width: 44px; text-align: center; }
.dt9-id-col { width: 56px; }

.dt9-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--dt9-primary);
}

.dt9-table tbody tr:hover td {
  background: #F4F7FF;
  transition: background 0.1s;
}

.dt9-table tbody tr.is-selected td {
  background: var(--dt9-selected-bg);
}

/* ===== 状態バッジ ===== */
.dt9-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.dt9-status[data-status="未着手"] { background: #F3F4F6; color: #6B7280; }
.dt9-status[data-status="対応中"] { background: #DBEAFE; color: #1E40AF; }
.dt9-status[data-status="完了"]   { background: #D1FAE5; color: #065F46; }

/* ===== リセットボタン ===== */
.demo-controls { margin-top: 12px; }

.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.reset-btn:hover { background: #F4F6F9; border-color: #9AA5B4; }

@media (max-width: 600px) {
  .dt9-table th,
  .dt9-table td { padding: 8px 12px; }
  .dt9-toolbar { flex-direction: column; align-items: stretch; }
  .dt9-toolbar-actions { justify-content: flex-start; }
}
