/* 261112-rat: REP ACTIVITY tab. Same look as GHL SETTER DIALS (Inter, near-black ink, white cards, 8px corners, blue). */
#view-rep-activity {
  --ra-ink: #0f0f0f; --ra-muted: #6b6b70; --ra-faint: #9a9aa0; --ra-line: #ececee; --ra-soft: #f7f7f8;
  --ra-blue: #2b44e6; --ra-off: #f3f3f5; --ra-bad: #c4320a; --ra-call: #0f0f0f; --ra-ns: #c4320a;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ra-ink);
}
#view-rep-activity * { box-sizing: border-box; }
.ra { display: grid; gap: 16px; max-width: 1400px; font-variant-numeric: tabular-nums; }
.ra.ra-load { opacity: .6; transition: opacity .15s; }
.ra-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.ra-top h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.ra-top p { margin: 4px 0 0; font-size: 13px; color: var(--ra-muted); max-width: 560px; }
.ra-ctrls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ra-seg, .ra-day { display: inline-flex; gap: 2px; padding: 3px; background: var(--ra-soft); border: 1px solid var(--ra-line); border-radius: 8px; flex-wrap: wrap; align-items: center; }
.ra-seg button, .ra-day button { font: 500 13px/1 Inter, system-ui, sans-serif; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ra-muted); cursor: pointer; min-height: 32px; }
.ra-seg button:hover, .ra-day button:hover:not(:disabled) { color: var(--ra-ink); }
.ra-seg button.on { background: var(--ra-ink); color: #fff; }
.ra-day button:disabled { opacity: .35; cursor: default; }
.ra-day input { font: 500 13px Inter, system-ui, sans-serif; border: 0; background: #fff; border-radius: 6px; padding: 6px 8px; color: var(--ra-ink); min-height: 32px; }
.ra-seg button:focus-visible, .ra-day button:focus-visible, .ra-day input:focus-visible { outline: 2px solid var(--ra-blue); outline-offset: 1px; }
.ra-how { font-size: 13px; color: var(--ra-muted); max-width: 640px; line-height: 1.5; }
.ra-how b { color: var(--ra-ink); font-weight: 600; }
.ra-warn { background: #fdeee8; color: #8a2a0a; border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.ra-warn b { color: var(--ra-bad); }
.ra-foot { font-size: 12px; color: var(--ra-faint); padding: 0 18px 14px; }
.ra-foot:empty { display: none; }
.ra-fresh { font-size: 12px; color: var(--ra-muted); }
.ra-fresh:empty { display: none; }
.ra-stale { color: var(--ra-bad); }
.ra-errbox { background: #fdeee8; color: var(--ra-bad); border-radius: 8px; padding: 10px 14px; font-size: 13px; }

.ra-card { background: #fff; border: 1px solid var(--ra-line); border-radius: 8px; min-width: 0; }
.ra-panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 18px 8px; flex-wrap: wrap; }
.ra-panel-h h3 { font-size: 14px; font-weight: 600; margin: 0; }
.ra-panel-h span { font-size: 12px; color: var(--ra-faint); }
.ra-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ra-grid, .ra-trend { border-collapse: separate; border-spacing: 2px; font-size: 12px; margin: 0 14px 8px; }
.ra-grid th, .ra-trend th { font-weight: 500; color: var(--ra-faint); text-align: left; padding: 4px 6px; white-space: nowrap; }
.ra-grid td, .ra-trend td { padding: 6px; white-space: nowrap; }
.ra-grid th.ra-h { text-align: center; min-width: 34px; padding: 4px 2px; }
.ra-rep { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; }
th.ra-rep[scope="row"] { color: var(--ra-ink); }
.ra-name { display: block; font-weight: 600; font-size: 13px; }
.ra-role { display: block; font-size: 11px; color: var(--ra-faint); font-weight: 400; }
.ra-c { text-align: center; border-radius: 4px; height: 34px; min-width: 34px; font-weight: 600; font-size: 11px; background: var(--ra-soft); }
.ra-c { min-width: 38px; padding: 6px 2px !important; font-size: 11px; }
.ra-grid td:nth-last-child(-n+5) { padding-left: 8px; padding-right: 4px; }
.ra-grid .ra-rep { min-width: 140px; }
.ra-c.ra-ok { background: #cdebd8; color: #0f6b3a; }
.ra-c.ra-bad { background: #f8d4d1; color: #a3261b; }
.ra-c.ra-off { background: var(--ra-off); color: var(--ra-faint); font-weight: 500; }
.ra-c.ra-live { background: #fff; color: var(--ra-blue); outline: 2px solid var(--ra-blue); outline-offset: -2px; }
.ra-c.ra-future { background: #fff; border: 1px solid var(--ra-line); }
.ra-c.ra-call { box-shadow: inset 0 -4px 0 var(--ra-call); }
.ra-c.ra-ns { outline: 2px dotted var(--ra-ink); outline-offset: -3px; }
.ra-good { color: #0f6b3a; }
.ra-okt { color: #0f6b3a; }
.ra-badt { color: #a3261b; }
.ra-sw-ok { background: #cdebd8; }
.ra-sw-bad { background: #f8d4d1; }
.ra-sw-live { background: #fff; outline: 2px solid var(--ra-blue); outline-offset: -2px; }
.ra-grid td:nth-last-child(-n+6) { padding-left: 12px; color: var(--ra-ink); }
.ra-faint { color: var(--ra-faint); }
.ra-bad { color: var(--ra-bad); font-weight: 600; }
.ra-empty { color: var(--ra-faint); padding: 14px 18px; font-size: 13px; }

.ra-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 18px 14px; font-size: 12px; color: var(--ra-muted); align-items: center; }
.ra-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.ra-sw-call { background: var(--ra-soft); box-shadow: inset 0 -3px 0 var(--ra-call); }
.ra-sw-ns { background: #fff; outline: 2px dotted var(--ra-ink); outline-offset: -2px; }
.ra-sw-off { background: var(--ra-off); border: 1px solid var(--ra-line); }

.ra-row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ra-row2 > .ra-card:last-child { order: -1; }   /* 7-day tiles full width, right under the hourly grid */
.ra-gaps ul { list-style: none; margin: 0; padding: 0 18px 14px; max-height: 420px; overflow-y: auto; }
.ra-gaps li { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ra-line); font-size: 13px; }
.ra-gaps li span:last-child { text-align: right; }
.ra-trend th.ra-dh { text-align: center; min-width: 58px; }
.ra-trend th.ra-wkend { color: #c4c4c9; }
.ra-sofar { display: block; font-size: 10px; font-weight: 500; color: var(--ra-blue); }
.ra-t { text-align: center; border-radius: 4px; height: 36px; min-width: 58px; font-weight: 600; font-size: 12px; background: var(--ra-soft); color: var(--ra-faint); }
.ra-t.ra-t-wk { opacity: .45; }
.ra-t.ra-t-today { outline: 1px dashed var(--ra-blue); outline-offset: -1px; }
.ra-trend th.ra-avgh { text-align: center; color: var(--ra-ink); font-weight: 600; padding-left: 12px; }
.ra-avg { text-align: center; font-weight: 700; font-size: 13px; padding-left: 12px; }
.ra-note { font-size: 12px; color: var(--ra-muted); margin: 0; max-width: 900px; line-height: 1.5; }

@media (max-width: 900px) { .ra-row2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .ra-top, .ra-ctrls { flex-direction: column; align-items: stretch; }
  .ra-rep { min-width: 104px; }
  .ra-role { display: none; }
}
