/* DATA BASE (V2) — colors fixed by the approved picture docs/v2-database.html; kept as-is in both themes.
   Four tabs since 2026-10-18 (API 연동 / 판매처·솔루션 / 주제 / 동기화): rows gained [method] [topic] tags and a route line. */
.db { background: #0b0f17; color: #e6e9ef; border-radius: 14px; padding: 16px 18px; font-size: 13px; }
.db-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; color: #8b93a3; margin: 0 2px 10px; }
.db-when { color: #9ca3af; font-variant-numeric: tabular-nums; }
.db-health { color: #c7cbd4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.db-tabtext { width: 100%; color: #6b7280; }
.db-legend { display: flex; gap: 10px; font-size: 11px; margin: 0 0 12px 2px; flex-wrap: wrap; }
.db-card { background: #111827; border: 1px solid #1f2937; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.db-card.db-empty { color: #8b93a3; text-align: center; padding: 28px; }
.db-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.db-logo { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex: none; background: #4b5563; }
.db-logo[data-source="ZIGZAG"] { background: #ff3f8e; }   /* ZigZag app icon pink (Hankyu 10/19) */
.db-logo[data-source="CAFE24"] { background: #2563eb; }
.db-logo[data-source="SELLMATE"] { background: #0f766e; }
.db-logo[data-source="GA"] { background: #f59e0b; }
.db-logo[data-source="META"] { background: #6b7280; }
.db-logo[data-source="CHANNELTALK"] { background: #0ea5e9; }
.db-logo[data-source="BUYAPPS"], .db-logo[data-source="ADCENTER"], .db-logo[data-source="OTHER"] { background: #4b5563; }
.db-logo[data-source="REFS"] { background: #8b5cf6; }
.db-logo-xs { width: 16px; height: 16px; border-radius: 5px; font-size: 9px; font-style: normal; }
.db-head b { font-size: 14px; font-weight: 600; display: block; color: #fff; }
.db-head small { color: #8b93a3; font-size: 11px; }
.db-login { margin-left: auto; font-size: 11px; color: #c7cbd4; display: inline-flex; align-items: center; gap: 6px; background: #0e131d; border: 1px solid #1f2937; border-radius: 8px; padding: 4px 10px; }
.db-login small { color: #6b7280; }
.db-login i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.db-login.bad i { background: #ef4444; }
.db-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #151c29; position: relative; }
.db-name { width: 250px; font-weight: 500; color: #fff; display: flex; flex-direction: column; gap: 2px; flex: none; min-width: 0; }
.db-name > span { display: flex; align-items: center; gap: 6px; }
.db-route { font-weight: 400; font-size: 10.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-row-sync .db-name { width: 300px; }
.db-row-api .db-name { width: 220px; }
.db-tags { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; min-width: 0; }
.db-tag { font-size: 11px; padding: 3px 8px; border-radius: 5px; font-weight: 500; line-height: 1.2; border: 1px solid #1f2937; color: #9ca3af; background: #0e131d; white-space: nowrap; }
.db-tag-method { color: #c7cbd4; }
.db-tag-topic { color: #a5b4fc; border-color: #2a2d5a; }
.db-src { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #c7cbd4; margin-right: 2px; }
.db-q { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #4b5563; color: #9ca3af; font-size: 9px; display: inline-flex; align-items: center; justify-content: center; cursor: help; position: relative; flex: none; }
.db-q:hover, .db-q:focus { border-color: #9ca3af; color: #fff; outline: none; }
.db-q::after { content: attr(data-tip); position: absolute; left: 20px; top: 50%; transform: translateY(-50%); background: #1f2937; color: #e6e9ef; border: 1px solid #374151; border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; max-width: 480px; }
.db-q:hover::after, .db-q:focus::after { opacity: 1; white-space: normal; width: max-content; }
.db-period { font-size: 11px; color: #9ca3af; background: #1a2230; border-radius: 4px; padding: 1px 6px; min-width: 26px; text-align: center; white-space: nowrap; margin-left: auto; }
.db-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #1f2937; border-top-color: #22c55e; flex: none; }
@media (prefers-reduced-motion: no-preference) { .db-spin { animation: db-rotate 3s linear infinite; } }
@keyframes db-rotate { to { transform: rotate(360deg); } }
.db-status { font-size: 11px; padding: 3px 8px; line-height: 1.2; border-radius: 5px; font-weight: 500; white-space: nowrap; }
.db-status-on { background: #0f2e1c; color: #4ade80; }
.db-status-plan { background: #0f2340; color: #60a5fa; }
.db-status-hold { background: #2d2308; color: #fbbf24; }
.db-status-wait { background: #3a1515; color: #f87171; }
.db-status-off { background: #1f2937; color: #9ca3af; }
.db-chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex: none; width: 250px; }
.db-row-api .db-period { display: none; }
.db-row-api .db-status { margin-left: auto; }
.db-chip { position: relative; font-size: 11px; padding: 3px 8px; border-radius: 5px; font-weight: 500; line-height: 1.2; }
.db-chip-1 { background: #0f3d31; color: #9fe1cb; }
.db-chip-2 { background: #2a2560; color: #cecbf6; }
.db-chip-3 { background: #0f3560; color: #b5d4f4; }
.db-chip-4 { background: #4a2414; color: #f5c4b3; }
.db-chip-shared { background: #1a2230; color: #6b7280; }
.db-chip i { position: absolute; top: -6px; right: -6px; width: 13px; height: 13px; border-radius: 50%; background: #ef4444; color: #fff; font-style: normal; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1.5px solid #111827; }
.db-dim { opacity: .55; }
.db-dim .db-name { font-weight: 400; }
.db-topic-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; }
.db-topic { font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid #1f2937; background: #0e131d; color: #9ca3af; cursor: pointer; }
.db-topic.on { background: #1a2230; color: #fff; border-color: #374151; }
.db-clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; margin-right: 6px; }
@media (max-width: 960px) { .db-chips { width: auto; } }
@media (max-width: 720px) {
  .db { padding: 12px; }
  .db-row { flex-wrap: wrap; }
  .db-name, .db-row-sync .db-name, .db-row-api .db-name { width: 100%; }
  .db-route { white-space: normal; }
  .db-q::after { white-space: normal; width: 220px; }
  .db-login { margin-left: 0; width: 100%; }
}
/* 오늘의 바퀴 (from the daily summary) at the top of 동기화 */
.db-wheel-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid #151c29; font-size: 12px; align-items: start; }
.db-wheel-label { color: #8b93a3; font-size: 11px; padding-top: 2px; }
.db-wheel-body { color: #e6e9ef; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; overflow-wrap: anywhere; }
.db-wheel .dash-run { display: inline-flex; align-items: center; gap: 4px; }
.db-wheel .dash-run-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4b5563; margin-right: 3px; }
.db-wheel .dash-run-dot.ok { background: #22c55e; }
.db-wheel .dash-run-dot.bad { background: #ef4444; }
.db-wheel .badge { font-size: 11px; padding: 2px 8px; border-radius: 5px; }
.db-wheel .badge.green { background: #0f2e1c; color: #4ade80; }
.db-wheel .badge.orange { background: #2d2308; color: #fbbf24; }

/* 수집 현황 (2026-11-14): one card per dataset, one cell per day, three colours only. */
.col-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin: 0 2px 18px; }
.col-sum b { display: block; font-size: 16px; font-weight: 600; color: #fff; line-height: 1.4; }
.col-sum small { color: #8b93a3; font-size: 12px; font-variant-numeric: tabular-nums; }
.col-sum-bad b, .col-sum-stale b { color: #fca5a5; }
.col-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; color: #c7cbd4; }
.col-legend span { display: inline-flex; align-items: center; gap: 6px; }
.col-legend small { width: 100%; color: #6b7280; font-size: 11px; }
.col-group { margin-bottom: 20px; }
.col-group h3 { margin: 0 2px 8px; font-size: 13px; font-weight: 600; color: #e6e9ef; display: flex; align-items: baseline; gap: 8px; }
.col-group h3 small { font-weight: 400; font-size: 11px; color: #6b7280; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.col-card { background: #111827; border: 1px solid #1f2937; border-radius: 12px; padding: 12px 14px; min-width: 0; }
.col-card-bad { border-color: #7f1d1d; }
.col-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.col-card-head b { font-size: 13px; font-weight: 600; color: #fff; }
.col-card-head small { font-size: 11px; color: #6b7280; white-space: nowrap; }
.col-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.col-store { width: 64px; white-space: nowrap; flex: none; font-size: 12px; color: #9ca3af; }
.col-cells { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; flex: 1; min-width: 0; }
.col-cell { display: block; height: 18px; border-radius: 3px; box-sizing: border-box; }
.col-legend .col-cell { width: 12px; height: 12px; }
.col-ok { background: #22c55e; }
.col-miss { background: #ef4444; }
.col-off { background: #6b7280; }
.col-none { background: transparent; border: 1px dashed #263041; }
@media (max-width: 640px) { .col-grid { grid-template-columns: 1fr; } .col-sum b { font-size: 15px; } }
