/* ==========================================================================
   BenkBenk design layer - Bootstrap 5
   Replaces SB Admin 2. Keeps every legacy class name the blade views use
   (.bg-benkbenk, .text-benkbenk2, .btn-benkbenk, .sidebar-*, .collapse-item,
   .img-profile, .btn-circle ...) so the markup keeps working, but restyles them.
   ========================================================================== */

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("../fonts/fraunces-latin.woff2") format("woff2");
}

:root {
    /* Palette taken from the BenkBenk logo: soft pink as the signature
       surface, charcoal for the frame, rose for actions. Rose is dark
       enough for white text (5.3:1); the pinks carry --tp-deep text.
       (The --tp-* names are kept from the earlier theme so every class
       keeps working: caramel = primary action, latte/foam = pink tints.) */
    --tp-espresso: #241A1C;   /* sidebar */
    --tp-deep: #2E2224;       /* headings, top bar, text on cream */
    --tp-deep-700: #5A4348;
    --tp-caramel: #B8435C;    /* primary actions */
    --tp-caramel-600: #9A2F48;
    --tp-crema: #FCD6CD;      /* highlights on dark */

    --tp-latte: #F7C6BB;
    --tp-latte-600: #E7A596;
    --tp-latte-soft: #FDE6E0;
    --tp-latte-wash: #FFF3F0;
    --tp-foam: #FCD6CD;
    --tp-foam-600: #F3B5A6;
    --tp-foam-soft: #FFF0EC;

    --tp-ink: #2A1E20;
    --tp-muted: #7D5F63;
    --tp-line: #F2DAD4;
    --tp-canvas: #FFF4F1;
    --tp-surface: #FFFBFA;

    --tp-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --tp-font-display: "Fraunces", Georgia, "Times New Roman", serif;

    --tp-radius: 14px;
    --tp-radius-sm: 9px;
    --tp-shadow-sm: 0 1px 2px rgba(46, 34, 36, .06), 0 1px 3px rgba(46, 34, 36, .05);
    --tp-shadow: 0 2px 4px rgba(46, 34, 36, .04), 0 10px 28px rgba(46, 34, 36, .08);
    --tp-shadow-lg: 0 14px 44px rgba(46, 34, 36, .18);

    --tp-sidebar-w: 15.5rem;

    /* let the Bootstrap components inherit the brand */
    --bs-primary: #B8435C;
    --bs-primary-rgb: 184, 67, 92;
    --bs-body-color: #2A1E20;
    --bs-body-bg: #FFF4F1;
    --bs-border-color: #F2DAD4;
    --bs-link-color: #9A2F48;
    --bs-link-hover-color: #2E2224;
    --bs-link-color-rgb: 154, 47, 72;
    --bs-link-hover-color-rgb: 46, 34, 36;
    --bs-focus-ring-color: rgba(184, 67, 92, .3);
}

/* --------------------------------------------------------------- base --- */

body {
    font-family: var(--tp-font);
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--tp-ink);
    background-color: var(--tp-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -.015em;
    color: var(--tp-deep);
}

/* page titles and big numbers get the roastery serif */
h1, h2, h3, h4,
.ui-stat__value,
.dash-hello__title,
.pay__due,
.cust-intro__title,
.cust-status__title,
.cust-top__name {
    font-family: var(--tp-font-display);
    font-optical-sizing: auto;
    letter-spacing: -.01em;
}

h4 { font-weight: 700; }

h4 { font-size: 1.3rem; }
h5 { font-size: 1.075rem; }
h6 { font-size: .9rem; }

hr {
    border-color: var(--tp-line);
    opacity: 1;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ------------------------------------------------------------- brand ---- */

.text-benkbenk  { color: var(--tp-deep) !important; }
.text-benkbenk1 { color: var(--tp-deep) !important; }
/* used on top of .bg-benkbenk, which is now a pastel */
.text-benkbenk2 { color: var(--tp-deep) !important; }

a.text-benkbenk:hover,
a.text-benkbenk:focus { color: var(--tp-deep-700) !important; }

.bg-benkbenk  { background-color: var(--tp-latte-soft) !important; }
.bg-benkbenk2 { background-color: var(--tp-foam) !important; }
.bg-benkbenk3 { background: linear-gradient(160deg, var(--tp-latte-soft) 0%, var(--tp-latte-wash) 55%, var(--tp-foam-soft) 100%); }

/* logo: the gold mark sits on a deep tile so it stays legible on pastels */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 2.4rem;
    border-radius: 10px;
    background: var(--tp-deep);
}

.brand-mark img { width: 72%; height: auto; }

.brand-wordmark {
    display: block;
    height: 1.9rem;
    width: auto;
    max-width: 100%;
}

/* merchant logo, or the store icon shown when there is none */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tp-foam);
    background: var(--tp-surface);
}

.avatar--icon {
    background: var(--tp-foam-soft);
    color: var(--tp-deep);
}

/* --------------------------------------------------------------- shell -- */

#wrapper {
    display: flex;
    min-height: 100vh;
}

#content-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    background-color: var(--tp-canvas);
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1 0 auto;
}

#content > .container-fluid {
    padding: 1.75rem 1.9rem 3rem;
}

/* ------------------------------------------------------------- sidebar -- */

.sidebar {
    width: var(--tp-sidebar-w);
    min-width: var(--tp-sidebar-w);
    min-height: 100vh;
    padding: 0 0 1.5rem;
    margin: 0;
    list-style: none;
    background:
        radial-gradient(120% 40% at 0% 0%, rgba(233, 169, 91, .10) 0%, transparent 70%),
        linear-gradient(180deg, #2C1B12 0%, var(--tp-espresso) 100%);
    border-right: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 225, 220, .18) transparent;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 225, 220, .18);
    border-radius: 3px;
}

.sidebar .nav-item { list-style: none; }

.sidebar-brand {
    padding: 1.2rem 1.1rem;
    gap: .6rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 225, 220, .08);
}

.sidebar-heading {
    padding: 1.35rem 1.25rem .45rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 215, 208, .42);
}

.sidebar-divider { display: none; }

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: .1rem .65rem;
    padding: .62rem .8rem;
    border-radius: var(--tp-radius-sm);
    color: rgba(255, 235, 230, .78) !important;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 225, 220, .07);
    color: #FFEFEA !important;
}

.sidebar .nav-link[aria-expanded="true"] {
    background-color: rgba(255, 225, 220, .06);
    color: #FFEFEA !important;
}

.sidebar .nav-link i {
    width: 1.1rem;
    font-size: .95rem;
    color: var(--tp-crema) !important;
    opacity: .85;
    text-align: center;
}

.sidebar .nav-link span { color: inherit !important; }

/* submenu */
.sidebar .collapse-inner {
    margin: .15rem .65rem .35rem;
    padding: .4rem !important;
    background: rgba(0, 0, 0, .18) !important;
    border-radius: var(--tp-radius-sm);
}

.sidebar .collapse-header {
    padding: .35rem .65rem;
    margin: 0;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 215, 208, .42);
}

.sidebar .collapse-item,
.sidebar .dropdown-item {
    display: block;
    padding: .42rem .65rem;
    border-radius: 6px;
    font-size: .86rem;
    font-weight: 500;
    color: rgba(255, 235, 230, .7) !important;
    background: transparent;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar .collapse-item:hover,
.sidebar .dropdown-item:hover {
    background-color: rgba(255, 225, 220, .08);
    color: #FFEFEA !important;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--tp-caramel) 0%, #9A2F48 100%);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(184, 67, 92, .35);
}

.sidebar .nav-link.active i { color: #FFD9D1 !important; opacity: 1; }

.sidebar .collapse-item.active {
    background-color: rgba(233, 169, 91, .16);
    color: var(--tp-crema) !important;
    font-weight: 600;
}

#sidebarToggle {
    width: 2.1rem;
    height: 2.1rem;
    background: rgba(255, 225, 220, .08) !important;
    border-radius: 50%;
    transition: background-color .15s ease;
}

#sidebarToggle:hover { background: rgba(255, 225, 220, .16) !important; }

#sidebarToggle::before {
    content: "\f100";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--tp-crema);
}

/* the mobile bar and drawer controls only exist on phones */
.mobile-topbar,
.sidebar-backdrop,
.sidebar-close { display: none; }

@media (max-width: 767.98px) {
    #wrapper { flex-direction: column; }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: .7rem;
        position: sticky;
        top: 0;
        z-index: 1030;
        min-height: 3.5rem;
        padding: calc(.5rem + env(safe-area-inset-top)) 1rem .5rem;
        background: var(--tp-deep);
        box-shadow: 0 2px 8px rgba(42, 30, 32, .18);
    }

    .mobile-topbar__back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        margin-left: -.4rem;
        border-radius: 50%;
        color: var(--tp-foam);
        font-size: 1.05rem;
    }

    .mobile-topbar__back:active { background: rgba(255, 255, 255, .12); }
    .mobile-topbar.has-back .brand-mark { display: none; }

    .mobile-topbar__title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -.01em;
        color: var(--tp-foam);
    }

    .mobile-topbar .brand-mark { width: 2rem; height: 2rem; flex-basis: 2rem; border-radius: 8px; }
    .mobile-topbar .brand-wordmark { height: 1.6rem; }

    .mobile-topbar__toggle,
    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        border: 0;
        border-radius: var(--tp-radius-sm);
        background: var(--tp-latte-soft);
        color: var(--tp-deep);
        font-size: 1.05rem;
    }

    .mobile-topbar__toggle {
        background: rgba(255, 255, 255, .12);
        color: var(--tp-foam);
    }

    .sidebar-close {
        margin-left: auto;
        background: rgba(255, 255, 255, .12);
        color: var(--tp-foam);
    }

    /* off-canvas drawer, closed until the bar's button opens it */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        width: min(80vw, 17rem);
        min-width: 0;
        min-height: 0;
        max-height: none;
        height: 100%;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: var(--tp-shadow-lg);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(42, 30, 32, .35);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.sidebar-open { overflow: hidden; }

    .sidebar-heading { padding-top: .9rem; }
    #content > .container-fluid { padding: 1.1rem 1rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .sidebar-backdrop { transition: none; }
}

/* collapsed sidebar (toggled by #sidebarToggle) */
body.sidebar-collapsed .sidebar {
    --tp-sidebar-w: 4.6rem;
}

body.sidebar-collapsed .sidebar .sidebar-heading,
body.sidebar-collapsed .sidebar .nav-link span,
body.sidebar-collapsed .sidebar .sidebar-brand-text,
body.sidebar-collapsed .sidebar .collapse-inner {
    display: none;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding-left: .5rem;
    padding-right: .5rem;
}

/* ---------------------------------------------------------- auth pages -- */

.auth-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(150deg, var(--tp-latte-soft) 0%, var(--tp-latte-wash) 55%, var(--tp-foam-soft) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--tp-surface);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(46, 34, 36, .16);
    overflow: hidden;
}

.auth-card--wide { max-width: 720px; }

.auth-card__brand {
    padding: 1.9rem 2rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid var(--tp-line);
}

.auth-card__brand img {
    max-width: 210px;
    width: 100%;
    height: auto;
}

.auth-card__body { padding: 1.9rem 2rem 2.1rem; }

.auth-card__body .form-check-label { color: var(--tp-muted); }

/* multi-step register form */
.step { display: none; border: 0; padding: 0; margin: 0; }
.step.is-active { display: block; }

.stepper {
    display: flex;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
}

.stepper__item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .7rem;
    border-radius: var(--tp-radius-sm);
    background: var(--tp-latte-wash);
    font-size: .78rem;
    font-weight: 600;
    color: var(--tp-muted);
    transition: background-color .2s ease, color .2s ease;
}

.stepper__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 1.4rem;
    border-radius: 50%;
    background: var(--tp-line);
    color: var(--tp-muted);
    font-size: .72rem;
}

.stepper__item.is-active {
    background: var(--tp-latte-soft);
    color: var(--tp-deep);
}

.stepper__item.is-active span {
    background: var(--tp-latte);
    color: var(--tp-deep);
}

@media (max-width: 575.98px) {
    .stepper { flex-direction: column; }
}

/* -------------------------------------------------------------- topbar -- */

.topbar {
    min-height: 4.1rem;
    padding: .5rem 1.5rem;
    background: var(--tp-surface) !important;
    border-bottom: 1px solid var(--tp-line);
    box-shadow: none !important;
}

.topbar .navbar-brand img { max-height: 42px; width: auto; }

.topbar .nav-link { font-weight: 600; }

/* --------------------------------------------------------------- cards -- */

.card,
.card-benkbenk {
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background-color: var(--tp-surface);
    box-shadow: var(--tp-shadow-sm);
    overflow: hidden;
}

.card-benkbenk { min-width: 0; }

.card-header {
    padding: .95rem 1.25rem;
    border-bottom: 1px solid var(--tp-line);
    background-color: var(--tp-latte-wash);
    font-weight: 600;
}

.card-header.bg-benkbenk {
    border-bottom: none;
}

.card-header.bg-benkbenk h5,
.card-header.bg-benkbenk h6,
.card-header.bg-benkbenk .text-benkbenk2 {
    margin: 0;
    color: var(--tp-deep) !important;
    font-weight: 600;
    letter-spacing: -.01em;
}

.card-body { padding: 1.35rem 1.25rem; }

.card-footer {
    background-color: var(--tp-latte-wash);
    border-top: 1px solid var(--tp-line);
}

/* ------------------------------------------------------------- buttons -- */

.btn {
    --bs-btn-padding-y: .48rem;
    --bs-btn-padding-x: 1.05rem;
    --bs-btn-font-size: .875rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--tp-radius-sm);
    letter-spacing: .005em;
    transition: transform .12s ease, box-shadow .15s ease,
                background-color .15s ease, border-color .15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-benkbenk {
    color: #fff;
    background: linear-gradient(135deg, #CF5870 0%, var(--tp-caramel) 55%, #9A2F48 100%);
    border-color: var(--tp-caramel);
    box-shadow: 0 1px 2px rgba(46, 34, 36, .12), 0 4px 12px rgba(184, 67, 92, .22);
}

.btn-benkbenk:hover,
.btn-benkbenk:focus {
    color: #fff;
    background: var(--tp-caramel-600);
    border-color: var(--tp-caramel-600);
    box-shadow: 0 6px 18px rgba(184, 67, 92, .32);
}

.btn-benkbenk:disabled,
.btn-benkbenk.disabled {
    color: #fff;
    background: #E7B6AC;
    border-color: #E7B6AC;
    box-shadow: none;
}

.btn-benkbenk-create {
    color: var(--tp-deep);
    background-color: var(--tp-foam);
    border-color: var(--tp-foam);
    box-shadow: var(--tp-shadow-sm);
}

.btn-benkbenk-create:hover,
.btn-benkbenk-create:focus {
    color: var(--tp-deep);
    background-color: var(--tp-foam-600);
    border-color: var(--tp-foam-600);
    box-shadow: 0 4px 12px rgba(243, 181, 166, .45);
}

/* .btn-benkbenk2 is used on 21 screens, mostly the "Create" action that sits
   on a brand card header. */
.btn-benkbenk2 {
    color: var(--tp-deep);
    background-color: var(--tp-foam);
    border-color: var(--tp-foam);
    box-shadow: var(--tp-shadow-sm);
}

.btn-benkbenk2:hover,
.btn-benkbenk2:focus {
    color: var(--tp-deep);
    background-color: var(--tp-foam-600);
    border-color: var(--tp-foam-600);
    box-shadow: 0 4px 12px rgba(243, 181, 166, .45);
}

/* links dropped straight into a brand card header */
.card-header.bg-benkbenk a:not(.btn) {
    color: var(--tp-deep);
}

.btn-primary {
    --bs-btn-color: var(--tp-deep);
    --bs-btn-bg: var(--tp-latte);
    --bs-btn-border-color: var(--tp-latte);
    --bs-btn-hover-color: var(--tp-deep);
    --bs-btn-hover-bg: var(--tp-latte-600);
    --bs-btn-hover-border-color: var(--tp-latte-600);
    --bs-btn-active-color: var(--tp-deep);
    --bs-btn-active-bg: var(--tp-latte-600);
    --bs-btn-active-border-color: var(--tp-latte-600);
}

/* icon-only Create / Edit / Delete buttons; the label lives in title and
   aria-label, so the tooltip and screen readers still say what they do */
.btn.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem !important;
    padding: 0;
    margin: 0;
    font-size: .9rem;
    line-height: 1;
    vertical-align: middle;
}

.btn.btn-icon + .btn.btn-icon,
.btn.btn-icon + .modal + .btn.btn-icon { margin-left: .35rem; }

.card-header .btn.btn-icon {
    width: 2.5rem;
    height: 2.5rem !important;
    font-size: 1rem;
}

/* round icon button used in every table action column */
.btn-circle,
a.btn-benkbenk.btn-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border-radius: 50%;
    font-size: .8rem;
    line-height: 1;
    color: var(--tp-deep);
    background-color: var(--tp-latte-soft);
    border: 1px solid transparent;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

.btn-circle:hover {
    color: var(--tp-deep);
    background-color: var(--tp-latte);
    transform: translateY(-1px);
}

.btn-circle.btn-danger,
.btn-danger.btn-circle {
    color: #c0392b;
    background-color: rgba(192, 57, 43, .1);
    border-color: transparent;
}

.btn-circle.btn-danger:hover { color: #fff; background-color: #c0392b; }

/* -------------------------------------------------------------- tables -- */

.table {
    --bs-table-border-color: var(--tp-line);
    --bs-table-bg: var(--tp-surface);
    margin-bottom: 0;
    font-size: .875rem;
    color: var(--tp-ink);
}

.table > thead > tr > th {
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--tp-line) !important;
    background-color: var(--tp-latte-wash);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--tp-muted);
    white-space: nowrap;
    vertical-align: middle;
}

.table > tbody > tr > td {
    padding: .78rem .9rem;
    border-bottom: 1px solid var(--tp-line);
    vertical-align: middle;
}

.table > tbody > tr:last-child > td { border-bottom: none; }

.table > tbody > tr { transition: background-color .12s ease; }
.table > tbody > tr:hover > td { background-color: var(--tp-foam-soft); }

.table-responsive {
    border-radius: var(--tp-radius);
    border: 1px solid var(--tp-line);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow-sm);
    overflow-x: auto;
}

/* --------------------------------------------------------------- forms -- */

.form-group { margin-bottom: 1.05rem; }

label,
.form-label {
    margin-bottom: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--tp-deep);
}

.form-control,
.form-select {
    padding: .55rem .8rem;
    font-size: .9rem;
    color: var(--tp-ink);
    background-color: var(--tp-surface);
    border: 1px solid #F0CFC8;
    border-radius: var(--tp-radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tp-latte-600);
    box-shadow: 0 0 0 3px rgba(184, 67, 92, .45);
}

.form-control::placeholder { color: #B89F8A; }

/* keep Bootstrap's room for the dropdown arrow */
.form-select { padding-right: 2.25rem; }

/* Bootstrap bakes its blue into the checkbox/radio styles */
.form-check-input:checked {
    background-color: var(--tp-latte-600);
    border-color: var(--tp-latte-600);
}

.form-check-input:focus {
    border-color: var(--tp-latte-600);
    box-shadow: 0 0 0 3px rgba(184, 67, 92, .45);
}

.input-group-text {
    background-color: var(--tp-latte-wash);
    border: 1px solid #F0CFC8;
    border-radius: var(--tp-radius-sm);
    color: var(--tp-muted);
    font-size: .85rem;
}

/* -------------------------------------------------------------- badges -- */

.badge {
    padding: .38em .7em;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 999px;
}

/* --------------------------------------------------------------- misc --- */

.alert {
    border: 1px solid transparent;
    border-radius: var(--tp-radius);
    font-size: .88rem;
    box-shadow: var(--tp-shadow-sm);
}

.modal-content {
    border: none;
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow-lg);
}

.modal-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--tp-line);
}

.modal-body { padding: 1.35rem; }

.modal-footer {
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--tp-line);
}

.dropdown-menu {
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    padding: .4rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: .5rem .7rem;
    font-size: .88rem;
}

.img-profile {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.pagination {
    --bs-pagination-color: var(--tp-deep);
    --bs-pagination-active-color: var(--tp-deep);
    --bs-pagination-active-bg: var(--tp-latte);
    --bs-pagination-active-border-color: var(--tp-latte);
    --bs-pagination-border-radius: var(--tp-radius-sm);
    --bs-pagination-font-size: .875rem;
}

/* DataTables controls */
.dataTables_wrapper .dt-buttons .btn {
    margin-right: .35rem;
    background-color: var(--tp-latte-soft);
    border-color: transparent;
    color: var(--tp-deep);
}

.dataTables_wrapper .dt-buttons .btn:hover {
    background-color: var(--tp-latte);
    color: var(--tp-deep);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #F0CFC8;
    border-radius: var(--tp-radius-sm);
    padding: .35rem .6rem;
}

/* the arrow sits in the select's right padding */
div.dataTables_wrapper div.dataTables_length select { padding-right: 2rem; }

div.dataTables_wrapper div.dataTables_filter input {
    padding-left: 2rem;
    background: var(--tp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2385766A' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.75'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") no-repeat .65rem center / .9rem;
}

.dataTables_wrapper .dataTables_length select {
    padding-top: .3rem;
    padding-bottom: .3rem;
    margin: 0 .35rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    font-size: .84rem;
    color: var(--tp-muted);
}

/* page heading used at the top of most screens */
#content h4.text-benkbenk {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.28rem;
    font-weight: 700;
}

#content h4.text-benkbenk .fa-chevron-right {
    font-size: .7rem;
    color: var(--tp-muted);
}

/* the customer-facing menu pages sit outside the admin shell */
.menu-hero {
    background: linear-gradient(160deg, var(--tp-latte-soft) 0%, var(--tp-foam-soft) 100%);
    color: var(--tp-deep);
}

/* ----------------------------------------------------- employee shell --- */

.employee-body {
    background: var(--tp-canvas);
    min-height: 100vh;
}

.employee-topbar {
    background: var(--tp-surface);
    border-bottom: 1px solid var(--tp-line);
}

.employee-topbar__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: .8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.employee-topbar__logo { height: 34px; width: auto; }

.employee-main { padding: 1.6rem 1rem 3rem; }

/* --------------------------------------------------------- attendance --- */

.punch-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    border: 1px solid var(--tp-line);
    border-left: 4px solid #EBCBC4;
    box-shadow: var(--tp-shadow-sm);
}

.punch-status--in { border-left-color: #1e9e5a; }

.punch-status__label {
    font-weight: 700;
    color: var(--tp-deep);
}

.punch-status__since {
    font-size: .82rem;
    color: var(--tp-muted);
}

.punch-clock {
    font-variant-numeric: tabular-nums;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tp-deep);
    letter-spacing: -.02em;
}

.capture {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    background: #2A1E20;
    border-radius: var(--tp-radius);
    overflow: hidden;
}

.capture__view {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* mirror the preview so it reads like a selfie */
    transform: scaleX(-1);
}

.capture__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, .72);
    font-size: .85rem;
}

.location-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    justify-content: center;
    padding: .6rem .9rem;
    border-radius: var(--tp-radius-sm);
    background: var(--tp-latte-wash);
    font-size: .84rem;
    color: var(--tp-muted);
}

.location-row i { color: var(--tp-muted); }
.location-row--ok { background: rgba(30, 158, 90, .1); color: #146c40; }
.location-row--ok i { color: #1e9e5a; }
.location-row--warn { background: var(--tp-foam-soft); color: #7a6300; }
.location-row--warn i { color: #b08f00; }

.attendance-photo {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--tp-line);
}

/* --------------------------------------------------- desktop tables ---- */

/* A DataTable sits in the bordered .table-responsive box: give its controls
   some room and let the table itself run edge to edge between them. */
@media (min-width: 768px) {
    /* controls share a line: buttons | search on top, info | pages below */
    .table-responsive > .dataTables_wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .table-responsive > .dataTables_wrapper > .row,
    .table-responsive > .dataTables_wrapper > table {
        flex: 0 0 100%;
        width: 100%;
    }

    .table-responsive > .dataTables_wrapper > .row {
        margin: 0;
        align-items: center;
    }

    .table-responsive > .dataTables_wrapper > .row:not(.dt-row) {
        padding: .85rem 1.1rem;
    }

    .table-responsive > .dataTables_wrapper > .row.dt-row > [class*="col-"] {
        padding: 0;
    }

    /* layouts built from a "dom" string (report pages) have no .row wrappers */
    .table-responsive > .dataTables_wrapper > .dt-buttons,
    .table-responsive > .dataTables_wrapper > .dataTables_filter,
    .table-responsive > .dataTables_wrapper > .dataTables_info,
    .table-responsive > .dataTables_wrapper > .dataTables_paginate {
        padding: .85rem 1.1rem;
    }

    .table-responsive > .dataTables_wrapper > .dataTables_filter { margin-left: auto; }
    .table-responsive > .dataTables_wrapper > .dataTables_paginate { margin-left: auto; }

    .table-responsive > .dataTables_wrapper .dataTables_info { padding-top: 0; }


    .table-responsive > .dataTables_wrapper table.dataTable {
        margin: 0 !important;
        border-bottom: 1px solid var(--tp-line);
    }

    /* the box already draws the outer edge */
    .table-responsive .table-bordered > :not(caption) > * > :first-child { border-left-width: 0; }
    .table-responsive .table-bordered > :not(caption) > * > :last-child { border-right-width: 0; }
}

/* ---------------------------------------------------- mobile tables ---- */

/* js/table-stack.js labels each cell from the header and adds .table-stack;
   on phones each row then becomes a card of "label: value" lines. */
@media (max-width: 767.98px) {
    .table-responsive.has-table-stack {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .table-stack,
    .table-stack > tbody,
    .table-stack > tfoot,
    .table-stack > tbody > tr,
    .table-stack > tfoot > tr {
        display: block;
        width: 100% !important;
    }

    .table-stack > thead { display: none; }

    /* totals stay under the rows even when <tfoot> comes first in the markup */
    .table-stack { display: flex !important; flex-direction: column; }
    .table-stack > tbody { order: 1; }
    .table-stack > tfoot { order: 2; }
    .table-stack > tfoot .cell-blank { display: none !important; }

    .table-stack > tbody > tr,
    .table-stack > tfoot > tr {
        margin-bottom: .75rem;
        padding: .3rem .95rem;
        background: var(--tp-surface);
        border: 1px solid var(--tp-line);
        border-radius: var(--tp-radius);
        box-shadow: var(--tp-shadow-sm);
    }

    .table-stack > tfoot > tr { background: var(--tp-latte-wash); }

    .table-stack > tbody > tr:hover { background: var(--tp-surface); }

    .table-stack > tbody > tr > td,
    .table-stack > tbody > tr > th,
    .table-stack > tfoot > tr > td,
    .table-stack > tfoot > tr > th {
        display: block;
        position: relative;
        min-height: 2.5rem;
        padding: .6rem 0 .6rem 42% !important;
        text-align: right !important;
        border: 0 !important;
        border-bottom: 1px dashed var(--tp-line) !important;
        background: transparent !important;
        overflow-wrap: anywhere;
    }

    .table-stack > tbody > tr > :last-child,
    .table-stack > tfoot > tr > :last-child {
        border-bottom: 0 !important;
    }

    .table-stack [data-label]::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: .6rem;
        width: 40%;
        padding-right: .5rem;
        text-align: left;
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--tp-muted);
    }

    /* "no data" rows and other cells spanning several columns */
    .table-stack .cell-wide,
    .table-stack .dataTables_empty {
        padding-left: 0 !important;
        text-align: center !important;
    }

    /* stacked action buttons keep a little room between them */
    .table-stack td .btn + .btn,
    .table-stack td .btn + a,
    .table-stack td a + .btn { margin-top: .25rem; }

    /* DataTables controls: one left edge, lined up with the cards. The
       generated .row/.col wrappers come with uneven gutters, so drop them. */
    .dataTables_wrapper > .row {
        margin-left: 0;
        margin-right: 0;
        row-gap: .6rem;
    }

    .dataTables_wrapper > .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info {
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter { margin-bottom: .6rem; }

    div.dataTables_wrapper div.dataTables_filter label {
        display: block;
        width: 100%;
        margin: 0;
    }

    div.dataTables_wrapper div.dataTables_filter input {
        display: block;
        width: 100%;
        margin-left: 0;
    }

    .dataTables_wrapper .dataTables_info { padding-top: .25rem; }

    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center !important;
        flex-wrap: wrap;
    }

    .dataTables_wrapper .dt-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
        margin-bottom: .6rem;
    }

    .dataTables_wrapper .dt-buttons .btn { margin-right: 0; }
}

/* ------------------------------------------------------------- POS ----- */
/* Create Order / Add Menu: product picker + cart (public/js/pos-cart.js) */

.pos {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.25rem;
    align-items: start;
}

.pos__products { min-width: 0; }

.pos-picker__search {
    position: relative;
    margin-bottom: .75rem;
}

.pos-picker__search i {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tp-muted);
    font-size: .9rem;
}

.pos-picker__search .form-control { padding-left: 2.4rem; border-radius: 999px; }

.pos-chips {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding-bottom: .4rem;
    margin-bottom: .6rem;
    scrollbar-width: none;
}

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

.pos-chip {
    flex: 0 0 auto;
    padding: .45rem .95rem;
    border: 1px solid var(--tp-line);
    border-radius: 999px;
    background: var(--tp-surface);
    color: var(--tp-deep-700);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.pos-chip.is-active {
    background: var(--tp-deep);
    border-color: var(--tp-deep);
    color: var(--tp-foam);
}

.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: .75rem;
}

.pos-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .5rem .5rem .7rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    text-align: left;
    box-shadow: var(--tp-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.pos-tile[hidden] { display: none; }
.pos-tile:active { transform: scale(.97); }
.pos-tile.is-in-cart { border-color: var(--tp-latte-600); box-shadow: 0 0 0 2px var(--tp-latte-soft); }
.pos-tile:disabled { opacity: .5; }

.pos-tile__img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    margin-bottom: .3rem;
    border-radius: 9px;
    overflow: hidden;
    background: var(--tp-latte-wash);
}

.pos-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pos-tile__qty {
    position: absolute;
    top: .35rem;
    right: .35rem;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--tp-deep);
    color: var(--tp-foam);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.6rem;
    text-align: center;
}

.pos-tile.is-bumped .pos-tile__qty { animation: pos-bump .25s ease; }

@keyframes pos-bump {
    50% { transform: scale(1.3); }
}

.pos-tile__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--tp-ink);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.25;
    min-height: 2.25em;
}

.pos-tile__price { color: var(--tp-deep-700); font-size: .85rem; font-weight: 700; }

.pos-picker__none { padding: 2rem 0; text-align: center; color: var(--tp-muted); }

/* cart panel */
.pos__cart {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    max-height: calc(100vh - 2rem);
    padding: 1rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow);
}

.pos__cart-head { display: flex; align-items: center; justify-content: space-between; }
.pos__cart-head h5 { display: flex; align-items: center; gap: .5rem; }

.pos__count-badge {
    min-width: 1.6rem;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: var(--tp-latte-soft);
    font-size: .8rem;
    text-align: center;
}

.pos__close {
    display: none;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: var(--tp-latte-wash);
    color: var(--tp-deep);
}

.pos__fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pos__fields .form-label { font-size: .75rem; margin-bottom: .2rem; }

.pos__lines {
    flex: 1 1 auto;
    min-height: 5rem;
    overflow-y: auto;
    border-top: 1px solid var(--tp-line);
    border-bottom: 1px solid var(--tp-line);
}

.pos__empty { margin: 0; padding: 1.5rem .5rem; text-align: center; color: var(--tp-muted); font-size: .88rem; }
.pos__empty i { font-size: 1.6rem; color: var(--tp-latte-600); }

.pos-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "info total" "step step";
    gap: .35rem .75rem;
    padding: .65rem 0;
    border-bottom: 1px dashed var(--tp-line);
}

.pos-line:last-child { border-bottom: 0; }
.pos-line__info { grid-area: info; min-width: 0; }
.pos-line__name { font-weight: 600; font-size: .9rem; }
.pos-line__price { color: var(--tp-muted); font-size: .8rem; }
.pos-line__total { grid-area: total; font-weight: 700; font-size: .9rem; text-align: right; }

.pos-stepper {
    grid-area: step;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    border: 1px solid var(--tp-line);
    border-radius: 999px;
    overflow: hidden;
}

.pos-stepper__btn {
    width: 2.25rem;
    height: 2.1rem;
    border: 0;
    background: var(--tp-latte-wash);
    color: var(--tp-deep);
    font-size: .8rem;
}

.pos-stepper__btn:active { background: var(--tp-latte-soft); }
.pos-stepper__qty { min-width: 2.2rem; text-align: center; font-weight: 700; }

.pos__totals { margin: 0; font-size: .88rem; }
.pos__totals > div { display: flex; justify-content: space-between; padding: .12rem 0; }
.pos__totals dt { font-weight: 500; color: var(--tp-muted); }
.pos__totals dd { margin: 0; font-weight: 600; }
.pos__totals .pos__grand { margin-top: .3rem; padding-top: .45rem; border-top: 1px solid var(--tp-line); font-size: 1.05rem; }
.pos__totals .pos__grand dt, .pos__totals .pos__grand dd { color: var(--tp-deep); font-weight: 800; }

.pos__submit { min-height: 3rem; font-size: 1rem; }
.pos__submit:disabled { opacity: .5; }

.pos__bar, .pos__backdrop { display: none; }

/* already-ordered lines on Add Menu */
.pos__ordered { font-size: .85rem; }
.pos__ordered-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
.pos__ordered-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.pos__ordered-row span:first-child { flex: 1; min-width: 0; }

@media (max-width: 991.98px) {
    .pos { grid-template-columns: minmax(0, 1fr) 19rem; }
}

@media (max-width: 767.98px) {
    .pos { display: block; }
    .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .pos-picker__search .form-control { min-height: 2.75rem; }

    /* keep the last tiles clear of the cart bar */
    .pos__products { padding-bottom: 4.5rem; }

    .pos__cart {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1046;
        max-height: 88vh;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(42, 30, 32, .25);
        transform: translateY(105%);
        transition: transform .28s cubic-bezier(.2, .8, .2, 1);
        visibility: hidden;
    }

    .pos.cart-open .pos__cart { transform: none; visibility: visible; }

    .pos__cart::before {
        content: "";
        display: block;
        width: 2.5rem;
        height: .3rem;
        margin: -.4rem auto 0;
        border-radius: 999px;
        background: var(--tp-line);
    }

    .pos__close { display: inline-flex; align-items: center; justify-content: center; }

    .pos__backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1045;
        background: rgba(36, 26, 28, .4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

    .pos.cart-open .pos__backdrop { opacity: 1; visibility: visible; }
    body.pos-sheet-open { overflow: hidden; }

    .pos__bar {
        display: flex;
        align-items: center;
        gap: .75rem;
        position: fixed;
        left: .75rem;
        right: .75rem;
        bottom: calc(4.6rem + env(safe-area-inset-bottom));
        z-index: 1034;
        min-height: 3.3rem;
        padding: .5rem 1rem;
        border: 0;
        border-radius: 14px;
        background: var(--tp-deep);
        color: var(--tp-foam);
        box-shadow: 0 10px 28px rgba(42, 30, 32, .35);
        font-size: .9rem;
        transform: translateY(150%);
        transition: transform .25s ease;
    }

    .pos.has-items .pos__bar { transform: none; }
    .pos__bar-count { display: flex; align-items: center; gap: .4rem; }
    .pos__bar-total { flex: 1; text-align: right; font-weight: 800; font-size: 1rem; }
    .pos__bar-cta { padding-left: .75rem; border-left: 1px solid rgba(255, 255, 255, .2); font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
    .pos__cart, .pos__bar, .pos__backdrop { transition: none; }
}

/* ------------------------------------------------- v2 UI components ---- */
/* resources/views/components/*.blade.php */

/* smooth page-to-page transitions (Chrome / Android WebView), no JS */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .18s; }
.mobile-topbar { view-transition-name: topbar; }
.bottom-nav { view-transition-name: bottomnav; }
.sidebar { view-transition-name: sidebar; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* flash toasts (includes/flash.blade.php) */
.flash-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: min(26rem, calc(100% - 2rem));
}

.flash-toast {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .8rem .9rem;
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    border: 1px solid var(--tp-line);
    border-left: 4px solid var(--tp-latte-600);
    box-shadow: var(--tp-shadow-lg);
    font-size: .9rem;
    color: var(--tp-ink);
    animation: flash-in .25s ease;
}

.flash-toast i { margin-top: .15rem; }
.flash-toast--success { border-left-color: #2E8B57; }
.flash-toast--success i { color: #2E8B57; }
.flash-toast--warning { border-left-color: #D08A1E; }
.flash-toast--warning i { color: #D08A1E; }
.flash-toast span { flex: 1; }
.flash-toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }

.flash-toast__close {
    border: 0;
    background: transparent;
    color: var(--tp-muted);
    font-size: 1.2rem;
    line-height: 1;
}

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

/* field */
.ui-field { margin-bottom: 1.1rem; }
.ui-field__label { display: block; margin-bottom: .35rem; }
.ui-field__req { color: #C0392B; margin-left: .15rem; }
.ui-field__hint { margin-top: .3rem; font-size: .78rem; color: var(--tp-muted); }
.ui-field__error { margin-top: .3rem; font-size: .8rem; font-weight: 600; color: #C0392B; }

/* money input */
.ui-money { position: relative; }
.ui-money__prefix {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--tp-muted);
    pointer-events: none;
}
.ui-money .ui-money__input { padding-left: 2.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* image upload */
.ui-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem;
    border: 2px dashed var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-latte-wash);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.ui-upload:hover { border-color: var(--tp-latte-600); }
.ui-upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ui-upload__img {
    width: 5.5rem;
    height: 5.5rem;
    flex: 0 0 5.5rem;
    object-fit: cover;
    border-radius: 10px;
    background: var(--tp-surface);
}
.ui-upload__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ui-upload__body i { font-size: 1.3rem; color: var(--tp-latte-600); }
.ui-upload.has-image .ui-upload__body i { display: none; }
.ui-upload__title { font-weight: 700; color: var(--tp-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-upload__hint { font-size: .78rem; color: var(--tp-muted); }

/* switch */
.ui-switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; user-select: none; }
.ui-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ui-switch__track {
    position: relative;
    width: 3rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--tp-line);
    transition: background-color .15s ease;
}
.ui-switch__thumb {
    position: absolute;
    top: .2rem;
    left: .2rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}
.ui-switch__input:checked + .ui-switch__track { background: #2E8B57; }
.ui-switch__input:checked + .ui-switch__track .ui-switch__thumb { transform: translateX(1.3rem); }
.ui-switch__input:focus-visible + .ui-switch__track { box-shadow: 0 0 0 3px rgba(184, 67, 92, .6); }
.ui-switch__label { font-weight: 600; color: var(--tp-deep); }

/* form actions */
.ui-actions {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tp-line);
}
.ui-actions__submit { min-width: 8rem; }

/* form card: a centered, readable column for create / edit pages */
.ui-form-card { max-width: 40rem; margin: 0 auto; }
.ui-form-card--wide { max-width: 58rem; }
form > div.ui-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.ui-form-section { margin: .5rem 0 .9rem; padding-top: .9rem; border-top: 1px solid var(--tp-line); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
.ui-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ui-crumb__parent { color: var(--tp-muted); text-decoration: none; font-weight: 600; }
.ui-crumb__parent:hover { color: var(--tp-deep); }
.ui-crumb__sep { font-size: .7em; color: var(--tp-muted); }
/* list pages */
.ui-list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ui-list-head__count {
    display: inline-block;
    margin-left: .4rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--tp-latte-soft);
    color: var(--tp-deep);
    font-size: .8rem;
    font-weight: 800;
    vertical-align: middle;
}
.ui-list-head__add { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.ui-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.ui-badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.ui-badge--on { background: #E3F2EA; color: #24714A; }
.ui-badge--off { background: #F6E8E4; color: var(--tp-muted); }
.ui-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-act { text-align: center; white-space: nowrap; }

.ui-thumb-cell { display: inline-flex; align-items: center; gap: .65rem; }
.ui-thumb { width: 2.6rem; height: 2.6rem; flex: 0 0 2.6rem; border-radius: 8px; object-fit: cover; background: var(--tp-latte-wash); }
.ui-role { display: inline-block; padding: .15rem .6rem; border-radius: 6px; font-size: .78rem; font-weight: 700; background: var(--tp-latte-wash); color: var(--tp-deep); }
.ui-role--admin { background: var(--tp-deep); color: #fff; }
.ui-role--cashier { background: var(--tp-latte-soft); }

/* delete confirmation */
.ui-confirm { padding: 1.5rem 1.25rem 1.25rem; text-align: center; border: 0; border-radius: 16px; }
.ui-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto .75rem;
    border-radius: 50%;
    background: #FBE9E7;
    color: #C0392B;
    font-size: 1.1rem;
}
.ui-confirm__title { font-weight: 800; font-size: 1.05rem; color: var(--tp-deep); overflow-wrap: anywhere; }
.ui-confirm__text { margin: .35rem 0 1.1rem; font-size: .85rem; color: var(--tp-muted); }
.ui-confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* deactivated staff, listed apart under the active team */
.ui-inactive__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1rem;
    border: 1px dashed var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-latte-wash);
    color: var(--tp-deep);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.ui-inactive__summary::-webkit-details-marker { display: none; }
.ui-inactive__chevron { margin-left: auto; font-size: .8rem; color: var(--tp-muted); transition: transform .15s ease; }
.ui-inactive[open] .ui-inactive__chevron { transform: rotate(180deg); }
.ui-inactive__summary > i { color: var(--tp-muted); }
.ui-inactive__hint { font-weight: 500; font-size: .8rem; color: var(--tp-muted); }
.ui-inactive__table td { color: var(--tp-muted); }

/* "berjalan" pill on figures that keep counting */
.ui-live { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border-radius: 999px; background: #E3F2EA; color: #24714A; font-size: .75rem; font-weight: 700; }
.ui-live__dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; animation: ui-live-pulse 1.6s ease-in-out infinite; }
@keyframes ui-live-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .ui-live__dot { animation: none; } }

/* daily cash drawer (cash/index, cash/history) */
.cash-date { display: flex; align-items: center; gap: .35rem; }
.cash-date .form-control { width: auto; min-width: 10.5rem; }
.cash-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border-radius: var(--tp-radius);
    background: var(--tp-latte-wash);
    border: 1px solid var(--tp-line);
    color: var(--tp-deep);
    font-size: .9rem;
}
.cash-banner > i { color: var(--tp-muted); }
.cash-banner--closed { background: #E3F2EA; border-color: #CBE6D6; }
.cash-banner--closed > i { color: #24714A; }

.cash-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .3rem; border-radius: 12px; background: var(--tp-latte-wash); }
.cash-toggle__opt {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 44px; margin: 0; border-radius: 9px;
    font-weight: 700; color: var(--tp-muted); cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.cash-toggle__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cash-toggle__opt.is-active { background: var(--tp-surface); color: var(--tp-deep); box-shadow: var(--tp-shadow-sm); }
.cash-toggle__opt:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(184, 67, 92, .3); }

.cash-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .45rem; }
.cash-cat { position: relative; margin: 0; cursor: pointer; }
.cash-cat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cash-cat__box {
    display: flex; align-items: center; gap: .5rem;
    min-height: 44px; padding: .5rem .7rem;
    border: 1.5px solid var(--tp-line); border-radius: 10px; background: var(--tp-surface);
    font-size: .85rem; font-weight: 600; color: var(--tp-deep);
    transition: border-color .15s ease, background-color .15s ease;
}
.cash-cat__box i { width: 1rem; text-align: center; color: var(--tp-latte-600); }
.cash-cat:hover .cash-cat__box { border-color: var(--tp-latte-600); }
.cash-cat input:checked + .cash-cat__box { border-color: var(--tp-caramel); background: var(--tp-latte-wash); box-shadow: inset 0 0 0 1px var(--tp-caramel); }
.cash-cat input:checked + .cash-cat__box i { color: var(--tp-caramel); }
.cash-cat input:focus-visible + .cash-cat__box { box-shadow: 0 0 0 3px rgba(184, 67, 92, .3); }

.cash-entry { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--tp-line); }
.cash-entry:last-child { border-bottom: 0; }
.cash-entry__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; flex: 0 0 2.4rem; border-radius: 10px; }
.cash-entry__icon.is-out { background: #FBE3DC; color: var(--tp-caramel); }
.cash-entry__icon.is-in { background: #E3F2EA; color: #24714A; }
.cash-entry__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cash-entry__amount { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-entry__amount.is-out { color: var(--tp-caramel-600); }
.cash-entry__amount.is-in { color: #24714A; }

.cash-close-row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-variant-numeric: tabular-nums; }
.cash-close-row--total { margin: .25rem 0 .75rem; padding-top: .6rem; border-top: 1px dashed var(--tp-line); font-size: 1.05rem; }

/* change password: whose account this is */
.account-who { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; padding: .8rem; border-radius: var(--tp-radius); background: var(--tp-latte-wash); }
.account-who__avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; flex: 0 0 2.6rem; border-radius: 50%; background: var(--tp-deep); color: var(--tp-crema); font-weight: 800; }

/* radio tiles (employee level, ...) */
.ui-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; }
.ui-choice { position: relative; margin: 0; cursor: pointer; }
.ui-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ui-choice__box {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    height: 100%;
    padding: .8rem .9rem;
    border: 1.5px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.ui-choice__box > i { color: var(--tp-latte-600); font-size: 1.1rem; margin-bottom: .2rem; }
.ui-choice__title { font-weight: 800; color: var(--tp-deep); }
.ui-choice__desc { font-size: .78rem; color: var(--tp-muted); line-height: 1.35; }
.ui-choice:hover .ui-choice__box { border-color: var(--tp-latte-600); }
.ui-choice > input:checked + .ui-choice__box { border-color: var(--tp-deep); background: var(--tp-latte-wash); box-shadow: inset 0 0 0 1px var(--tp-deep); }
.ui-choice > input:focus-visible + .ui-choice__box { box-shadow: 0 0 0 3px rgba(184, 67, 92, .6); }
.ui-suffix { position: relative; }
.ui-suffix > .form-control { padding-right: 2.4rem; }
.ui-suffix__text { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--tp-muted); pointer-events: none; }
.ui-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ui-form-grid > .ui-field--full { grid-column: 1 / -1; }

/* empty state */
.ui-empty { padding: 2.5rem 1rem; text-align: center; color: var(--tp-muted); }
.ui-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: .75rem;
    border-radius: 50%;
    background: var(--tp-latte-soft);
    color: var(--tp-deep-700);
    font-size: 1.4rem;
}
.ui-empty__title { font-weight: 700; color: var(--tp-deep); }
.ui-empty__text { margin-top: .25rem; font-size: .88rem; }

/* stat */
.ui-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.ui-stats--5 { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.ui-stats--5 .ui-stat { flex-direction: column; align-items: flex-start; gap: .55rem; }
.ui-stats--5 .ui-stat__value { font-size: clamp(1.05rem, 1.35vw, 1.3rem); }
/* six figures: three per row on wide screens */
@media (min-width: 992px) { .ui-stats--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ui-stat {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow-sm);
}
.ui-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 2.8rem;
    border-radius: 12px;
    background: var(--tp-latte-soft);
    color: var(--tp-deep);
    font-size: 1.1rem;
}
.ui-stat--deep .ui-stat__icon { background: var(--tp-deep); color: var(--tp-foam); }
.ui-stat--green .ui-stat__icon { background: #E3F2E9; color: #2E7D50; }
.ui-stat--amber .ui-stat__icon { background: #FBEFD9; color: #A8681A; }
.ui-stat__body { min-width: 0; }
.ui-stat__label { font-size: .78rem; font-weight: 600; color: var(--tp-muted); }
.ui-stat__value { font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 800; color: var(--tp-deep); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: normal; }
.ui-stat__hint { font-size: .78rem; color: var(--tp-muted); }

/* chips (report ranges, filters) */
.ui-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.ui-chip {
    padding: .45rem .95rem;
    border: 1px solid var(--tp-line);
    border-radius: 999px;
    background: var(--tp-surface);
    color: var(--tp-deep-700);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.ui-chip:hover { border-color: var(--tp-latte-600); color: var(--tp-deep); }
.ui-chip.is-active { background: var(--tp-deep); border-color: var(--tp-deep); color: var(--tp-foam); }

/* chart box */
.ui-chart { position: relative; height: 16rem; }

@media (max-width: 767.98px) {
    .flash-stack { top: calc(4rem + env(safe-area-inset-top)); left: .75rem; right: .75rem; max-width: none; }
    .ui-form-grid { grid-template-columns: 1fr; }
    .ui-stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .ui-stat { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .85rem; }
    .ui-stat__value { font-size: 1.1rem; }
    .ui-chart { height: 13rem; }

    /* save button stays reachable above the bottom bar */
    .ui-actions {
        position: sticky;
        bottom: calc(4.4rem + env(safe-area-inset-bottom));
        z-index: 5;
        margin: 1.25rem -.9rem -1rem;
        padding: .75rem .9rem;
        background: var(--tp-surface);
        box-shadow: 0 -6px 16px rgba(46, 34, 36, .06);
    }
    .ui-actions .btn { flex: 1; }
}

/* dashboard (home.blade.php) */
.dash-hello {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.dash-hello__greet { font-size: 1.3rem; font-weight: 800; color: var(--tp-deep); letter-spacing: -.02em; }
.dash-hello__date { color: var(--tp-muted); font-size: .9rem; }
.dash-hello__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
.dash-grid > .card { margin: 0; }
.dash-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.1rem;
    border-bottom: 1px solid var(--tp-line);
    font-size: .9rem;
}
.dash-row:last-child { border-bottom: 0; }
.dash-row__main { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dash-row__meta { color: var(--tp-muted); font-size: .8rem; white-space: nowrap; }
.dash-row__value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-rank, .dash-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    flex: 0 0 1.9rem;
    border-radius: 50%;
    background: var(--tp-latte-soft);
    color: var(--tp-deep);
    font-weight: 800;
    font-size: .8rem;
}
.dash-avatar { background: var(--tp-deep); color: var(--tp-foam); }

@media (max-width: 991.98px) {
    .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .dash-hello__greet { font-size: 1.1rem; }
    .dash-hello__actions { width: 100%; }
    .dash-hello__actions .btn { flex: 1; }
}

/* -------------------------------------------- customer (table QR) ----- */
/* layouts/customer.blade.php and resources/views/dashboard/* */

.cust-body { background: var(--tp-canvas); min-height: 100vh; }

.cust-top {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: calc(.7rem + env(safe-area-inset-top)) 1rem .7rem;
    background: var(--tp-deep);
    color: var(--tp-foam);
    box-shadow: 0 2px 10px rgba(42, 30, 32, .2);
}

.cust-top__name { flex: 1; min-width: 0; }
.cust-top__store { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-top__city { font-size: .78rem; opacity: .75; }
.cust-top__table {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-weight: 700;
    font-size: .85rem;
    white-space: nowrap;
}

.cust-main { max-width: 64rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.cust-panel { max-width: 34rem; margin: 0 auto; }

.cust-intro { margin-bottom: 1rem; }
.cust-intro__title { font-size: 1.45rem; font-weight: 800; color: var(--tp-deep); letter-spacing: -.02em; margin: 0 0 .2rem; }
.cust-intro__text { color: var(--tp-muted); margin: 0; }
.cust-back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .6rem; font-weight: 600; color: var(--tp-deep-700); }
.cust-note { margin: .2rem 0 0; font-size: .8rem; color: var(--tp-muted); }

.cust-status { padding: 1.5rem 0 1.25rem; text-align: center; }
.cust-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: .9rem;
    border-radius: 50%;
    font-size: 1.8rem;
}
.cust-status__icon--ok { background: #E3F2E9; color: #2E7D50; }
.cust-status__icon--wait { background: var(--tp-foam-soft); color: var(--tp-deep); animation: cust-pulse 1.8s ease-in-out infinite; }
.cust-status__title { font-size: 1.4rem; font-weight: 800; color: var(--tp-deep); margin: 0 0 .3rem; }
.cust-status__text { color: var(--tp-muted); margin: 0; }

@keyframes cust-pulse {
    50% { box-shadow: 0 0 0 12px rgba(246, 221, 184, .5); }
}

.cust-actions { display: flex; gap: .6rem; margin: 1.25rem 0 .5rem; }
.cust-actions .btn { flex: 1; min-height: 3rem; }

.cust-bill__row {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .65rem 1.1rem;
    border-bottom: 1px dashed var(--tp-line);
}
.cust-bill__qty { min-width: 2rem; font-weight: 700; color: var(--tp-deep-700); }
.cust-bill__name { flex: 1; min-width: 0; }
.cust-bill__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cust-bill__totals { padding: .75rem 1.1rem 1rem; }
.cust-bill__totals > div { display: flex; justify-content: space-between; padding: .15rem 0; color: var(--tp-muted); }
.cust-bill__totals .cust-bill__grand { margin-top: .4rem; padding-top: .55rem; border-top: 1px solid var(--tp-line); color: var(--tp-deep); font-weight: 800; font-size: 1.1rem; }

.cust-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.cust-list__item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    color: var(--tp-ink);
    box-shadow: var(--tp-shadow-sm);
}
.cust-list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cust-list__title { font-weight: 700; color: var(--tp-deep); }
.cust-list__sub { font-size: .82rem; color: var(--tp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-list__item > i { color: var(--tp-muted); }

.cust-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .75rem; }
.cust-tables__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    aspect-ratio: 1;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    color: var(--tp-deep);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: var(--tp-shadow-sm);
}
.cust-tables__item i { color: var(--tp-latte-600); font-size: 1.2rem; }

@media (max-width: 767.98px) {
    /* no bottom navigation on customer pages */
    body.cust-body { padding-bottom: env(safe-area-inset-bottom); }
    .pos--customer .pos__bar { bottom: calc(1rem + env(safe-area-inset-bottom)); }
    .cust-main { padding: 1rem .85rem 1.5rem; }
    .cust-intro__title { font-size: 1.25rem; }
}

/* Alpine: hide x-cloak'd blocks until Alpine has started */
[x-cloak] { display: none !important; }

/* cashier payment (cart/payment.blade.php, cart/confirm.blade.php) */
.pay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 1.25rem; align-items: start; }
.pay > .card { margin: 0; }
.pay__panel { position: sticky; top: 1rem; }
.pay__due {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border-radius: var(--tp-radius);
    background: var(--tp-deep);
    color: var(--tp-foam);
}
.pay__due strong { font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay__methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.pay__method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .75rem .4rem;
    border: 1.5px solid var(--tp-line);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    color: var(--tp-deep-700);
    font-size: .85rem;
    font-weight: 700;
}
.pay__method i { font-size: 1.15rem; color: var(--tp-latte-600); }
.pay__method.is-active { border-color: var(--tp-deep); background: var(--tp-latte-wash); color: var(--tp-deep); box-shadow: 0 0 0 2px var(--tp-latte-soft); }
.pay__method.is-active i { color: var(--tp-deep); }
.pay__amount { font-size: 1.35rem !important; min-height: 3.2rem; }
.pay__quick { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }
.pay__quick .ui-chip { border: 1px solid var(--tp-line); }
.pay__change {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .8rem 1rem;
    border-radius: var(--tp-radius);
    background: #E3F2E9;
    color: #22603E;
    font-weight: 600;
}
.pay__change strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.pay__change.is-short { background: #FBE7E4; color: #A23A2C; }
.pay__hint { color: var(--tp-muted); font-size: .88rem; margin: 0; }
.pay__submit { min-height: 3.2rem; font-size: 1.05rem; }
.pay__summary > div { display: flex; justify-content: space-between; padding: .4rem 0; }
.pay__summary > div span { color: var(--tp-muted); }
.pay__summary-change { margin-top: .3rem; padding-top: .7rem !important; border-top: 1px solid var(--tp-line); font-size: 1.25rem; }
.pay__summary-change strong { color: #22603E; }

@media (max-width: 991.98px) {
    .pay { grid-template-columns: 1fr; }
    .pay__panel { position: static; }
}

/* reports */
.report-filter .card-body { display: flex; flex-direction: column; gap: .75rem; }
.report-filter__custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.report-filter__custom > div { flex: 1 1 9rem; }
.report-filter__label { font-size: .85rem; color: var(--tp-muted); }
@media (max-width: 767.98px) {
    .report-filter .ui-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
    .report-filter .ui-chip { flex: 0 0 auto; }
}

/* warm the Bootstrap neutrals (light buttons, dark badges, pagination) */
.btn-light {
    --bs-btn-color: var(--tp-deep);
    --bs-btn-bg: var(--tp-surface);
    --bs-btn-border-color: var(--tp-line);
    --bs-btn-hover-color: var(--tp-deep);
    --bs-btn-hover-bg: var(--tp-latte-wash);
    --bs-btn-hover-border-color: var(--tp-latte);
    --bs-btn-active-bg: var(--tp-latte-soft);
    --bs-btn-active-border-color: var(--tp-latte);
}
.btn-light.border { border-color: var(--tp-line) !important; }
.badge.bg-dark, .badge.text-bg-dark { background-color: var(--tp-deep) !important; }
.pagination {
    --bs-pagination-color: var(--tp-deep-700);
    --bs-pagination-bg: var(--tp-surface);
    --bs-pagination-border-color: var(--tp-line);
    --bs-pagination-hover-color: var(--tp-deep);
    --bs-pagination-hover-bg: var(--tp-latte-wash);
    --bs-pagination-hover-border-color: var(--tp-line);
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(184, 67, 92, .25);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--tp-caramel);
    --bs-pagination-active-border-color: var(--tp-caramel);
    --bs-pagination-disabled-color: #BBA593;
    --bs-pagination-disabled-bg: var(--tp-latte-wash);
    --bs-pagination-disabled-border-color: var(--tp-line);
}
.dataTables_wrapper .page-item.active .page-link { color: #fff; background-color: var(--tp-caramel); border-color: var(--tp-caramel); }

/* tablet (iPad portrait and landscape): the POS screen needs the width more
   than the menu labels, so there the sidebar folds into an icon rail. Other
   pages keep the full sidebar (and its Library submenu). */
@media (min-width: 768px) and (max-width: 1199.98px) {
    body:has(form.pos) .sidebar { --tp-sidebar-w: 4.6rem; }
    body:has(form.pos) .sidebar .nav-link span {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    body:has(form.pos) .sidebar .sidebar-heading,
    body:has(form.pos) .sidebar .sidebar-brand-text,
    body:has(form.pos) .sidebar .collapse-inner { display: none; }
    body:has(form.pos) .sidebar .nav-link { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
    body:has(form.pos) #content > .container-fluid { padding: 1.25rem 1.1rem 2rem; }
    .pos { gap: 1rem; }
    .pos-tile__img { aspect-ratio: 16 / 11; }
}

/* touch screens: 44px tap targets where the cashier works */
@media (pointer: coarse) {
    .pos-chip,
    .ui-chip { min-height: 44px; }
    .pos .btn,
    .pay .btn,
    .ui-form-card .btn,
    .ui-list-head .btn,
    .pos .form-control,
    .pay .form-control,
    .ui-form-card .form-control,
    .ui-form-card .form-select { min-height: 44px; }
    #sidebarToggle { width: 2.75rem; height: 2.75rem; }
}

/* ------------------------------------------------- phone / app shell ---- */

html { -webkit-tap-highlight-color: transparent; }

.bottom-nav,
.page-progress { display: none; }

/* app-wide toast (app-shell.js) */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(5.5rem + env(safe-area-inset-bottom));
    z-index: 1090;
    max-width: calc(100% - 2rem);
    padding: .75rem 1rem;
    border-radius: var(--tp-radius);
    background: var(--tp-ink);
    color: #fff;
    font-size: .88rem;
    box-shadow: var(--tp-shadow-lg);
    transform: translate(-50%, 1rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* thin bar at the very top while the next page loads */
.page-progress {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    height: 3px;
    width: 0;
    background: var(--tp-foam-600);
    box-shadow: 0 0 6px rgba(243, 181, 166, .8);
    opacity: 0;
}

.page-progress.is-loading {
    opacity: 1;
    animation: page-progress 8s cubic-bezier(.1, .7, .2, 1) forwards;
}

@keyframes page-progress {
    from { width: 0; }
    to { width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
    .page-progress.is-loading { animation: none; width: 92%; }
}

@media (max-width: 767.98px) {
    /* the drawer is opened from the bottom bar now */
    .mobile-topbar__toggle { display: none; }

    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1035;
        padding: .3rem .4rem calc(.3rem + env(safe-area-inset-bottom));
        background: var(--tp-surface);
        border-top: 1px solid var(--tp-line);
        box-shadow: 0 -4px 16px rgba(46, 34, 36, .08);
    }

    .bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .2rem;
        min-height: 3.4rem;
        padding: .3rem 0;
        border: 0;
        border-radius: var(--tp-radius);
        background: transparent;
        color: var(--tp-muted);
        font-size: .68rem;
        font-weight: 600;
        line-height: 1.1;
        text-decoration: none;
    }

    .bottom-nav__item i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 3.2rem;
        height: 1.9rem;
        border-radius: 999px;
        font-size: 1.05rem;
        transition: background-color .15s ease, color .15s ease;
    }

    .bottom-nav__item.is-active { color: var(--tp-deep); }
    .bottom-nav__item.is-active i { background: var(--tp-latte-soft); color: var(--tp-deep); }
    .bottom-nav__item:active i { background: var(--tp-latte-soft); }

    /* keep content clear of the bottom bar */
    body { padding-bottom: calc(4.3rem + env(safe-area-inset-bottom)); }
    body:has(.card-header.bg-benkbenk > .btn-icon:only-child) {
        padding-bottom: calc(8.5rem + env(safe-area-inset-bottom));
    }
    .employee-body { padding-bottom: calc(4.3rem + env(safe-area-inset-bottom)); }

    /* barista screen: same espresso title bar; POS and logout are in the
       bottom bar already */
    .employee-topbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        background: var(--tp-deep);
        border-bottom: 0;
        padding-top: env(safe-area-inset-top);
        box-shadow: 0 2px 8px rgba(42, 30, 32, .18);
    }
    .employee-topbar .btn { display: none; }
    .employee-topbar__inner { padding: .6rem 1rem; }
    .employee-topbar__logo { height: 30px; }

    /* the drawer sits above the bottom bar and clears the status bar */
    .sidebar { padding-top: env(safe-area-inset-top); }

    /* page content: tighter, app-like spacing */
    #content > .container-fluid { padding: 1rem .85rem 1.5rem; }

    #content h3.text-benkbenk,
    #content h4.text-benkbenk {
        font-size: 1.2rem;
        margin-bottom: .5rem !important;
    }

    #content > .container-fluid > hr { margin: .5rem 0 .9rem; }

    /* the title bar already shows the page heading */
    #content > .container-fluid > .page-heading,
    #content > .container-fluid > .page-heading + hr { display: none; }

    /* a card header holding only the Create button becomes a floating
       action button above the bottom bar */
    .card-header.bg-benkbenk:has(> .btn-icon:only-child) {
        padding: 0;
        min-height: 0;
        border: 0;
        background: transparent !important;
    }
    .card-header.bg-benkbenk > .btn-icon:only-child {
        position: fixed;
        right: 1rem;
        bottom: calc(5.2rem + env(safe-area-inset-bottom));
        z-index: 1034;
        width: 3.5rem;
        height: 3.5rem !important;
        border-radius: 18px;
        font-size: 1.3rem;
        background: var(--tp-deep);
        border-color: var(--tp-deep);
        color: var(--tp-foam);
        box-shadow: 0 8px 24px rgba(42, 30, 32, .35);
    }

    /* denser table cards */
    .table-stack > tbody > tr > td,
    .table-stack > tbody > tr > th {
        min-height: 0;
        padding-top: .45rem !important;
        padding-bottom: .45rem !important;
    }
    .table-stack [data-label]::before { top: .5rem; }

    /* action cells: icon buttons in one tidy right-aligned row */
    .table-stack > tbody > tr > td:has(> .btn-icon),
    .table-stack > tbody > tr > th:has(> .btn-icon) {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: .4rem;
        padding-left: 5.5rem !important;
    }
    .table-stack td > .btn.btn-icon,
    .table-stack th > .btn.btn-icon { margin: 0 !important; }
    .table-stack > tbody > tr { margin-bottom: .6rem; }

    .card-header { padding: .7rem .9rem; }
    .card-body { padding: 1rem .9rem; }

    /* comfortable touch targets; 16px inputs stop zoom-on-focus */
    .btn { --bs-btn-padding-y: .55rem; }
    .form-control,
    .form-select { font-size: 16px; min-height: 2.75rem; }
    .btn.btn-icon { width: 2.5rem; height: 2.5rem !important; }

    /* DataTables: page size and "Showing x of y" are noise on a phone */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_info { display: none !important; }
    .dataTables_wrapper .dataTables_paginate { margin-top: .5rem; }

    /* modals become bottom sheets */
    .modal-dialog {
        margin: auto 0 0;
        max-width: none;
        min-height: 100%;
        display: flex;
        align-items: flex-end;
    }
    .modal.fade .modal-dialog { transform: translateY(100%); }
    .modal.show .modal-dialog { transform: none; }
    .modal-content {
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .modal-content::before {
        content: "";
        display: block;
        width: 2.5rem;
        height: .3rem;
        margin: .6rem auto .2rem;
        border-radius: 999px;
        background: var(--tp-line);
    }
}

/* inside the Android app: printing and file exports are not available */
.in-app .dt-buttons { display: none !important; }

/* text selection and the long-press callout feel like a web page; keep
   them for inputs and table data only */
.in-app body { -webkit-user-select: none; user-select: none; }
.in-app input, .in-app textarea, .in-app td, .in-app [contenteditable] { -webkit-user-select: text; user-select: text; }

@media print {
    .sidebar, .topbar, .btn, .dt-buttons { display: none !important; }
    #content > .container-fluid { padding: 0; }
    .card, .table-responsive { border: none; box-shadow: none; }
}
