/* Live HR Profit (HumanResources > Live HR Profit).
   Root: <div class="lp dash-glass dash-aurora">. .dash-glass puts the shell's glass tokens (--text, --gfill, --rim, --gshadow, --blue, --amber, --good, --warn ...) on it, light or dark
   with the window's theme (exa-desktop.css); .dash-aurora paints the soft colour fields the glass blurs (exa-dashpage.css). Nothing here is a fixed colour except the four fills
   of the bars and the chart, which have a light and a dark value.
   The layout answers to the WIDTH OF THE WINDOW (container queries on .lp), not the viewport: the page lives in a desktop window that can be any size.
   The odometer, the floating amounts, the row flashes, the bars and the chart glide all stop under prefers-reduced-motion. */

.lp {
    --lp-ink: var(--text);
    --lp-ink2: var(--text2);
    --lp-ink3: var(--text3);
    --lp-bill: var(--blue);
    --lp-pay: var(--amber);
    --lp-profit: var(--good);
    --lp-loss: var(--warn);
    --lp-billf: #2563eb;
    --lp-payf: #d97706;
    --lp-profitf: #2fb32e;
    --lp-lossf: #dc2626;
    --lp-up: var(--lp-profitf);
    --lp-down: var(--lp-lossf);
    --lp-track: rgba(18, 48, 26, .10);
    --lp-grid: rgba(18, 48, 26, .13);
    --lp-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
    --lp-chipbg: rgba(255, 255, 255, .55);
    container-type: inline-size;
    container-name: lp;
    position: relative;
    min-height: 100%;
    color: var(--lp-ink);
    font-family: var(--fb);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

/* Inside the page frame (Usr_WinPage) the area around the page does not scroll (.wp-main is overflow hidden), so the report is its own scroller there: it takes the height the frame
   leaves and scrolls inside it. The backdrop is on this same element, so it stays put while the cards move over it. */
.wp-main > .lp { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--stroke) transparent; }
[data-theme=dark] .lp {
    --lp-billf: #5b9bff;
    --lp-payf: #f5a623;
    --lp-profitf: #34d058;
    --lp-lossf: #f87171;
    --lp-track: rgba(255, 255, 255, .10);
    --lp-grid: rgba(255, 255, 255, .14);
    --lp-chipbg: rgba(255, 255, 255, .10);
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp button { font: inherit; color: inherit; cursor: pointer; }
.lp button:focus-visible, .lp select:focus-visible, .lp summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp [hidden] { display: none !important; }
.lp-inner { position: relative; display: flex; flex-direction: column; gap: 16px; max-width: 1320px; margin: 0 auto; padding: 16px; }
.lp-mono { font-family: var(--lp-mono); font-variant-numeric: tabular-nums; }
.lp-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--lp-ink3); }
.lp h2 { margin: 0; font-family: var(--fh); letter-spacing: -.005em; text-wrap: balance; color: var(--lp-ink); }
.lp-host { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* glass card */
.lp-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 18px;
    border-radius: 24px;
    background: var(--gfill);
    backdrop-filter: blur(26px) saturate(1.6);
    -webkit-backdrop-filter: blur(26px) saturate(1.6);
    box-shadow: var(--gshadow);
    color: var(--lp-ink);
}
.lp-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    z-index: 4;
    background: var(--rim);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* top: the chips and the range controls */
.lp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lp-top h1 { margin: 0; font-family: var(--fh); font-size: clamp(20px, 3.4cqw, 28px); font-weight: 800; line-height: 1.1; color: var(--lp-ink); letter-spacing: -.01em; }
.lp-crumb { font-size: 12px; color: var(--lp-ink3); font-weight: 600; }
.lp-sub { font-family: var(--fh); font-size: clamp(16px, 2.6cqw, 20px); font-weight: 800; line-height: 1.2; color: var(--lp-ink); letter-spacing: -.01em; }
.lp-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lp-logo {
    width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff;
    background: linear-gradient(135deg, var(--lp-profitf), var(--lp-billf));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--lp-profitf) 35%, transparent);
}
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
    background: var(--lp-chipbg); border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; color: var(--lp-ink2);
}
.lp-chip.lp-live b { color: var(--lp-profit); letter-spacing: .08em; }
.lp-chip.lp-final b { color: var(--lp-ink); letter-spacing: .08em; }
.lp-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--lp-profitf); position: relative; flex: none; }
.lp-pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--lp-profitf); animation: lp-ping 1.6s ease-out infinite; }
.lp-chip.lp-final .lp-pulse { background: var(--lp-ink3); }
.lp-chip.lp-final .lp-pulse::after { display: none; }
@keyframes lp-ping { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }

.lp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 14px; }
.lp-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--lp-track); border: 1px solid var(--stroke); gap: 2px; }
.lp-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--lp-ink2); transition: background .2s, color .2s; }
.lp-seg button:hover:not(:disabled) { color: var(--lp-ink); }
.lp-seg button[aria-pressed="true"] { background: var(--btn); color: #fff; }
.lp-seg button:disabled { opacity: .45; cursor: default; }
.lp-seg.lp-sm button { padding: 5px 10px; font-size: 12.5px; }
.lp-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lp-stepper button, .lp-ghost {
    border: 1px solid var(--stroke); background: var(--lp-chipbg); border-radius: 10px; padding: 6px 11px; font-weight: 700; color: var(--lp-ink2); display: inline-flex; align-items: center; gap: 6px;
}
.lp-stepper button:hover:not(:disabled), .lp-ghost:hover:not(:disabled) { color: var(--lp-ink); border-color: var(--accent); }
.lp-stepper button:disabled, .lp-ghost:disabled { opacity: .4; cursor: default; }
.lp-range { min-width: 200px; text-align: center; font-weight: 700; padding: 0 6px; color: var(--lp-ink); }
.lp-spacer { flex: 1 1 0; }
.lp-spin { animation: lp-spin 1s linear infinite; display: inline-block; }
@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp-warn { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-wchip {
    display: inline-flex; align-items: flex-start; gap: 6px; padding: 6px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
    background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); color: var(--amber);
}
.lp-err { padding: 16px 18px; color: var(--warn); font-weight: 600; }
.lp-busy { position: absolute; inset: 0; z-index: 6; display: grid; place-items: start center; padding-top: 120px; pointer-events: none; }
.lp-busy span { padding: 8px 16px; border-radius: 999px; background: var(--lp-chipbg); border: 1px solid var(--stroke); font-weight: 700; color: var(--lp-ink2); backdrop-filter: blur(10px); }

/* hero */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
.lp-heroL { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: 24px 26px; }
.lp-odoWrap { position: relative; display: inline-block; align-self: flex-start; max-width: 100%; }
.lp-odo {
    display: inline-flex; align-items: baseline; font-family: var(--lp-mono); font-weight: 700; font-size: clamp(36px, 9cqw, 82px); line-height: 1; letter-spacing: -.03em;
    font-variant-numeric: tabular-nums; transition: color .4s; filter: drop-shadow(0 0 22px color-mix(in srgb, currentColor 30%, transparent));
}
.lp-odo.lp-pos { color: var(--lp-profit); }
.lp-odo.lp-neg { color: var(--lp-loss); }
.lp-d { display: inline-block; width: .62em; height: 1.06em; overflow: hidden; position: relative; }
.lp-d i { position: absolute; left: 0; top: 0; width: 100%; display: flex; flex-direction: column; font-style: normal; transition: transform .75s cubic-bezier(.2, .9, .25, 1); }
.lp-d b { display: block; height: 1.06em; line-height: 1.06em; text-align: center; font-weight: inherit; }
.lp-s { display: inline-block; line-height: 1.06em; }
.lp-s.lp-cm { width: .34em; text-align: center; }
.lp-pops { position: absolute; inset: 0; pointer-events: none; }
.lp-pop { position: absolute; right: -6px; top: -4px; font-family: var(--lp-mono); font-weight: 700; font-size: 15px; white-space: nowrap; animation: lp-popup 1.5s ease-out forwards; }
.lp-pop.lp-up { color: var(--lp-profit); }
.lp-pop.lp-dn { color: var(--lp-loss); }
@keyframes lp-popup { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-52px); } }
.lp-heroRow { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-rate {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-family: var(--lp-mono); font-weight: 700; font-size: 13px;
    background: color-mix(in srgb, var(--lp-profitf) 18%, transparent); color: var(--lp-profit); border: 1px solid color-mix(in srgb, var(--lp-profitf) 40%, transparent); transition: all .3s;
}
.lp-rate.lp-neg { background: color-mix(in srgb, var(--lp-lossf) 16%, transparent); color: var(--lp-loss); border-color: color-mix(in srgb, var(--lp-lossf) 40%, transparent); }
.lp-rate.lp-flat { background: var(--lp-chipbg); color: var(--lp-ink2); border-color: var(--stroke); }
.lp-chipm { padding: 6px 12px; border-radius: 999px; background: var(--lp-chipbg); border: 1px solid var(--stroke); font-weight: 700; font-size: 13px; color: var(--lp-ink2); }
.lp-muted { margin: 0; color: var(--lp-ink3); font-size: 13px; }
.lp-heroR { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px 24px; }
.lp-eq { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.lp-eq .lp-k { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--lp-ink2); }
.lp-eq .lp-v { font-size: 20px; font-weight: 700; }
.lp-c-bill { color: var(--lp-bill); } .lp-c-pay { color: var(--lp-pay); } .lp-c-profit { color: var(--lp-profit); } .lp-c-loss { color: var(--lp-loss); }
.lp-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lp-sw.lp-bill { background: var(--lp-billf); } .lp-sw.lp-pay { background: var(--lp-payf); } .lp-sw.lp-pro { background: var(--lp-profitf); }
.lp-bar2 { height: 10px; border-radius: 99px; background: var(--lp-track); overflow: hidden; }
.lp-bar2 i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .9s cubic-bezier(.2, .9, .25, 1), background-color .4s; }
.lp-bar2 i.lp-bill { background: linear-gradient(90deg, color-mix(in srgb, var(--lp-billf) 55%, transparent), var(--lp-billf)); }
.lp-bar2 i.lp-pay { background: linear-gradient(90deg, color-mix(in srgb, var(--lp-payf) 55%, transparent), var(--lp-payf)); }
.lp-bar2 i.lp-pos { background: linear-gradient(90deg, color-mix(in srgb, var(--lp-profitf) 55%, transparent), var(--lp-profitf)); }
.lp-bar2 i.lp-neg { background: linear-gradient(90deg, color-mix(in srgb, var(--lp-lossf) 55%, transparent), var(--lp-lossf)); }
.lp-eq.lp-total { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stroke); }

/* the two lists */
.lp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lp-ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.lp-ph h2 { font-size: 19px; font-weight: 800; }
.lp-ph p { margin: 2px 0 0; color: var(--lp-ink3); font-size: 13px; }
.lp-ptot { text-align: right; flex: none; }
.lp-ptot b { display: block; font-size: 24px; line-height: 1.1; }
.lp-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 470px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--stroke) transparent; }
.lp-er {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 14px;
    background: var(--gtile); border: 1px solid transparent; animation: lp-rowin .45s ease both;
}
.lp-er.lp-st-client, .lp-er.lp-st-shift { border-color: var(--stroke); }
/* somebody on a break or off the clock is quieter, but the writing keeps its full contrast: only the avatar and the name fade */
.lp-er.lp-st-break .lp-av, .lp-er.lp-st-off .lp-av { opacity: .62; filter: saturate(.5); }
.lp-er.lp-st-break .lp-nm b, .lp-er.lp-st-off .lp-nm b { color: var(--lp-ink2); font-weight: 600; }
@keyframes lp-rowin { from { opacity: 0; transform: translateY(6px); } }
.lp-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: hsl(var(--h) 52% 38%); position: relative; }
.lp-st-client .lp-av::after, .lp-st-shift .lp-av::after { content: ""; position: absolute; inset: -3px; border-radius: 14px; border: 2px solid var(--lp-profitf); opacity: 0; animation: lp-ring 2.2s ease-out infinite; }
.lp-st-shift .lp-av::after { border-color: var(--lp-payf); }
@keyframes lp-ring { 0% { opacity: .8; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }
.lp-nm { min-width: 0; display: flex; flex-direction: column; }
.lp-nm b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lp-ink); }
.lp-nm small { color: var(--lp-ink3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-hr { color: var(--lp-ink2); font-size: 13px; text-align: right; min-width: 68px; }
.lp-cost { font-weight: 700; font-size: 15px; color: var(--lp-pay); text-align: right; min-width: 84px; }
.lp-cg { border-radius: 14px; background: var(--gtile); border: 1px solid var(--stroke); padding: 9px 11px; animation: lp-rowin .45s ease both; }
.lp-ch { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.lp-lg { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--lp-billf) 22%, transparent); color: var(--lp-bill); border: 1px solid color-mix(in srgb, var(--lp-billf) 40%, transparent); }
.lp-amt { font-weight: 700; font-size: 15px; color: var(--lp-bill); text-align: right; min-width: 96px; }
.lp-ss { list-style: none; margin: 8px 0 0 50px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.lp-ss li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 12.5px; color: var(--lp-ink2); }
.lp-ss li.lp-left { color: var(--amber); }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-profitf); animation: lp-blink 1.4s ease-in-out infinite; }
.lp-dot.lp-off { animation: none; background: var(--lp-ink3); }
@keyframes lp-blink { 50% { opacity: .3; } }
.lp-ss em { font-style: normal; color: var(--lp-ink3); }
.lp-flash { animation: lp-fl .55s ease-out; }
@keyframes lp-fl { 0% { filter: brightness(1.6); } 100% { filter: none; } }
.lp-empty { color: var(--lp-ink3); padding: 14px; text-align: center; }

/* statistics */
.lp-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.lp-tile { padding: 14px 16px; border-radius: 18px; background: var(--gtile); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lp-tile .lp-val { font-weight: 700; font-size: clamp(17px, 2.1cqw, 22px); line-height: 1.15; white-space: nowrap; transition: color .3s; color: var(--lp-ink); }
.lp-tile .lp-val.lp-pos { color: var(--lp-profit); } .lp-tile .lp-val.lp-neg { color: var(--lp-loss); }
.lp-tile small { color: var(--lp-ink3); font-size: 12px; line-height: 1.3; }
.lp-tile.lp-key { border-color: color-mix(in srgb, var(--lp-profitf) 45%, var(--stroke)); }

/* chart and feed */
.lp-lower { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.lp-lower.lp-solo, .lp-host[data-live="0"] .lp-lower { grid-template-columns: minmax(0, 1fr); }
.lp-chh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.lp-chh h2 { font-size: 17px; font-weight: 800; }
.lp-chartWrap { position: relative; }
.lp-chart { display: block; width: 100%; height: 290px; }
.lp-chartEmpty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--lp-ink3); font-weight: 600; }
.lp-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 330px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--stroke) transparent; }
.lp-feed li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; font-size: 13px; color: var(--lp-ink2); animation: lp-rowin .5s ease both; }
.lp-feed time { display: block; font-family: var(--lp-mono); font-size: 11.5px; color: var(--lp-ink3); }
.lp-fdot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--lp-ink3); }
.lp-feed .in .lp-fdot { background: var(--lp-profitf); } .lp-feed .idle .lp-fdot { background: var(--lp-lossf); } .lp-feed .break .lp-fdot { background: var(--lp-payf); }
.lp-feed .clock .lp-fdot { background: var(--accent); } .lp-feed .client .lp-fdot { background: var(--lp-billf); }

.lp-notes { padding: 14px 18px; }
.lp-notes summary { cursor: pointer; font-weight: 700; color: var(--lp-ink2); }
.lp-notes ul { margin: 10px 0 0; padding-left: 20px; color: var(--lp-ink2); display: flex; flex-direction: column; gap: 6px; max-width: 90ch; }

/* narrower windows */
@container lp (max-width: 1060px) { .lp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container lp (max-width: 900px) {
    .lp-hero, .lp-cols, .lp-lower { grid-template-columns: minmax(0, 1fr); }
    .lp-range { min-width: 0; }
    .lp-heroL { padding: 20px; }
}
@container lp (max-width: 560px) {
    .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-er { grid-template-columns: 38px minmax(0, 1fr) auto; }
    .lp-er .lp-hr { display: none; }
    .lp-inner { padding: 12px; gap: 12px; }
    .lp-host { gap: 12px; }
    .lp-card { padding: 14px; border-radius: 20px; }
    .lp-ss { margin-left: 0; }
    .lp-bar { padding: 10px; }
    .lp-seg button { padding: 7px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
}
