/* History of one cash place (till > places): a violet balance card, three tiles with one colour each
   (green in, red out, amber still with the person in charge) and the movements grouped by day. */
#tillContent .ph-place {
    --ph-green: #12a26b;
    --ph-red: #e5484d;
    --ph-amber: #f2a20c;
    --ph-sky: #2b8fe6;
    --ph-violet: #6d4bff;
    --ph-teal: #0ea5a4;
    --ph-orange: #f2711c;
    --ph-purple: #9b4dff;
    --ph-card: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(246, 247, 252, .82));
    --ph-line: rgba(255, 255, 255, .8);
    display: grid;
    gap: 16px;
}
html[data-theme="dark"] #tillContent .ph-place {
    --ph-green: #34d399;
    --ph-red: #ff6b70;
    --ph-amber: #fbbf24;
    --ph-sky: #60b4ff;
    --ph-violet: #9b85ff;
    --ph-teal: #2dd4bf;
    --ph-orange: #fb923c;
    --ph-purple: #c084fc;
    --ph-card: linear-gradient(160deg, rgba(42, 45, 66, .94), rgba(28, 30, 46, .92));
    --ph-line: rgba(255, 255, 255, .08);
}
#tillContent .ph-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
#tillContent .ph-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 0 16px;
    border-radius: 15px;
    border: 1px solid var(--ph-line);
    background: var(--ph-card);
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(30, 40, 90, .08);
    transition: transform .25s;
}
#tillContent .ph-back:hover {
    transform: translateX(3px);
}
#tillContent .ph-tools {
    display: flex;
    gap: 8px;
    margin-inline-start: auto;
}
#tillContent .ph-tool {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
}
#tillContent .ph-tool:hover {
    transform: translateY(-2px);
}
#tillContent .ph-tool.is-print {
    background: linear-gradient(145deg, #4aa8ff, #2b6fe6);
    box-shadow: 0 10px 22px rgba(43, 111, 230, .35);
}
#tillContent .ph-tool.is-excel {
    background: linear-gradient(145deg, #2fd08c, #0f9a63);
    box-shadow: 0 10px 22px rgba(15, 154, 99, .35);
}

/* the main card: what this place holds now */
#tillContent .ph-hero {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 20px 22px;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, .22), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(45, 212, 191, .35), transparent 45%),
        linear-gradient(135deg, #5b3df5, #3f5df0 55%, #2a86e8);
    box-shadow: 0 22px 44px rgba(63, 93, 240, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: ph-rise .6s cubic-bezier(.2, .9, .3, 1) both;
}
#tillContent .ph-hero-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 45%, transparent 60%);
    background-size: 250% 100%;
    animation: ph-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}
#tillContent .ph-hero-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
#tillContent .ph-hero-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .35);
    font-size: 27px;
    animation: ph-float 3.5s ease-in-out infinite;
}
#tillContent .ph-hero h2 {
    margin: 0;
    font-size: 21px;
    color: #fff;
}
#tillContent .ph-hero p {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 0;
    font-size: 13px;
    opacity: .88;
}
#tillContent .ph-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-inline-start: auto;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: 13px;
    font-weight: 700;
}
#tillContent .ph-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ef7c3;
    box-shadow: 0 0 0 0 rgba(110, 247, 195, .7);
    animation: ph-ping 1.8s ease-out infinite;
}
#tillContent .ph-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 18px;
}
#tillContent .ph-hero-value {
    font-size: 46px;
    font-weight: 700;
    line-height: 1.1;
    direction: ltr;
    text-align: right;
}
#tillContent .ph-hero-value small {
    font-size: 22px;
    opacity: .85;
}
#tillContent .ph-flow {
    display: grid;
    gap: 8px;
}
#tillContent .ph-flow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: 13.5px;
}
#tillContent .ph-flow-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#tillContent .ph-flow-row i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 15px;
}
#tillContent .ph-flow-row.is-in i {
    background: #2fd08c;
}
#tillContent .ph-flow-row.is-out i {
    background: #ff6b70;
}
#tillContent .ph-flow-row b {
    direction: ltr;
    font-size: 15px;
}
#tillContent .ph-bar {
    display: flex;
    gap: 4px;
    height: 10px;
}
#tillContent .ph-bar span {
    width: var(--w);
    border-radius: 6px;
    transform-origin: right;
    animation: ph-fill 1s cubic-bezier(.2, .9, .3, 1) .3s both;
}
#tillContent .ph-bar span:first-child {
    background: linear-gradient(90deg, #2fd08c, #8ff5c8);
}
#tillContent .ph-bar span:last-child {
    background: linear-gradient(90deg, #ffb0b2, #ff6b70);
}

/* three tiles, one colour each */
#tillContent .ph-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
#tillContent .ph-tile {
    --k: var(--ph-green);
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    overflow: hidden;
    border-radius: 24px;
    border: 1.5px solid color-mix(in srgb, var(--k) 35%, transparent);
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--k) 22%, transparent), transparent 60%),
        var(--ph-card);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--k) 18%, transparent);
    animation: ph-rise .55s cubic-bezier(.2, .9, .3, 1) both;
    transition: transform .3s;
}
#tillContent .ph-tile:nth-child(2) {
    animation-delay: .08s;
}
#tillContent .ph-tile:nth-child(3) {
    animation-delay: .16s;
}
#tillContent .ph-tile:hover {
    transform: translateY(-4px);
}
#tillContent .ph-tile.is-red {
    --k: var(--ph-red);
}
#tillContent .ph-tile.is-amber {
    --k: var(--ph-amber);
}
#tillContent .ph-tile-ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--k) 70%, #fff), var(--k));
    color: #fff;
    font-size: 27px;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--k) 40%, transparent);
    transition: transform .4s cubic-bezier(.2, 1.6, .4, 1);
}
#tillContent .ph-tile:hover .ph-tile-ico {
    transform: rotate(-8deg) scale(1.08);
}
#tillContent .ph-tile small {
    display: block;
    color: var(--text2);
    font-size: 13px;
    font-weight: 700;
}
#tillContent .ph-tile b {
    display: block;
    color: var(--k);
    font-size: 24px;
    line-height: 1.3;
}
#tillContent .ph-tile em {
    display: block;
    color: var(--text2);
    font-size: 12px;
    font-style: normal;
}
#tillContent .ph-tile.is-amber .ph-tile-ico {
    animation: ph-pulse 2.4s ease-in-out infinite;
}

/* the list */
#tillContent .ph-list-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#tillContent .ph-sec-ico {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #8b6cff, #5b3df5);
    color: #fff;
    font-size: 21px;
    box-shadow: 0 10px 20px rgba(91, 61, 245, .3);
}
#tillContent .ph-list-head h3 {
    margin: 0;
    font-size: 17px;
}
#tillContent .ph-count {
    padding: 2px 11px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--ph-violet) 14%, transparent);
    color: var(--ph-violet);
    font-style: normal;
    font-weight: 700;
}
#tillContent .ph-tabs {
    display: flex;
    gap: 4px;
    margin-inline-start: auto;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid var(--ph-line);
    background: var(--ph-card);
    box-shadow: 0 6px 16px rgba(30, 40, 90, .07);
}
#tillContent .ph-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
}
#tillContent .ph-tabs button.is-in i {
    color: var(--ph-green);
}
#tillContent .ph-tabs button.is-out i {
    color: var(--ph-red);
}
#tillContent .ph-tabs button.on {
    background: linear-gradient(145deg, #8b6cff, #5b3df5);
    color: #fff;
    font-weight: 700;
}
#tillContent .ph-tabs button.on i {
    color: #fff;
}
#tillContent .ph-tabs em {
    padding: 0 7px;
    border-radius: 8px;
    background: rgba(127, 127, 160, .14);
    font-style: normal;
    font-size: 12px;
}
#tillContent .ph-day {
    display: flex;
    align-items: center;
    gap: 10px;
}
#tillContent .ph-day::before,
#tillContent .ph-day::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ph-violet) 35%, transparent), transparent);
}
#tillContent .ph-day span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 13px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ph-violet) 10%, transparent);
    color: var(--ph-violet);
    font-size: 12.5px;
    font-weight: 700;
}
#tillContent .ph-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
#tillContent .ph-mv {
    --k: var(--ph-green);
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas: "ico what amt" "ico meta meta" "pills pills pills";
    align-items: center;
    gap: 6px 12px;
    padding: 14px 16px;
    border-radius: 22px;
    border: 1.5px solid color-mix(in srgb, var(--k) 28%, var(--ph-line));
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--k) 14%, transparent), transparent 55%),
        var(--ph-card);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--k) 12%, transparent);
    animation: ph-slide .5s cubic-bezier(.2, .9, .3, 1) both;
    transition: transform .3s, box-shadow .3s;
}
#tillContent .ph-mv:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px color-mix(in srgb, var(--k) 20%, transparent);
}
#tillContent .ph-mv.is-out {
    --k: var(--ph-red);
}
#tillContent .ph-mv-ico {
    --t: var(--ph-green);
    position: relative;
    grid-area: ico;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--t) 65%, #fff), var(--t));
    color: #fff;
    font-size: 25px;
    box-shadow: 0 10px 18px color-mix(in srgb, var(--t) 35%, transparent);
}
#tillContent .is-teal {
    --t: var(--ph-teal);
}
#tillContent .is-green {
    --t: var(--ph-green);
}
#tillContent .is-orange {
    --t: var(--ph-orange);
}
#tillContent .is-purple {
    --t: var(--ph-purple);
}
#tillContent .ph-dir {
    position: absolute;
    bottom: -5px;
    inset-inline-start: -5px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--k);
    font-size: 12px;
    font-style: normal;
}
#tillContent .ph-mv-what {
    grid-area: what;
    min-width: 0;
}
#tillContent .ph-kind {
    display: inline-block;
    margin-bottom: 2px;
    padding: 1px 9px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--t) 14%, transparent);
    color: var(--t);
    font-size: 11.5px;
    font-weight: 700;
}
#tillContent .ph-mv-what b {
    display: block;
    font-size: 14.5px;
    overflow-wrap: anywhere;
}
#tillContent .ph-mv-amt {
    grid-area: amt;
    direction: ltr;
    color: var(--k);
    font-size: 19px;
    white-space: nowrap;
}
#tillContent .ph-mv-amt small {
    font-size: 13px;
}
#tillContent .ph-mv-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text2);
    font-size: 12.5px;
}
#tillContent .ph-mv-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
#tillContent .ph-doc {
    padding: 2px 9px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--ph-sky) 12%, transparent);
    color: var(--ph-sky);
    font-weight: 700;
}
#tillContent .ph-mv-pills {
    grid-area: pills;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px dashed color-mix(in srgb, var(--k) 25%, transparent);
}
#tillContent .ph-pill {
    --p: var(--ph-green);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--p) 12%, transparent);
    color: var(--p);
    font-size: 12px;
    font-weight: 700;
}
#tillContent .ph-pill.is-wait {
    --p: var(--ph-amber);
    animation: ph-glow 2s ease-in-out infinite;
}
#tillContent .ph-pill.is-link {
    --p: var(--ph-sky);
    cursor: pointer;
}
#tillContent .ph-more {
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #8b6cff, #5b3df5 50%, #2a86e8);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(91, 61, 245, .3);
}
#tillContent .ph-more i {
    animation: ph-bob 1.6s ease-in-out infinite;
}

@keyframes ph-rise {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
}
@keyframes ph-slide {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}
@keyframes ph-shine {
    0%,
    60% {
        background-position: 150% 0;
    }
    100% {
        background-position: -100% 0;
    }
}
@keyframes ph-float {
    50% {
        transform: translateY(-4px);
    }
}
@keyframes ph-ping {
    100% {
        box-shadow: 0 0 0 10px rgba(110, 247, 195, 0);
    }
}
@keyframes ph-fill {
    from {
        transform: scaleX(0);
    }
}
@keyframes ph-pulse {
    50% {
        transform: scale(1.08);
    }
}
@keyframes ph-glow {
    50% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--ph-amber) 22%, transparent);
    }
}
@keyframes ph-bob {
    50% {
        transform: translateY(3px);
    }
}

@media (max-width: 760px) {
    #tillContent .ph-tool span {
        display: none;
    }
    #tillContent .ph-tool {
        width: 44px;
        padding: 0;
        justify-content: center;
    }
    #tillContent .ph-hero {
        padding: 16px;
    }
    #tillContent .ph-hero-head {
        flex-wrap: wrap;
    }
    #tillContent .ph-live {
        margin: 0;
    }
    #tillContent .ph-hero-main {
        grid-template-columns: minmax(0, 1fr);
    }
    #tillContent .ph-hero-value {
        font-size: 36px;
        text-align: center;
    }
    #tillContent .ph-tiles {
        gap: 8px;
    }
    #tillContent .ph-tile {
        flex-direction: column;
        gap: 6px;
        padding: 12px 6px;
        text-align: center;
    }
    #tillContent .ph-tile-ico {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 20px;
    }
    #tillContent .ph-tile small {
        font-size: 11.5px;
    }
    #tillContent .ph-tile b {
        font-size: 16px;
    }
    #tillContent .ph-tile em {
        display: none;
    }
    #tillContent .ph-tabs {
        width: 100%;
        margin: 0;
    }
    #tillContent .ph-tabs button {
        flex: 1;
        justify-content: center;
        padding: 0 8px;
    }
    #tillContent .ph-rows {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    #tillContent .ph-place * {
        animation: none !important;
    }
}

#tillContent .ph-place.till-section-panel {
    --sec-t: #665a96;
    --sec-n: #4f6fe8;
    --sec-l: #9a90c4;
}
html[data-theme="dark"] #tillContent .ph-place.till-section-panel {
    --sec-t: #b3aef0;
    --sec-n: #8fa6ff;
    --sec-l: #6f69b0;
}
#tillContent .ph-tile-ico,
#tillContent .ph-pill,
#tillContent .ph-tabs button {
    -webkit-tap-highlight-color: transparent;
}
#tillContent button.ph-pill {
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
#tillContent .ph-pill.is-act {
    --p: var(--ph-violet);
    background: linear-gradient(145deg, #8b6cff, #5b3df5);
    color: #fff;
}
/* the page takes focus when it opens so screen readers land on it; that needs no ring */
#tillContent .ph-place.till-section-panel,
#tillContent .ph-place.till-section-panel:focus,
#tillContent .ph-place.till-section-panel:focus-visible {
    outline: none !important;
}
#tillContent .ph-tiles.is-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
