/* ══════════════════════════════════════════════════════════════════
   25 — APPLICATIONS TIMELINE + HEAT MAP (v4.11 recipe work, session 7)
   Inputs → Applications (js/features/app-views.js).
   Phone first: the timeline scrolls inside its own box, never the page.
══════════════════════════════════════════════════════════════════ */
.avt-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.avt-modes { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; background: var(--bg-card); }
.avt-mode { min-height: 36px; padding: 0 14px; border: 0; background: transparent; color: var(--quiet); font-size: 12px; font-weight: 700; cursor: pointer; }
.avt-mode.active { background: var(--ink); color: var(--bg-card); }
.avt-sel { min-height: 36px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-input); color: var(--ink); font-size: 0.78rem; }

.avt-legend, .avh-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11px; color: var(--quiet); margin-bottom: 8px; }
.avt-key { display: inline-flex; align-items: center; gap: 5px; }
.avt-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.avt-key i.is-done { background: var(--quiet); }
.avt-key i.is-planned { border: 2px solid var(--quiet); box-sizing: border-box; }
.avt-note { font-size: 11px; color: var(--quiet); line-height: 1.45; margin-top: 8px; }
.avt-empty { padding: 1.5rem 1rem; text-align: center; color: var(--quiet); font-size: 0.85rem; line-height: 1.45; }

.avt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-card); max-width: 100%; -webkit-overflow-scrolling: touch; }
.avt { --lab: 104px; --cw: 28px; width: max-content; min-width: 100%; }
.avt-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.avt-row:last-child { border-bottom: 0; }
.avt-row.is-group { background: var(--bg-subtle); }
.avt-lab { position: sticky; left: 0; z-index: 2; flex: 0 0 var(--lab); width: var(--lab); box-sizing: border-box; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--bg-card); border: 0; border-right: 1px solid var(--line); color: var(--ink-2); font-size: 0.74rem; text-align: left; min-height: 30px; }
.avt-row.is-group .avt-lab { background: var(--bg-subtle); }
.avt-lab.is-head { color: var(--ink); font-weight: 700; cursor: pointer; }
.avt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.avt-chev { flex: 0 0 auto; color: var(--quiet); font-size: 0.7rem; }
.avt-n { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--quiet); }
.avt-cells { display: flex; }
.avt-cell { flex: 0 0 var(--cw); width: var(--cw); box-sizing: border-box; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; padding: 3px 1px; border-right: 1px solid color-mix(in srgb, var(--line) 55%, transparent); min-height: 30px; }
.avt-cell.is-now { background: color-mix(in srgb, var(--need-tint, #E9C46A) 45%, transparent); }
.avt-headrow .avt-cell { flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 2px 0; min-height: 34px; font-size: 10px; font-weight: 700; color: var(--quiet); text-transform: uppercase; align-items: center; }
.avt-day { font-weight: 400; text-transform: none; }

.avt-mark { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid var(--c); box-sizing: border-box; cursor: pointer; font-size: 9px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.avt-mark.is-done { background: var(--c); color: #fff; }
.avt-mark.is-planned { background: transparent; color: var(--c); }
.avt-mark.is-skipped { background: transparent; border-style: dashed; opacity: 0.55; }
.avt-mark.is-part { opacity: 0.55; }
.avt-mark.is-sm { width: 11px; height: 11px; border-width: 1.5px; }
@media (pointer: coarse) { .avt-mark { width: 20px; height: 20px; } .avt-mark.is-sm { width: 12px; height: 12px; } }

.avh-measures { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.avh-scale i { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }
.avh-group { margin-bottom: 12px; }
.avh-head { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--quiet); margin-bottom: 5px; }
.avh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 5px; }
.avh-tile { min-width: 0; min-height: 52px; border-radius: 8px; padding: 6px 7px; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; color: var(--ink); }
.avh-tile.is-dark { color: #fff; }
.avh-label { font-size: 0.7rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avh-val { font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
