/* Home, alerts and follow-up calls */
.hm-sec > * + * { margin-top: 12px; }
.hm-sec-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.hm-sec-head h2 { font-size: 17px; }
.hm-h { font-size: 17px; margin-top: 24px !important; }
.hm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-grid { align-items: start; }
.hm-grid > .card { margin: 0; min-width: 0; }

/* today's class cards */
.hm-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.hm-classes > .card { margin: 0; min-width: 0; }
.hm-sec .hm-classes { grid-template-columns: 1fr; }
@media (min-width: 760px) { .hm-sec .hm-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-class { border-left: 5px solid var(--gold); }
.hm-class.done { border-left-color: var(--leaf); }
.hm-class.none { border-left-color: var(--line-strong); }
.hm-class h3 { font-size: 18px; }
.hm-class-title { font-weight: 600; font-size: 15.5px; }
.hm-class .btn.big { min-height: 52px; font-size: 16px; }
.btn.hm-register { min-height: 54px; font-size: 16px; }

/* batch progress rows */
.hm-batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.hm-batch { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--paper); min-width: 0; }
.hm-batch:hover { border-color: var(--line-strong); }
.hm-batch-top { display: flex; align-items: center; gap: 8px; }
.hm-batch-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-batch-bar { display: flex; align-items: center; gap: 10px; }
.hm-batch-bar span { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* alerts */
.al-list { display: flex; flex-direction: column; }
.al-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.al-item:last-child { border-bottom: 0; }
.al-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); }
.al-item.lvl-warn .al-ic { background: var(--red-soft); color: var(--red); }
.al-item.closed { opacity: .7; }
.al-main { flex: 1; min-width: 0; }
.al-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.al-text { margin: 2px 0 4px; overflow-wrap: anywhere; }
.al-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.al-acts { display: flex; flex-direction: column; gap: 6px; flex: none; align-items: stretch; }
.al-acts .btn { justify-content: center; min-height: 36px; }
@media (prefers-color-scheme: dark) { .al-ic { color: #b9bef5; } .al-item.lvl-warn .al-ic { color: #ffd9de; } }

/* follow-up calls */
.fu-list { display: flex; flex-direction: column; }
.card.fu-list { padding-top: 6px; padding-bottom: 6px; }
.card.fu-list > * + * { margin-top: 0; }
.fu-item { display: flex; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.fu-item:last-child { border-bottom: 0; }
.fu-item.late { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
.fu-main { flex: 1; min-width: 0; }
.fu-main p { margin: 2px 0; }
.fu-out { font-size: 13px; background: var(--chip); border-radius: 8px; padding: 6px 10px; margin-top: 6px !important; }
.fu-acts { display: flex; flex-direction: column; gap: 6px; flex: none; align-items: stretch; }
.fu-acts .btn { justify-content: center; min-height: 38px; }
.call-link { font-weight: 700; }

@media (max-width: 600px) {
  .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hm-stats .stat { padding: 12px; column-gap: 10px; }
  .hm-stats .stat-icon { width: 34px; height: 34px; }
  .hm-stats .stat-val { font-size: 20px; }
  .hm-classes, .hm-batches { grid-template-columns: 1fr; }
  .fu-item, .al-item { flex-wrap: wrap; }
  .fu-acts { flex-direction: row; width: 100%; }
  .fu-acts .btn { flex: 1; min-height: 44px; }
  .al-acts { flex-direction: row; width: 100%; padding-left: 46px; }
  .al-acts .btn { flex: 1; min-height: 42px; }
  .line-row { flex-wrap: wrap; }
}

/* office overview: tests taken (14 days) + latest activity */
.ov-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.ov-loading { grid-column: 1 / -1; }
.ov-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ov-chart { display: block; width: 100%; height: auto; }
.ov-bar { fill: var(--navy); }
.ov-col.today .ov-bar { fill: var(--gold); }
.ov-grid { stroke: var(--line); stroke-dasharray: 4 4; }
.ov-axis { stroke: var(--line-strong); }
.ov-max, .ov-day { fill: var(--mute); font: 600 12px var(--font); }
.ov-val { fill: var(--ink); font: 700 11.5px var(--font); }
.ov-col.today .ov-day { fill: var(--ink); font-weight: 800; }
.ov-legend { display: flex; gap: 14px; margin-top: 4px; }
.ov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ov-k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--navy); }
.ov-k.today { background: var(--gold); }
.ov-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 330px; overflow-y: auto; }
.ov-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ov-list li:last-child { border-bottom: 0; }
.ov-list .grow { flex: 1; min-width: 0; }
.ov-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-list small { display: block; }
.ov-right { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
@media (prefers-color-scheme: dark) { .ov-bar, .ov-k { fill: #8ea2dd; background: #8ea2dd; } }
@media (max-width: 860px) { .ov-body { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ov-max, .ov-day { font-size: 19px; } .ov-val { font-size: 18px; } }
