/* ===============================
   POS FULLSCREEN FIX
   =============================== */

html,
body {
    height: 100%;
    overflow: hidden;
}

.content {
    padding: 0 !important;
    margin: 0 !important;
}

/*
    Ako ti je sidebar drugačije širine, promijeni samo ovo:
    skupljen sidebar obično 72px
    proširen sidebar može biti 250px / 260px
*/
:root {
    --pos-sidebar-width: 72px;
}

/* ===============================
   POS MAIN
   =============================== */

.pos-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--pos-receipt-width, 410px);
    gap: var(--pos-screen-gap, 18px);
    padding: var(--pos-screen-padding, 18px);
    background: var(--bg);
    overflow: hidden;
}

.pos-left {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: var(--pos-product-gap, 14px);
    overflow: hidden;
}

/* ===============================
   TOP BAR
   =============================== */

.pos-top {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.pos-title-block h1 {
    margin: 0;
    font-size: 31px;
    line-height: 1;
    font-weight: 1000;
    letter-spacing: -0.7px;
    color: var(--text);
}

.pos-title-block p {
    margin: 7px 0 0;
    opacity: .68;
    font-size: 14px;
    font-weight: 800;
}

.pos-search {
    flex: 0 0 330px;
}

.pos-search input {
    width: 100%;
    padding: 15px 18px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.10);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    outline: none;
    box-shadow: 0 8px 20px rgba(0,0,0,.04);
}

.pos-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200,155,109,.14);
}

/* ===============================
   CATEGORIES
   =============================== */

.pos-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
}

.pos-cat {
    flex: 0 1 auto;
    min-height: var(--pos-category-height, 48px);
    border: 1px solid rgba(0,0,0,.08);
    background: var(--card);
    color: var(--text);
    border-radius: 18px;
    padding: 13px 18px;
    font-size: var(--pos-category-font-size, 15px);
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,.055);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    touch-action: manipulation;
    user-select: none;
}

.pos-cat span {
    margin-right: 4px;
}

.pos-cat:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0,0,0,.08);
}

.pos-cat:active {
    transform: scale(.97);
}

.pos-cat.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

/* ===============================
   PRODUCTS
   =============================== */

.pos-items {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(var(--pos-grid-columns, 4), minmax(0, 1fr));
    gap: var(--pos-product-gap, 14px);
    padding-right: 4px;
    padding-bottom: 4px;
    align-content: start;
    scrollbar-width: thin;
}

.pos-items::-webkit-scrollbar {
    width: 8px;
}

.pos-items::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

.pos-items::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.18);
    border-radius: 999px;
}

.pos-product {
    height: var(--pos-product-min-height, 166px);
    min-height: var(--pos-product-min-height, 166px);
    border: 1px solid rgba(0,0,0,.08);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, var(--bg) 8%), var(--card));
    color: var(--text);
    border-radius: var(--pos-product-radius, 24px);
    padding: var(--pos-product-padding, 18px);
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 13px 32px rgba(0,0,0,.075);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    user-select: none;
    touch-action: manipulation;
}

.pos-product:hover {
    transform: translateY(-2px);
    border-color: rgba(200,155,109,.45);
    box-shadow: 0 16px 34px rgba(0,0,0,.10);
}

.pos-product:active {
    transform: scale(.975);
}

.product-icon {
    font-size: var(--pos-product-icon-size, 38px);
    line-height: 1;
    width: var(--pos-product-image-width, 78px);
    height: var(--pos-product-image-height, 78px);
    margin-bottom: 10px;
    border-radius: calc(var(--pos-product-radius, 24px) - 10px);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    align-self: var(--pos-product-image-position, center);
    grid-template-columns: 1fr;
    gap: clamp(4px, calc(var(--pos-product-icon-size, 38px) * 0.08), 8px);
    padding: clamp(6px, calc(var(--pos-product-padding, 18px) * 0.35), 10px);
    box-sizing: border-box;
}

.product-icon.has-multiple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    place-items: center;
}

.product-icon-chip {
    font-size: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-icon.has-multiple .product-icon-chip {
    font-size: clamp(
        16px,
        calc(var(--pos-product-icon-size, 38px) * 0.58),
        var(--pos-product-icon-size, 38px)
    );
}

.product-image {
    position: relative;
    width: var(--pos-product-image-width, 78px);
    height: var(--pos-product-image-height, 78px);
    margin-bottom: 10px;
    border-radius: calc(var(--pos-product-radius, 24px) - 10px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 10%, rgba(255,255,255,.92), transparent 58%),
        color-mix(in srgb, var(--card) 88%, var(--primary) 12%);
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.045);
    align-self: var(--pos-product-image-position, center);
}

.product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: var(--pos-product-image-fit, contain);
    object-position: center;
}

.product-name {
    font-size: var(--pos-product-name-size, 17px);
    font-weight: 1000;
    line-height: 1.12;
    flex: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-name.is-long {
    font-size: max(13px, calc(var(--pos-product-name-size, 17px) - 2px));
    line-height: 1.08;
}

.product-desc {
    min-height: 0;
    margin-top: 4px;
    font-size: clamp(11px, var(--pos-product-desc-size, 12px), 13px);
    opacity: .66;
    line-height: 1.18;
    font-weight: 750;
    flex: 1 1 auto;
    display: var(--pos-product-desc-display, -webkit-box);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-price {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(200,155,109,.18);
    color: var(--primary-dark);
    font-size: var(--pos-product-price-size, 17px);
    font-weight: 1000;
    box-shadow: inset 0 0 0 1px rgba(200,155,109,.16);
}

/* ===============================
   RECEIPT
   =============================== */

.receipt-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.receipt-paper {
    position: relative;
    height: 100%;
    max-height: 100%;
    background: #fff;
    color: #111827;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 18px 48px rgba(0,0,0,.16);

    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.receipt-paper::before,
.receipt-paper::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    height: 14px;
    background-image: radial-gradient(circle, var(--bg) 6px, transparent 7px);
    background-size: 18px 14px;
    background-repeat: repeat-x;
    pointer-events: none;
    z-index: 5;
}

.receipt-paper::before {
    top: -7px;
}

.receipt-paper::after {
    bottom: -7px;
}

.receipt-header {
    flex: 0 0 auto;
    text-align: left;
    padding-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.receipt-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.receipt-brand-text strong {
    display: block;
    font-size: 14px;
    line-height: 1.1;
}

.receipt-brand-text small {
    display: block;
    opacity: .65;
    font-size: 11px;
    font-weight: 900;
}

.receipt-logo {
    font-size: 28px;
    line-height: 1;
    opacity: .78;
}

.receipt-logo img {
    max-width: 120px;
    max-height: 36px;
    width: auto;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

.receipt-header h2 {
    margin: 8px 0 4px;
    font-size: 23px;
    line-height: 1;
    font-weight: 1000;
    letter-spacing: -.4px;
}

.receipt-header p {
    margin: 0;
    font-size: 12px;
    opacity: .7;
    font-weight: 900;
}

.ready-orders-widget {
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(200,155,109,.08);
    border-radius: 16px;
    padding: 10px 12px;
    display: grid;
    gap: 7px;
    cursor: pointer;
    text-align: left;
}

.ready-orders-widget[hidden] {
    display: none !important;
}

.ready-orders-widget.is-active {
    display: grid;
}

.ready-orders-widget.is-alert {
    border-color: rgba(200,155,109,.55);
    box-shadow: 0 8px 18px rgba(200,155,109,.18);
}

.ready-orders-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ready-orders-badge {
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 1000;
}

.ready-orders-chips {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.receipt-paper.ready-attention {
    animation: receiptAttentionPulse 1.35s ease-in-out infinite;
}

.ready-order-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(0,0,0,.08);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.ready-order-chip.is-newest {
    animation: readyPulse 1.5s ease-in-out infinite;
}

.ready-orders-widget small {
    font-size: 11px;
    font-weight: 800;
    opacity: .7;
}

.ready-orders-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(15, 23, 42, .55);
    display: grid;
    place-items: center;
    padding: 22px;
}

.ready-orders-modal[hidden] {
    display: none;
}

.ready-orders-modal-card {
    width: min(var(--pos-ready-modal-width, 760px), calc(100vw - 44px));
    max-height: min(960px, var(--pos-ready-modal-max-height, 92vh));
    background: var(--card);
    color: var(--text);
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    --ready-kitchen-ticket-title-size: var(--pos-ready-title-size, 16px);
    --ready-kitchen-item-name-size: var(--pos-ready-item-size, 12px);
    --ready-kitchen-detail-size: var(--pos-ready-detail-size, 11px);
    --ready-kitchen-ticket-padding: var(--pos-ready-card-padding, 8px);
    --ready-kitchen-ticket-radius: var(--pos-ready-card-radius, 8px);
    --ready-kitchen-card-gap: clamp(6px, var(--pos-ready-action-gap, 8px), 12px);
    --ready-kitchen-action-height: var(--pos-ready-action-height, 38px);
    --ready-kitchen-action-gap: var(--pos-ready-action-gap, 6px);
}

.ready-orders-modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ready-orders-modal-head h3 {
    margin: 0;
    font-size: 21px;
    font-weight: 1000;
}

.ready-orders-modal-head p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: .68;
    font-weight: 800;
}

.ready-orders-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(0,0,0,.07);
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
}

.ready-orders-modal-body {
    padding: 12px 14px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    gap: var(--pos-ready-action-gap, 8px);
    grid-template-columns: repeat(var(--ready-orders-columns, var(--pos-ready-modal-columns, 3)), minmax(0, 1fr));
    align-content: start;
}

.ready-order-card {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: var(--ready-kitchen-ticket-radius, 8px);
    background: #fff;
    padding: var(--ready-kitchen-ticket-padding, 10px);
    display: grid;
    grid-template-rows: auto minmax(var(--pos-ready-items-block-height, 132px), var(--pos-ready-items-block-height, 132px)) auto;
    gap: var(--ready-kitchen-card-gap, 10px);
    box-shadow: 0 5px 12px rgba(0,0,0,.06);
    min-width: 0;
}

.ready-order-card .kitchen-ticket-buzzer {
    min-width: 30px;
    min-height: 24px;
    padding: 2px 7px;
    font-size: clamp(13px, calc(var(--pos-ready-title-size, 16px) * 0.72), 16px);
    border-width: 1px;
}

.ready-order-card .kitchen-ticket-title strong {
    font-size: var(--pos-ready-title-size, 16px);
    line-height: 1.1;
}

.ready-order-card .kitchen-ticket-time,
.ready-order-card .kitchen-ticket-title span {
    font-size: clamp(11px, calc(var(--pos-ready-detail-size, 11px) + 1px), 12px);
}

.ready-order-card .kitchen-ticket-type {
    font-size: clamp(10px, var(--pos-ready-detail-size, 11px), 12px);
    padding: 4px 9px;
}

.ready-order-card.is-newest {
    border-color: rgba(239, 68, 68, .45);
    animation: readyPulse 1.5s ease-in-out infinite;
}

.ready-order-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ready-kitchen-card-gap, 10px);
}

.ready-order-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ready-mini-badge {
    min-height: 24px;
    padding: 0 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 1000;
}

.ready-mini-badge.order {
    border: 1px solid rgba(239,68,68,.36);
    background: rgba(239,68,68,.08);
    color: #b91c1c;
}

.ready-mini-badge.pager {
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.03);
    color: #334155;
}

.ready-order-type {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(200,155,109,.18);
    color: #8a5d33;
    font-size: 11px;
    font-weight: 1000;
}

.ready-order-meta {
    font-size: 11px;
    font-weight: 900;
    opacity: .72;
    margin-top: -4px;
}

.ready-order-items {
    display: grid;
    align-content: start;
    grid-auto-rows: min-content;
    gap: 3px;
    font-size: var(--ready-kitchen-item-name-size, 15px);
    font-weight: 850;
    min-height: var(--pos-ready-items-block-height, 132px);
    max-height: var(--pos-ready-items-block-height, 132px);
    overflow: hidden;
}

.ready-item-more {
    font-size: 11px;
    font-weight: 800;
    opacity: .55;
    list-style: none;
}

.ready-item-choices {
    font-size: 10px;
    font-weight: 800;
    opacity: .6;
    padding-left: 22px;
    line-height: 1.3;
    margin-top: 1px;
}

.ready-order-items small {
    opacity: .72;
    font-weight: 800;
    font-size: var(--ready-kitchen-detail-size, 12px);
    display: block;
    padding-left: 24px;
}

.ready-item-line {
    font-size: var(--ready-kitchen-item-name-size, 15px);
    font-weight: 950;
    line-height: 1.2;
}

.ready-order-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ready-kitchen-action-gap, 8px);
}

.ready-orders-modal .ready-order-actions button {
    border: 0;
    border-radius: var(--pos-ready-action-radius, 11px);
    min-height: var(--ready-kitchen-action-height, 46px);
    font-size: var(--pos-ready-action-font-size, 10px);
    font-weight: 1000;
    cursor: pointer;
    line-height: 1.1;
    padding: 3px var(--pos-ready-action-padding-x, 5px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ready-orders-modal .ready-btn-delivered {
    background: var(--primary) !important;
    color: #fff !important;
}

.ready-orders-modal .ready-btn-return {
    background: #b91c1c !important;
    color: #fff !important;
}

/* ── Ready detail popup ─────────────────────────────── */
.ready-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 10025;
    background: rgba(15,23,42,.65);
    display: grid;
    place-items: center;
    padding: 20px;
}
.ready-detail-overlay[hidden] { display: none; }

.ready-detail-card {
    background: var(--card, #fff);
    color: var(--text, #111);
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 32px 80px rgba(0,0,0,.32);
    width: min(520px, calc(100vw - 40px));
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ready-detail-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.ready-detail-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ready-detail-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ready-detail-order-no {
    font-size: 22px;
    font-weight: 1000;
    line-height: 1;
}

.ready-detail-elapsed {
    font-size: 12px;
    font-weight: 800;
    opacity: .6;
}

.ready-detail-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(0,0,0,.07);
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ready-detail-close:hover { background: rgba(0,0,0,.12); }

.ready-detail-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 14px;
    display: grid;
    gap: 6px;
}

.ready-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0,0,0,.03);
    border-radius: 10px;
}

.ready-detail-item-main {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.3;
}

.ready-detail-item-main b {
    font-size: 12px;
    font-weight: 1000;
    opacity: .6;
    flex-shrink: 0;
}

.ready-detail-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 24px;
}

.ready-detail-chip {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(200,155,109,.18);
    color: #8a5d33;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(200,155,109,.28);
}

.ready-detail-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    background: rgba(0,0,0,.03);
    border-radius: 10px;
}

.ready-detail-choice-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 900;
}

.ready-detail-choice-bullet {
    font-size: 10px;
    opacity: .45;
    flex-shrink: 0;
}

.ready-detail-mods {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 16px;
    margin-top: 2px;
}

.ready-detail-mod {
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ready-detail-mod.add { color: #15803d; }
.ready-detail-mod.remove { color: #b91c1c; }

.ready-detail-mod-sign {
    font-size: 13px;
    font-weight: 1000;
    line-height: 1;
    flex-shrink: 0;
}

.ready-detail-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(0,0,0,.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex-shrink: 0;
}

.ready-detail-btn {
    border: 0;
    border-radius: 12px;
    height: 46px;
    font-size: 14px;
    font-weight: 1000;
    cursor: pointer;
    transition: opacity .15s;
}
.ready-detail-btn:hover { opacity: .88; }
.ready-detail-btn.primary {
    background: var(--primary);
    color: #fff;
}
.ready-detail-btn.secondary {
    background: rgba(0,0,0,.07);
    color: var(--text);
}

@keyframes readyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.0); }
    50% { box-shadow: 0 0 0 3px rgba(239,68,68,.20); }
}

@keyframes receiptAttentionPulse {
    0%, 100% {
        box-shadow: 0 18px 48px rgba(0,0,0,.16), inset 0 0 0 0 rgba(200,155,109,0);
        background: #ffffff;
    }
    50% {
        box-shadow: 0 24px 62px rgba(0,0,0,.22), inset 0 0 0 6px rgba(200,155,109,.52);
        background: color-mix(in srgb, #fff 82%, var(--primary) 18%);
    }
}

.receipt-line {
    flex: 0 0 auto;
    height: 2px;
    background: #111827;
    opacity: .78;
    margin: 14px 0;
}

.receipt-line.dashed {
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #111827 0,
        #111827 8px,
        transparent 8px,
        transparent 14px
    );
    opacity: .55;
}

.order-type-toggle {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: -3px 0 14px;
    padding: 5px;
    border-radius: 8px;
    background: #f3f4f6;
}

.order-type-toggle button {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #111827;
    font-size: 14px;
    font-weight: 1000;
    cursor: pointer;
    touch-action: manipulation;
}

.order-type-toggle button.active {
    background: #111827;
    color: #fff;
    box-shadow: 0 7px 14px rgba(17,24,39,.16);
}

.receipt-cols {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 92px;
    gap: 8px;
    align-items: center;
}

.receipt-head {
    font-size: 11px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .35px;
    opacity: .72;
}

.receipt-head span:nth-child(2),
.receipt-head span:nth-child(3) {
    text-align: right;
}

/* samo lista računa scrolla */
.receipt-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    margin-right: -8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(17,24,39,.25) transparent;
    scroll-behavior: smooth;
}

.receipt-items::-webkit-scrollbar {
    width: 8px;
}

.receipt-items::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

.receipt-items::-webkit-scrollbar-thumb {
    background: rgba(17,24,39,.22);
    border-radius: 999px;
    border: 2px solid #fff;
}

.receipt-items::-webkit-scrollbar-thumb:hover {
    background: rgba(17,24,39,.42);
}

.receipt-bottom {
    flex: 0 0 auto;
    background: #fff;
    z-index: 2;
    padding-top: 4px;
    box-shadow: 0 -14px 24px rgba(255,255,255,.95);
}

.empty-receipt {
    text-align: center;
    padding: 70px 10px;
    font-size: 16px;
    font-weight: 1000;
    opacity: .50;
}

.empty-receipt small {
    display: inline-block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 900;
}

.receipt-row {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(0,0,0,.18);
    transition: background .12s ease, padding .12s ease, margin .12s ease;
}

.receipt-row:hover {
    background: linear-gradient(
        to right,
        rgba(200,155,109,.08),
        transparent
    );
    border-radius: 14px;
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.receipt-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 92px;
    gap: 8px;
    align-items: start;
}

.receipt-title {
    font-size: 16px;
    font-weight: 1000;
    line-height: 1.18;
    word-break: break-word;
}

.receipt-price,
.receipt-qty {
    font-size: 16px;
    font-weight: 1000;
    text-align: right;
    white-space: nowrap;
}

.receipt-sub {
    margin-top: 6px;
    font-size: 13px;
    opacity: .66;
    font-weight: 850;
}

/* veća touch dugmad */
.qty-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.qty-actions button {
    width: 46px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #0f172a;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    font-weight: 1000;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 8px 18px rgba(15,23,42,.18);
    display: inline-grid;
    place-items: center;
}

.qty-actions button:hover {
    background: #111827;
}

.qty-actions button:active {
    transform: scale(.94);
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: -.7px;
}

.receipt-total strong {
    color: var(--primary);
    white-space: nowrap;
}

.receipt-actions {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.receipt-actions button {
    border: 0;
    border-radius: 18px;
    padding: 18px 15px;
    font-size: 17px;
    font-weight: 1000;
    cursor: pointer;
    touch-action: manipulation;
}

.receipt-actions button:active {
    transform: scale(.98);
}

.receipt-actions button:disabled {
    opacity: .62;
    cursor: wait;
}

.pay-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 18px rgba(0,0,0,.11);
}

.send-btn {
    background: #111827;
    color: #fff;
}

.clear-btn {
    background: #f3f4f6;
    color: #111827;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 1450px) {
    .pos-screen {
        grid-template-columns: minmax(0, 1fr) min(var(--pos-receipt-width, 410px), 390px);
    }

}

@media (max-width: 1100px) {
    .pos-screen {
        grid-template-columns: minmax(0, 1fr) min(var(--pos-receipt-width, 410px), 360px);
        gap: 14px;
        padding: 14px;
    }

    .pos-search {
        flex-basis: 270px;
    }
}

@media (max-width: 640px) {
    html,
    body {
        overflow: auto;
    }

    .pos-items {
        grid-template-columns: repeat(auto-fill, minmax(var(--pos-grid-min-width, 155px), 1fr));
        max-height: 520px;
        overflow-y: auto;
    }

    .pos-top {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-search {
        flex: none;
    }
}

/* ===============================
   ITEM MODAL / IZMJENE
   =============================== */

.item-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, .55);
    display: grid;
    place-items: center;
    padding: 22px;
    grid-template-rows: auto minmax(0, auto) auto;
    gap: 10px;
}

.item-modal-backdrop[hidden] {
    display: none;
}

.item-modal {
    width: min(820px, 100%);
    max-height: min(760px, 92vh);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--card) 96%, #ffffff 4%) 0%,
        var(--card) 100%
    );
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
    border-radius: 30px;
    box-shadow: 0 28px 90px rgba(0,0,0,.30);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.item-modal-head {
    flex: 0 0 auto;
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary) 12%, transparent) 0%,
        transparent 100%
    );
}

.item-modal-head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 1000;
    letter-spacing: -.6px;
}

.item-modal-head p {
    margin: 7px 0 0;
    opacity: .75;
    font-weight: 850;
}

.modal-close-btn {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: color-mix(in srgb, var(--text) 8%, transparent);
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, opacity .16s ease;
}

.modal-close-btn:hover {
    background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.modal-close-btn:active {
    transform: scale(.95);
}

.item-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 24px;
    scrollbar-width: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.item-modal-body::-webkit-scrollbar {
    width: 12px;
}

.item-modal-body::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 45%, rgba(0,0,0,.20));
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

.item-modal-scroll-controls {
    position: absolute;
    right: 8px;
    top: 96px;
    bottom: 108px;
    width: 52px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    align-items: stretch;
    pointer-events: none;
    z-index: 3;
}

.item-modal-scroll-btn {
    pointer-events: auto;
    align-self: start;
    justify-self: end;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    color: var(--text);
    font-size: 20px;
    font-weight: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
    opacity: .58;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.item-modal-scroll-btn.down {
    align-self: end;
}

.item-modal-scroll-btn:active {
    transform: scale(.96);
    opacity: .78;
}

.item-modal-scroll-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.item-modal-wide-scroll {
    width: min(820px, 100%);
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    color: var(--text);
    font-size: 24px;
    font-weight: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    opacity: .56;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.item-modal-wide-scroll:active {
    transform: scale(.99);
    opacity: .78;
}

.item-modal-wide-scroll:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.modal-section {
    margin-bottom: 22px;
}

.modal-section h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 1000;
    letter-spacing: -.2px;
}

.modal-section small {
    display: block;
    margin: -7px 0 12px;
    font-size: var(--pos-product-desc-size, 12px);
    font-weight: 850;
    opacity: .62;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.option-chip {
    min-height: 58px;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    background: color-mix(in srgb, var(--card) 86%, var(--text));
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 950;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: border-color .16s ease, transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.option-chip:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

.option-chip input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.option-chip:has(input:checked) {
    background: color-mix(in srgb, var(--primary) 20%, var(--card));
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 70%, transparent);
}

.option-chip b {
    color: var(--primary);
    font-weight: 1000;
}

.item-note-input {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    background: color-mix(in srgb, var(--card) 88%, var(--text));
    color: var(--text);
    padding: 15px 16px;
    font-size: 16px;
    font-weight: 850;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.item-note-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200,155,109,.14);
}

.item-modal-footer {
    flex: 0 0 auto;
    padding: 18px 24px 22px;
    border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 14px;
    align-items: center;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.modal-price-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.modal-price-box span {
    font-size: 13px;
    font-weight: 900;
    opacity: .72;
}

.modal-price-box strong {
    font-size: 30px;
    font-weight: 1000;
    color: var(--primary);
}

.save-item-btn {
    border: 0;
    border-radius: 18px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--primary) 92%, #ffffff 8%) 0%,
        var(--primary) 100%
    );
    color: #fff;
    padding: 18px;
    font-size: 17px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 34%, transparent);
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.save-item-btn:hover {
    filter: brightness(1.03);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 40%, transparent);
}

.save-item-btn:active {
    transform: translateY(1px);
}

.buzzer-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, .58);
    display: grid;
    place-items: center;
    padding: 22px;
}

.buzzer-modal-backdrop[hidden] {
    display: none;
}

.buzzer-modal {
    width: min(760px, 100%);
    max-height: min(760px, 92vh);
    background: var(--card);
    color: var(--text);
    border-radius: 24px;
    box-shadow: 0 26px 80px rgba(0,0,0,.32);
    overflow: hidden;
}

.buzzer-modal-head {
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.buzzer-modal-head h3 {
    margin: 0 0 5px;
    font-size: 26px;
    font-weight: 1000;
}

.buzzer-modal-head p {
    margin: 0;
    opacity: .68;
    font-weight: 850;
}

.buzzer-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(0,0,0,.07);
    color: var(--text);
    font-size: 22px;
    font-weight: 1000;
    cursor: pointer;
}

.buzzer-grid {
    max-height: 620px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 22px;
}

.buzzer-skip-btn {
    width: calc(100% - 44px);
    min-height: 62px;
    margin: 18px 22px 0;
    border: 2px solid color-mix(in srgb, var(--text) 16%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--text) 7%, var(--card));
    color: var(--text);
    font-size: 22px;
    font-weight: 1000;
    cursor: pointer;
}

.buzzer-skip-btn:hover,
.buzzer-skip-btn:active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
}

.buzzer-number-btn {
    min-height: 74px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--text);
    font-size: 30px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.buzzer-number-btn:hover,
.buzzer-number-btn:active {
    background: var(--primary);
    color: var(--text);
}

/* dugme izmjene na računu */
.edit-line-btn {
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 17px !important;
}

/* prikaz izmjena ispod artikla u računu */
.receipt-options {
    margin-top: 7px;
    display: grid;
    gap: 3px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
}

.receipt-option-remove {
    color: #b91c1c;
}

.receipt-option-add {
    color: #047857;
}

.receipt-option-child {
    padding-left: 14px;
}

.receipt-option-note {
    color: #374151;
    opacity: .85;
}

@media (max-width: 700px) {
    .ready-orders-modal-body {
        grid-template-columns: 1fr;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .buzzer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .item-modal-footer {
        grid-template-columns: 1fr;
    }

    .ready-order-actions {
        grid-template-columns: 1fr;
    }

    .item-modal-scroll-controls {
        right: 4px;
        top: 84px;
        bottom: 136px;
        width: 48px;
    }

    .item-modal-scroll-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
}

@media (max-width: 980px) {
    .ready-orders-modal {
        padding: 14px;
    }
}

