/* Главная v4 — канон design/home-v4-claude.html. Все цвета из tokens.css. */
.hv4 { max-width: 1060px; }
.hv4-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.hv4 h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.hv4-fresh { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.hv4-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 1px; }
.hv4-fresh.stale .hv4-dot { background: var(--amber); }
.hv4-date { color: var(--text-3); font-size: 13px; margin-bottom: 20px; }
.hv4-summary { font-size: 13.5px; color: var(--text-2); line-height: 1.6; max-width: 760px; margin: 0 0 24px; }
.hv4-summary b { color: var(--text); font-weight: 500; }
.hv4-summary .pos, .hv4 .pos { color: var(--green); }
.hv4-summary .neg, .hv4 .neg { color: var(--red); }
.hv4 .terra { color: var(--brand); }
.hv4 .up { color: var(--green); }

.hv4-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.hv4-grid4.cols2 { grid-template-columns: repeat(2, 1fr); }
.hv4-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; }
.hv4-tap { cursor: pointer; }
.hv4-tap:active { background: var(--bg-soft); }
.hv4-wide { margin-bottom: 10px; }
.hv4-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.hv4-lbl { font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; color: var(--text-3); text-transform: uppercase; }
.hv4-lbl.terra { color: var(--brand); }
.hv4-num { font-family: var(--serif); font-size: 23px; font-weight: 600; margin-top: 5px; letter-spacing: -0.01em; }
.hv4-num small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.hv4-sub2 { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.hv4-sec-t { font-family: var(--serif); font-size: 15.5px; font-weight: 600; margin-bottom: 12px; }
.hv4-sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.hv4-sec-head .hv4-sec-t { margin: 0; }
.hv4-note { font-size: 12px; color: var(--text-3); }
.hv4-duo { display: flex; justify-content: space-between; align-items: baseline; }

/* Движение к плану */
.hv4-bar-lbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 6px; gap: 10px; }
.hv4-bar-lbl b { color: var(--text); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.hv4-bar { position: relative; height: 6px; background: rgba(10, 10, 10, 0.08); border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.hv4-bar .f { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text); border-radius: 3px; }
.hv4-bar .fc { position: absolute; top: 0; bottom: 0; background: var(--brand); opacity: 0.32; }
.hv4-bar .pm { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); }
.hv4-bar-note { font-size: 12px; color: var(--text-3); margin-top: -6px; }

/* Выручка по дням */
.hv4-chart-scroll { overflow-x: auto; margin: 0 -17px; padding: 0 17px; -webkit-overflow-scrolling: touch; }
.hv4-chart { display: flex; align-items: flex-end; gap: 4px; height: 148px; min-width: 700px; }
.hv4-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hv4-col .v { font-size: 10.5px; color: var(--text-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.hv4-col .b { width: 100%; max-width: 26px; background: rgba(10, 10, 10, 0.12); border-radius: 3px 3px 0 0; }
.hv4-col.fut .b { height: 3px; background: rgba(10, 10, 10, 0.06); }
.hv4-col.fut .d { color: rgba(10, 10, 10, 0.22); }
.hv4-col.fut .dw { visibility: hidden; }
.hv4-col.hit .b { background: rgba(10, 10, 10, 0.38); }
.hv4-col.rec .b { background: var(--text); }
.hv4-col.rec .v { color: var(--text); font-weight: 600; }
.hv4-col.today .b { background: var(--brand); }
.hv4-col.today .v, .hv4-col.today .d { color: var(--brand); }
.hv4-col .d { font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.hv4-col .dw { font-size: 9.5px; color: rgba(10, 10, 10, 0.28); }
.hv4-col.wk .d { color: var(--text); font-weight: 500; }
.hv4-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); margin-top: 12px; flex-wrap: wrap; }
.hv4-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.hv4-legend .li-hit { background: rgba(10, 10, 10, 0.38); }
.hv4-legend .li-miss { background: rgba(10, 10, 10, 0.12); }
.hv4-legend .li-rec { background: var(--text); }
.hv4-legend .li-today { background: var(--brand); }
.hv4-leg-r { margin-left: auto; }

/* Сегодня / P&L */
.hv4-big-row { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.hv4-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.hv4-tbl td { padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.hv4-tbl tr:last-child td { border-bottom: none; }
.hv4-tbl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.hv4-tbl td.neg { color: var(--text-2); }
.hv4-tbl .total td { font-weight: 600; padding-top: 10px; }
.hv4-tbl .total .r { font-family: var(--serif); font-size: 15px; }
.hv4-tbl .total .r.pos { color: var(--green); }
.hv4-tbl .total .r.neg { color: var(--red); }

/* Живая смена */
.hv4-shift { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.hv4-shift-n { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.hv4-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.hv4-chip { font-size: 12px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; color: var(--text-2); background: rgba(10, 10, 10, 0.02); }
.hv4-chip.warn { border-color: #E8CDB8; color: var(--red); background: #FBF4EC; }

/* Совет */
.hv4-advice { border-left: 3px solid var(--brand); }
.hv4-advice-p { font-size: 13.5px; margin: 8px 0 0; line-height: 1.55; }
.hv4-btn { display: inline-block; margin-top: 12px; background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-family: inherit; }
.hv4-btn:active { opacity: 0.85; }

/* Скелетоны */
.hv4-skel { min-height: 56px; position: relative; overflow: hidden; }
.hv4-skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(10, 10, 10, 0.03), transparent); animation: hv4shimmer 1.4s infinite; }
@keyframes hv4shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (max-width: 760px) {
    .hv4-grid4 { grid-template-columns: 1fr 1fr; }
    .hv4-row2 { grid-template-columns: 1fr; }
    .hv4 h1 { font-size: 21px; }
    .hv4-fresh { display: none; }
    .hv4-num { font-size: 20px; }
    .hv4-chart { min-width: 700px; }
}
