/* 전체 목록: 노션 DB형 표 + 턱 고정 무대 + 쪽 넘김 (2026-10-24 사용자 선택 시안 02, 제목 앞 아이콘 없음).
   styles.css·arche-ui.css 뒤에 불러와 .dashboard 범위에서만 덮어쓴다. 동작은 list-stage.js. */
.dashboard {
  --db-ink: #37352f; --db-muted: #787774; --db-soft: #9b9a97; --db-line: #ededeb; --db-head: #fbfbfa; --db-hover: #f7f7f5; --db-chip: #e3e2e0;
}

/* 툴바: 한 덩어리로 낮게 */
.dashboard .tracker-toolbar { min-height: 0; padding: 0 2px 8px; gap: 8px 12px; border: 0; background: transparent; align-items: center; flex-wrap: wrap; }
.dashboard .classification-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.dashboard .filter-row { gap: 4px; }
.dashboard .filter-label { width: auto; margin-right: 2px; color: var(--db-soft); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0; }
.dashboard .view-tabs, .dashboard .index-tabs { gap: 2px; padding: 0; background: transparent; border: 0; box-shadow: none; flex-wrap: wrap; }
.dashboard .view-tab, .dashboard .index-tab {
  min-height: 26px; height: 26px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; box-shadow: none;
  color: var(--db-ink); font-size: 0.75rem; font-weight: 500; line-height: 26px;
}
.dashboard .view-tab span, .dashboard .index-tab span { margin-left: 3px; color: var(--db-soft); opacity: 1; font-weight: 500; }
.dashboard .view-tab:hover, .dashboard .index-tab:hover { background: #efefed; }
.dashboard .view-tab.active, .dashboard .index-tab.active,
.dashboard .index-tab[data-index-filter].active { background: var(--db-chip); color: var(--db-ink); border: 0; font-weight: 650; }
.dashboard .toolbar-actions { padding-top: 0 !important; gap: 6px; align-items: center; }
.dashboard .table-search { height: 28px; min-height: 28px; border: 1px solid #e9e9e7; border-radius: 4px; background: #fff; box-shadow: none; padding: 0 8px; font-size: 0.75rem; }
.dashboard .table-search input { font-size: 0.75rem; }
.dashboard .toolbar-buttons { gap: 2px; }
.dashboard .report-tool-button, .dashboard .sort-button {
  height: 28px; min-height: 28px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; box-shadow: none;
  color: var(--db-ink); font-size: 0.75rem; font-weight: 500;
}
.dashboard .report-tool-button:hover, .dashboard .sort-button:hover { background: #efefed; }
.dashboard .report-tool-button svg, .dashboard .sort-button svg { width: 14px; height: 14px; }

/* 표 판 */
.dashboard .tracker-card { margin-top: 0; padding: 0; border: 1px solid var(--db-line); border-radius: 6px; box-shadow: none; background: #fff; overflow: hidden; }
.dashboard .tracker-card .table-wrap { padding: 0; }
.dashboard .tracker-card table { table-layout: fixed; border-collapse: collapse; border-spacing: 0; min-width: 1080px; color: var(--db-ink); }
.dashboard .tracker-card th, .dashboard .tracker-card td { border-right: 1px solid var(--db-line); border-bottom: 1px solid var(--db-line); }
.dashboard .tracker-card th:last-child, .dashboard .tracker-card td:last-child { border-right: 0; }
.dashboard .tracker-card th {
  position: sticky; top: 0; z-index: 2; height: 33px; padding: 0 8px; background: var(--db-head); color: var(--db-muted);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left; white-space: nowrap;
}
.dashboard .tracker-card th:first-child { width: 24%; padding-left: 12px; }
.dashboard .tracker-card th:nth-child(2) { width: 9%; }
.dashboard .tracker-card th:nth-child(3) { width: 6%; }
.dashboard .tracker-card th:nth-child(4) { width: 10%; }
.dashboard .tracker-card th:nth-child(5) { width: 11%; }
.dashboard .tracker-card th:nth-child(6) { width: 14%; }
.dashboard .tracker-card th:nth-child(7) { width: 8%; }
.dashboard .tracker-card th:nth-child(8) { width: 12%; }
.dashboard .tracker-card th:nth-child(9) { width: 5%; }
.dashboard .tracker-card td {
  height: 36px; padding: 0 8px; border-radius: 0; background: transparent; vertical-align: middle; font-size: 0.8125rem; color: var(--db-ink); transition: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dashboard .tracker-card td:first-child { padding-left: 12px; border-radius: 0; }
.dashboard .tracker-card td:last-child { padding-right: 8px; border-radius: 0; }
.dashboard .tracker-card tbody tr:last-child td { border-bottom: 1px solid var(--db-line); }
.dashboard .tracker-card tbody tr:hover, .dashboard .tracker-card tbody tr:hover td { background: var(--db-hover); }

.dashboard .title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dashboard .project-title-button {
  display: block; min-width: 0; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--db-ink); font: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.4;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.dashboard .project-title-button:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9c8c5; }
.dashboard .row-adding-badge { flex: none; font-size: 0.6875rem; padding: 1px 6px; border-radius: 4px; }
.dashboard .col-authors { color: var(--db-muted); }
.dashboard .authors-text.is-empty { color: var(--db-soft); }
.dashboard .guest-file-note { margin-left: 6px; color: var(--db-soft); font-size: 0.75rem; }

.dashboard .type-pill { display: inline-block; height: auto; padding: 0; border: 0; background: none; color: var(--db-ink); font-size: 0.8125rem; font-weight: 400; }
.dashboard .status-picker-button {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; min-height: 22px; padding: 0 7px; border: 0; border-radius: 4px;
  background: var(--tag-bg); color: var(--tag-fg); font-size: 0.75rem; font-weight: 500; box-shadow: none; max-width: 100%;
}
.dashboard .status-picker-button svg { width: 10px; height: 10px; opacity: .55; }
.dashboard .row-progress { display: flex; align-items: center; gap: 7px; }
.dashboard .row-progress-track { flex: 1; height: 5px; border-radius: 3px; background: var(--db-line); overflow: hidden; }
.dashboard .row-progress-track span { display: block; height: 100%; border-radius: 3px; }
.dashboard .row-progress small { width: 32px; flex: none; text-align: right; color: var(--db-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.dashboard .target-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dashboard .target-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: var(--db-ink); font-weight: 400; }
.dashboard .target-links { display: inline-flex; gap: 3px; flex: none; }
.dashboard .target-chip { height: 20px; padding: 0 5px; border-radius: 4px; font-size: 0.6875rem; }
.dashboard .target-chip span { display: none; }
.dashboard .file-count { font-size: 0.6875rem; color: var(--db-soft); }
.dashboard .index-cell { display: flex; gap: 3px; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.dashboard .index-badge { height: 20px; padding: 0 6px; border-radius: 4px; font-size: 0.6875rem; font-weight: 600; line-height: 20px; }
.dashboard .no-index { color: #c9c8c5; }
.dashboard .deadline { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.dashboard .deadline strong { font-size: 0.8125rem; font-weight: 500; color: var(--db-ink); }
.dashboard .deadline strong { flex: none; }
.dashboard .deadline small { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; color: var(--db-soft); font-variant-numeric: tabular-nums; }
.dashboard .deadline.urgent small { color: #d44c47; font-weight: 600; }
.dashboard .row-actions { justify-content: flex-end; gap: 2px; }
.dashboard .demo-row-label { font-size: 0.6875rem; padding: 1px 6px; border-radius: 4px; background: #f1f1ef; color: var(--db-muted); }
.dashboard .row-ai-chat, .dashboard .row-menu { height: 24px; min-height: 24px; padding: 0 6px; border-radius: 4px; font-size: 0.6875rem; }

/* 바닥줄 + 쪽 넘김 */
.dashboard .tracker-footer { height: 40px; min-height: 40px; padding: 0 12px; gap: 12px; border-top: 1px solid var(--db-line); color: var(--db-muted); font-size: 0.75rem; background: #fff; }
.dashboard .tracker-footer > * { white-space: nowrap; }
.dashboard .tracker-footer > button { color: var(--db-muted); font-weight: 500; }
.dashboard .tracker-footer > button:hover { color: var(--db-ink); }
.list-pager { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.list-pager[hidden] { display: none; }
.list-pager button { min-width: 26px; height: 26px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-size: 0.75rem; font-weight: 500; color: var(--db-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.list-pager button:hover:not(:disabled) { background: #efefed; }
.list-pager button.on { background: var(--db-chip); font-weight: 700; }
.list-pager button:disabled { opacity: .3; cursor: default; }
.list-pager .gap { color: var(--db-soft); padding: 0 2px; }
.list-pager .range { margin-left: 8px; color: var(--db-soft); font-variant-numeric: tabular-nums; }

/* 턱 고정 무대: 목록이 화면 한 장을 차지하고, 표는 남은 높이를 꽉 채운다 */
.dashboard.list-stage { height: var(--stage-h, 100vh); padding-top: 14px; padding-bottom: 12px; display: flex; flex-direction: column; box-sizing: border-box; }
.dashboard.list-stage > * { flex: none; }
.dashboard.list-stage .list-heading { margin: 0 0 8px; }
.dashboard.list-stage .tracker-toolbar { margin-top: 0; padding-top: 0; }
.dashboard.list-stage .list-heading h2 { font-size: 1.375rem; }
.dashboard.list-stage .guest-sample-banner { margin: 0 0 8px; padding: 8px 10px 8px 12px; gap: 10px; border-radius: 10px; box-shadow: none; border: 1px solid var(--db-line); flex-wrap: nowrap; flex-direction: row; align-items: center; }
.dashboard.list-stage .guest-sample-banner .guest-banner-mascot { width: 28px; height: 28px; flex: none; }
.dashboard.list-stage .guest-sample-banner .guest-banner-mascot svg { width: 28px; height: 28px; }
.dashboard.list-stage .guest-sample-banner > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.dashboard.list-stage .guest-sample-banner > div > span { flex: none; font-size: 0.75rem; }
.dashboard.list-stage .guest-sample-banner strong { font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dashboard.list-stage .guest-sample-banner p { display: none; }
.dashboard.list-stage .guest-sample-banner button { flex: none; width: auto; height: 30px; min-height: 30px; padding: 0 12px; font-size: 0.75rem; }
.dashboard.list-stage .tracker-card { flex: 1 1 auto; min-height: 220px; display: flex; flex-direction: column; }
.dashboard.list-stage .table-wrap { flex: 1 1 auto; min-height: 0; overflow-x: auto; overflow-y: hidden; display: flex; flex-direction: column; }
.dashboard.list-stage .table-wrap > table { flex: none; }
.dashboard .list-filler { flex: 1 0 0px; min-width: 1080px; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0 35px, var(--db-line) 35px 36px); background-size: 100% 36px; }
.dashboard .empty-state:not([hidden]) ~ .list-filler { display: none; }

.list-detent-hint {
  position: fixed; left: 50%; z-index: 80; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: #fff; color: #5b54f0; box-shadow: 0 6px 20px rgba(40, 40, 90, .14); font-size: 0.75rem; font-weight: 650;
  opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity .15s, transform .15s;
}
.list-detent-hint.show { opacity: 1; transform: translate(-50%, 0); }
.list-detent-hint .bar { width: 46px; height: 4px; border-radius: 4px; background: #eeedff; overflow: hidden; }
.list-detent-hint .bar i { display: block; width: 0; height: 100%; background: #5b54f0; }

@media (max-width: 760px) {
  .dashboard .classification-filters { gap: 4px; }
  .dashboard .view-tabs, .dashboard .index-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: calc(100vw - 80px); scrollbar-width: none; }
  .dashboard .toolbar-buttons { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; }
  .dashboard .tracker-card td.col-title, .dashboard .tracker-card th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--db-line); }
  .dashboard .tracker-card th:first-child { z-index: 3; background: var(--db-head); }
  .dashboard .tracker-card { border-radius: 6px; background: #fff; overflow: hidden; }
  .dashboard .tracker-card .table-wrap { overflow-x: auto; }
  .dashboard .tracker-card table { display: table; width: 100%; min-width: 960px; }
  .dashboard .tracker-card thead { display: table-header-group; }
  .dashboard .tracker-card tbody { display: table-row-group; }
  .dashboard .tracker-card tbody tr { display: table-row; padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .dashboard .tracker-card td, .dashboard .tracker-card td:first-child, .dashboard .tracker-card td:last-child { display: table-cell; height: 40px; padding: 0 8px; }
  .dashboard .tracker-card .status-picker-button { height: 24px; min-height: 24px; }
  .dashboard .row-ai-chat, .dashboard .row-menu { height: 28px; width: auto; }
  .dashboard .tracker-footer { padding: 0 10px; }
  .dashboard .tracker-footer button { height: 32px; }
  .dashboard .view-tab, .dashboard .index-tab { height: 32px; min-height: 32px; line-height: 32px; }
  .dashboard .report-tool-button, .dashboard .sort-button { height: 32px; min-height: 32px; }
  .dashboard.list-stage .guest-sample-banner > div > span, .dashboard.list-stage .guest-sample-banner strong { font-size: 0.75rem; }
  .dashboard .tracker-card th:first-child { width: 190px; }
  .dashboard .tracker-card td.col-title { padding-left: 10px; }
  .list-pager .range { display: none; }
  .dashboard .tracker-footer { gap: 6px; }
  .dashboard .tracker-footer:has(.list-pager:not([hidden])) #visibleCount { display: none; }
  .list-pager button { min-width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .list-detent-hint { transition: none; } }
