/* Beranda: layout lebar, ringkasan uang, perlu diperhatikan, agenda */
html body #view { max-width: 1480px; }
html body #app.bare #view { max-width: 520px; }
.hm-slot:empty { display: none; }
.hm-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.hm-strip.three { grid-template-columns: repeat(3, 1fr); }
.hm-cell { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-s); min-width: 0; }
.hm-cell .hm-l { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 600; color: var(--muted); }
.hm-cell b { display: block; margin: 4px 0 2px; font: 600 1.75rem/1.15 var(--serif); color: var(--navy); }
.hm-cell small { display: block; font-size: .78rem; color: var(--muted); }
.hm-cell.warn small { color: var(--warn); font-weight: 600; }
.hm-cell.down small { color: var(--danger); }
.hm-spark { position: absolute; right: 14px; top: 14px; width: 96px; height: 30px; overflow: visible; }
.hm-spark .hm-line { stroke: #2a78d6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hm-spark .hm-area { fill: #2a78d6; opacity: .12; }
.hm-spark .hm-dot { fill: #2a78d6; stroke: var(--card); stroke-width: 2; }
.hm-spark .hm-hit { fill: transparent; }
.cols.cols3 { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .cols.cols3 { grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; } }
@media (min-width: 760px) and (max-width: 1099px) { .cols.cols3 { grid-template-columns: 1fr 1fr; } .cols.cols3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 1099px) { .hm-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hm-strip, .hm-strip.three { grid-template-columns: 1fr; } .hm-cell b { font-size: 1.5rem; } }
.cols.cols3 > div > .box + .hm-agenda, .hm-agenda { margin-top: 20px; }
.hm-k { flex: none; min-width: 64px; text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--soft); color: var(--navy2); }
.hm-k.high { background: #FBE6E4; color: #B3261E; }
.hm-k.mid { background: var(--warn-bg); color: var(--warn); }
.hm-k.ag-event { background: var(--navy); color: #fff; }
.hm-k.ag-invoice, .hm-k.ag-bill { background: #E3F2EA; color: var(--ok); }
.hm-day { display: flex; justify-content: space-between; padding: 8px 16px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.hm-day b { color: var(--text, inherit); text-transform: uppercase; letter-spacing: .06em; }
html[data-theme="dark"] .hm-cell { background: linear-gradient(180deg, #14203A, #111A2F); border-color: #2A3757; }
html[data-theme="dark"] .hm-cell b { color: #fff; }
html[data-theme="dark"] .hm-spark .hm-line { stroke: #3987e5; } html[data-theme="dark"] .hm-spark .hm-area, html[data-theme="dark"] .hm-spark .hm-dot { fill: #3987e5; }
html[data-theme="dark"] .hm-k { color: var(--gold-l); }
html[data-theme="dark"] .hm-k.high { background: #4A1F1C; color: #FF8F86; }
html[data-theme="dark"] .hm-k.mid { color: var(--warn); }
html[data-theme="dark"] .hm-k.ag-event { background: #2A3A66; color: #fff; }
html[data-theme="dark"] .hm-k.ag-invoice, html[data-theme="dark"] .hm-k.ag-bill { background: #12372A; color: var(--ok); }

/* animasi muncul */
@keyframes hm-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hm-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hm-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.hm-cell { animation: hm-in .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.hm-slot .row, .hm-slot .hm-day, .hm-slot .empty { animation: hm-in .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(180ms + var(--i, 0) * 55ms); }
.hm-spark .hm-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: hm-draw 1.1s ease-out .35s both; }
.hm-spark .hm-area { animation: hm-in 1s ease-out .6s both; }
.hm-spark .hm-dot { transform-box: fill-box; transform-origin: center; animation: hm-pop .4s cubic-bezier(.3, 1.6, .5, 1) 1.2s both; }
.kpis .kpi { animation: hm-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.kpis .kpi:nth-child(2) { animation-delay: 70ms; } .kpis .kpi:nth-child(3) { animation-delay: 140ms; }
.cols.cols3 > div { animation: hm-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.cols.cols3 > div:nth-child(2) { animation-delay: 90ms; } .cols.cols3 > div:nth-child(3) { animation-delay: 180ms; }
@media (prefers-reduced-motion: reduce) {
  .hm-cell, .hm-slot .row, .hm-slot .hm-day, .hm-slot .empty, .hm-spark *, .kpis .kpi, .cols.cols3 > div { animation: none !important; }
}
