/* ============================================================================
   BarPOS — charcoal, copper and deep teal bar room UI.
   ========================================================================== */

:root {
    --cp-bg: #f6f1e7;
    --cp-bg-2: #efe6d6;
    --cp-surface: #fffdf8;
    --cp-surface-2: #fbf7ee;
    --cp-ink: #201c17;
    --cp-ink-2: #40382d;
    --cp-muted: #786d5c;
    --cp-line: #e6dbc8;
    --cp-line-strong: #d6c6ad;
    --cp-brand: #9a4a14;
    --cp-brand-2: #763409;
    --cp-brand-soft: #f6e5d4;
    --cp-brand-ink: #ffffff;
    --cp-gold: #b38336;
    --cp-gold-soft: #f8eeda;
    --cp-ok: #356a55;
    --cp-ok-soft: #e4f0e8;
    --cp-warn: #9c6513;
    --cp-warn-soft: #fbefd7;
    --cp-danger: #a33932;
    --cp-danger-soft: #fae4e1;
    --cp-shadow: 0 18px 50px rgba(53, 38, 22, 0.1);
    --cp-shadow-sm: 0 8px 22px rgba(53, 38, 22, 0.07);
    --cp-radius: 22px;
    --cp-radius-sm: 14px;
    --cp-serif: 'Instrument Serif', Georgia, serif;
    --cp-sans: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-bs-theme="dark"] {
    --cp-bg: #111514;
    --cp-bg-2: #181e1c;
    --cp-surface: #1a211f;
    --cp-surface-2: #212a27;
    --cp-ink: #f3ecdf;
    --cp-ink-2: #e2d6c3;
    --cp-muted: #a79d8b;
    --cp-line: #2e3935;
    --cp-line-strong: #44524c;
    --cp-brand: #d0783a;
    --cp-brand-2: #a45822;
    --cp-brand-soft: #37271b;
    --cp-gold-soft: #362d1b;
    --cp-ok-soft: #193127;
    --cp-warn-soft: #362d1b;
    --cp-danger-soft: #391f1e;
    --cp-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    --cp-shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body.cp-body {
    display: block !important;
    min-height: 100vh;
    margin: 0;
    color: var(--cp-ink) !important;
    background:
        radial-gradient(1100px 500px at 100% -8%, rgba(47, 111, 102, 0.14), transparent 65%),
        radial-gradient(900px 480px at -10% 110%, rgba(154, 74, 20, 0.1), transparent 60%),
        var(--cp-bg) !important;
    font-family: var(--cp-sans);
    font-size: 14.5px;
    -webkit-font-smoothing: antialiased;
}

body.cp-body a {
    color: var(--cp-brand);
    text-decoration: none;
}

body.cp-body button,
body.cp-body input,
body.cp-body select,
body.cp-body textarea {
    font: inherit;
}

body.cp-body h1,
body.cp-body h2,
body.cp-body h3,
body.cp-body h4 {
    margin: 0;
    letter-spacing: -0.02em;
}

body.cp-body p {
    margin: 0;
}

body.cp-body img {
    max-width: 100%;
}

body.cp-body svg {
    flex: 0 0 auto;
}

#cpApp {
    min-height: 100vh;
}

/* Brand hooks for the platform window menu */
#app-window-menu #king {
    background: var(--cp-brand) !important;
    border-color: var(--cp-brand) !important;
    color: #fff !important;
}

#app-window-menu .dropdown-menu {
    border-color: var(--cp-line) !important;
}

/* ======================= BOOT ======================= */
.cp-boot {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding: 30px;
}

.cp-boot__mark {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(145deg, var(--cp-brand), #2b5f57);
    box-shadow: 0 18px 42px rgba(47, 111, 102, 0.3);
}

.cp-boot h1 {
    font-family: var(--cp-serif);
    font-size: 2.2rem;
    font-weight: 400;
}

.cp-boot p {
    color: var(--cp-muted);
}

.cp-boot__spin {
    width: 26px;
    height: 26px;
    margin-top: 8px;
    border-radius: 50%;
    border: 2px solid var(--cp-line);
    border-top-color: var(--cp-brand);
    animation: cp-spin .8s linear infinite;
}

.cp-noscript {
    max-width: 460px;
    margin: 20vh auto;
    padding: 32px;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    background: var(--cp-surface);
    text-align: center;
}

.cp-noscript h2 {
    font-family: var(--cp-serif);
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ======================= AUTH ======================= */
.cp-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
}

.cp-auth__art {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: clamp(32px, 6vw, 86px);
    color: #fff;
    background:
        radial-gradient(700px 460px at 80% 10%, rgba(233, 155, 183, .38), transparent 60%),
        radial-gradient(600px 500px at 10% 100%, rgba(193, 138, 71, .26), transparent 65%),
        linear-gradient(145deg, #49132d 0%, #2b0c1c 55%, #1d0814 100%);
    overflow: hidden;
}

.cp-auth__art::before,
.cp-auth__art::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.cp-auth__art::before {
    width: 360px;
    height: 360px;
    right: -80px;
    top: 60px;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 90px rgba(255, 214, 229, .12);
}

.cp-auth__art::after {
    width: 150px;
    height: 150px;
    left: 12%;
    top: 16%;
    background: radial-gradient(circle, rgba(255, 255, 255, .17), transparent 66%);
}

.cp-auth__art-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
}

.cp-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.cp-auth__art h1 {
    font-family: var(--cp-serif);
    font-weight: 400;
    font-size: clamp(3rem, 6.2vw, 5.7rem);
    line-height: .98;
    margin: 24px 0 20px;
    letter-spacing: -.035em;
}

.cp-auth__art p {
    max-width: 460px;
    color: rgba(255, 240, 245, .78);
    font-size: 1.02rem;
    line-height: 1.7;
}

.cp-auth__swatches {
    display: flex;
    gap: 10px;
    margin: 28px 0 26px;
}

.cp-auth__proof {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: rgba(255, 240, 245, .78);
    font-size: .78rem;
}

.cp-auth__proof span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cp-auth__panel {
    display: grid;
    align-items: center;
    padding: clamp(24px, 4vw, 58px);
    background: var(--cp-bg);
}

.cp-auth__card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid var(--cp-line);
    border-radius: 26px;
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow);
}

.cp-auth__card--wide {
    max-width: 660px;
}

.cp-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--cp-brand);
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: 22px;
}

.cp-auth__brand span {
    font-family: var(--cp-serif);
    font-weight: 400;
    font-size: 1.4rem;
    letter-spacing: -.02em;
}

.cp-auth__card h2 {
    font-family: var(--cp-serif);
    font-weight: 400;
    font-size: 2rem;
    margin-bottom: 6px;
}

.cp-auth__copy {
    color: var(--cp-muted);
    margin-bottom: 24px;
}

.cp-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 17px 0;
    color: var(--cp-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.cp-auth__divider::before,
.cp-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cp-line);
}

.cp-auth__switch {
    margin-top: 18px;
    text-align: center;
    color: var(--cp-muted);
    font-size: .84rem;
}

.cp-auth__demo {
    margin-top: 20px;
    padding: 11px 13px;
    border-radius: 12px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
    font-size: .73rem;
    text-align: center;
}

.cp-auth__list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    padding: 0;
    list-style: none;
    color: rgba(255, 240, 245, .82);
    font-size: .88rem;
}

.cp-auth__list li {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* ======================= SHELL ======================= */
.cp-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.cp-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    color: #f3f7ef;
    background:
        radial-gradient(420px 260px at 20% 0%, color-mix(in srgb, var(--cp-brand) 48%, transparent), transparent 68%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--cp-brand) 62%, #0b1710) 0%,
            color-mix(in srgb, var(--cp-brand-2) 52%, #09120d) 56%,
            #0a130e 100%);
    z-index: 40;
}

.cp-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px 22px;
    color: #fff;
}

.cp-brand:hover {
    color: #fff;
}

.cp-brand__mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--cp-brand), var(--cp-brand-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .26);
}

.cp-brand b {
    display: block;
    font-family: var(--cp-serif);
    font-size: 1.37rem;
    font-weight: 400;
    letter-spacing: -.01em;
}

.cp-brand small {
    display: block;
    color: rgba(255, 255, 255, .56);
    font-size: .65rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.cp-nav {
    display: grid;
    gap: 3px;
    overflow-y: auto;
    flex: 1;
    padding-right: 3px;
}

.cp-nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, .72);
    font-size: .84rem;
    font-weight: 600;
    transition: .15s ease;
}

.cp-nav__item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.cp-nav__item.is-active {
    color: #fff;
    background: linear-gradient(90deg,
            color-mix(in srgb, var(--cp-brand) 46%, transparent),
            color-mix(in srgb, var(--cp-brand) 15%, transparent));
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--cp-brand) 62%, #ffffff);
}

.cp-nav__item em {
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-style: normal;
    font-size: .64rem;
}

/* The shared body link colour is more specific than the sidebar rules, so
   reassert the on-dark palette explicitly. */
body.cp-body .cp-sidebar .cp-brand,
body.cp-body .cp-sidebar .cp-brand:hover {
    color: #fff;
}

body.cp-body .cp-sidebar .cp-nav__item {
    color: rgba(255, 255, 255, .74);
}

body.cp-body .cp-sidebar .cp-nav__item:hover,
body.cp-body .cp-sidebar .cp-nav__item.is-active {
    color: #fff;
}

.cp-sidebar__foot {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.cp-branch-current,
.cp-branch-select {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .8);
    font-size: .73rem;
}

.cp-branch-select select {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font-size: .73rem;
}

.cp-branch-select option {
    color: var(--cp-ink);
}

.cp-userbox {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 2px;
}

.cp-userbox>span:not(.cp-avatar) {
    min-width: 0;
    flex: 1;
}

.cp-userbox b {
    display: block;
    font-size: .76rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-userbox small {
    display: block;
    color: rgba(255, 255, 255, .5);
    font-size: .65rem;
    text-transform: capitalize;
}

.cp-userbox .cp-btn {
    color: rgba(255, 255, 255, .72);
}

.cp-userbox .cp-btn:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.cp-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--cp-brand), var(--cp-brand-2));
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.cp-avatar--lg {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 1rem;
}

.cp-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cp-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 12px clamp(16px, 3vw, 32px);
    border-bottom: 1px solid var(--cp-line);
    background: color-mix(in srgb, var(--cp-bg) 84%, transparent);
    backdrop-filter: blur(16px);
}

.cp-topbar__menu {
    display: none !important;
}

.cp-topbar__title {
    min-width: 0;
}

.cp-topbar__title span {
    display: block;
    font-family: var(--cp-serif);
    font-size: 1.34rem;
    font-weight: 400;
    line-height: 1.1;
}

.cp-topbar__title small {
    display: block;
    margin-top: 3px;
    color: var(--cp-muted);
    font-size: .69rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.cp-topbar__date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    color: var(--cp-muted);
    font-size: .73rem;
}

.cp-content {
    padding: clamp(18px, 3vw, 34px);
    flex: 1;
}

/* ======================= SCREEN / CARDS ======================= */
.cp-screen-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.cp-screen-head h1 {
    font-family: var(--cp-serif);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.cp-screen-head p {
    margin-top: 7px;
    color: var(--cp-muted);
    font-size: .86rem;
    max-width: 640px;
}

.cp-screen-head__actions {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
}

.cp-card {
    padding: clamp(18px, 2.4vw, 26px);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow-sm);
}

.cp-card--flush {
    padding: 0;
    overflow: hidden;
}

.cp-card--mini {
    padding: 20px;
}

.cp-card__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
}

.cp-card__head--padded {
    padding: 20px 20px 0;
    margin-bottom: 14px;
}

.cp-card__head h2 {
    font-family: var(--cp-serif);
    font-size: 1.25rem;
    font-weight: 400;
}

.cp-card__head p {
    color: var(--cp-muted);
    font-size: .73rem;
    margin-top: 3px;
}

.cp-card__icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand);
    margin-bottom: 12px;
}

.cp-card--mini h3 {
    font-size: .88rem;
    margin-bottom: 12px;
}

.cp-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.cp-grid--2-1 {
    grid-template-columns: minmax(0, 1.75fr) minmax(290px, .85fr);
}

.cp-grid--1-1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cp-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cp-muted {
    color: var(--cp-muted);
}

.cp-note {
    display: flex;
    align-items: start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
    font-size: .74rem;
    line-height: 1.5;
}

.cp-summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1px;
    margin-bottom: 18px;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-sm);
    overflow: hidden;
    background: var(--cp-line);
}

.cp-summary-strip>div {
    padding: 13px 15px;
    background: var(--cp-surface);
}

.cp-summary-strip span {
    display: block;
    color: var(--cp-muted);
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cp-summary-strip b {
    display: block;
    margin-top: 4px;
    font-size: 1.07rem;
}

.cp-summary-strip .is-warn {
    color: var(--cp-warn);
}

.cp-summary-strip .is-danger {
    color: var(--cp-danger);
}

/* ======================= STATS / ALERTS ======================= */
.cp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cp-stat {
    display: flex;
    gap: 13px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-sm);
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow-sm);
}

.cp-stat__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand);
}

.cp-stat--gold .cp-stat__icon {
    background: var(--cp-gold-soft);
    color: var(--cp-gold);
}

.cp-stat--rose .cp-stat__icon {
    background: #fbe6ee;
    color: #b23a6b;
}

.cp-stat__label {
    display: block;
    color: var(--cp-muted);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cp-stat strong {
    display: block;
    margin: 3px 0 2px;
    font-family: var(--cp-serif);
    font-size: 1.55rem;
    font-weight: 400;
    line-height: 1.05;
}

.cp-stat small {
    color: var(--cp-muted);
    font-size: .68rem;
}

.cp-alert-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cp-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--cp-surface);
    color: var(--cp-ink);
    font-size: .75rem;
    cursor: pointer;
}

.cp-alert b {
    margin-right: 2px;
}

.cp-alert--warn {
    background: var(--cp-warn-soft);
    border-color: color-mix(in srgb, var(--cp-warn) 22%, transparent);
    color: var(--cp-warn);
}

.cp-alert--gold {
    background: var(--cp-gold-soft);
    border-color: color-mix(in srgb, var(--cp-gold) 24%, transparent);
    color: var(--cp-gold);
}

.cp-alert--danger {
    background: var(--cp-danger-soft);
    border-color: color-mix(in srgb, var(--cp-danger) 22%, transparent);
    color: var(--cp-danger);
}

/* ======================= BUTTONS ======================= */
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--cp-ink);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.cp-btn:hover {
    background: color-mix(in srgb, var(--cp-brand-soft) 45%, transparent);
}

.cp-btn--primary {
    background: var(--cp-brand);
    border-color: var(--cp-brand);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--cp-brand) 25%, transparent);
}

.cp-btn--ghost {
    border-color: var(--cp-line);
    background: var(--cp-surface);
}

.cp-btn--soft {
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
}

.cp-btn--danger {
    background: var(--cp-danger);
    color: #fff;
}

.cp-btn--primary:hover {
    background: var(--cp-brand-2);
    border-color: var(--cp-brand-2);
    color: #fff;
}

.cp-btn--ghost:hover {
    border-color: var(--cp-line-strong);
    background: var(--cp-surface-2);
}

.cp-btn--soft:hover {
    background: color-mix(in srgb, var(--cp-brand-soft) 75%, var(--cp-brand) 8%);
}

.cp-btn--danger:hover {
    background: color-mix(in srgb, var(--cp-danger) 88%, #000);
}

.cp-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.cp-btn--block {
    width: 100%;
}

.cp-btn--lg {
    min-height: 46px;
    font-size: .86rem;
}

.cp-btn--icon {
    width: 38px;
    padding: 0;
}

.cp-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cp-brand);
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
}

.cp-link:hover {
    text-decoration: underline;
}

.cp-link--danger {
    color: var(--cp-danger);
}

/* ======================= FORMS ======================= */
.cp-form {
    display: grid;
    gap: 14px;
}

.cp-form--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cp-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.cp-field--span2 {
    grid-column: span 2;
}

.cp-field>span {
    color: var(--cp-muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.cp-field input,
.cp-field select,
.cp-field textarea {
    width: 100%;
    min-height: 39px;
    padding: 8px 11px;
    border: 1px solid var(--cp-line);
    border-radius: 10px;
    background: var(--cp-surface-2);
    color: var(--cp-ink);
    outline: 0;
    font-size: .8rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cp-field textarea {
    min-height: 70px;
    resize: vertical;
}

.cp-field input:focus,
.cp-field select:focus,
.cp-field textarea:focus {
    border-color: var(--cp-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-brand) 13%, transparent);
}

.cp-field--inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-field--inline>span {
    white-space: nowrap;
}

.cp-field--inline input {
    width: auto;
    min-width: 132px;
}

.cp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cp-ink-2);
    font-size: .76rem;
    cursor: pointer;
}

.cp-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--cp-brand);
}

.cp-form__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 4px;
}

.cp-colour {
    display: flex;
    gap: 8px;
}

.cp-colour input[type="color"] {
    width: 46px;
    min-width: 46px;
    padding: 3px;
}

.cp-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    min-height: 40px;
    border: 1px solid var(--cp-line);
    border-radius: 11px;
    background: var(--cp-surface);
    color: var(--cp-muted);
}

.cp-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cp-ink);
    font-size: .79rem;
}

.cp-search kbd {
    padding: 2px 5px;
    border: 1px solid var(--cp-line);
    border-radius: 5px;
    background: var(--cp-surface-2);
    font-size: .6rem;
    color: var(--cp-muted);
}

.cp-search--sm {
    min-height: 36px;
    width: 190px;
}

.cp-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cp-toolbar .cp-search {
    flex: 1;
    min-width: 220px;
}

.cp-toolbar--inset {
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid var(--cp-line);
}

.cp-toolbar--inset .cp-search {
    min-width: 180px;
}

/* ======================= CHIPS / TABS ======================= */
.cp-chips {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.cp-chip {
    padding: 6px 11px;
    border: 1px solid var(--cp-line);
    border-radius: 999px;
    background: var(--cp-surface);
    color: var(--cp-muted);
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cp-chip:hover {
    border-color: var(--cp-line-strong);
    color: var(--cp-ink);
}

.cp-chip.is-active {
    border-color: var(--cp-brand);
    background: var(--cp-brand);
    color: #fff;
}

.cp-cat-row {
    margin: 8px 0 14px;
}

.cp-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    background: var(--cp-surface);
    width: fit-content;
    max-width: 100%;
}

.cp-tabs--inline {
    margin: 0;
}

.cp-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cp-muted);
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
}

.cp-tab:hover {
    color: var(--cp-ink);
    background: var(--cp-surface-2);
}

.cp-tab.is-active {
    background: var(--cp-brand);
    color: #fff;
}

/* ======================= BADGES / SWATCHES ======================= */
.cp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--cp-surface-2);
    color: var(--cp-muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: capitalize;
    white-space: nowrap;
}

.cp-badge--ok {
    background: var(--cp-ok-soft);
    color: var(--cp-ok);
}

.cp-badge--warn {
    background: var(--cp-warn-soft);
    color: var(--cp-warn);
}

.cp-badge--danger {
    background: var(--cp-danger-soft);
    color: var(--cp-danger);
}

.cp-badge--info {
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
}

.cp-badge--muted {
    background: var(--cp-surface-2);
    color: var(--cp-muted);
}

.cp-badge--cool {
    background: #e9f0fb;
    color: #41648d;
}

.cp-badge--warm {
    background: #fbeee0;
    color: #a36521;
}

.cp-badge--neutral {
    background: #f1ece8;
    color: #7b665a;
}

.cp-badge--olive {
    background: #edf2e1;
    color: #607343;
}

.cp-swatch {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-block;
    border-radius: 50%;
    background: var(--swatch, #d8b4c4);
    border: 2px solid var(--cp-surface);
    box-shadow: 0 0 0 1px var(--cp-line);
}

.cp-swatch--lg {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
}

.cp-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 4px;
    background: var(--cp-muted);
}

.cp-dot--cool {
    background: #7c9bc5;
}

.cp-dot--warm {
    background: #d29252;
}

.cp-dot--neutral {
    background: #a58d80;
}

.cp-dot--olive {
    background: #879766;
}

.cp-stock-pill {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 800;
}

.cp-stock-pill--ok {
    background: var(--cp-ok-soft);
    color: var(--cp-ok);
}

.cp-stock-pill--low {
    background: var(--cp-warn-soft);
    color: var(--cp-warn);
}

.cp-stock-pill--out {
    background: var(--cp-danger-soft);
    color: var(--cp-danger);
}

.cp-stock-pill--service {
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
}

.cp-table .is-positive {
    color: var(--cp-ok);
    font-weight: 800;
}

.cp-table .is-negative {
    color: var(--cp-danger);
    font-weight: 800;
}

/* ======================= TABLES ======================= */
.cp-table-wrap {
    overflow-x: auto;
}

.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .76rem;
}

.cp-table th {
    padding: 10px 13px;
    border-bottom: 1px solid var(--cp-line);
    color: var(--cp-muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    background: var(--cp-surface-2);
}

.cp-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--cp-line);
    vertical-align: middle;
}

.cp-table tr:last-child td {
    border-bottom: 0;
}

.cp-table tbody tr:hover {
    background: var(--cp-surface-2);
}

.cp-table td small {
    display: block;
    color: var(--cp-muted);
    font-size: .67rem;
    margin-top: 2px;
}

.cp-table__product {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 160px;
}

.cp-table__product b {
    display: block;
}

.cp-table__actions {
    text-align: right;
    white-space: nowrap;
}

.cp-table__actions .cp-btn {
    display: inline-flex;
}

.cp-thumb {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: var(--thumb, linear-gradient(145deg, #f3dce5, #eac6d4));
    color: var(--cp-brand-2);
    font-weight: 800;
    font-size: .82rem;
    overflow: hidden;
}

.cp-thumb--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-shade-cell {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
}

/* ======================= TILL ======================= */
.cp-till {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 382px;
    gap: 18px;
    align-items: start;
}

.cp-till__catalog {
    min-width: 0;
}

.cp-till__bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cp-till__bar .cp-search {
    flex: 1;
}

.cp-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 11px;
    margin-top: 12px;
}

.cp-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--cp-line);
    border-radius: 16px;
    background: var(--cp-surface);
    color: var(--cp-ink);
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.cp-product-card:hover {
    transform: translateY(-2px);
    border-color: var(--cp-line-strong);
    box-shadow: var(--cp-shadow-sm);
}

.cp-product-card.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

.cp-product-card__media {
    position: relative;
    display: block;
    height: 104px;
    background: linear-gradient(145deg, var(--cp-brand-soft), #f4dfe8);
}

.cp-product-card__media .cp-thumb {
    position: absolute;
    inset: 12px;
    width: auto;
    height: auto;
    border-radius: 12px;
    font-size: 2rem;
    background: var(--thumb, transparent);
    color: var(--cp-brand-2);
    opacity: .9;
}

.cp-product-card__media .cp-thumb--image {
    inset: 0;
    border-radius: 0;
}

.cp-product-card__swatch {
    position: absolute;
    right: 9px;
    bottom: 9px;
    width: 24px;
    height: 24px;
}

.cp-product-card__body {
    padding: 11px 12px 4px;
    flex: 1;
}

.cp-product-card__body b {
    display: block;
    font-size: .78rem;
    line-height: 1.25;
}

.cp-product-card__body small {
    display: block;
    margin-top: 3px;
    color: var(--cp-muted);
    font-size: .66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-product-card__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 7px;
    color: var(--cp-muted);
    font-size: .62rem;
    font-weight: 700;
    text-transform: capitalize;
}

.cp-product-card__price {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 12px 11px;
    font-size: .82rem;
    font-weight: 800;
}

.cp-product-card__price small {
    color: var(--cp-ok);
    font-size: .62rem;
    font-weight: 700;
}

.cp-product-card__price small.is-low {
    color: var(--cp-warn);
}

.cp-product-card__price small.is-out {
    color: var(--cp-danger);
}

.cp-till__cart {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 104px);
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius);
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow);
    overflow: hidden;
}

.cp-cart__close {
    display: none !important;
}

.cp-mobile-cart {
    display: none;
}

.cp-cart__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 18px 11px;
}

.cp-cart__head h2 {
    font-family: var(--cp-serif);
    font-size: 1.3rem;
    font-weight: 400;
}

.cp-cart__head p {
    color: var(--cp-muted);
    font-size: .69rem;
    margin-top: 2px;
}

.cp-customer-pick {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 14px 10px;
    padding: 9px 10px;
    border: 1px dashed var(--cp-line-strong);
    border-radius: 11px;
    background: var(--cp-surface-2);
    color: var(--cp-ink);
    text-align: left;
    cursor: pointer;
}

.cp-customer-pick.is-picked {
    border-style: solid;
    border-color: var(--cp-brand);
    background: var(--cp-brand-soft);
}

.cp-customer-pick>span:not(.cp-avatar) {
    flex: 1;
    min-width: 0;
}

.cp-customer-pick b {
    display: block;
    font-size: .74rem;
}

.cp-customer-pick small {
    display: block;
    color: var(--cp-muted);
    font-size: .64rem;
    margin-top: 2px;
}

.cp-cart-lines {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
    min-height: 100px;
}

.cp-cart-empty {
    display: grid;
    place-items: center;
    gap: 9px;
    padding: 44px 16px;
    color: var(--cp-muted);
    text-align: center;
    font-size: .76rem;
}

.cp-cart-line {
    display: flex;
    align-items: start;
    gap: 9px;
    padding: 10px 3px;
    border-bottom: 1px solid var(--cp-line);
}

.cp-cart-line__media .cp-thumb {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.cp-cart-line__body {
    flex: 1;
    min-width: 0;
}

.cp-cart-line__body b {
    display: block;
    font-size: .72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-cart-line__body small {
    display: block;
    color: var(--cp-muted);
    font-size: .62rem;
    margin-top: 2px;
}

.cp-cart-line__body .cp-qty {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 2px;
    border: 1px solid var(--cp-line);
    border-radius: 8px;
}

.cp-qty button {
    width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: var(--cp-surface-2);
    color: var(--cp-ink);
    cursor: pointer;
}

.cp-qty b {
    min-width: 18px;
    text-align: center;
    font-size: .68rem;
}

.cp-cart-line__right {
    text-align: right;
}

.cp-cart-line__right b {
    display: block;
    font-size: .74rem;
}

.cp-cart-line__right .cp-link {
    font-size: .6rem;
    margin-top: 5px;
}

.cp-cart__foot {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--cp-line);
    background: var(--cp-surface-2);
}

.cp-redeem {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 9px;
    padding: 8px 10px;
    border: 1px solid var(--cp-line);
    border-radius: 10px;
    background: var(--cp-surface);
    color: var(--cp-brand);
    text-align: left;
    cursor: pointer;
}

.cp-redeem.is-on {
    border-color: var(--cp-brand);
    background: var(--cp-brand-soft);
}

.cp-redeem b {
    display: block;
    font-size: .7rem;
}

.cp-redeem small {
    display: block;
    color: var(--cp-muted);
    font-size: .61rem;
}

.cp-totals {
    display: grid;
    gap: 5px;
    margin: 9px 0 11px;
    font-size: .72rem;
}

.cp-totals>div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--cp-muted);
}

.cp-totals>div b {
    color: var(--cp-ink);
}

.cp-totals .is-total {
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px dashed var(--cp-line-strong);
    color: var(--cp-ink);
    font-size: .86rem;
    font-weight: 800;
}

.cp-totals .is-total b {
    font-family: var(--cp-serif);
    font-size: 1.3rem;
    font-weight: 400;
}

.cp-pay-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.cp-pay {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 3px;
    border: 1px solid var(--cp-line);
    border-radius: 9px;
    background: var(--cp-surface);
    color: var(--cp-muted);
    font-size: .58rem;
    font-weight: 700;
    cursor: pointer;
}

.cp-pay.is-active {
    border-color: var(--cp-brand);
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
}

.cp-checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 11px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand-2);
}

.cp-checkout-total b {
    font-family: var(--cp-serif);
    font-size: 1.5rem;
    font-weight: 400;
}

/* ======================= SHADE FINDER ======================= */
.cp-card--finder {
    margin-bottom: 18px;
}

.cp-finder__form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.cp-finder__profile {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    background: var(--cp-surface-2);
}

.cp-finder__profile-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand);
}

.cp-finder__profile>div {
    flex: 1;
}

.cp-finder__profile b {
    display: block;
    font-size: .78rem;
}

.cp-finder__profile p {
    color: var(--cp-muted);
    font-size: .69rem;
    margin-top: 2px;
}

.cp-shade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.cp-shade-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-sm);
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow-sm);
    overflow: hidden;
}

.cp-shade-card__swatch {
    position: relative;
    height: 112px;
    display: flex;
    align-items: end;
    padding: 10px 12px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--swatch) 84%, #fff), var(--swatch));
}

.cp-shade-card__swatch span {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: #3b1a28;
    font-size: .6rem;
    font-weight: 800;
}

.cp-shade-card__body {
    padding: 12px;
}

.cp-shade-card__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cp-shade-card__top h3 {
    font-size: .84rem;
}

.cp-match {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--cp-ok-soft);
    color: var(--cp-ok);
    font-size: .61rem;
    font-weight: 800;
    height: fit-content;
}

.cp-shade-card__body>p {
    color: var(--cp-muted);
    font-size: .68rem;
    margin-top: 3px;
}

.cp-shade-card__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: .62rem;
    color: var(--cp-muted);
}

.cp-shade-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid var(--cp-line);
}

.cp-shade-card__foot b {
    font-size: .84rem;
}

.cp-shade-card__foot span {
    color: var(--cp-muted);
    font-size: .64rem;
}

.cp-mini-shades {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 9px;
}

.cp-mini-shade {
    padding: 9px;
    border: 1px solid var(--cp-line);
    border-radius: 10px;
    text-align: center;
}

.cp-mini-shade b {
    display: block;
    font-size: .67rem;
    margin-top: 6px;
}

.cp-mini-shade small {
    display: block;
    color: var(--cp-muted);
    font-size: .6rem;
}

/* ======================= CUSTOMERS ======================= */
.cp-customer-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.5fr);
    gap: 18px;
    align-items: start;
}

.cp-customer-list {
    max-height: calc(100vh - 265px);
    overflow-y: auto;
    padding: 7px;
}

.cp-customer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--cp-ink);
    text-align: left;
    cursor: pointer;
}

.cp-customer-row:hover {
    background: var(--cp-surface-2);
}

.cp-customer-row.is-active {
    background: var(--cp-brand-soft);
}

.cp-customer-row__body {
    flex: 1;
    min-width: 0;
}

.cp-customer-row__body b {
    display: block;
    font-size: .75rem;
}

.cp-customer-row__body small {
    display: block;
    color: var(--cp-muted);
    font-size: .63rem;
    margin: 1px 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-customer-row__body>span {
    display: flex;
    gap: 4px;
}

.cp-customer-row__right {
    text-align: right;
}

.cp-customer-row__right b {
    display: block;
    font-size: .7rem;
    color: var(--cp-brand);
}

.cp-customer-row__right small {
    display: block;
    color: var(--cp-muted);
    font-size: .6rem;
}

.cp-customer-detail {
    min-height: 340px;
}

.cp-customer-detail__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cp-line);
}

.cp-customer-detail__head>div:nth-child(2) {
    flex: 1;
    min-width: 140px;
}

.cp-customer-detail__head h2 {
    font-family: var(--cp-serif);
    font-size: 1.55rem;
    font-weight: 400;
}

.cp-customer-detail__head p {
    color: var(--cp-muted);
    font-size: .7rem;
    margin-top: 2px;
}

.cp-customer-detail__actions {
    display: flex;
    gap: 7px;
}

.cp-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 15px 0;
    border: 1px solid var(--cp-line);
    border-radius: 11px;
    overflow: hidden;
    background: var(--cp-line);
}

.cp-profile-grid>div {
    padding: 10px 12px;
    background: var(--cp-surface-2);
}

.cp-profile-grid span {
    display: block;
    color: var(--cp-muted);
    font-size: .61rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.cp-profile-grid b {
    display: block;
    margin-top: 3px;
    font-size: .76rem;
}

.cp-allergy {
    display: flex;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    background: var(--cp-danger-soft);
    color: var(--cp-danger);
    font-size: .72rem;
}

.cp-detail-section {
    margin-top: 17px;
}

.cp-detail-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.cp-detail-section h3 {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--cp-muted);
}

.cp-timeline {
    display: grid;
    gap: 8px;
}

.cp-timeline__row {
    display: flex;
    gap: 9px;
    align-items: start;
}

.cp-timeline__dot {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cp-surface-2);
    color: var(--cp-muted);
}

.cp-timeline__dot.is-plus {
    background: var(--cp-ok-soft);
    color: var(--cp-ok);
}

.cp-timeline__dot.is-minus {
    background: var(--cp-warn-soft);
    color: var(--cp-warn);
}

.cp-timeline__row b {
    display: block;
    font-size: .71rem;
}

.cp-timeline__row small {
    display: block;
    color: var(--cp-muted);
    font-size: .62rem;
}

/* ======================= LISTS / CHARTS ======================= */
.cp-list {
    display: grid;
    gap: 2px;
}

.cp-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 6px;
    border-bottom: 1px solid var(--cp-line);
}

.cp-list__item:last-child {
    border-bottom: 0;
}

.cp-list__item>div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cp-list__item b {
    display: block;
    font-size: .73rem;
}

.cp-list__item small {
    display: block;
    color: var(--cp-muted);
    font-size: .63rem;
}

.cp-list__item--button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--cp-line);
    background: transparent;
    color: var(--cp-ink);
    text-align: left;
    cursor: pointer;
}

.cp-list__item--button:hover {
    background: var(--cp-surface-2);
}

.cp-list__right {
    text-align: right;
    display: grid;
    gap: 3px;
    justify-items: end;
}

.cp-bars {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 190px;
    padding-top: 18px;
}

.cp-bar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: end;
    position: relative;
    min-width: 5px;
}

.cp-bar__fill {
    width: 100%;
    height: var(--h);
    min-height: 2px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--cp-brand), color-mix(in srgb, var(--cp-brand) 42%, #fff));
    transition: height .3s ease;
}

.cp-bar:hover .cp-bar__fill {
    background: linear-gradient(180deg, var(--cp-gold), var(--cp-brand));
}

.cp-bar__tip {
    position: absolute;
    bottom: calc(var(--h) + 7px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--cp-ink);
    color: var(--cp-surface);
    font-size: .56rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 2;
}

.cp-bar:hover .cp-bar__tip {
    opacity: 1;
}

.cp-bar-labels {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    color: var(--cp-muted);
    font-size: .55rem;
}

.cp-bar-labels span {
    flex: 1;
    text-align: center;
    min-width: 5px;
    white-space: nowrap;
}

.cp-bars-horizontal {
    display: grid;
    gap: 11px;
}

.cp-hbar__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    font-size: .69rem;
}

.cp-hbar__meta span {
    color: var(--cp-ink-2);
}

.cp-hbar__meta b {
    font-weight: 800;
}

.cp-hbar__track {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: var(--cp-surface-2);
    overflow: hidden;
}

.cp-hbar__track i {
    display: block;
    width: var(--w);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cp-brand), color-mix(in srgb, var(--cp-gold) 45%, var(--cp-brand)));
}

.cp-meter {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--cp-line);
    font-size: .69rem;
}

.cp-meter:last-child {
    border-bottom: 0;
}

.cp-meter span {
    color: var(--cp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-meter b {
    flex: 0 0 auto;
}

.cp-leaderboard {
    display: grid;
    gap: 4px;
}

.cp-leader {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cp-line);
}

.cp-leader:last-child {
    border-bottom: 0;
}

.cp-leader__rank {
    width: 20px;
    color: var(--cp-muted);
    font-family: var(--cp-serif);
    font-size: 1rem;
}

.cp-leader>div {
    flex: 1;
    min-width: 0;
}

.cp-leader b {
    display: block;
    font-size: .72rem;
}

.cp-leader small {
    display: block;
    color: var(--cp-muted);
    font-size: .62rem;
}

.cp-leader__points {
    text-align: right;
}

.cp-leader__points b {
    color: var(--cp-brand);
}

/* ======================= STOCK / SUPPLIERS ======================= */
.cp-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    padding: 18px;
}

.cp-supplier__head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.cp-supplier__head>div {
    flex: 1;
    min-width: 0;
}

.cp-supplier__head h3 {
    font-size: .84rem;
}

.cp-supplier__head p {
    color: var(--cp-muted);
    font-size: .65rem;
}

.cp-supplier__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 13px 0;
    color: var(--cp-muted);
    font-size: .65rem;
}

.cp-supplier__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cp-supplier__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--cp-line);
    color: var(--cp-muted);
    font-size: .64rem;
}

.cp-purchase-line {
    display: grid;
    grid-template-columns: 2fr .7fr .8fr 1fr 1fr auto;
    gap: 7px;
    align-items: end;
    padding: 9px 0;
    border-bottom: 1px solid var(--cp-line);
}

.cp-purchase-line .cp-field>span {
    font-size: .58rem;
}

.cp-purchase-line .cp-btn {
    margin-bottom: 0;
}

.cp-current-stock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--cp-surface-2);
    font-size: .76rem;
}

.cp-current-stock b {
    font-family: var(--cp-serif);
    font-size: 1.15rem;
    font-weight: 400;
}

/* ======================= SETTINGS ======================= */
.cp-store-card {
    display: flex;
    flex-direction: column;
}

.cp-store-card__head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.cp-store-card h3 {
    font-family: var(--cp-serif);
    font-size: 1.2rem;
    font-weight: 400;
}

.cp-store-card p {
    color: var(--cp-muted);
    font-size: .7rem;
    margin: 4px 0 12px;
    min-height: 30px;
}

.cp-store-card__meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--cp-muted);
    font-size: .66rem;
}

.cp-add-card {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 190px;
    padding: 18px;
    border: 1px dashed var(--cp-line-strong);
    border-radius: var(--cp-radius);
    background: transparent;
    color: var(--cp-muted);
    font-size: .76rem;
    font-weight: 700;
    cursor: pointer;
}

.cp-add-card:hover {
    border-color: var(--cp-brand);
    color: var(--cp-brand);
    background: var(--cp-brand-soft);
}

.cp-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.cp-plan {
    padding: 18px;
    border: 1px solid var(--cp-line);
    border-radius: 16px;
    background: var(--cp-surface-2);
}

.cp-plan.is-active {
    border-color: var(--cp-brand);
    box-shadow: inset 0 0 0 1px var(--cp-brand);
    background: var(--cp-surface);
}

.cp-plan__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}

.cp-plan__head h3 {
    font-family: var(--cp-serif);
    font-size: 1.2rem;
    font-weight: 400;
}

.cp-plan__price {
    margin: 10px 0 12px;
    font-family: var(--cp-serif);
    font-size: 2rem;
}

.cp-plan__price span {
    color: var(--cp-muted);
    font-family: var(--cp-sans);
    font-size: .68rem;
}

.cp-plan ul {
    display: grid;
    gap: 6px;
    margin: 0 0 15px;
    padding: 0;
    list-style: none;
    color: var(--cp-muted);
    font-size: .68rem;
}

.cp-plan li {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ======================= MODALS / TOASTS ======================= */
.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(22, 8, 15, .55);
    backdrop-filter: blur(5px);
}

.cp-modal__panel {
    width: 100%;
    max-width: 620px;
    max-height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cp-line);
    border-radius: 20px;
    background: var(--cp-surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.cp-modal__panel--sm {
    max-width: 440px;
}

.cp-modal__panel--md {
    max-width: 620px;
}

.cp-modal__panel--lg {
    max-width: 840px;
}

.cp-modal__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--cp-line);
}

.cp-modal__head h2 {
    font-family: var(--cp-serif);
    font-size: 1.45rem;
    font-weight: 400;
}

.cp-modal__head p {
    color: var(--cp-muted);
    font-size: .72rem;
    margin-top: 3px;
}

.cp-modal__close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: var(--cp-surface-2);
    color: var(--cp-muted);
    cursor: pointer;
}

.cp-modal__close:hover {
    background: var(--cp-brand-soft);
    color: var(--cp-brand);
}

.cp-modal__body {
    padding: 20px;
    overflow-y: auto;
}

.cp-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--cp-line);
    background: var(--cp-surface-2);
    flex-wrap: wrap;
}

.cp-modal-copy {
    color: var(--cp-ink-2);
    line-height: 1.6;
}

.cp-toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1400;
    display: grid;
    gap: 8px;
    width: min(360px, calc(100vw - 36px));
}

.cp-toast {
    display: flex;
    align-items: start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
    background: var(--cp-surface);
    box-shadow: var(--cp-shadow);
    color: var(--cp-ink);
    font-size: .76rem;
    animation: cp-slidein .2s ease;
}

.cp-toast--error {
    border-color: color-mix(in srgb, var(--cp-danger) 30%, var(--cp-line));
}

.cp-toast--warn {
    border-color: color-mix(in srgb, var(--cp-warn) 30%, var(--cp-line));
}

.cp-toast__icon {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--cp-ok-soft);
    color: var(--cp-ok);
}

.cp-toast--error .cp-toast__icon {
    background: var(--cp-danger-soft);
    color: var(--cp-danger);
}

.cp-toast--warn .cp-toast__icon {
    background: var(--cp-warn-soft);
    color: var(--cp-warn);
}

.cp-toast>span:nth-child(2) {
    flex: 1;
    line-height: 1.45;
}

.cp-toast__close {
    border: 0;
    background: transparent;
    color: var(--cp-muted);
    cursor: pointer;
    padding: 1px;
}

.cp-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 80px 20px;
    color: var(--cp-muted);
    font-size: .78rem;
}

.cp-spinner svg {
    animation: cp-spin .8s linear infinite;
}

.cp-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 42px 18px;
    text-align: center;
    color: var(--cp-muted);
}

.cp-empty__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--cp-brand-soft);
    color: var(--cp-brand);
}

.cp-empty h3 {
    font-family: var(--cp-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--cp-ink);
}

.cp-empty p {
    max-width: 300px;
    font-size: .72rem;
    line-height: 1.5;
}

.cp-error-page {
    padding-top: 20px;
}

.cp-picker-list {
    display: grid;
    gap: 2px;
    max-height: 340px;
    overflow-y: auto;
    margin-top: 10px;
}

.cp-picker-row {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cp-ink);
    text-align: left;
    cursor: pointer;
}

.cp-picker-row:hover {
    background: var(--cp-surface-2);
}

.cp-picker-row>span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.cp-picker-row b {
    display: block;
    font-size: .73rem;
}

.cp-picker-row small {
    display: block;
    color: var(--cp-muted);
    font-size: .63rem;
}

.cp-picker-row__points {
    color: var(--cp-brand);
    font-size: .68rem;
    font-weight: 800;
}

.cp-return-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px auto;
    gap: 10px;
    align-items: end;
    padding: 10px 0;
    border-bottom: 1px solid var(--cp-line);
}

.cp-return-line .cp-field>span {
    font-size: .58rem;
}

.cp-return-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--cp-line);
    font-size: .7rem;
}

.cp-rules {
    display: grid;
    gap: 1px;
    border: 1px solid var(--cp-line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--cp-line);
}

.cp-rules>div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    background: var(--cp-surface);
    font-size: .72rem;
}

.cp-rules span {
    color: var(--cp-muted);
}

/* ======================= PRINT ======================= */
.cp-print {
    display: none;
}

.cp-doc {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    color: #24151d;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.45;
}

.cp-doc__brand {
    text-align: center;
    padding-bottom: 9px;
    border-bottom: 1px dashed #b9a6ae;
}

.cp-doc__brand h3 {
    font-family: var(--cp-serif);
    font-size: 20px;
    margin-bottom: 2px;
}

.cp-doc__brand p {
    font-size: 10.5px;
    color: #6f5963;
}

.cp-doc__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 9px 0;
    border-bottom: 1px dashed #b9a6ae;
}

.cp-doc__meta span {
    display: block;
    color: #7b6570;
    font-size: 9px;
    text-transform: uppercase;
}

.cp-doc__meta b {
    display: block;
    font-size: 11px;
}

.cp-doc__items {
    padding: 8px 0;
    border-bottom: 1px dashed #b9a6ae;
}

.cp-doc__line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}

.cp-doc__line small {
    display: block;
    color: #6f5963;
    font-size: 9.5px;
}

.cp-doc__totals {
    padding: 8px 0;
}

.cp-doc__totals>div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.cp-doc__totals .is-total {
    margin-top: 4px;
    padding-top: 5px;
    border-top: 1px dashed #b9a6ae;
    font-size: 14px;
    font-weight: 700;
}

.cp-doc__loyalty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 7px 0;
    padding: 6px;
    border: 1px solid #d9bfca;
    border-radius: 5px;
    font-size: 10px;
    text-align: center;
    justify-content: center;
}

.cp-doc__gift {
    margin: 9px 0;
    padding: 8px;
    border: 1px dashed #b9a6ae;
    border-radius: 5px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
}

.cp-doc__foot {
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px dashed #b9a6ae;
    text-align: center;
    font-size: 9.5px;
    color: #6f5963;
}

.cp-doc__foot small {
    display: block;
    margin-top: 4px;
}

.cp-receipt-preview {
    max-height: 520px;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 12px;
}

@media print {
    body.cp-body {
        background: #fff !important;
    }

    body>*:not(.cp-print) {
        display: none !important;
    }

    .cp-print {
        display: block !important;
    }

    .cp-print.is-printing {
        display: block !important;
    }

    .cp-doc {
        max-width: none;
        color: #000;
    }
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 1180px) {
    .cp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cp-grid--2-1,
    .cp-grid--1-1 {
        grid-template-columns: 1fr;
    }

    .cp-till {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .cp-finder__form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cp-finder__form .cp-btn {
        grid-column: span 2;
    }
}

@media (max-width: 940px) {
    .cp-shell {
        grid-template-columns: 1fr;
    }

    .cp-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 262px;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 20px 0 60px rgba(0, 0, 0, .3);
    }

    .cp-sidebar.is-open {
        transform: translateX(0);
    }

    .cp-topbar__menu {
        display: inline-flex !important;
    }

    .cp-cp-scrim {
        display: none;
    }

    .cp-auth {
        grid-template-columns: 1fr;
    }

    .cp-auth__art {
        min-height: 280px;
        padding: 32px;
        align-items: center;
    }

    .cp-auth__art h1 {
        font-size: clamp(2.4rem, 9vw, 4rem);
        margin: 14px 0;
    }

    .cp-auth__art p,
    .cp-auth__proof,
    .cp-auth__swatches {
        display: none;
    }

    .cp-auth__panel {
        padding: 24px 16px 40px;
    }

    .cp-till {
        grid-template-columns: 1fr;
    }

    .cp-till__cart {
        position: sticky;
        top: 88px;
        max-height: none;
        display: none;
    }

    .cp-till__cart.is-open {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 110;
        border-radius: 22px 22px 0 0;
        max-height: 84vh;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, .28);
    }

    .cp-cart__footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .cp-cart__close {
        display: inline-flex !important;
    }

    .cp-mobile-cart {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 12px 14px;
        border: 0;
        border-radius: 14px;
        background: var(--cp-brand);
        color: #fff;
        box-shadow: 0 14px 34px rgba(178, 58, 107, .36);
        font-size: .78rem;
        font-weight: 700;
    }

    .cp-mobile-cart span {
        flex: 1;
    }

    .cp-mobile-cart b {
        font-size: .72rem;
        opacity: .9;
    }

    .cp-customer-layout {
        grid-template-columns: 1fr;
    }

    .cp-customer-list {
        max-height: 330px;
    }

    .cp-grid--3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .cp-content {
        padding: 14px;
    }

    .cp-screen-head {
        align-items: start;
    }

    .cp-screen-head h1 {
        font-size: 1.75rem;
    }

    .cp-stats {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .cp-stat {
        padding: 13px;
    }

    .cp-stat strong {
        font-size: 1.2rem;
    }

    .cp-stat__icon {
        width: 31px;
        height: 31px;
    }

    .cp-topbar__date,
    .cp-hide-sm {
        display: none;
    }

    .cp-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cp-product-card__media {
        height: 82px;
    }

    .cp-form--grid {
        grid-template-columns: 1fr;
    }

    .cp-field--span2 {
        grid-column: auto;
    }

    .cp-auth__card {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .cp-grid--3 {
        grid-template-columns: 1fr;
    }

    .cp-finder__form {
        grid-template-columns: 1fr 1fr;
    }

    .cp-finder__form .cp-btn {
        grid-column: span 2;
    }

    .cp-profile-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cp-purchase-line {
        grid-template-columns: 1fr 1fr;
    }

    .cp-purchase-line> :nth-child(1) {
        grid-column: span 2;
    }

    .cp-return-line {
        grid-template-columns: 1fr 80px;
    }

    .cp-return-line .cp-check {
        grid-column: span 2;
    }

    .cp-summary-strip {
        grid-template-columns: 1fr 1fr;
    }

    .cp-pay-row {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    .cp-modal {
        padding: 8px;
    }

    .cp-modal__panel {
        max-height: 94vh;
        border-radius: 16px;
    }

    .cp-modal__body {
        padding: 16px;
    }

    .cp-toasts {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
    }

    .cp-customer-detail__head {
        align-items: start;
    }

    .cp-customer-detail__actions {
        width: 100%;
    }

    .cp-customer-detail__actions .cp-btn {
        flex: 1;
    }
}

@media (max-width: 400px) {
    .cp-stats {
        grid-template-columns: 1fr;
    }

    .cp-product-grid {
        grid-template-columns: 1fr;
    }

    .cp-customer-detail__head .cp-avatar--lg {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}

/* ============================================================================
   BookPOS theme layer — parchment, forest green and brass.
   ========================================================================== */

:root {
    --cp-bg: #f7f3ea;
    --cp-bg-2: #efe8da;
    --cp-surface: #fffdf8;
    --cp-surface-2: #fbf7ee;
    --cp-ink: #22281f;
    --cp-ink-2: #3d4636;
    --cp-muted: #777b6c;
    --cp-line: #e4dccb;
    --cp-line-strong: #d3c7b0;
    --cp-brand: #3f6f5e;
    --cp-brand-2: #2c5346;
    --cp-brand-soft: #e8f0e8;
    --cp-brand-ink: #ffffff;
    --cp-gold: #a98447;
    --cp-gold-soft: #f6eeda;
    --cp-ok: #3f6f4f;
    --cp-ok-soft: #e8f2e6;
    --cp-warn: #9d6a22;
    --cp-warn-soft: #f9efdb;
    --cp-danger: #a4443b;
    --cp-danger-soft: #fbeae7;
    --cp-shadow: 0 18px 50px rgba(48, 58, 42, 0.09);
    --cp-shadow-sm: 0 8px 22px rgba(48, 58, 42, 0.07);
    --cp-serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --cp-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html[data-bs-theme="dark"] {
    --cp-bg: #14170f;
    --cp-bg-2: #1c2118;
    --cp-surface: #1e2319;
    --cp-surface-2: #252b20;
    --cp-ink: #f1f3e9;
    --cp-ink-2: #dde2d3;
    --cp-muted: #a3aa97;
    --cp-line: #333a2c;
    --cp-line-strong: #46503d;
    --cp-brand-soft: #24352b;
    --cp-gold-soft: #382f1e;
    --cp-ok-soft: #1f3527;
    --cp-warn-soft: #382f1e;
    --cp-danger-soft: #3a2320;
    --cp-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    --cp-shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.24);
}

body.cp-body {
    background:
        radial-gradient(1100px 520px at 100% -10%, rgba(63, 111, 94, 0.11), transparent 65%),
        radial-gradient(900px 480px at -10% 110%, rgba(169, 132, 71, 0.1), transparent 60%),
        var(--cp-bg) !important;
}

.cp-auth__art {
    background:
        radial-gradient(700px 460px at 80% 10%, rgba(156, 190, 164, .34), transparent 60%),
        radial-gradient(600px 500px at 10% 100%, rgba(196, 160, 99, .3), transparent 65%),
        linear-gradient(150deg, #253b31 0%, #17281f 55%, #101a14 100%);
}

.cp-auth__art p {
    color: rgba(243, 245, 234, .8);
}

.cp-auth__art::before {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 90px rgba(198, 222, 193, .1);
}

.cp-auth__swatches {
    border-color: rgba(255, 255, 255, .2) !important;
}

/* Book covers: portrait ratio, paper edge and gentle spine. */
.cp-thumb {
    border-radius: 4px 9px 9px 4px;
    box-shadow: inset 3px 0 0 rgba(0, 0, 0, .14), 0 2px 6px rgba(40, 46, 35, .18);
    overflow: hidden;
}

.cp-thumb--image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.cp-product-card__media {
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 5px 12px 12px 5px;
    background: linear-gradient(135deg, var(--cp-surface-2), var(--cp-bg-2));
}

.cp-product-card__media .cp-thumb {
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-family: var(--cp-serif);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #e8efe4, #d5e2d6);
    color: var(--cp-brand-2);
    text-align: center;
}

html[data-bs-theme="dark"] .cp-product-card__media .cp-thumb {
    background: linear-gradient(150deg, #2c3b31, #22302a);
    color: #cfe2d0;
}

.cp-product-card__media .cp-thumb--image {
    box-shadow: none;
}

.cp-product-card__body b {
    font-family: var(--cp-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.cp-cart-line__media .cp-thumb {
    width: 46px;
    height: 62px;
    font-size: 1rem;
}

.cp-product-card {
    align-items: flex-start;
}

.cp-cat-row {
    margin-top: -2px;
}

/* Shelf labels */
.cp-stock-pill {
    font-variant-numeric: tabular-nums;
}

/* Event section headers */
.cp-screen-head h1,
.cp-auth__card h2,
.cp-card h2,
.cp-card h3,
.cp-plan__head h3,
.cp-doc__brand h3 {
    font-family: var(--cp-serif);
    letter-spacing: -0.015em;
}

.cp-screen-head h1 {
    font-weight: 600;
}

.cp-auth__card h2 {
    font-weight: 600;
}

.cp-stat strong {
    font-family: var(--cp-serif);
    font-weight: 600;
}

.cp-boot__mark {
    background: linear-gradient(145deg, var(--cp-brand), #1f3a2e);
    box-shadow: 0 18px 42px rgba(63, 111, 94, .32);
    border-radius: 20px 28px 28px 20px;
}

.cp-brand__mark {
    border-radius: 10px 16px 16px 10px;
}

/* Receipt paper */
.cp-doc {
    font-family: var(--cp-sans);
}

.cp-doc--receipt {
    background-image: linear-gradient(180deg, #fffdf8, #fbf7ee);
}

html[data-bs-theme="dark"] .cp-doc--receipt {
    background-image: linear-gradient(180deg, #1f241b, #191d16);
}

/* Special order pipeline */
.cp-pipeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.cp-pipeline__step {
    border: 1px solid var(--cp-line);
    background: var(--cp-surface);
    border-radius: var(--cp-radius-sm);
    padding: 12px 14px;
    text-align: left;
}

.cp-pipeline__step small {
    display: block;
    color: var(--cp-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.cp-pipeline__step b {
    font-family: var(--cp-serif);
    font-size: 1.35rem;
}

.cp-pipeline__step.is-active {
    border-color: var(--cp-brand);
    background: var(--cp-brand-soft);
}

.cp-reading-profile {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.cp-reading-profile>div {
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-sm);
    background: var(--cp-surface-2);
    padding: 10px 12px;
}

.cp-reading-profile span {
    display: block;
    color: var(--cp-muted);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.cp-reading-profile b {
    font-size: .95rem;
}

.cp-genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cp-genre-chips span {
    border: 1px solid var(--cp-line);
    background: var(--cp-surface-2);
    color: var(--cp-ink-2);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .74rem;
    font-weight: 600;
}

.cp-book-cover-large {
    width: 96px;
    height: 132px;
    border-radius: 5px 12px 12px 5px;
    box-shadow: inset 4px 0 0 rgba(0, 0, 0, .14), 0 8px 18px rgba(40, 46, 35, .2);
    background: linear-gradient(150deg, #e8efe4, #d5e2d6);
    color: var(--cp-brand-2);
    display: grid;
    place-items: center;
    font-family: var(--cp-serif);
    font-size: 1.6rem;
    overflow: hidden;
}

.cp-book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-isbn {
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    font-size: .76rem;
    color: var(--cp-muted);
}

.cp-order-card {
    border: 1px solid var(--cp-line);
    border-radius: var(--cp-radius-sm);
    background: var(--cp-surface);
    padding: 15px 16px;
}

.cp-order-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.cp-order-card__head h3 {
    margin: 0;
}

.cp-order-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--cp-muted);
    font-size: .8rem;
    margin-bottom: 10px;
}

.cp-order-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--cp-line);
    padding-top: 10px;
}

.cp-order-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cp-title-detail__head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 16px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--cp-line);
}

.cp-title-detail__head .cp-book-cover-large {
    flex: 0 0 auto;
}

.cp-title-detail__head p {
    margin-top: 9px;
    line-height: 1.6;
}

.cp-btn--sm {
    padding: 7px 11px;
    font-size: .76rem;
}

@media (max-width: 560px) {
    .cp-title-detail__head {
        flex-direction: column;
    }
}

.cp-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.cp-cover-upload {
    display: flex;
    gap: 14px;
    align-items: center;
    border: 1px dashed var(--cp-line-strong);
    border-radius: var(--cp-radius-sm);
    padding: 12px;
    background: var(--cp-surface-2);
}

.cp-cover-upload img {
    width: 58px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px 7px 7px 3px;
    box-shadow: 0 4px 10px rgba(40, 46, 35, .2);
}

.cp-cover-upload input[type="file"] {
    max-width: 190px;
}

@media (max-width: 760px) {
    .cp-pipeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cp-reading-profile {
        grid-template-columns: 1fr;
    }

    .cp-order-grid {
        grid-template-columns: 1fr;
    }

    .cp-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .cp-chips::-webkit-scrollbar {
        display: none;
    }

    .cp-chip {
        flex: 0 0 auto;
    }
}

@keyframes cp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cp-slidein {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}