/* System history page (profile > history) and the window of one event.
   Amber glass like the rest of the site; one short wide row for every event, ten to a page. */

.sh-shell,
.jd {
    --sh-ease: cubic-bezier(.22, 1, .36, 1);
    --sh-t: #d9731f;
    --sh-n: #f0a659;
    --sh-ink: var(--text, #2a2118);
    --sh-ink2: #6f6252;
    --sh-line: rgba(217, 115, 31, .22);
    --sh-a: rgba(255, 255, 255, .78);
    --sh-b: rgba(255, 255, 255, .42);
    --sh-hl: rgba(255, 255, 255, .95);
    --sh-ok: #1f7a4d;
    --sh-bad: #c4553a;
    --sh-warn: #b07712;
    --sh-wait: #8a5cd0;
    --sh-dup: #3b8be8;
}

html[data-theme="dark"] .sh-shell,
html[data-theme="dark"] .jd {
    --sh-t: #f5a867;
    --sh-n: #d9731f;
    --sh-ink: #f4ede4;
    --sh-ink2: #c4b6a4;
    --sh-line: rgba(245, 168, 103, .26);
    --sh-a: rgba(255, 255, 255, .09);
    --sh-b: rgba(255, 255, 255, .03);
    --sh-hl: rgba(255, 255, 255, .08);
    --sh-ok: #5fd391;
    --sh-bad: #f09479;
    --sh-warn: #e8bd5a;
    --sh-wait: #b99af0;
    --sh-dup: #7db3f5;
}

/* ---------- page ---------- */
.sh-shell {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--sh-t) 30%, var(--sh-line));
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--sh-t) 22%, transparent), transparent 52%),
        radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--sh-n) 14%, transparent), transparent 56%),
        linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(255, 250, 244, .3));
    box-shadow: 0 18px 44px color-mix(in srgb, var(--sh-t) 16%, transparent), inset 0 1px 0 var(--sh-hl);
    color: var(--sh-ink);
    animation: sh-rise .6s var(--sh-ease) both;
}

html[data-theme="dark"] .sh-shell {
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--sh-t) 24%, transparent), transparent 52%),
        linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
}

.sh-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sh-ht {
    flex: 1;
    min-width: 0;
}

.sh-ht h2 {
    margin: 0;
    font-size: 24px;
    color: var(--sh-ink);
}

.sh-ht p {
    margin: 0;
    font-size: 14px;
    color: var(--sh-ink2);
}

.sh-chip {
    flex: none;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--sh-t) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.sh-chip i {
    color: #fff;
    font-size: 28px;
    animation: sh-beat 2.4s ease-in-out infinite;
}

.sh-acts {
    display: flex;
    gap: 8px;
}

.sh-mbtn,
.sh-gbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 14.5px;
    cursor: pointer;
    transition: transform .2s var(--sh-ease), box-shadow .2s;
}

.sh-mbtn {
    color: #fff;
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--sh-t) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.sh-mbtn i {
    color: #fff;
}

.sh-gbtn {
    color: var(--sh-ink);
    background: linear-gradient(145deg, var(--sh-a), var(--sh-b));
    border: 1px solid color-mix(in srgb, var(--sh-t) 28%, var(--sh-line));
    box-shadow: inset 0 1px 0 var(--sh-hl);
}

.sh-gbtn i {
    color: var(--sh-t);
}

.sh-mbtn:hover,
.sh-gbtn:hover {
    transform: translateY(-2px);
}

.sh-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.sh-kpi {
    --c: var(--sh-t);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--c) 26%, var(--sh-line));
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 55%),
        linear-gradient(145deg, var(--sh-a), var(--sh-b));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 10%, transparent), inset 0 1px 0 var(--sh-hl);
    animation: sh-rise .6s var(--sh-ease) both;
    transition: transform .3s var(--sh-ease);
}

.sh-kpi:hover {
    transform: translateY(-3px);
}

.sh-kpi.k2 {
    --c: #1f7a4d;
    animation-delay: .06s;
}

.sh-kpi.k3 {
    --c: #c4553a;
    animation-delay: .12s;
}

.sh-kpi.k4 {
    --c: #3b8be8;
    animation-delay: .18s;
}

.sh-kc {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
    box-shadow: 0 8px 16px color-mix(in srgb, var(--c) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.sh-kc i {
    color: #fff;
    font-size: 22px;
}

.sh-kpi small {
    display: block;
    font-size: 13px;
    color: var(--sh-ink2);
}

.sh-kpi b {
    font-size: 24px;
    line-height: 1.2;
    color: var(--sh-ink);
}

.sh-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sh-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--sh-t) 24%, var(--sh-line));
    background: color-mix(in srgb, var(--sh-t) 7%, transparent);
}

.sh-scope button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--sh-ink2);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s var(--sh-ease);
}

.sh-scope button:hover {
    transform: translateY(-1px);
}

.sh-scope button i {
    color: var(--sh-t);
}

.sh-scope button.on {
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    color: #fff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--sh-t) 30%, transparent);
}

.sh-scope button.on i {
    color: #fff;
}

.sh-scope b {
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    font-size: 12.5px;
}

.sh-daypick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px dashed color-mix(in srgb, var(--sh-t) 40%, transparent);
    background: color-mix(in srgb, var(--sh-t) 5%, transparent);
    font-size: 14px;
}

.sh-daypick[hidden] {
    display: none;
}

.sh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sh-chips button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 15px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--sh-t) 24%, var(--sh-line));
    background: var(--sh-a);
    color: var(--sh-ink);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: transform .2s var(--sh-ease), background .2s;
}

.sh-chips button i {
    color: var(--sh-t);
}

.sh-chips button:hover {
    transform: translateY(-2px);
}

.sh-chips button.on {
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    border-color: transparent;
    color: #fff;
}

.sh-chips button.on i {
    color: #fff;
}

.sh-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.sh-list-head h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    color: var(--sh-ink);
}

.sh-list-head small {
    color: var(--sh-ink2);
    font-size: 13px;
}

.sh-live {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--sh-ok);
    animation: sh-ping 2s ease-out infinite;
}

.sh-list {
    display: grid;
    gap: 7px;
    min-height: 120px;
}

.sh-day {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--sh-ink2);
}

.sh-day::before,
.sh-day::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sh-line);
}

.sh-ev {
    --c: var(--sh-t);
    display: grid;
    grid-template-columns: 58px 40px minmax(0, 1fr) 160px 84px 96px 20px;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 7px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--c) 22%, var(--sh-line));
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 46%),
        linear-gradient(145deg, var(--sh-a), var(--sh-b));
    box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 7%, transparent), inset 0 1px 0 var(--sh-hl);
    color: var(--sh-ink);
    cursor: pointer;
    animation: sh-rise .5s var(--sh-ease) both;
    animation-delay: calc(var(--i) * 40ms);
    transition: transform .25s var(--sh-ease), box-shadow .25s, border-color .25s;
}

.sh-ev:hover {
    transform: translateX(-4px) translateY(-1px);
    border-color: color-mix(in srgb, var(--c) 50%, var(--sh-line));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--c) 18%, transparent), inset 0 1px 0 var(--sh-hl);
}

.sh-ev:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent);
    outline-offset: 2px;
}

.sh-t {
    display: grid;
    justify-items: center;
    line-height: 1.2;
    direction: ltr;
}

.sh-t b {
    font-size: 15px;
}

.sh-t small {
    font-size: 11px;
    color: var(--sh-ink2);
}

.sh-ic {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c));
    box-shadow: 0 7px 14px color-mix(in srgb, var(--c) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4);
    transition: transform .3s var(--sh-ease);
}

.sh-ev:hover .sh-ic {
    transform: rotate(-8deg) scale(1.1);
}

.sh-ic i {
    color: #fff;
    font-size: 20px;
}

.sh-tx {
    min-width: 0;
}

.sh-tx b,
.sh-tx small {
    display: block;
    overflow: hidden;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-tx b {
    font-size: 14.5px;
}

.sh-tx small {
    font-size: 12.5px;
    color: var(--sh-ink2);
}

.sh-who {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
}

.sh-who span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-av {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    color: #fff;
    font-size: 12px;
    font-style: normal;
}

.sh-src {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.sh-src.be {
    background: color-mix(in srgb, #1f8f86 14%, transparent);
    color: #1f8f86;
}

.sh-src.fe {
    background: color-mix(in srgb, #4f56d6 14%, transparent);
    color: #4f56d6;
}

html[data-theme="dark"] .sh-src.be {
    color: #7ce6d8;
}

html[data-theme="dark"] .sh-src.fe {
    color: #b3b9ff;
}

.sh-st {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12.5px;
    white-space: nowrap;
}

.sh-st.is-ok {
    background: var(--sh-ok);
}

.sh-st.is-bad {
    background: var(--sh-bad);
}

.sh-st.is-warn {
    background: var(--sh-warn);
}

.sh-st.is-wait {
    background: var(--sh-wait);
}

.sh-st.is-dup {
    background: var(--sh-dup);
}

html[data-theme="dark"] .sh-st {
    color: #10161f;
}

.sh-go {
    color: var(--sh-ink2);
    transition: transform .25s var(--sh-ease), color .2s;
}

.sh-ev:hover .sh-go {
    transform: translateX(-4px);
    color: var(--c);
}

.sh-skel {
    grid-template-columns: 58px 40px 1fr;
    cursor: default;
}

.sh-skel i {
    height: 18px;
    border-radius: 9px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--sh-t) 10%, transparent), color-mix(in srgb, var(--sh-t) 24%, transparent), color-mix(in srgb, var(--sh-t) 10%, transparent));
    background-size: 200% 100%;
    animation: sh-shine 1.4s linear infinite;
}

.sh-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 34px 12px;
    color: var(--sh-ink2);
    text-align: center;
}

.sh-empty i {
    color: var(--sh-t);
    font-size: 36px;
}

.sh-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.sh-count,
.sh-note {
    font-size: 13px;
    color: var(--sh-ink2);
}

.sh-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sh-note i {
    color: var(--sh-t);
}

.sh-pg {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sh-pb,
.sh-pn {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--sh-t) 24%, var(--sh-line));
    background: var(--sh-a);
    color: var(--sh-ink);
    font: inherit;
    font-size: 14.5px;
    cursor: pointer;
    transition: transform .2s var(--sh-ease), background .2s;
}

.sh-pb:hover:not(:disabled),
.sh-pn:hover {
    transform: translateY(-2px);
}

.sh-pb:disabled {
    opacity: .4;
    cursor: default;
}

.sh-pb i {
    color: var(--sh-t);
}

.sh-pn.on {
    background: linear-gradient(145deg, var(--sh-n), var(--sh-t));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--sh-t) 30%, transparent);
}

.sh-dots {
    color: var(--sh-ink2);
}

/* ---------- the window of one event ---------- */
.jd {
    --c: #d9731f;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--c) 30%, rgba(255, 255, 255, .6));
    background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(250, 247, 252, .94));
    box-shadow: 0 30px 70px rgba(20, 20, 60, .35), inset 0 1px 0 #fff;
    color: #2a2118;
    animation: sh-pop .5s var(--sh-ease) both;
}

html[data-theme="dark"] .jd {
    background: linear-gradient(160deg, rgba(34, 30, 40, .98), rgba(22, 24, 36, .96));
    color: #f4ede4;
}

.jd-h {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--c) 34%, transparent), transparent 60%),
        radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%),
        linear-gradient(145deg, color-mix(in srgb, var(--c) 14%, #fff), color-mix(in srgb, var(--c) 5%, #fff));
    border-bottom: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}

html[data-theme="dark"] .jd-h {
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--c) 36%, transparent), transparent 60%),
        linear-gradient(145deg, color-mix(in srgb, var(--c) 18%, #1c1c26), #1c1c26);
}

.jd-h > div {
    flex: 1;
}

.jd-h small {
    display: block;
    color: var(--c);
    font-size: 13px;
}

.jd-h h3 {
    margin: 0;
    font-size: 20px;
}

.jd-chip {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--c) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.jd-chip i {
    color: #fff;
    font-size: 28px;
    animation: sh-beat 2.6s ease-in-out infinite;
}

.jd-x {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .8);
    color: #2a2118;
    cursor: pointer;
    transition: transform .25s var(--sh-ease);
}

.jd-x:hover {
    transform: rotate(90deg);
}

.jd-x i {
    font-size: 22px;
}

.jd-b {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 14px;
    padding: 18px 20px;
}

.jd-b > * {
    animation: sh-rise .5s var(--sh-ease) both;
}

.jd-b > *:nth-child(2) {
    animation-delay: .06s;
}

.jd-b > *:nth-child(3) {
    animation-delay: .12s;
}

.jd-b > *:nth-child(4) {
    animation-delay: .18s;
}

.jd-b > *:nth-child(5) {
    animation-delay: .24s;
}

.jd-b > *:nth-child(6) {
    animation-delay: .3s;
}

.jd-sum {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 55%),
        color-mix(in srgb, var(--c) 5%, transparent);
}

.jd-sum > div {
    flex: 1;
    min-width: 0;
}

.jd-sum b {
    display: block;
    font-size: 16.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.jd-sum small {
    color: #7b6e5f;
    font-size: 13px;
}

html[data-theme="dark"] .jd-sum small,
html[data-theme="dark"] .jd-f span,
html[data-theme="dark"] .jd-op small,
html[data-theme="dark"] .fl small,
html[data-theme="dark"] .fl em {
    color: #c4b6a4;
}

.jd-si {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
}

.jd-si i {
    color: var(--c);
    font-size: 22px;
}

.jd-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.jd-flow .fl {
    --k: var(--c);
    display: grid;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--k) 28%, transparent);
    background: color-mix(in srgb, var(--k) 8%, transparent);
    text-align: center;
}

.jd-flow .fl small {
    font-size: 12px;
    line-height: 1.5;
    color: #7b6e5f;
}

.jd-flow .fl b {
    font-size: 24px;
    line-height: 1.3;
    direction: ltr;
}

.jd-flow .fl em {
    font-style: normal;
    font-size: 12px;
    color: #7b6e5f;
}

.jd-flow .fl.a {
    --k: #1f8f86;
}

.jd-flow .fl.b {
    --k: #3b8be8;
}

.jd-flow .fl.t {
    border-color: transparent;
    background: linear-gradient(145deg, #55b786, #1f7a4d);
    box-shadow: 0 12px 24px rgba(31, 122, 77, .3);
}

.jd-flow .fl.t.warn {
    background: linear-gradient(145deg, #e0ae4a, #b07712);
    box-shadow: 0 12px 24px rgba(176, 119, 18, .3);
}

.jd-flow .fl.t.bad {
    background: linear-gradient(145deg, #e8826a, #c4553a);
    box-shadow: 0 12px 24px rgba(196, 85, 58, .35);
}

.jd-flow .fl.t small,
.jd-flow .fl.t b,
.jd-flow .fl.t em {
    color: #fff;
}

.jd-flow .op {
    color: #9a8c7a;
    font-size: 20px;
}

.jd-steps {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jd-sp {
    flex: none;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
    opacity: .55;
    font-size: 12.5px;
}

.jd-sp i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: var(--c);
    font-size: 19px;
}

.jd-sp.done,
.jd-sp.now,
.jd-sp.bad {
    opacity: 1;
}

.jd-sp.done i {
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c));
    color: #fff;
}

.jd-sp.now i {
    background: linear-gradient(145deg, #9a8df0, #5b63e0);
    color: #fff;
    animation: sh-ping-c 2s ease-out infinite;
}

.jd-sp.bad i {
    background: linear-gradient(145deg, #e8826a, #c4553a);
    color: #fff;
}

.jd-ln {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent));
}

.jd-ln.off {
    background: color-mix(in srgb, var(--c) 18%, transparent);
}

.jd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jd-chips span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
    background: color-mix(in srgb, var(--c) 6%, transparent);
    font-size: 13px;
}

.jd-chips i {
    color: var(--c);
    font-size: 17px;
}

.jd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.jd-f {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 12px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
    background: linear-gradient(145deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .2));
    transition: transform .25s var(--sh-ease);
}

html[data-theme="dark"] .jd-f {
    background: rgba(255, 255, 255, .05);
}

.jd-f:hover {
    transform: translateY(-2px);
}

.jd-f > i {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: var(--c);
    font-size: 20px;
}

.jd-f span {
    color: #7b6e5f;
    font-size: 12.5px;
}

.jd-f b {
    overflow-wrap: anywhere;
    font-size: 15px;
}

.jd-op {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 1.5px dashed color-mix(in srgb, var(--c) 36%, transparent);
    background: color-mix(in srgb, var(--c) 4%, transparent);
}

.jd-op > i {
    color: var(--c);
    font-size: 24px;
}

.jd-op div {
    flex: 1;
    min-width: 0;
}

.jd-op small {
    display: block;
    color: #7b6e5f;
    font-size: 12.5px;
}

.jd-op code {
    display: block;
    font-size: 12.5px;
    line-height: 1.7;
    text-align: start;
    white-space: normal;
    word-break: break-all;
}

.jd-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: var(--c);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.jd-tech-copy {
    margin: 4px 14px 12px;
}

.jd-copy:hover {
    background: color-mix(in srgb, var(--c) 24%, transparent);
}

.jd-tech {
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
    overflow: hidden;
}

.jd-tech summary {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    list-style: none;
}

.jd-tech summary i {
    color: var(--c);
    font-size: 19px;
}

.jd-tech .jd-cv {
    margin-inline-start: auto;
    transition: transform .25s var(--sh-ease);
}

.jd-tech[open] .jd-cv {
    transform: rotate(180deg);
}

.jd-tl {
    display: grid;
    gap: 6px;
    padding: 0 14px 12px;
}

.jd-tl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.jd-tl span {
    color: #7b6e5f;
}

.jd-tl code {
    min-width: 0;
    text-align: end;
    word-break: break-all;
}

.jd-f2 {
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid color-mix(in srgb, var(--c) 14%, transparent);
}

.jd-f2 .sh-mbtn {
    background: linear-gradient(145deg, color-mix(in srgb, var(--c) 68%, #fff), var(--c));
}

.jd-f2 .jd-close {
    margin-inline-start: auto;
    color: #2a2118;
}

html[data-theme="dark"] .jd-f2 .jd-close {
    color: #f4ede4;
}

@keyframes sh-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sh-pop {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.95);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sh-beat {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@keyframes sh-ping {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--sh-ok) 55%, transparent);
    }

    100% {
        box-shadow: 0 0 0 12px transparent;
    }
}

@keyframes sh-ping-c {
    0% {
        box-shadow: 0 0 0 0 rgba(91, 99, 224, .5);
    }

    100% {
        box-shadow: 0 0 0 12px transparent;
    }
}

@keyframes sh-shine {
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 900px) {
    .sh-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sh-ev {
        grid-template-columns: 52px 38px minmax(0, 1fr) 20px;
    }

    .sh-ev .sh-who,
    .sh-ev .sh-src {
        display: none;
    }

    .sh-ev .sh-st {
        grid-column: 3;
        justify-self: start;
    }

    .sh-head {
        flex-wrap: wrap;
    }

    .jd-grid,
    .jd-flow {
        grid-template-columns: 1fr;
    }

    .jd-flow .op {
        justify-self: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-shell *,
    .jd,
    .jd * {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
    }
}

.jd-chips,
.jd-grid,
.jd-flow,
.jd-steps,
.jd-sum,
.jd-op,
.jd-tech {
    min-width: 0;
}

.jd-chips span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .jd-steps {
        gap: 4px;
    }

    .jd-sp {
        padding: 6px 8px;
        font-size: 11.5px;
    }

    .jd-f2 {
        flex-wrap: wrap;
    }

    .jd-f2 .sh-mbtn {
        flex: 1 1 100%;
    }
}

/* ---------- the window of a corrected sale ---------- */
.jd.jc {
    --jc-bad: #E05252;
    --jc-ok: #21976B;
    --jc-card: rgba(255, 255, 255, .78);
    --jc-line: rgba(118, 86, 217, .16);
    --sh-t: #7656D9;
    --sh-line: rgba(118, 86, 217, .24);
    width: min(1060px, calc(100vw - 24px));
    background: linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(248, 246, 253, .95));
}

html[data-theme="dark"] .jd.jc {
    --jc-card: rgba(255, 255, 255, .05);
    --jc-line: rgba(160, 130, 255, .2);
    --sh-t: #b39cf5;
    --sh-line: rgba(160, 130, 255, .26);
    background: linear-gradient(160deg, rgba(34, 30, 46, .98), rgba(22, 24, 36, .97));
}

.jc-h > div:not(.jc-meta) {
    flex: 0 1 auto;
    min-width: 0;
}

/* employee, date and time, state: one even row beside the title */
.jc-meta {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-inline-start: 12px;
}

.jc-meta span,
.jd.jc .jc-meta .sh-st {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 13px;
    white-space: nowrap;
}

.jc-meta span:not(.sh-st) {
    border: 1px solid var(--jc-line);
    background: rgba(255, 255, 255, .7);
}

.jc-when em {
    width: 1px;
    height: 14px;
    margin: 0 4px;
    background: rgba(118, 86, 217, .3);
}

html[data-theme="dark"] .jc-meta span:not(.sh-st) {
    background: rgba(255, 255, 255, .06);
}

.jc-meta i {
    color: var(--c);
    font-size: 16px;
}

.jc-b {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 16px;
    padding: 18px 20px;
}

.jc-col {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.jc-col > * {
    animation: sh-rise .5s var(--sh-ease) both;
}

.jc-col > *:nth-child(2) {
    animation-delay: .08s;
}

.jc-col > *:nth-child(3) {
    animation-delay: .16s;
}

.jc-t {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    font-size: 14.5px;
}

.jc-t i {
    color: var(--c);
    font-size: 18px;
}

.jc-pair {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
}

.jc-ba {
    --k: var(--jc-bad);
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--k) 30%, transparent);
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--k) 16%, transparent), transparent 60%),
        color-mix(in srgb, var(--k) 5%, var(--jc-card));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--k) 12%, transparent);
    min-width: 0;
}

.jc-ba.is-after {
    --k: var(--jc-ok);
}

.jc-tag {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 10px;
    background: var(--k);
    color: #fff;
    font-size: 13px;
}

.jc-v {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.jc-v > i {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--k) 14%, transparent);
    color: var(--k);
    font-size: 19px;
}

.jc-v small,
.jc-df small,
.jc-info small {
    display: block;
    color: var(--sh-ink2);
    font-size: 12.5px;
}

.jc-v b {
    font-size: 18px;
}

.jc-ba.is-before .jc-v b {
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--jc-bad) 70%, transparent);
    text-decoration-thickness: 2px;
}

.jc-arrow {
    display: grid;
    place-items: center;
    align-self: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9d84ef, var(--c));
    box-shadow: 0 8px 18px rgba(118, 86, 217, .35);
    color: #fff;
}

.jc-arrow i {
    font-size: 24px;
    animation: jc-nudge 1.6s ease-in-out infinite;
}

.jc-diffs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.jc-df {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--jc-line);
    background: var(--jc-card);
    min-width: 0;
}

.jc-df > i {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--k);
    color: #fff;
    font-size: 18px;
}

.jc-df b {
    font-size: 15.5px;
}

.jc-df b.is-neg {
    color: var(--jc-bad);
}

.jc-chain {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.jc-doc {
    --k: var(--c);
    position: relative;
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--k) 28%, transparent);
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 60%),
        var(--jc-card);
    min-width: 0;
}

.jc-doc.is-reversal {
    --k: var(--jc-bad);
}

.jc-doc.is-replacement {
    --k: var(--jc-ok);
}

.jc-dt {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--k);
    font-size: 13.5px;
    font-weight: 700;
}

.jc-dt > i {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--k);
    color: #fff;
    font-size: 17px;
}

.jc-dt em {
    display: grid;
    flex: none;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-inline-start: auto;
    border-radius: 50%;
    background: color-mix(in srgb, var(--k) 14%, transparent);
    font-size: 12px;
    font-style: normal;
}

.jc-doc code {
    overflow: hidden;
    font-family: Consolas, monospace;
    font-size: 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-doc p {
    margin: 0;
    color: var(--sh-ink2);
    font-size: 12.5px;
    line-height: 1.6;
}

.jc-doc + .jc-doc::before {
    content: "\ea60";
    position: absolute;
    top: 50%;
    inset-inline-start: -17px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border-radius: 50%;
    border: 1px solid var(--jc-line);
    background: #fff;
    color: var(--c);
    font-family: 'tabler-icons';
    font-size: 13px;
}

html[data-theme="dark"] .jc-doc + .jc-doc::before {
    background: #241f33;
}

.jc-copy {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 4px;
    padding: 3px 9px;
    border: 1px solid var(--jc-line);
    border-radius: 9px;
    background: transparent;
    color: var(--k, var(--c));
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.jc-copy:hover {
    background: color-mix(in srgb, var(--k, var(--c)) 10%, transparent);
}

.jc-card {
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--jc-line);
    background: var(--jc-card);
}

.jc-reason {
    border-color: rgba(201, 132, 16, .3);
    background:
        radial-gradient(circle at 100% 0%, rgba(201, 132, 16, .14), transparent 60%),
        var(--jc-card);
}

.jc-reason .jc-t i {
    color: #c98410;
}

.jc-reason q {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(201, 132, 16, .1);
    font-size: 15px;
    quotes: none;
}

.jc-reason p {
    margin: 10px 0 0;
    color: var(--sh-ink2);
    font-size: 13px;
    line-height: 1.7;
}

.jc-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
}

.jc-info div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.jc-info i {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(118, 86, 217, .12);
    color: var(--c);
    font-size: 17px;
}

.jc-info b {
    font-size: 14px;
}

.jc-path {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jc-path span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    white-space: nowrap;
}

.jc-path span i {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--jc-ok);
    color: #fff;
    font-size: 15px;
}

.jc-path span.is-wait i {
    background: var(--sh-warn);
}

.jc-path em {
    flex: 1;
    min-width: 10px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--jc-ok), #9d84ef, var(--jc-ok));
    background-size: 200% 100%;
    animation: sh-shine 2s linear infinite;
}

.jc-op {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--jc-line);
}

.jc-op > i {
    color: var(--c);
    font-size: 19px;
}

.jc-op code {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    text-align: left;
    overflow-wrap: anywhere;
}

@keyframes jc-nudge {
    0%,
    100% {
        transform: none;
    }

    50% {
        transform: translateX(-4px);
    }
}

@media (max-width: 900px) {
    .jc-b {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .jc-h {
        flex-wrap: wrap;
        padding: 14px;
    }

    .jc-meta {
        order: 3;
        justify-content: flex-start;
        width: 100%;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
}

@media (max-width: 620px) {
    /* the employee is in the information card; the row keeps date and state only */
    .jc-meta .jc-who {
        display: none;
    }

    .jc-meta .jc-when {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 620px) {
    .jc-pair {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .jc-arrow {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 2;
        width: 34px;
        height: 34px;
        margin: -17px 0 0 -17px;
    }

    .jc-arrow i {
        font-size: 19px;
    }

    .jc-ba {
        padding: 11px;
    }

    .jc-v b {
        font-size: 15.5px;
    }

    .jc-diffs {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 6px;
    }

    .jc-df {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }

    .jc-chain {
        grid-template-columns: minmax(0, 1fr);
    }

    .jc-doc {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        padding: 10px 12px;
    }

    .jc-dt {
        grid-column: 1 / -1;
    }

    .jc-doc p {
        display: none;
    }

    .jc-doc + .jc-doc::before {
        content: "\ea5f";
        top: -17px;
        inset-inline-start: 50%;
        margin: 0 -11px 0 0;
    }

    .jc-path span {
        font-size: 11.5px;
    }

    .jd.jc .jd-f2 .sh-mbtn,
    .jd.jc .jd-f2 .jd-close {
        flex: 1;
    }
}
