/* Overview page. Tokens only; see docs/design-system.md. */

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: var(--s4); margin-top: var(--s4); align-items: start; }
.opps { margin-top: var(--s8); }
.opps .section-head .seg { margin-left: var(--s2); }

/* KPI strip details */
.kpi .of { color: var(--faint); font-weight: 500; font-size: 15px; }

/* Setup: compact, only while something is left to do */
.setup { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); margin-bottom: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.setup-head { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); }
.setup-head .btn { margin-left: auto; }
.setup-steps { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.setup-steps li { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); }
.setup-steps li.done { color: var(--muted); }
.setup-steps li.done span:not(.tick) { text-decoration: line-through; text-decoration-color: var(--faint); }
.setup-steps .tick { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); color: #fff; }
.setup-steps li.done .tick { background: var(--teal); border-color: var(--teal); }
.setup-steps .tick svg { width: 12px; height: 12px; }
.setup-steps a, .setup-steps .linklike { font-weight: 500; font-size: var(--fs-sm); }

/* Monitoring table */
.mon-table td { padding-top: 10px; padding-bottom: 10px; }
.mon-table td:first-child { max-width: 320px; }
.mon-table .mon-actions { text-align: right; white-space: nowrap; }
.mon-table .mon-actions .btn + .btn { margin-left: 2px; }
.mon-latest { color: var(--text); font-weight: 500; display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-latest:hover { color: var(--teal-text); }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: var(--s1) 0; }
.feed li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); padding: 10px var(--s5); }
.feed li + li { border-top: 1px solid var(--border); }
.feed .ic { width: 28px; height: 28px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; }
.feed li.unread .ic { background: var(--teal-soft); color: var(--teal-text); }
.feed .ic svg { width: 15px; height: 15px; }
.feed a { color: var(--text); font-size: var(--fs-sm); font-weight: 500; display: block; line-height: 1.4; }
.feed a:hover { color: var(--teal-text); }
.feed p { color: var(--text-2); font-size: var(--fs-xs); margin-top: 2px; overflow-wrap: anywhere; }
.feed time { color: var(--muted); font-size: 11px; }

/* First run */
.first-run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.first-run .panel-body { padding: var(--s6); border-right: 1px solid var(--border); display: grid; align-content: start; gap: var(--s2); }
.first-run h2 { font-size: var(--fs-lg); }
.first-run-templates { padding: var(--s5) var(--s6); display: grid; gap: var(--s2); align-content: start; }
.tpl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.tpl { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); text-align: left; transition: border-color var(--ease), background var(--ease); }
.tpl:hover { border-color: var(--teal); background: var(--surface-2); }
.tpl > svg { width: 18px; height: 18px; color: var(--teal); margin-top: 1px; }
.tpl b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.tpl span span { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; margin-top: 2px; }

@media (min-width: 1700px) { .dash-grid { grid-template-columns: minmax(0, 2.4fr) minmax(320px, 1fr); } }
@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .first-run { grid-template-columns: 1fr; }
  .first-run .panel-body { border-right: 0; border-bottom: 1px solid var(--border); padding: var(--s5); }
  .tpl-list { grid-template-columns: 1fr; }
  .opps .section-head .seg { order: 3; margin-left: 0; width: 100%; }
  .mon-table thead { display: none; }
  .mon-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
  .mon-table tbody tr:last-child { border-bottom: 0; }
  .mon-table td { padding: 0; border: 0; }
  .mon-table td:first-child { grid-column: 1 / -1; max-width: none; }
  .mon-table td.num::before { content: attr(data-l); }
  .mon-table .mon-actions { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 860px) {
  body[data-route='home'] #topActions [data-action='new-search'] { display: none; }
  .setup-head { flex-wrap: wrap; row-gap: 2px; }
  .setup-head .muted { order: 3; width: 100%; font-size: var(--fs-xs); }
  .setup-steps { display: grid; gap: 8px; }
}
@media (max-width: 430px) {
  .kpi { padding: var(--s3) var(--s4); }
  .kpi .kpi-value { font-size: 19px; }
}
