/* Domaselo admin — Home (WP7, spec § 5). Prefix .hm- plus the shared classes; § 1.4 tokens only. */

/* ---------- header ---------- */
.hm-hdr { gap: 10px; padding: 0 16px 0 20px; }
.hm-hello { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hm-caption { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-greet { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: 0.37px; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane:not(.narrow) .hm-greet { font-size: 34px; line-height: 40px; }
.hm-refresh.spin svg { animation: hmSpin 900ms linear infinite; animation-delay: var(--hm-spin, 0ms); }
@keyframes hmSpin { to { transform: rotate(360deg); } }
.hm-me { position: relative; width: 40px; height: 40px; border-radius: 9.5px; flex: none; display: grid; place-items: center; }
.hm-me:active { transform: scale(0.92); }
.hm-me .av { box-shadow: inset 0 0 0 0.5px var(--glass-line); }
.hm-me .av-shield { box-shadow: 0 0 0 2px var(--bg); }

/* ---------- body layout ---------- */
.hm-body { padding-left: 16px; padding-right: 16px; padding-bottom: 24px; }
.hm-wrap { max-width: 1080px; margin: 0 auto; padding-top: 10px; display: flex; flex-direction: column; gap: 26px; }
.hm-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hm-feed { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hm-wrap.wide { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.hm-wrap.wide .hm-left { padding-top: 40px; } /* lines up with the first feed card, not its title */

/* ---------- Income banner (§ 5.3) ---------- */
.hm-income { position: relative; border-radius: 31px; height: 77px; overflow: hidden; flex: none; }
.hm-income.is-closed { cursor: pointer; }
.hm-income.open { height: 339px; }
.hm-income > * { position: relative; z-index: 1; }
.hm-inc-title { position: absolute; left: 27px; top: 22px; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: 0.36px; white-space: nowrap; pointer-events: none; }
.hm-toggle { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; z-index: 2; color: var(--label); }
.hm-toggle svg { width: 17px; height: 17px; position: relative; z-index: 1; }
.hm-toggle.on {
  color: var(--on-accent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--on-accent) 16%, transparent) 0%, transparent 55%), color-mix(in srgb, var(--accent) 80%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--on-accent) 40%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--on-accent) 18%, transparent);
}
.hm-toggle.on svg { width: 15px; height: 15px; }
.hm-inc-rows { position: absolute; inset: 0; }
.hm-rv { position: absolute; left: 29px; right: 28px; }
.hm-inc-top { top: 85px; height: 18px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.hm-inc-lbl { font-size: 15px; line-height: 18px; letter-spacing: -0.24px; color: var(--label-2); white-space: nowrap; }
.hm-period { display: inline-flex; align-items: center; gap: 4px; margin: -8px -8px; padding: 8px; border-radius: 12px; font-size: 15px; line-height: 18px; font-weight: 600; letter-spacing: -0.24px; color: var(--label); white-space: nowrap; }
.hm-period:hover { background: var(--hover-subtle); }
.hm-period svg { width: 12px; height: 12px; }
.hm-inc-sum { top: 108px; }
.hm-amt { display: block; font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: 0.37px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--label); }
.hm-cents { color: var(--label-2); }
.hm-inc-of { margin-top: 3px; font-size: 15px; line-height: 18px; letter-spacing: -0.24px; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.hm-inc-prog { top: 184px; height: 6px; border-radius: 3px; background: var(--glass-track); overflow: hidden; }
.hm-inc-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); transform-origin: 0 50%; }
.hm-inc-sep { top: 211px; height: 0.5px; background: var(--glass-line); }
.hm-inc-stats { top: 227px; display: flex; gap: 9px; }
.hm-stat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-stat-l { font-size: 13px; line-height: 15px; letter-spacing: -0.08px; color: var(--label-2); white-space: nowrap; }
.hm-stat-v { font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: 0.35px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-inc-pay { top: 283px; height: 36px; display: flex; align-items: center; gap: 8px; margin: 0 -10px; padding: 0 10px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--label); text-align: left; }
.hm-inc-pay span { flex: 1; }
.hm-inc-pay:hover { background: var(--hover-subtle); }
.hm-pay-ic { width: 16px; height: 16px; color: var(--label-2); }
.hm-income-na { height: auto; min-height: 77px; padding: 70px 27px 20px; }
.hm-inc-na { margin: 0; font-size: 15px; line-height: 20px; color: var(--label-2); }
.hm-income-na .hm-err { padding: 0; }
.hm-inc-skel { display: flex; flex-direction: column; gap: 8px; }

/* open / close / launch reveal: keyframes resume after a re-render through the negative --hm-t delay */
.hm-income.hm-a-open { animation: hmGrow 520ms var(--spring) both; animation-delay: var(--hm-t, 0ms); }
.hm-income.hm-a-close { animation: hmShrink 460ms var(--spring) both; animation-delay: var(--hm-t, 0ms); }
.hm-a-open .hm-rv, .hm-a-reveal .hm-rv { animation: hmDrop 460ms var(--spring-pop) both; animation-delay: calc(var(--hm-t, 0ms) + var(--i, 0) * 32ms + 40ms); }
.hm-a-close .hm-rv { animation: hmFade 160ms ease both; animation-delay: var(--hm-t, 0ms); }
.hm-a-open .hm-inc-fill, .hm-a-reveal .hm-inc-fill { animation: hmFill 700ms var(--spring) both; animation-delay: calc(var(--hm-t, 0ms) + 140ms); }
.hm-a-open .hm-toggle.on, .hm-a-reveal .hm-toggle.on { animation: hmPop 420ms var(--spring-pop) both; animation-delay: var(--hm-t, 0ms); }
@keyframes hmGrow { from { height: 77px; } to { height: 339px; } }
@keyframes hmShrink { from { height: 339px; } to { height: 77px; } }
@keyframes hmDrop { from { opacity: 0; transform: translateY(-10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes hmFade { to { opacity: 0; } }
@keyframes hmFill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes hmPop { from { transform: scale(0.55) rotate(-90deg); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---------- This Week card (§ 5.4) ---------- */
.hm-week { border-radius: 26px; padding: 18px; }
.hm-week > * { position: relative; z-index: 1; }
.hm-week-hdr { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hm-week-t { margin: 0; font-size: 17px; font-weight: 600; white-space: nowrap; }
.hm-week-r { font-size: 15px; color: var(--label-2); white-space: nowrap; }
.hm-wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 12px; }
.hm-wstat { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 8px 10px; margin: 0 -10px; border-radius: 14px; min-width: 0; transition: background-color 160ms ease; }
.hm-wstat:hover { background: var(--hover-subtle); }
.hm-wstat-l { font-size: 13px; color: var(--label-2); white-space: nowrap; }
.hm-wstat-v { font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: 0.35px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-wstat.hot .hm-wstat-v { color: var(--orange); }

/* ---------- feed sections (§ 5.5) ---------- */
.hm-sec-hdr { display: flex; align-items: baseline; gap: 8px; padding: 0 14px; min-height: 30px; }
.hm-sec-title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: 0.35px; white-space: nowrap; }
.hm-sec-hdr .badge { align-self: center; font-size: 13px; }
.hm-sec-sp { flex: 1; }
.hm-link { font-size: 17px; color: var(--accent-text); white-space: nowrap; border-radius: 8px; }
.hm-link:hover { text-decoration: underline; }
.hm-card { margin-top: 10px; background: var(--card); border-radius: 26px; overflow: hidden; }
.hm-card > * { position: relative; }
.hm-card > * + *::before { content: ""; position: absolute; left: var(--hm-inset, 18px); right: 0; top: 0; height: 0.5px; background: var(--sep); z-index: 1; pointer-events: none; }
.hm-rq, .hm-crow, .hm-clock { --hm-inset: 66px; }
.hm-lrow { --hm-inset: 60px; }
.hm-shift { --hm-inset: 70px; }
.hm-card > .skel { padding: 4px 0; }

.hm-empty { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 18px; font-size: 17px; color: var(--label-2); }
.hm-empty-ic { display: grid; place-items: center; color: var(--label-2); }
.hm-empty-ic svg { width: 20px; height: 20px; }
.hm-err { display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-size: 15px; color: var(--label-2); }
.hm-err-ic { display: grid; place-items: center; color: var(--red); }
.hm-err-ic svg { width: 18px; height: 18px; }
.hm-err-tx { flex: 1; min-width: 0; }
.hm-err .hm-link { font-size: 15px; font-weight: 600; }

/* rows */
.hm-row, .hm-lrow { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 18px; text-align: left; transition: background-color 160ms ease; }
.hm-row:hover, .hm-lrow:hover { background: var(--fill-subtle); }
.hm-row:focus-visible, .hm-lrow:focus-visible, .hm-rq-main:focus-visible { outline-offset: -3px; border-radius: 26px; }
.hm-row-tx, .hm-lrow-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-row-t { font-size: 17px; font-weight: 600; letter-spacing: -0.41px; color: var(--label); }
.hm-row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hm-row-top .hm-row-t { flex: 1; }
.hm-row-s { font-size: 15px; color: var(--label-2); }
.hm-row-s2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hm-row-s2 .hm-row-s { flex: 1; }
.hm-time { flex: none; font-size: 15px; color: var(--label-2); white-space: nowrap; }
.hm-lrow-t { font-size: 17px; color: var(--label); }
.hm-lrow-s { font-size: 15px; color: var(--label-2); }
.hm-chev { width: 14px; height: 14px; color: var(--label-3); flex: none; }
.hm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--c, var(--gray)); margin-right: 6px; vertical-align: 1px; flex: none; }

/* Needs Attention request rows */
.hm-rq { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 18px 10px 0; }
.hm-rq-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 0 0 18px; min-height: 44px; text-align: left; border-radius: 0; }
.hm-rq-main:hover .hm-rq-name { text-decoration: underline; text-decoration-color: var(--label-3); }
.hm-rq-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hm-rq-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hm-rq-name { font-size: 17px; font-weight: 600; letter-spacing: -0.41px; min-width: 0; }
.hm-rq-line { font-size: 15px; color: var(--label-2); }
.hm-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
:root[data-theme="light"] .hm-chip { color: color-mix(in srgb, var(--c) 78%, black); background: color-mix(in srgb, var(--c) 14%, transparent); }
.hm-chip svg { width: 10px; height: 10px; }
.hm-chip.k-off { --c: var(--orange); }
.hm-chip.k-trade { --c: var(--blue); }
.hm-chip.k-cover { --c: var(--purple); }
.hm-rbtn { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; flex: none; }
.hm-rbtn svg { width: 14px; height: 14px; }
.hm-rbtn.deny { background: var(--fill); color: var(--label); }
.hm-rbtn.deny:hover { background: var(--fill-strong); }
.hm-rbtn.ok { background: var(--green); color: var(--on-accent); }
.hm-rbtn.ok svg { width: 16px; height: 16px; }
.hm-out-a { animation: hmOutA 320ms var(--ease-out) both; animation-delay: var(--hm-t, 0ms); }
.hm-out-d { animation: hmOutD 320ms var(--ease-out) both; animation-delay: var(--hm-t, 0ms); }
@keyframes hmOutA { to { opacity: 0; transform: translateX(24px); } }
@keyframes hmOutD { to { opacity: 0; transform: translateX(-24px); } }

/* On the Clock */
.hm-clock-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-size: 15px; color: var(--label-2); }
.hm-clock-el { color: var(--label); }
.hm-now { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--now-text); background: var(--now-wash); flex: none; }

/* Chats */
.hm-crow { position: relative; }
.hm-chat { padding-right: 18px; }
.hm-hash { width: 36px; height: 36px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--fill); color: var(--label-2); font-size: 19px; font-weight: 600; }
.hm-grp { position: relative; width: 36px; height: 36px; flex: none; }
.hm-grp .av { position: absolute; box-shadow: 0 0 0 2px var(--bar-solid); }
.hm-grp .av:first-child { left: 0; top: 0; }
.hm-grp .av:last-child { right: 0; bottom: 0; }
.hm-cbadge { flex: none; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hm-cbadge.dot { min-width: 0; width: 10px; height: 10px; padding: 0; border-radius: 5px; }
.hm-hover { position: absolute; right: 14px; top: 50%; translate: 0 -50%; display: flex; gap: 6px; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.hm-crow:hover .hm-hover, .hm-crow:focus-within .hm-hover { opacity: 1; pointer-events: auto; }
.hm-crow:hover .hm-time, .hm-crow:focus-within .hm-time, .hm-crow:hover .hm-cbadge, .hm-crow:focus-within .hm-cbadge { visibility: hidden; }
.hm-hbtn { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; color: var(--label); }
.hm-hbtn svg { width: 13px; height: 13px; position: relative; z-index: 1; }

/* Upcoming Shifts */
.hm-shift { gap: 14px; min-height: 66px; }
.hm-date { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; }
.hm-date-w { font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: 0.4px; color: var(--label-2); }
.hm-date-d { font-size: 22px; line-height: 26px; font-weight: 700; color: var(--label); }
.hm-date.today .hm-date-w, .hm-date.today .hm-date-d { color: var(--accent-text); }
.hm-len { flex: none; font-size: 17px; color: var(--label-2); text-align: right; font-variant-numeric: tabular-nums; }
.hm-draft { display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; color: var(--label-2); box-shadow: inset 0 0 0 1px var(--label-3); vertical-align: 2px; }

/* ---------- pops: previews and Quick Reply ---------- */
.hm-pop-hdr { padding: 4px 6px 8px; min-width: 0; }
.hm-pop-t { font-size: 17px; font-weight: 600; }
.hm-pop-s { font-size: 13px; color: var(--label-2); margin-top: 2px; }
.hm-preview { display: block; width: 100%; text-align: left; padding: 6px; border-radius: 14px; }
.hm-preview:hover { background: var(--hover-subtle); }
.hm-pv-msg { display: flex; flex-direction: column; gap: 1px; padding: 6px; font-size: 13px; line-height: 18px; }
.hm-pv-who { font-weight: 600; color: var(--label); }
.hm-pv-tx { color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hm-pv-empty { padding: 6px; font-size: 13px; color: var(--label-2); }
.hm-mention { background: var(--mention-wash); color: var(--label); border-radius: 4px; padding: 0 2px; }
.hm-pop-menu { display: flex; flex-direction: column; }
.hm-facts { display: flex; flex-direction: column; gap: 6px; padding: 0 6px 8px; }
.hm-fact { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--label); }
.hm-fact.now { color: var(--now-text); font-weight: 600; }
.hm-fact-ic { width: 14px; height: 14px; color: var(--label-2); margin-right: 4px; }
.hm-fact.now .hm-fact-ic { color: var(--now-text); }
.hm-mates-t { padding: 8px 6px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.4px; color: var(--label-2); }
.hm-mate { display: flex; align-items: center; gap: 10px; padding: 5px 6px; }
.hm-mate-tx { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; }
.hm-mate-s { font-weight: 400; color: var(--label-2); }
.hm-open-day { padding: 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); }

.hm-qr-hdr { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hm-qr-t { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.hm-qr-pad { width: 30px; flex: none; }
.hm-quote { position: relative; padding: 10px 12px 10px 15px; border-radius: 16px; background: var(--fill-subtle); margin-bottom: 12px; overflow: hidden; }
.hm-quote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.hm-quote-who { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.hm-quote-tx { margin-top: 2px; font-size: 15px; line-height: 20px; color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hm-qr-box { display: flex; align-items: flex-end; gap: 8px; }
.hm-qr-in { flex: 1; min-height: 40px; max-height: 110px; border: 0; border-radius: 20px; padding: 10px 14px; font-size: 15px; line-height: 20px; background: var(--fill); color: var(--label); resize: none; }
.hm-qr-in::placeholder { color: var(--label-2); }
.hm-qr-send { width: 40px; height: 40px; border-radius: 20px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0.5px 0 color-mix(in srgb, var(--on-accent) 35%, transparent); }
.hm-qr-send svg { width: 16px; height: 16px; }
.hm-qr-send:disabled { background: var(--fill); color: var(--label-2); box-shadow: none; }

/* ---------- narrow panes ---------- */
.pane.cmp .hm-hdr { padding-left: 16px; }
.pane.cmp .hm-body { padding-left: 12px; padding-right: 12px; }
.pane.cmp .hm-rv { left: 22px; right: 20px; }
.pane.cmp .hm-inc-title { left: 22px; }
