/* Restaurant touch POS */
.restaurant-pos-shell {
    min-height: calc(100vh - 8rem);
}

.restaurant-pos-toolbar,
.restaurant-pos-tables,
.restaurant-pos-menu,
.restaurant-pos-ticket {
    border: 1px solid var(--rz-border-color, #e0e0e0);
    border-radius: .75rem;
    background: var(--rz-base-50, #f8f9fa);
}

.restaurant-pos-toolbar {
    padding: .75rem;
}

.restaurant-pos-summary-card {
    border: 1px solid var(--rz-border-color, #e0e0e0);
    background: var(--rz-base-50, #f8f9fa);
    min-height: 4.5rem;
}

.restaurant-pos-grid {
    display: grid;
    grid-template-columns: minmax(12rem, .8fr) minmax(20rem, 1.5fr) minmax(20rem, 1.15fr);
    gap: .75rem;
    align-items: start;
}

.restaurant-pos-tables,
.restaurant-pos-menu,
.restaurant-pos-ticket {
    padding: .75rem;
    min-height: 28rem;
}

.restaurant-pos-ticket {
    position: sticky;
    top: .5rem;
}

.restaurant-pos-table-grid,
.restaurant-pos-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: .6rem;
}

.restaurant-pos-menu-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .35rem;
    border: 1px solid var(--rz-border-color, #e0e0e0);
    border-radius: .65rem;
    background: var(--rz-base-background-color, #fff);
}

.restaurant-pos-table-btn,
.restaurant-pos-menu-btn,
.restaurant-pos-portion-btn {
    height: auto !important;
    min-height: 3.25rem;
    padding: .65rem !important;
    white-space: normal;
    text-align: start;
    touch-action: manipulation;
}

.restaurant-pos-menu-btn {
    min-height: 4.75rem;
    width: 100%;
}

.restaurant-pos-portion-grid {
    display: grid;
    gap: .3rem;
}

.restaurant-pos-portion-btn {
    min-height: 2.75rem;
    width: 100%;
    justify-content: flex-start;
    font-weight: 600;
}

.restaurant-pos-lines {
    max-height: 42vh;
    overflow: auto;
    overscroll-behavior: contain;
}

.restaurant-pos-line {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--rz-border-color, #e8e8e8);
}

.restaurant-pos-line .rz-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.restaurant-pos-modifiers {
    color: var(--rz-text-tertiary-color, #6b7280);
}

@media (max-width: 1100px) {
    .restaurant-pos-grid {
        grid-template-columns: 1fr;
    }

    .restaurant-pos-ticket {
        position: static;
    }
}

/* Restaurant KDS */
.restaurant-kds-summary-card {
    border: 1px solid var(--rz-border-color, #e0e0e0);
    background: var(--rz-base-50, #f8f9fa);
}

.restaurant-kds-ticket {
    border-inline-start: 4px solid var(--rz-secondary, #64748b);
    touch-action: manipulation;
}

.restaurant-kds-ticket-warning {
    border-inline-start-color: var(--rz-warning, #f59e0b);
}

.restaurant-kds-ticket-late {
    border-inline-start-color: var(--rz-danger, #dc2626);
}

.restaurant-kds-items {
    display: grid;
    gap: .55rem;
    margin-block: .6rem;
}

.restaurant-kds-item {
    padding: .55rem;
    border-radius: .45rem;
    background: var(--rz-base-100, #f1f5f9);
}

.restaurant-kds-item-title {
    display: flex;
    gap: .4rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1.05rem;
}

.restaurant-kds-modifiers {
    color: var(--rz-info-dark, #075985);
    font-weight: 600;
}

.restaurant-kds-notes {
    margin-top: .25rem;
    padding: .35rem;
    border-radius: .3rem;
    background: color-mix(in srgb, var(--rz-warning, #f59e0b) 18%, transparent);
    font-weight: 700;
}

.restaurant-kds-action {
    min-height: 3rem;
    min-width: 5rem;
    touch-action: manipulation;
}

.restaurant-kitchen-print-shell {
    max-width: 32rem;
    margin: auto;
}

.restaurant-kitchen-ticket-print {
    width: 76mm;
    max-width: 100%;
    margin: auto;
    background: #fff;
    color: #000;
    font-family: ui-monospace, Consolas, monospace;
}

.restaurant-kitchen-ticket-title,
.restaurant-kitchen-ticket-number {
    text-align: center;
    font-weight: 700;
}

.restaurant-kitchen-ticket-title {
    font-size: 1.15rem;
}

.restaurant-kitchen-ticket-number {
    font-size: 1.35rem;
}

.restaurant-kitchen-ticket-item {
    padding-block: .5rem;
    border-bottom: 1px dashed #000;
    break-inside: avoid;
}

.restaurant-kitchen-ticket-modifiers {
    font-weight: 600;
}

.restaurant-kitchen-ticket-notes {
    margin-top: .2rem;
    padding: .25rem;
    border: 1px solid #000;
    font-weight: 700;
}
/* AccuServ POS cashier — full workspace shell */

.pos-terminal-shell {
    --pos-gap: 0.65rem;
    --pos-radius: 12px;
    --pos-till-bg: linear-gradient(135deg, #0f3d3e 0%, #1a5c5e 55%, #0d7377 100%);
    --pos-pay-bg: #f7faf9;
    --pos-total-bg: #0b2e2f;
    --pos-accent: #14b8a6;
    --pos-danger: #e11d48;
    display: flex;
    flex-direction: column;
    gap: var(--pos-gap);
    min-height: calc(100vh - 7.5rem);
    margin: -0.25rem;
    outline: none;
}

.pos-terminal-shell:focus {
    outline: none;
}

.pos-till-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--pos-radius);
    background: var(--pos-till-bg);
    color: #f0fdfa;
    box-shadow: 0 8px 24px rgba(13, 61, 62, 0.28);
}

.pos-till-strip__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.pos-till-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    white-space: nowrap;
}

.pos-till-chip--currency {
    background: rgba(20, 184, 166, 0.35);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pos-till-chip--status-open {
    background: rgba(34, 197, 94, 0.35);
}

.pos-till-chip--status-closed {
    background: rgba(251, 191, 36, 0.35);
}

.pos-till-chip--expected {
    background: rgba(56, 189, 248, 0.35);
    font-weight: 600;
}

.pos-till-chip--gl-balance {
    background: rgba(251, 191, 36, 0.4);
    font-weight: 600;
}

.pos-till-strip__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.pos-till-strip__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.pos-activity-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    background: rgba(11, 46, 47, 0.45);
}

.pos-activity-panel {
    width: min(28rem, 100vw);
    height: 100%;
    overflow: auto;
    padding: 1rem 1.1rem 1.5rem;
    background: #f8faf9;
    box-shadow: -12px 0 36px rgba(0, 0, 0, 0.22);
}

.pos-activity-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pos-activity-tenders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.5rem;
}

.pos-activity-tender {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(13, 61, 62, 0.08);
}

.pos-activity-tender span {
    font-size: 0.78rem;
    color: #5b6b6c;
}

.pos-activity-tender strong {
    font-size: 1.05rem;
    color: #0b2e2f;
}

.pos-activity-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(13, 61, 62, 0.08);
}

.pos-activity-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.pos-activity-section + .pos-activity-section {
    margin-top: 1.15rem;
}

.pos-activity-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pos-activity-line {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(13, 61, 62, 0.1);
}

.pos-activity-line__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pos-activity-line__amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #0b2e2f;
}

.pos-activity-line__tender,
.pos-activity-line__badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f3d3e;
}

.pos-activity-line__badge {
    display: inline-flex;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
}

.pos-activity-line__badge.is-in {
    background: rgba(34, 197, 94, 0.16);
    color: #166534;
}

.pos-activity-line__badge.is-out {
    background: rgba(244, 63, 94, 0.14);
    color: #9f1239;
}

.pos-activity-line__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #5b6b6c;
}

.pos-activity-line__meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pos-activity-line__note {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #334155;
    overflow-wrap: anywhere;
}

.pos-activity-grid {
    width: 100%;
}

.pos-activity-grid .rz-grid-table td,
.pos-activity-grid .rz-grid-table th {
    white-space: nowrap;
}

.pos-workspace {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.7fr) minmax(260px, 1.1fr);
    gap: var(--pos-gap);
    flex: 1;
    min-height: 0;
}

@media (max-width: 1100px) {
    .pos-workspace {
        grid-template-columns: 1fr;
    }
}

.pos-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--pos-radius);
    background: var(--rz-base-background-color, #fff);
    border: 1px solid rgba(15, 61, 62, 0.08);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.pos-panel__header {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(15, 61, 62, 0.08);
    font-weight: 600;
    font-size: 0.92rem;
}

.pos-panel__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.65rem 0.85rem;
}

.pos-scan-input {
    width: 100%;
}

.pos-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.pos-product-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.35rem;
    align-items: stretch;
    min-height: 4.75rem;
    padding: 0.55rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 61, 62, 0.12);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    touch-action: manipulation;
    user-select: none;
}

.pos-product-card:hover {
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}

.pos-product-card:active {
    transform: scale(0.98);
}

.pos-product-card__body {
    min-width: 0;
}

.pos-product-card__name {
    font-weight: 650;
    font-size: 0.92rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-card__price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--pos-accent, #0f766e);
    margin-top: 0.15rem;
}

.pos-product-card__meta {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.1rem;
}

.pos-product-card__add {
    align-self: center;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
}

.pos-product-pager {
    padding: 0.25rem 0;
}

.pos-product-pager__label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.pos-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pos-cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    background: #f8fafb;
    border: 1px solid rgba(15, 61, 62, 0.08);
}

.pos-cart-line__name {
    font-weight: 600;
}

.pos-cart-line__meta {
    font-size: 0.8rem;
    opacity: 0.7;
}

.pos-cart-line__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.pos-cart-line__total {
    font-weight: 700;
}

.pos-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pos-qty__btn {
    min-width: 2.15rem !important;
    min-height: 2.15rem !important;
}

.pos-qty__input {
    width: 4.75rem !important;
    min-width: 4.75rem !important;
    height: 2.15rem !important;
    box-sizing: border-box;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #102a2b;
    background: #fff;
    border: 1px solid rgba(15, 61, 62, 0.25);
    border-radius: 8px;
    padding: 0 0.25rem;
    -moz-appearance: textfield;
}

.pos-qty__input:focus {
    outline: none;
    border-color: var(--pos-accent, #0f766e);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.pos-qty__input:disabled {
    opacity: 0.65;
    background: #f3f4f5;
}

.pos-qty__input::-webkit-outer-spin-button,
.pos-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 900px) {
    .pos-product-grid {
        grid-template-columns: 1fr;
    }
}

.pos-pay-panel {
    background: var(--pos-pay-bg);
}

.pos-pay-tenders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.pos-pay-tender {
    border: 1px solid rgba(15, 61, 62, 0.15);
    border-radius: 10px;
    padding: 0.55rem 0.35rem;
    text-align: center;
    cursor: pointer;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
}

.pos-pay-tender.is-active {
    border-color: var(--pos-accent);
    background: rgba(20, 184, 166, 0.12);
    color: #0f3d3e;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.pos-pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
}

.pos-pay-row--due {
    font-weight: 700;
    font-size: 1rem;
}

.pos-pay-row--change {
    font-weight: 700;
    color: #0f766e;
    font-size: 1.05rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.12);
}

.pos-pay-confirm {
    width: 100%;
    margin-top: 0.5rem;
}

.pos-totals-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--pos-radius);
    background: var(--pos-total-bg);
    color: #ecfdf5;
    box-shadow: 0 -4px 20px rgba(11, 46, 47, 0.25);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.pos-totals-bar__figures {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1rem 1.5rem;
}

.pos-totals-bar__item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pos-totals-bar__label {
    font-size: 0.75rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pos-totals-bar__value {
    font-size: 0.95rem;
    font-weight: 600;
}

.pos-totals-bar__item--total .pos-totals-bar__value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #5eead4;
}

.pos-empty {
    padding: 1.5rem 0.75rem;
    text-align: center;
    opacity: 0.55;
    font-size: 0.9rem;
}
