/* =========================================================================
   Overview (the "Today" section), built from Camden's mockup (Nov 16):
   greeting, 4 KPI cards, then "Tervo AI is Working" / "Business Activity" /
   "Needs Your Attention", then "Today's Schedule" / "AI Agents".
   Colors come from theme.css. Every number on it comes from real records.
   ========================================================================= */
#tabToday { padding: 0; }
.ov { max-width: 1320px; display: flex; flex-direction: column; gap: 18px; }
.ov-head h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.ov-head p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }

.ov-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px; min-width: 0; }
.ov-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 26px; }
.ov-card-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; }
.ov-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 4px; border-radius: 6px;
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ov-link:hover { background: var(--accent-soft); }
.ov-link .ti { font-size: 14px; }
.ov-head-links { display: inline-flex; align-items: center; gap: 6px; }
.ov-empty { margin: 4px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.ov-more { border: 0; background: none; padding: 8px 0 0; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* Small rounded icon squares, tinted by meaning */
.ov-ic { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; }
.ov-ic.blue { background: var(--accent-soft); color: var(--accent); }
.ov-ic.red { background: var(--bad-soft); color: var(--bad); }
.ov-ic.orange { background: var(--orange-soft); color: var(--orange); }
.ov-ic.grey { background: var(--hover); color: var(--text-2); }

/* Status pills ("Active") and dots */
.ov-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ov-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ov-pill.good { background: var(--good-soft); color: var(--good-text); }
.ov-pill.warn { background: var(--warn-soft); color: var(--warn-text); }
.ov-pill.bad { background: var(--bad-soft); color: var(--bad-text); }
.ov-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.ov-dot.good { background: var(--good); } .ov-dot.warn { background: var(--warn); } .ov-dot.bad { background: var(--bad); }
.ov-up { color: var(--good-text); font-weight: 600; }
.ov-down { color: var(--bad-text); font-weight: 600; }
.ov-up .ti, .ov-down .ti { font-size: 13px; vertical-align: -2px; margin-right: 1px; }

/* ---------- KPI cards ---------- */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ov-kpi { display: flex; align-items: flex-start; gap: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; }
.ov-kpi:hover { border-color: var(--accent-line); }
.ov-kpi-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 18px;
  background: var(--accent-soft); color: var(--accent); }
.ov-kpi:first-child .ov-kpi-icon { background: var(--good-soft); color: var(--good); }
.ov-kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-label { font-size: 13px; font-weight: 500; color: var(--text); }
.ov-num { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ov-foot { font-size: 12px; color: var(--text-2); }

/* ---------- Row 2: working / activity / attention ---------- */
.ov-row2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ov-work, .ov-agent { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 9px; }
.ov-work:hover .ov-work-text, .ov-agent:hover b { color: var(--accent); }
.ov-work { display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; }
.ov-check { font-size: 18px; color: var(--good); }
.ov-check.draft { color: var(--text-3); }
.ov-work-text { font-size: 13px; font-weight: 500; line-height: 1.35; }
.ov-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ov-select { position: relative; display: inline-flex; align-items: center; }
.ov-select select { appearance: none; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 12px; font-weight: 500; padding: 5px 28px 5px 10px; cursor: pointer; }
.ov-select .ti { position: absolute; right: 8px; font-size: 13px; color: var(--text-2); pointer-events: none; }
.ov-chart { position: relative; height: 128px; margin: 2px 0 8px; }
.ov-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ov-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.ov-line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ov-fill-top { stop-color: var(--accent); stop-opacity: .28; }
.ov-fill-bottom { stop-color: var(--accent); stop-opacity: .02; }
.ov-chart-empty { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-size: 12.5px; color: var(--text-3); }
.ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); padding-top: 10px; }
.ov-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; font: inherit; color: inherit;
  padding: 4px 2px; border-radius: 8px; cursor: pointer; }
.ov-stat + .ov-stat { border-left: 1px solid var(--border); border-radius: 0; }
.ov-stat b { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.ov-stat .ov-stat-flat { color: var(--text); }
.ov-stat span { font-size: 12px; color: var(--text-2); }
.ov-stat.on span { color: var(--accent); font-weight: 600; }
.ov-stat:hover span { color: var(--accent); }

#attCard { scroll-margin-top: 84px; }   /* the bell scrolls here; clear the sticky top bar */
.ov-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #ffffff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ov-atts { display: flex; flex-direction: column; gap: 10px; }
.ov-att { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface); text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: border-color .15s, background .15s; }
.ov-att:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ov-att-text { display: flex; flex-direction: column; min-width: 0; }
.ov-att-text b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-att-text span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-chev { color: var(--text-2); font-size: 16px; }
.ov-clear { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.ov-clear .ti { color: var(--good); font-size: 18px; }

/* ---------- Row 3: schedule / AI agents ---------- */
.ov-row3 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ov-scheds { display: flex; flex-direction: column; gap: 8px; }
.ov-sched { display: grid; grid-template-columns: 76px 32px minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 9px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; text-align: left; font: inherit; color: inherit; width: 100%; }
button.ov-sched { cursor: pointer; }
button.ov-sched:hover { border-color: var(--accent-line); }
.ov-sched-time { font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ov-sched-what { display: flex; flex-direction: column; min-width: 0; }
.ov-sched-what b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-sched-what > span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-warn { color: var(--warn-text); font-weight: 500; }
.ov-sched-addr { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); min-width: 0; }
.ov-sched-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-sched-addr .ti { font-size: 14px; flex: 0 0 auto; }

.ov-agents { display: flex; flex-direction: column; }
.ov-agent { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; }
.ov-agent + .ov-agent { border-top: 1px solid var(--border); }
.ov-agent-text { display: flex; flex-direction: column; min-width: 0; }
.ov-agent-text b { font-size: 13px; font-weight: 600; }
.ov-agent-text span { font-size: 12px; color: var(--text-2); }
.ov-agent-text .ov-note { color: var(--warn-text); }

/* ---------- AI Activity page ---------- */
.act-day .panel-sub { margin-top: 18px; }
.act-row { display: grid; grid-template-columns: 74px 32px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0;
  border-top: 1px solid var(--border); }
.act-time { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.act-text { display: flex; flex-direction: column; min-width: 0; }
.act-text b { font-size: 13.5px; font-weight: 600; }
.act-text span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1180px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-row2 > :last-child { grid-column: 1 / -1; }
  .ov-row3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ov-row2 { grid-template-columns: minmax(0, 1fr); }
  .ov-sched { grid-template-columns: 64px 32px minmax(0, 1fr); }
  .ov-sched-addr { grid-column: 3; }
}
@media (max-width: 520px) {
  .ov-kpis { grid-template-columns: minmax(0, 1fr); }
  .tb-date { display: none; }
  .ov-head h2 { font-size: 22px; }
}
