.analytics-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.analytics-meta { color: var(--text-muted, #5b6474); font-size: 14px; line-height: 1.6; margin: 14px 0; }
.analytics-quality { font-size: 14px; line-height: 1.7; padding-left: 22px; }
.analytics-flow { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.analytics-flow .active { background: var(--accent); color: white; }
#view-analytics .table-scroll { overflow-x: auto; }
#view-analytics th, #view-analytics td { white-space: nowrap; }
#view-analytics [data-analytics-detail-body] { margin-top: 24px; }
#view-analytics [data-analytics-detail-body]:empty { display: none; }
#view-analytics [data-result] { margin-bottom: 20px; }
#view-analytics select { min-height: 44px; }
.analytics-chart { margin: 20px 0; padding: 18px; border: 1px solid var(--border, #d8dee6); border-radius: 8px; }
.analytics-chart figcaption { font-weight: 600; }
.analytics-bars { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.analytics-bar { flex: 1 0 42px; min-width: 42px; text-align: center; font-size: 12px; }
.analytics-bar-value { display: block; margin-bottom: 6px; }
.analytics-bar-track { height: 140px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border, #d8dee6); }
.analytics-bar-track > span { width: 70%; max-width: 48px; background: var(--accent, #475569); border-radius: 3px 3px 0 0; }
.analytics-bar-label { display: block; margin-top: 8px; max-width: 140px; overflow-wrap: anywhere; }
.dashboard-commerce { margin: 20px 0 32px; }
.overview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.overview-card { min-width: 0; grid-column: span 3; border: 1px solid var(--border, #d8dee6); border-radius: 10px; padding: 22px; background: white; }
.overview-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.overview-card-head h3 { margin: 0; font-size: 16px; }
.overview-card-head .btn { flex: none; }
.overview-card[data-overview-result="0"] { grid-column: span 4; border: 0; padding: 0; background: transparent; }
.overview-card[data-overview-result="0"] .overview-card-head { display: none; }
.overview-card[data-overview-result="0"] .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; height: 100%; }
.overview-card[data-overview-result="0"] .stat-card { padding: 22px; border-radius: 10px; }
.overview-card[data-overview-result="0"] .stat-card .value { font-size: 36px; }
.overview-card[data-overview-result="1"] { grid-column: span 2; }
.overview-card[data-overview-result="4"], .overview-card[data-overview-result="5"] { grid-column: 1 / -1; }
.overview-card[hidden] { display: none; }
.overview-section-head { display: flex; align-items: baseline; gap: 16px; margin: 28px 0 16px; }
.overview-section-head h2 { font-size: 24px; margin: 0; }
.overview-section-head > span { font-size: 14px; color: #536079; }
.overview-state { display: inline-block; font-size: 13px; color: #536079; margin: 8px 0; }
.overview-state:empty { display: none; }
.overview-kpi-number { display: block; font-size: 32px; line-height: 1.3; margin-top: 12px; }
.overview-kpi-number small { font-size: 14px; font-weight: 400; }
.overview-financial { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; margin-bottom: 0; }
.overview-financial dd { margin: 0; font-weight: 600; }
.overview-empty { margin: 24px 0; text-align: center; color: #536079; font-size: 15px; }
.overview-connections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.overview-connections > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.overview-guidance { flex-basis: 100%; margin: 0; color: var(--muted); line-height: 1.6; }
.overview-warning-copy { flex: 1; min-width: 0; }
.overview-warning-copy p { margin: 6px 0 0; line-height: 1.6; }
.overview-evidence { border-top: 1px solid #e0e5ed; margin-top: 16px; padding-top: 16px; font-size: 14px; }
.overview-evidence summary, .dash-secondary summary { cursor: pointer; }
.overview-warning { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px 20px; border: 1px solid #e8bf8e; background: #fff8ef; border-radius: 8px; margin: 16px 0; }
.overview-warning ul { margin: 0; padding-left: 20px; font-size: 14px; }
.overview-warning.is-failed { background: #fff3f3; border-color: #e4a2a2; }
.dash-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.dash-controls select { min-height: 44px; }
.dash-controls select { padding: 8px 12px; border: 1px solid #c7d0df; border-radius: 8px; color: #28395b; background: white; font-size: 14px; }
.app[data-view="dashboard"] .content-area { background: #f7f9fc; }
.app[data-view="dashboard"] .main { background: transparent; }
#view-dashboard { max-width: 1440px; font-size: 15px; }
#view-dashboard .dash-head h1 { font-size: 30px; }
#view-dashboard .dash-h, #dashDetectionTitle { font-size: 24px; }
#view-dashboard .dash-kpis { display: contents; }
#view-dashboard .dash-kpi { background: white; border-radius: 10px; display: block; }
#view-dashboard .dash-detection-grid .dash-kpi,
#view-dashboard .dash-detection-grid > .dash-insight { box-sizing: border-box; min-width: 0; margin: 0; padding: 24px; border-width: 1px; border-style: solid; }
#view-dashboard .dash-kpi { border-color: #d8dee6; }
#view-dashboard .dash-kpi-label { min-height: 24px; }
#view-dashboard .dash-kpi-line { min-height: 1lh; }
#view-dashboard .dash-kpi-value { margin-top: 6px; }
#view-dashboard .dash-kpi-value { font-size: 36px; }
#view-dashboard .dash-kpi-label { font-size: 15px; }
#view-dashboard .dash-detection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
#view-dashboard .dash-detection-grid > .dash-insight { grid-column: span 2; }
#view-dashboard .dash-detection-grid .dash-card-head { display: flex; align-items: center; min-height: 36px; margin: 0 0 20px; padding: 0; }
#view-dashboard .dash-detection-grid .dash-card-head h2 { margin: 0; }
#view-dashboard #dashInsightH, #view-dashboard #dashRecentH { font-size: 22px; font-weight: 600; }
#dashInsight .dash-trend-nums { gap: 8px 12px; margin-bottom: 8px; }
#dashInsight .dash-trend-nums b { font-size: 26px; }
#dashInsight .dash-trend-nums > div + div::before { content: '/'; margin-right: 6px; color: #64748B; font-size: 14px; }
#dashInsight .dash-trend-k, #dashInsight .dash-trend-note { font-size: 14px; color: #475569; }
#dashInsight .dash-trend-note { margin: 0 0 12px; line-height: 1.5; }
#dashInsight .dash-trend-chart { height: 270px; }
#dashInsight .dash-bar-label { font-size: 14px; }
#dashInsight .dash-trend-axis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding-inline: 1.904762%; align-items: start; }
#dashInsight .dash-day-link { display: block; min-width: 0; padding: 0; font-size: 14px; line-height: 20px; text-align: center; }
#dashInsight .dash-day-progress { display: block; margin-top: 4px; color: #475569; font-size: 14px; font-weight: 400; }
#view-dashboard .dash-insight { background: white; border: 1px solid #d8dee6; border-radius: 10px; }
#view-dashboard #dashRecent { border-color: #E5E7EB; border-radius: 8px; box-shadow: none; container-type: inline-size; }
#dashRecent .dash-recent-head { justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
#dashRecent .dash-recent-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
#view-dashboard #dashRecentH { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.4; }
#dashRecent .dash-recent-period { color: #64748B; font-size: 14px; font-weight: 400; white-space: nowrap; }
#dashRecent .dash-recent-head .dash-link { margin-left: auto; font-size: 14px; font-weight: 400; white-space: nowrap; }
#dashRecent .dash-recent-table { width: 100%; min-width: 0; table-layout: auto; border-collapse: collapse; font-family: inherit; }
#dashRecent .dash-recent-table th { height: auto; padding: 10px 12px; border: 0; border-bottom: 1px solid #E5E7EB; background: #F8FAFC; color: #475569; font-size: 14px; font-weight: 500; line-height: 20px; text-align: left; letter-spacing: normal; }
#dashRecent .dash-recent-table td { height: auto; padding: 12px; border: 0; border-bottom: 1px solid #E5E7EB; color: #334155; font-size: 14px; font-weight: 400; line-height: 24px; font-variant-numeric: tabular-nums; }
#dashRecent .dash-recent-table td:nth-child(2) { width: 100%; max-width: 0; }
#dashRecent .dash-recent-table td:not(:nth-child(2)) { white-space: nowrap; }
#dashRecent .dash-recent-table tbody tr:last-child td { border-bottom: 0; }
#dashRecent .dash-recent-table tbody tr { cursor: default; }
#dashRecent .dash-recent-table tbody tr:hover { background: #F8FAFC; }
#dashRecent .dash-recent-time { white-space: nowrap; }
#dashRecent .dash-recent-keyword { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dashRecent .dash-recent-severity { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#dashRecent .dash-recent-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#dashRecent .dash-recent-severity.is-critical { color: #991B1B; }
#dashRecent .dash-recent-severity.is-high { color: #B45309; }
#dashRecent .dash-recent-severity.is-medium { color: #475569; }
#dashRecent .dash-recent-status { color: #475569; white-space: nowrap; }
#dashRecent .dash-recent-time span { display: block; line-height: 22px; }
@media (max-width: 1280px) {
  #view-dashboard .dash-detection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-dashboard .dash-detection-grid > .dash-insight { grid-column: 1 / -1; }
}
#view-dashboard #dashTodo { margin: 16px 0; padding: 0; border: 0; background: transparent; }
#view-dashboard #dashTodo > h2 { font-size: 16px; margin-bottom: 10px; }
#view-dashboard #dashTodo ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
#view-dashboard #dashTodo li { padding: 16px 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
#view-dashboard #dashTodo li .dash-todo-desc { flex: 1; margin: 0; }
#view-dashboard #dashTodo li .dash-todo-big { margin: 0; }
#view-dashboard #dashTodo li.is-warn { background: #fff8ef; border-color: #e8bf8e; }
#view-dashboard #dashTodo li.is-danger { background: #fff3f3; border-color: #e4a2a2; }
#view-dashboard .dash-secondary { margin: 16px 0; font-size: 14px; }
#view-dashboard .dash-day-link { border: 0; background: none; color: #425477; font-size: 13px; cursor: pointer; min-height: 36px; }
#view-dashboard [id] { scroll-margin-top: 20px; }
.dashboard-commerce .table-scroll { overflow-x: auto; }
.dashboard-commerce th, .dashboard-commerce td { white-space: nowrap; }
.dashboard-commerce select { min-height: 44px; }
@media (max-width: 1000px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-card[data-overview-result] { grid-column: 1; }
  .overview-connections { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .topbar { overflow-x: auto; flex: none; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .topbar > * { flex-shrink: 0; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .body-row { flex-direction: column; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .sidenav { width: 100%; height: 56px; border-bottom: 1px solid var(--gnb-border); }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .sidenav .site-name { display: none; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .sidenav-menu { display: flex; overflow-x: auto; overflow-y: hidden; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .sidenav-menu > .nav-item { flex: none; width: auto; white-space: nowrap; padding: 12px; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .sidenav-menu > .sub-nav { display: none; }
  .app:is([data-view="analytics"], [data-view="dashboard"], [data-view="adcredential"]) .main { width: 100%; min-width: 0; padding: 16px; }
  #view-analytics .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-analytics .analytics-chart { padding: 12px; }
  #view-dashboard .dash-detection-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #view-dashboard .dash-detection-grid .dash-kpi,
  #view-dashboard .dash-detection-grid > .dash-insight { padding: 20px; }
  #view-dashboard .dash-head { align-items: flex-start; }
  .dash-controls { justify-content: flex-start; }
  .overview-card[data-overview-result="0"] .analytics-metrics { grid-template-columns: minmax(0, 1fr); }
  .overview-card { padding: 20px; }
}
