/* Table Service (staff/tablet) - operator brand palette, premium touch-first cards. */

.staff-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #1E40AF 0%, #0F172A 55%, #0B1220 100%);
    padding: 24px;
}

.staff-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.staff-login__card {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.staff-login__mark {
    border-radius: 12px;
    margin-bottom: 8px;
}

.staff-login__title {
    font-weight: 800;
}

.staff-login__subtitle {
    color: #64748B;
    margin-bottom: 20px;
}

.staff-login__alert {
    width: 100%;
    margin-bottom: 12px;
    text-align: left;
}

.staff-login__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.staff-login__submit {
    height: 52px;
    font-size: 1rem;
    border-radius: 14px !important;
}

.staff-login__hint {
    color: #94A3B8;
    margin-top: 20px;
}

/* App shell */

.staff-layout {
    min-height: 100vh;
    background: #F1F5F9;
}

.staff-appbar {
    padding-inline: 20px;
}

.staff-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-brand__mark {
    border-radius: 8px;
}

.staff-brand__stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.staff-brand__title {
    font-weight: 800;
    font-size: 1.05rem;
}

.staff-brand__subtitle {
    font-size: .72rem;
    opacity: .8;
}

.staff-operator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 8px;
}

.staff-operator__avatar {
    font-weight: 700;
}

.staff-operator__stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.staff-operator__name {
    font-weight: 700;
    font-size: .88rem;
}

.staff-operator__role {
    font-size: .72rem;
    opacity: .8;
}

.staff-main {
    padding: 20px clamp(16px, 3vw, 40px) 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.staff-page-loading {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-page--centered {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-not-authorized {
    max-width: 480px;
}

.staff-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #FFFFFF;
    border: 1px solid #EEF2F7;
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.staff-page__header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-page__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-page__title {
    font-weight: 800;
}

.staff-page__total-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
    font-weight: 800;
    font-size: .8rem;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.staff-page__updated {
    display: flex;
    align-items: center;
    gap: 6px;
}

.staff-page__header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-page__collections-btn {
    border-radius: 12px !important;
    height: 44px;
}

.staff-page__refresh {
    background: #F1F5F9 !important;
    color: #2563EB !important;
    border-radius: 12px !important;
}

.staff-muted {
    color: #64748B;
}

.staff-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.staff-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #334155;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}

.staff-status-pill:active {
    transform: scale(0.96);
}

.staff-status-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.staff-status-pill__dot--free { background: #16A34A; }
.staff-status-pill__dot--occupied { background: #2563EB; }
.staff-status-pill__dot--reserved { background: #D97706; }
.staff-status-pill__dot--dirty { background: #DC2626; }

.staff-status-pill__count {
    opacity: .65;
    font-weight: 800;
}

.staff-status-pill--active.staff-status-pill--all {
    background: #0F172A;
    border-color: #0F172A;
    color: #FFFFFF;
}

.staff-status-pill--active.staff-status-pill--free {
    background: #DCFCE7;
    border-color: #16A34A;
    color: #14532D;
}

.staff-status-pill--active.staff-status-pill--occupied {
    background: #DBEAFE;
    border-color: #2563EB;
    color: #1E3A8A;
}

.staff-status-pill--active.staff-status-pill--reserved {
    background: #FEF3C7;
    border-color: #D97706;
    color: #78350F;
}

.staff-status-pill--active.staff-status-pill--dirty {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #7F1D1D;
}

.staff-filters__search {
    max-width: 280px;
}

.staff-filters__search .mud-input-outlined-border {
    border-radius: 14px !important;
}

.staff-empty-state {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #94A3B8;
}

.staff-zone {
    margin-top: 20px;
}

.staff-zone__title {
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

.staff-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.table-card-skeleton {
    border-radius: 16px !important;
}

/* Table cards */

.table-card {
    border-radius: 18px !important;
    cursor: pointer;
    border-left: 6px solid transparent;
    min-height: 150px;
    /* A table can host several concurrent parties (each renders its own .table-card__order
       block) - cap the card and let its own content scroll instead of growing unbounded and
       breaking row alignment with shorter sibling cards in the same grid row. */
    max-height: 420px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.table-card:focus-within {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.table-card--free {
    border-left-color: #16A34A;
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.05) 0%, #FFFFFF 90px);
}

.table-card--occupied {
    border-left-color: #2563EB;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, #FFFFFF 90px);
}

.table-card--reserved {
    border-left-color: #D97706;
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.05) 0%, #FFFFFF 90px);
}

.table-card--dirty {
    border-left-color: #DC2626;
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.05) 0%, #FFFFFF 90px);
}

.table-card__content {
    padding: 16px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    overflow-y: auto;
}

.table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.table-card__name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0F172A;
}

.table-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #64748B;
    font-size: .82rem;
}

.table-card__capacity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.table-card__order {
    background: #F8FAFC;
    border: 1px solid #EDF1F7;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-card__order-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-weight: 700;
    color: #0F172A;
}

.table-card__order-number {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 600;
    color: #64748B;
}

.table-card__order-total {
    flex-shrink: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--iph-operator-primary-dark, #1D4ED8);
}

.table-card__lines {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.table-card__line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-card__line-qty {
    flex-shrink: 0;
    min-width: 28px;
    text-align: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--iph-operator-primary, #2563EB);
    color: #FFFFFF;
    font-size: .72rem;
    font-weight: 800;
}

.table-card__line-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .85rem;
    font-weight: 600;
    color: #1E293B;
}

.table-card__more {
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 700;
    color: var(--iph-operator-primary-dark, #1D4ED8);
    background: rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    padding: 2px 8px;
}

.table-card__staff {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--iph-operator-accent, #0D9488);
    margin-top: 2px;
}

.table-card__empty {
    color: #94A3B8;
    font-size: .85rem;
    font-style: italic;
}

.table-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.table-card__action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    color: #334155;
    font-weight: 700;
    font-size: .84rem;
    cursor: pointer;
}

.table-card__action-btn:active {
    background: #F1F5F9;
}

.table-card__action-btn--primary {
    border: none;
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.30);
}

.table-card__action-btn--primary:active {
    background: linear-gradient(135deg, #15803D 0%, #166534 100%);
}

.table-card__action-btn--danger {
    grid-column: 1 / -1;
    border-color: #FCA5A5;
    background: #FEF2F2;
    color: #B91C1C;
}

.table-card__action-btn--danger:active {
    background: #FEE2E2;
}

/* Status chips */

.table-status-chip {
    font-weight: 700 !important;
    color: #FFFFFF !important;
}

.table-status-chip--free { background: #16A34A !important; }
.table-status-chip--occupied { background: #2563EB !important; }
.table-status-chip--reserved { background: #D97706 !important; }
.table-status-chip--dirty { background: #DC2626 !important; }
.table-status-chip--unknown { background: #94A3B8 !important; }

/* Table detail dialog */

.table-detail__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.table-detail__meta {
    display: flex;
    gap: 18px;
    color: #64748B;
    font-size: .85rem;
}

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

.table-detail__order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-detail__lines {
    margin-top: 8px;
}

/* Table order builder (Phase 2) */

.table-order__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.table-order__header > div {
    flex: 1;
}

.table-order__guests {
    max-width: 220px;
    margin-bottom: 12px;
}

.table-order__seat {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.table-order__seat-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(37, 99, 235, 0.08), transparent 60%),
        linear-gradient(160deg, #ffffff 0%, #f7faff 100%);
    border: 1px solid #E2E8F0;
    border-radius: 22px;
    padding: 40px 32px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.table-order__seat-field {
    text-align: left;
    margin-bottom: 14px;
}

.table-order__add-cta-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-order__add-cta-title {
    font-weight: 800;
    color: #0F172A;
}

.table-order__add-cta-hint {
    margin: 6px 0 20px;
}

.table-order__add-cta-button {
    border-radius: 14px !important;
    height: 52px;
    padding-inline: 28px !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.table-order__cart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.table-order__cart-title {
    font-weight: 800;
    margin: 0;
}

.table-order__cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 12px;
    color: #94A3B8;
    text-align: center;
}

.table-order__send {
    border-radius: 14px !important;
    height: 52px;
    margin-top: 14px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.cart-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
}

.cart-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px;
    border-radius: 14px;
    background: #F8FAFC;
    border: 1px solid #EEF2F7;
}

.cart-line__info {
    display: flex;
    flex-direction: column;
}

.cart-line__name {
    font-weight: 700;
    font-size: .96rem;
    color: #0F172A;
}

.cart-line__mods {
    font-size: .78rem;
    color: #64748B;
}

.cart-line__controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cart-line__stepper-btn {
    color: #2563EB !important;
}

.cart-line__stepper-btn .mud-icon-root {
    font-size: 1.6rem !important;
}

.cart-line__remove-btn {
    color: #94A3B8 !important;
    margin-left: 4px;
}

.cart-line__qty {
    min-width: 26px;
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem;
}

.cart-line__total {
    margin-left: auto;
    font-weight: 800;
    font-size: .95rem;
    color: #0F172A;
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #0F172A;
    color: #CBD5E1;
}

.cart-summary__total {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 800;
}

/* Modifier selection dialog */

.modifier-dialog {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 280px;
}

.modifier-group__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.modifier-dialog__qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modifier-dialog__stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modifier-dialog__qty-value {
    min-width: 24px;
    text-align: center;
}

/* Product quantity dialog (tap a grid tile -> set qty -> add) */

.product-search-dialog__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-dialog .mud-dialog {
    min-width: 340px;
    width: 400px;
    max-width: 90vw;
}

.qty-dialog__body {
    text-align: center;
    padding-top: 4px;
}

.product-search__thumb--lg {
    width: 108px;
    height: 108px;
    border-radius: 22px;
    margin: 0 auto 16px;
    border: 2px solid var(--iph-operator-accent, #0D9488);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
    background: linear-gradient(160deg, #EFF6FF 0%, #F0FDFA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #94A3B8;
}

.product-search__thumb--lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-search__detail-price {
    color: var(--iph-operator-primary-dark, #1D4ED8);
    margin-bottom: 22px;
}

.product-search__qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.product-search__qty-label {
    color: #64748B;
}

.product-search__stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.product-search__stepper-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--iph-operator-primary, #2563EB) 0%, var(--iph-operator-primary-dark, #1D4ED8) 100%);
    color: var(--iph-operator-on-primary, #FFFFFF);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.30);
}

.product-search__stepper-btn:active {
    background: linear-gradient(135deg, var(--iph-operator-primary-dark, #1D4ED8) 0%, #1E3A8A 100%);
}

.product-search__stepper-btn:disabled {
    background: #CBD5E1;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
}

.product-search__qty-input {
    width: 64px;
    height: 50px;
    border: 2px solid var(--iph-operator-accent, #0D9488);
    border-radius: 16px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--iph-operator-text, #0F172A);
    background: #F0FDFA;
    -moz-appearance: textfield;
}

.product-search__qty-input::-webkit-outer-spin-button,
.product-search__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-search__qty-input:focus {
    outline: none;
    border-color: var(--iph-operator-primary, #2563EB);
    background: #FFFFFF;
}

.product-search__customize-hint {
    display: block;
    margin-top: 16px;
    color: #94A3B8;
}

.product-search__cancel {
    min-height: 52px;
    padding-inline: 20px !important;
    color: var(--iph-operator-muted, #64748B) !important;
}

.product-search__confirm {
    min-height: 52px;
    border-radius: 14px !important;
    padding-inline: 24px !important;
    background: linear-gradient(135deg, var(--iph-operator-primary, #2563EB) 0%, var(--iph-operator-primary-dark, #1D4ED8) 100%) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

/* Touch category/product grid (table order builder) */

.grid-shell {
    position: relative;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
    min-height: 60vh;
}

.grid-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid #E2E8F0;
    padding-right: 16px;
}

.grid-rail__header {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #94A3B8;
    margin-bottom: 4px;
}

.grid-rail__skeleton, .grid-rail__empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grid-category-skeleton {
    border-radius: 16px !important;
}

.grid-category {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 84px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}

.grid-category:active {
    transform: scale(0.98);
}

.grid-category--active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

.grid-category__thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #94A3B8;
    flex-shrink: 0;
}

.grid-category__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-category__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.grid-category__title {
    font-weight: 700;
    font-size: .96rem;
    color: #0F172A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-category__count {
    font-size: .78rem;
    color: #94A3B8;
}

.grid-stage {
    min-width: 0;
}

.grid-stage__header {
    margin-bottom: 16px;
}

.grid-stage__title {
    font-weight: 800;
    color: #0F172A;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
}

.grid-product-skeleton {
    border-radius: 20px !important;
}

.grid-product {
    position: relative;
    height: 220px;
    border-radius: 20px;
    border: none;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: linear-gradient(160deg, #64748B 0%, #475569 100%);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
    transition: transform .12s ease, box-shadow .12s ease;
}

.grid-product:active {
    transform: scale(0.97);
}

.grid-product:hover {
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.grid-product:disabled {
    cursor: not-allowed;
    opacity: .75;
}

.grid-product__image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.grid-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-product__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.82) 100%);
    pointer-events: none;
}

.grid-product__add {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.grid-product__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 800;
    color: #FFFFFF;
}

.grid-product__badge--oos {
    background: #DC2626;
}

.grid-product__text {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.grid-product__name {
    font-weight: 700;
    font-size: .95rem;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-product__price {
    align-self: flex-start;
    font-weight: 800;
    font-size: .88rem;
    color: #FFFFFF;
    background: rgba(37, 99, 235, 0.9);
    padding: 3px 9px;
    border-radius: 8px;
}

.grid-pager {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.grid-cart-fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    background: #2563EB;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.4);
    transition: transform .1s ease, background .1s ease;
    z-index: 20;
}

.grid-cart-fab:active {
    transform: scale(0.94);
}

.grid-cart-fab:hover {
    background: #1D4ED8;
}

.grid-cart-fab .mud-icon-root {
    font-size: 1.9rem;
}

.grid-cart-fab__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 999px;
    background: #DC2626;
    color: #FFFFFF;
    font-size: .78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.grid-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    justify-content: flex-end;
}

.grid-cart-scrim {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.grid-cart-panel {
    position: relative;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -18px 0 44px rgba(15, 23, 42, 0.22);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.grid-cart-panel__close {
    margin-left: auto;
}

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

    .grid-rail {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
        padding-right: 0;
        padding-bottom: 16px;
    }

    .grid-category {
        width: auto;
        flex: 1 1 220px;
    }
}

@media (max-width: 600px) {
    .staff-table-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .staff-main {
        padding: 14px 12px 32px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Order items / invoice / collections dialogs */

.order-items, .invoice-dialog__body, .collections-dialog__body {
    min-width: 420px;
    max-width: 100%;
}

.order-items__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.order-items__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #F8FAFC;
    border: 1px solid #EEF2F7;
}

.order-items__row-qty {
    flex-shrink: 0;
    min-width: 32px;
    font-weight: 800;
    color: #2563EB;
}

.order-items__row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.order-items__row-name {
    font-weight: 700;
    color: #0F172A;
}

.order-items__row-mods {
    font-size: .78rem;
    color: #64748B;
}

.order-items__row-note {
    font-size: .78rem;
    color: #94A3B8;
    font-style: italic;
}

.order-items__row-price {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.order-items__row-unit {
    font-size: .74rem;
    color: #94A3B8;
}

.order-items__row-total {
    font-weight: 800;
    color: #0F172A;
}

.order-items__summary {
    border-top: 1px solid #EEF2F7;
    padding-top: 12px;
}

.order-items__summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-weight: 700;
    color: #334155;
}

.order-items__summary-row--muted {
    font-weight: 500;
    color: #94A3B8;
    font-size: .85rem;
}

.order-items__summary-row--total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #EEF2F7;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0F172A;
}

.invoice-dialog__breakdown {
    padding: 2px 4px;
    margin-bottom: 10px;
}

.invoice-dialog__breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748B;
    font-size: 0.88rem;
    padding: 3px 0;
}

.invoice-dialog__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0F172A;
    color: #CBD5E1;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    font-weight: 700;
}

.invoice-dialog__total-value {
    color: #FFFFFF;
    font-size: 1.4rem;
    font-weight: 800;
}

.invoice-dialog__label {
    color: #64748B;
    margin-bottom: 8px;
}

.invoice-dialog__amount-input {
    width: 100%;
    height: 64px;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0F172A;
    background: #F8FAFC;
    margin-bottom: 12px;
}

.invoice-dialog__amount-input:focus {
    outline: none;
    border-color: #2563EB;
    background: #FFFFFF;
}

.invoice-dialog__quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.invoice-dialog__quick-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #2563EB;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
}

.invoice-dialog__quick-btn:active {
    transform: scale(0.96);
}

.invoice-dialog__change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    font-weight: 700;
    color: #065F46;
}

.invoice-dialog__change-value {
    font-size: 1.15rem;
    font-weight: 800;
}

.collections-dialog__hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    margin-bottom: 14px;
}

.collections-dialog__summary {
    border-top: 1px solid #EEF2F7;
    padding-top: 12px;
}

@media (max-width: 520px) {
    .order-items, .invoice-dialog__body, .collections-dialog__body {
        min-width: 0;
    }
}
