/* calm-home: see plan/BRIEF_CALM_V2_2026-11-21.md (worker B). Home / dashboards in the calm v2 language:
   H1 on bone + a 14px subhead from real numbers, a black "Berikutnya" panel on the right, the first KPI as the one black hero card,
   department + period pills over the numbers they change, a 300 ms fade while numbers tween. Theme vars only (light + dark). */

/* ---------- head: flat on bone, no card ---------- */
.dash .hm-head { margin: 0 0 24px; padding: 0; background: transparent !important; border: 0 !important; box-shadow: none !important; align-items: flex-end; }
.dash .hm-head h2 { margin: 0; color: var(--ink); }
.dash .hm-sub { margin: 10px 0 0; font-size: var(--fs-body); line-height: 1.4; color: var(--ink-3); }
.dash .hm-sub b, .dash .hm-clock { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.dash .hm-dot { color: var(--ink-3); }

/* ---------- top: today on the left, Next up on the right ---------- */
.dash .hm-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; margin: 0 0 32px; }
.dash .hm-top.one { grid-template-columns: minmax(0, 1fr); }
.dash .hm-l { display: grid; gap: var(--gap); min-width: 0; align-content: start; }
.dash .hm-l > *, .dash .hm-l .dk-now, .dash .hm-l .dk-vis { margin: 0; }
.dash .hm-r { position: sticky; top: 84px; min-width: 0; }
.dash .plates.now .pl-tag { background: var(--ink) !important; }

/* the black Next-up panel: inverted, white text, a white pill button */
.hm-next { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-card); background: var(--slab-1); color: #FFFFFF; box-shadow: var(--sh-card); }
.hm-next-k { margin: 0; font-size: var(--fs-micro); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .56); }
.hm-next-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-micro); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .8); }
.hm-next-kind .i { width: 16px; height: 16px; stroke-width: 1.5; }
.hm-next-t { margin: 2px 0 0; font-size: var(--fs-num); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; color: #FFFFFF;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hm-next-s { margin: 0; font-size: var(--fs-body); line-height: 1.4; color: rgba(255, 255, 255, .68); }
.hm-next-a { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.hm-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  font-size: var(--fs-micro); font-weight: 600; color: #FFFFFF; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hm-pill.warn::before, .hm-pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.hm-pill.warn::before { background: var(--warn-fill); }
.hm-pill.live::before { background: var(--ok-fill); }
.hm-next .hm-open { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 16px; border: 0; border-radius: 999px; background: #FFFFFF; color: #111111;
  font: inherit; font-size: var(--fs-body); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.hm-next .hm-open .i { width: 16px; height: 16px; color: #111111; }
.hm-next .hm-open:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.hm-next .hm-open:active { transform: translateY(1px); }
.hm-next .hm-open:focus-visible, .hm-next-l a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.hm-next .hm-after { margin-top: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hm-next-l { list-style: none; margin: 0; padding: 0; display: grid; }
.hm-next-l a { display: grid; grid-template-columns: minmax(44px, auto) minmax(0, 1fr) 16px; align-items: center; gap: 10px; min-height: 40px; color: #FFFFFF; text-decoration: none;
  font-size: var(--fs-body); border-radius: 10px; transition: background-color 150ms var(--ease); }
.hm-next-l a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.hm-next-l time { color: rgba(255, 255, 255, .56); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-next-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-next-l .i { width: 16px; height: 16px; color: rgba(255, 255, 255, .5); }
:root[data-palette="lime"] .hm-pill.live::before { background: #D9FF3F; }

/* ---------- department + period: one pill row, then the section micro label ---------- */
.dash .hm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 16px; }
.dash .hm-bar .dk-tabs { margin: 0; min-width: 0; }
.dash .hm-bar-r { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dash .hm-bar-r::-webkit-scrollbar { display: none; }
.dash .hm-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0 0 12px; font-size: var(--fs-micro); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.dash .hm-bar > .hm-sec { margin: 0; }
.dash .hm-sec > span + span::before { content: "·"; margin-right: 8px; }
.dash .dk-custom { border-radius: var(--r-card); padding: 12px 16px; }

/* ---------- KPI row: number gets the full width, sub line 14px with its key number in ink ---------- */
.dash .kc { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h h" "v v" "f sp"; gap: 6px 12px; padding: 20px; }
.dash .kc-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash .kc .kc-s { font-size: var(--fs-body) !important; color: var(--ink-3); }
.dash .kc .kc-s b { color: var(--ink); font-size: var(--fs-body) !important; font-weight: 600 !important; letter-spacing: 0 !important; line-height: 1.4; }
.dash .kc-sp { height: 28px; width: 64px; }

/* the one black hero card: white number, white sparkline, a white pill */
.dash .kc.kc-hero { grid-template-areas: "h btn" "v v" "f sp"; background: var(--slab-1) !important; color: #FFFFFF; border-color: transparent !important; }
.dash .kc-hero .kc-h, .dash .kc-hero .kc-h span, .dash .kc-hero .kc-a { color: rgba(255, 255, 255, .6) !important; }
.dash .kc-hero .kc-i { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.dash .kc-hero .kc-v { color: #FFFFFF; }
.dash .kc-hero .kc-s { color: rgba(255, 255, 255, .6) !important; }
.dash .kc-hero .kc-s b { color: #FFFFFF; }
.dash .kc-hero .u-delta, .dash .kc-hero .u-delta.bad, .dash .kc-hero .u-delta.flat { color: #FFFFFF !important; }
.dash .kc-hero .u-delta small { color: rgba(255, 255, 255, .6) !important; }
.dash .kc-hero .kc-sp i { background: rgba(255, 255, 255, .26); }
.dash .kc-hero .kc-sp i.on { background: #FFFFFF; }
.dash .kc-btn { grid-area: btn; justify-self: end; align-self: start; display: inline-flex; align-items: center; gap: 2px; height: 28px; margin: -4px -4px 0 0; padding: 0 8px 0 12px;
  border-radius: 999px; background: #FFFFFF; color: #111111; font-size: var(--fs-micro); font-weight: 600; white-space: nowrap; transition: box-shadow 150ms var(--ease); }
.dash .kc-btn .i { width: 16px; height: 16px; color: #111111; }
.dash .kc-hero:hover .kc-btn { box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.dash .kc-hero:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the numbers row sits between the period pills and today */
.dash .hm-k { margin: 0 0 24px; }
.dash .hm-c > .dk-grid:first-child { margin-top: 0; }

/* ---------- switching tab / period: the old numbers stay, dimmed, until the new ones tween in ---------- */
.dash .hm-data { transition: opacity 150ms var(--ease); }
.dash .hm-data.is-busy { opacity: .45; pointer-events: none; }

/* ---------- field today ---------- */
.dash .hm-field .u-card-b { min-width: 0; }

/* ---------- phone and narrow ---------- */
@media (max-width: 1100px) {
  .dash .hm-top { grid-template-columns: minmax(0, 1fr); }
  .dash .hm-r { order: -1; position: static; }
}
@media (max-width: 720px) {
  .dash .hm-head { margin-bottom: 16px; }
  .dash .hm-head .u-head-a { width: 100%; }
  .dash .hm-top { margin-bottom: 24px; }
  .dash .hm-bar { flex-direction: column; align-items: stretch; }
  .dash .hm-bar .dk-tabs, .dash .hm-bar-r { max-width: 100%; }
  .dash .kc { padding: 16px; }
  .hm-next { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .dash .hm-data, .hm-next .hm-open, .hm-next-l a, .dash .kc-btn { transition: none !important; }
}
:root[data-motion="low"] .dash .hm-data { transition: none; }

/* the Now plates never let a long title run under its due chip (phone) */
.dash .hm-l .plate .pt { min-width: 0; overflow: hidden; }
.dash .hm-l .plate .pt > a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* lead review: the next-up title stays at two lines; the KPI delta keeps "vs 30 hari lalu" on one line */
.hm-next-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash .kc-f .u-delta { white-space: nowrap; }
.dash .kc-f { flex-wrap: wrap; row-gap: 4px; }
/* owner reference images 2026-11-21: the next item sits in its own dark-grey inner card; title body-size bold, not a headline */
.hm-next-c { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.hm-next .hm-next-t { font-size: var(--fs-body); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; -webkit-line-clamp: 2; }
.hm-next-c .hm-next-a { margin-top: 4px; }
.hm-next .hm-open { height: 32px; }
