.pos-page {
    background: #0c0c0b;
}

.pos-page .sidebar {
    display: none;
}

.pos-page .main-content {
    width: 100%;
    margin-left: 0;
    max-width: none;
    padding: 0;
}

.pos-shell {
    min-height: 100vh;
    padding: 24px 26px 30px;
    background: radial-gradient(circle at 50% -20%, #302519 0, #11110f 42%, #0b0b0a 100%);
}

.pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.pos-title-group,
.pos-top-actions,
.pos-product-heading,
.pos-ticket-head {
    display: flex;
    align-items: center;
}

.pos-title-group {
    gap: 12px;
}

.pos-live-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px #96b8751c, 0 0 16px #96b875;
}

.pos-topbar h1 {
    margin: 5px 0 0;
    font: 500 29px var(--serif);
}

.pos-top-actions {
    gap: 16px;
}

.pos-status,
.pos-top-link {
    color: var(--muted);
    font-size: 12px;
}

.pos-status b {
    color: var(--green);
}

.pos-top-link {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.pos-top-link:hover {
    color: var(--gold);
    border-color: #80602c;
}

.pos-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr) 370px;
    gap: 16px;
    max-width: 1800px;
    margin: 0 auto;
    align-items: start;
}

.pos-control-panel,
.pos-product-panel,
.pos-ticket-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(145deg, #191916, #121211);
}

.pos-control-panel {
    position: sticky;
    top: 18px;
    padding: 18px 14px;
}

.pos-panel-heading {
    padding: 2px 4px 13px;
}

.pos-panel-heading strong,
.pos-panel-heading small {
    display: block;
}

.pos-panel-heading strong {
    margin-top: 7px;
    font-size: 15px;
}

.pos-panel-heading small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.pos-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pos-table-card {
    position: relative;
    min-height: 91px;
    padding: 10px 8px;
    text-align: left;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #141412;
}

.pos-table-card:hover,
.pos-table-card.active {
    color: var(--text);
    border-color: var(--gold);
    background: linear-gradient(145deg, #332718, #1b1812);
    box-shadow: 0 0 0 1px #d5a6571a;
}

.pos-table-card span,
.pos-table-card small {
    display: block;
    font-size: 10px;
}

.pos-table-card strong {
    display: block;
    margin: 4px 0 3px;
    color: var(--gold);
    font: 500 24px var(--serif);
}

.pos-table-card em {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 2px 5px;
    color: var(--green);
    background: #2b472f;
    border-radius: 3px;
    font-style: normal;
    font-size: 8px;
}

.pos-table-card .status-waiting,
.pos-table-card .status-occupied,
.pos-table-card .status-serving,
.pos-table-card .status-bill_requested {
    color: #f0c774;
    background: #4b3920;
}

.pos-category-heading {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.pos-category-list {
    display: grid;
    gap: 4px;
}

.pos-category-list button {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 11px 9px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    font-size: 12px;
}

.pos-category-list button b {
    color: var(--dim);
    font-size: 10px;
    font-weight: 500;
}

.pos-category-list button:hover,
.pos-category-list button.active {
    color: var(--gold);
    border-color: #6b5128;
    background: #2b2318;
}

.pos-category-list button.active b {
    color: var(--gold);
}

.pos-empty-small,
.pos-no-products {
    grid-column: 1 / -1;
    padding: 20px 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.pos-product-panel {
    padding: 22px;
}

.pos-product-heading {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.pos-product-heading h2 {
    margin: 6px 0 0;
    font: 500 25px var(--serif);
}

.pos-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 230px;
    height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--gold);
    background: #10100f;
}

.pos-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 13px;
}

.pos-search:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a6571a;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pos-product-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #151513;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.pos-product-card:hover {
    transform: translateY(-2px);
    border-color: #927039;
    background: #211c14;
}

.pos-product-card.is-hidden {
    display: none;
}

.pos-product-image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    color: var(--gold);
    background: #2b251a;
}

.pos-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pos-product-image i {
    font: 24px var(--serif);
    font-style: normal;
}

.pos-product-copy {
    min-width: 0;
    flex: 1;
}

.pos-product-copy strong,
.pos-product-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-product-copy strong {
    font-size: 13px;
}

.pos-product-copy small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.pos-product-card > b {
    align-self: flex-start;
    color: var(--gold);
    font-size: 12px;
    white-space: nowrap;
}

.pos-add-mark {
    position: absolute;
    right: 8px;
    bottom: 6px;
    color: var(--gold);
    font-size: 18px;
    line-height: 1;
}

.pos-ticket-panel {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    min-height: 650px;
    padding: 20px;
}

.pos-ticket-head {
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.pos-ticket-head h2 {
    margin: 6px 0 3px;
    font: 500 25px var(--serif);
}

.pos-ticket-head small {
    color: var(--muted);
    font-size: 11px;
}

.pos-ticket-live {
    padding: 5px 8px;
    color: var(--green);
    border: 1px solid #47694b;
    border-radius: 4px;
    background: #263b29;
    font-size: 10px;
    letter-spacing: .08em;
}

.pos-ticket-items {
    flex: 1;
    min-height: 180px;
    max-height: 400px;
    overflow: auto;
    padding: 4px 0 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pos-ticket-items::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.pos-ticket-empty {
    display: grid;
    place-items: center;
    padding: 70px 15px;
    color: var(--muted);
    text-align: center;
}

.pos-ticket-empty span {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    margin-bottom: 12px;
    color: var(--gold);
    border: 1px solid #6b5128;
    border-radius: 50%;
    font-size: 24px;
}

.pos-ticket-empty strong,
.pos-ticket-empty small {
    display: block;
}

.pos-ticket-empty strong {
    color: var(--text);
    font-size: 14px;
}

.pos-ticket-empty small {
    margin-top: 5px;
    font-size: 11px;
}

.pos-ticket-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 13px 0;
    border-bottom: 1px solid #292822;
}

.pos-ticket-line strong,
.pos-ticket-line small {
    display: block;
}

.pos-ticket-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.pos-ticket-line small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.pos-ticket-line > b {
    color: var(--gold);
    font-size: 12px;
}

.pos-qty {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
}

.pos-qty button {
    width: 22px;
    height: 22px;
    color: var(--gold);
    border: 1px solid #604c2d;
    border-radius: 50%;
    background: #242016;
}

.pos-qty b {
    min-width: 15px;
    color: var(--text);
    text-align: center;
    font-size: 11px;
}

.pos-note-label {
    display: block;
    padding: 12px 0 15px;
    color: var(--muted);
    font-size: 11px;
}

.pos-note-label textarea {
    display: block;
    width: 100%;
    min-height: 58px;
    margin-top: 7px;
    padding: 9px 10px;
    resize: vertical;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: #10100f;
    font: 12px var(--sans);
}

.pos-note-label textarea:focus {
    border-color: var(--gold);
}

.pos-total-box {
    padding: 13px 0 5px;
    border-top: 1px solid var(--line);
}

.pos-total-box > div {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    color: var(--muted);
    font-size: 12px;
}

.pos-total-box b {
    color: var(--text);
}

.pos-total-box small {
    color: var(--dim);
}

.pos-total-box .pos-grand-total {
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    color: var(--text);
    border-top: 1px solid var(--line);
    font-weight: 700;
}

.pos-grand-total strong {
    color: var(--gold);
    font: 500 27px var(--serif);
}

.pos-send-button {
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    padding: 0 16px;
    color: #21170d;
    border-radius: 7px;
    background: linear-gradient(135deg, #e2b96f, #a77b3b);
    font-size: 13px;
    font-weight: 700;
}

.pos-send-button span {
    float: right;
    font-size: 19px;
}

.pos-send-button:hover {
    filter: brightness(1.08);
}

.pos-send-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.pos-security-note {
    margin: 11px 2px 0;
    color: var(--dim);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.pos-payment-section {
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
}

.pos-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.pos-section-title small {
    color: var(--dim);
    font-size: 10px;
}

.pos-customer-field,
.pos-payment-fields label {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.pos-customer-field input,
.pos-input-with-suffix {
    display: block;
    width: 100%;
    height: 38px;
    margin-top: 6px;
    padding: 0 10px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: 0;
    background: #10100f;
    font: 12px var(--sans);
}

.pos-customer-field input:focus,
.pos-input-with-suffix:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #d5a6571a;
}

.pos-payment-methods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0;
}

.pos-payment-methods button {
    min-height: 48px;
    padding: 6px 3px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #151513;
    font-size: 10px;
}

.pos-payment-methods button span {
    display: block;
    margin-bottom: 3px;
    color: var(--gold);
    font-size: 16px;
}

.pos-payment-methods button:hover,
.pos-payment-methods button.active {
    color: var(--text);
    border-color: var(--gold);
    background: #2c2417;
}

.pos-payment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pos-input-with-suffix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
}

.pos-input-with-suffix input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
    font: 12px var(--sans);
}

.pos-input-with-suffix span {
    color: var(--gold);
}

.pos-note-label {
    padding-bottom: 10px;
}

.pos-change-row {
    color: var(--green) !important;
}

.pos-change-row b {
    color: var(--green) !important;
}

.pos-payment-button,
.pos-print-button {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

.pos-payment-button {
    padding: 0 16px;
    color: #21170d;
    background: linear-gradient(135deg, #edc477, #a77b3b);
    box-shadow: 0 8px 24px #a77b3b20;
}

.pos-payment-button span,
.pos-print-button span {
    float: right;
    font-size: 18px;
}

.pos-payment-button:hover {
    filter: brightness(1.08);
}

.pos-payment-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.pos-print-button {
    color: var(--gold);
    border: 1px solid #805f2d;
    background: #272015;
}

.pos-print-button:hover {
    background: #392b19;
}

.pos-receipt {
    display: none;
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    html,
    body,
    body.pos-page,
    body.pos-page .app-shell,
    body.pos-page .main-content {
        width: 80mm !important;
        min-width: 80mm !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    body.pos-page * {
        visibility: hidden !important;
    }

    /* Yazıcıda yalnızca termal fiş kalsın; POS çalışma alanı boş sayfa üretmesin. */
    body.pos-page .pos-shell {
        display: none !important;
    }

    body.pos-page .main-content,
    body.pos-page .app-shell {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    body.pos-page .pos-receipt,
    body.pos-page .pos-receipt * {
        visibility: visible !important;
    }

    body.pos-page .pos-receipt {
        position: static;
        display: block;
        width: 72mm;
        height: auto !important;
        max-height: none !important;
        min-height: 0;
        margin: 0 auto;
        padding: 0;
        color: #000;
        background: #fff;
        font: 11px Arial, sans-serif;
    }

    .pos-receipt-brand {
        padding-bottom: 7px;
        border-bottom: 1px dashed #000;
        text-align: center;
        font: bold 20px Georgia, serif;
        letter-spacing: 2px;
    }

    .pos-receipt-brand small {
        display: block;
        margin-top: 2px;
        font: 8px Arial, sans-serif;
        letter-spacing: 3px;
    }

    .pos-receipt-meta,
    .pos-receipt-lines div,
    .pos-receipt-totals div,
    .pos-receipt-payment {
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }

    .pos-receipt-meta {
        padding: 5px 0;
        border-bottom: 1px dotted #777;
        font-size: 10px;
    }

    .pos-receipt-lines {
        padding: 7px 0;
        border-bottom: 1px dashed #000;
    }

    .pos-receipt-lines div {
        padding: 2px 0;
    }

    .pos-receipt-totals {
        padding: 7px 0;
        border-bottom: 1px dashed #000;
    }

    .pos-receipt-totals div {
        padding: 2px 0;
    }

    .pos-receipt-totals .receipt-final {
        margin-top: 4px;
        padding-top: 5px;
        border-top: 1px solid #000;
        font-weight: bold;
    }

    .pos-receipt-payment {
        padding: 7px 0;
        font-size: 10px;
    }

    .pos-receipt-thanks {
        margin: 11px 0 0;
        text-align: center;
        font-size: 10px;
    }
}

.dashboard-pos-launch,
.dashboard-pos-action {
    border-color: #a37b3b;
}

@media (max-width: 1250px) {
    .pos-layout {
        grid-template-columns: 205px minmax(0, 1fr) 330px;
    }

    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 930px) {
    .pos-shell {
        padding: 16px;
    }

    .pos-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pos-top-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .pos-layout {
        grid-template-columns: 1fr 1fr;
    }

    .pos-control-panel {
        position: static;
        grid-column: 1 / -1;
    }

    .pos-table-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

    .pos-category-list {
        display: flex;
        overflow-x: auto;
    }

    .pos-category-list button {
        width: auto;
        min-width: max-content;
    }

    .pos-ticket-panel {
        position: static;
    }
}

@media (max-width: 620px) {
    .pos-shell {
        padding: 12px 10px 20px;
    }

    .pos-topbar h1 {
        font-size: 24px;
    }

    .pos-status {
        width: 100%;
    }

    .pos-layout {
        display: block;
    }

    .pos-control-panel,
    .pos-product-panel,
    .pos-ticket-panel {
        margin-bottom: 12px;
    }

    .pos-product-panel,
    .pos-ticket-panel {
        padding: 15px;
    }

    .pos-product-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .pos-search {
        width: 100%;
    }

    .pos-product-grid {
        grid-template-columns: 1fr;
    }

    .pos-ticket-panel {
        min-height: 560px;
    }

    .pos-payment-methods button {
        font-size: 9px;
    }
}

/* Premium enterprise POS layout */
.pos-page .pos-shell {
    padding: 14px 15px 0;
    background: #0d0f0e;
}

.pos-page .pos-topbar {
    display: grid;
    grid-template-columns: 225px 205px 245px 190px 190px minmax(330px, 1fr);
    gap: 0;
    max-width: none;
    margin: 0 -15px 14px;
    padding: 0 15px 13px;
    border-bottom: 1px solid #2c302c;
    align-items: center;
}

.pos-brand-lockup {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 54px;
    border-right: 1px solid #2c302c;
}

.pos-brand-lockup strong {
    color: #e3bb70;
    font: 500 30px var(--serif);
    letter-spacing: .08em;
}

.pos-brand-lockup span {
    padding-left: 18px;
    color: #e3bb70;
    font: 600 14px var(--sans);
}

.pos-context-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    border-right: 1px solid #2c302c;
}

.pos-context-chip > span:nth-child(2) {
    min-width: 0;
}

.pos-context-chip small,
.pos-context-chip b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-context-chip small {
    color: var(--muted);
    font-size: 10px;
}

.pos-context-chip b {
    margin-top: 3px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.pos-context-chip i {
    margin-left: auto;
    color: var(--gold);
    font-style: normal;
}

.pos-top-icon {
    color: var(--gold);
    font-size: 20px;
}

.pos-top-actions {
    justify-content: flex-end;
    gap: 8px;
}

.pos-stat-card {
    min-width: 124px;
    min-height: 54px;
    padding: 8px 12px;
    border: 1px solid #30342f;
    border-radius: 8px;
    background: #121513;
}

.pos-stat-card span {
    float: left;
    margin: 8px 9px 0 0;
    color: var(--gold);
    font-size: 22px;
}

.pos-stat-card small,
.pos-stat-card b {
    display: block;
}

.pos-stat-card small {
    color: var(--muted);
    font-size: 10px;
}

.pos-stat-card b {
    margin-top: 2px;
    color: var(--text);
    font-size: 16px;
}

.pos-page .pos-top-link {
    display: none;
}

.pos-page .pos-layout {
    grid-template-columns: minmax(300px, .94fr) minmax(440px, 1.18fr) minmax(355px, .9fr);
    gap: 13px;
    max-width: none;
    align-items: stretch;
}

.pos-page .pos-control-panel,
.pos-page .pos-product-panel,
.pos-page .pos-ticket-panel {
    min-height: calc(100vh - 131px);
    border-color: #30342f;
    border-radius: 9px;
    background: linear-gradient(150deg, #171a18, #101211);
    box-shadow: 0 14px 35px #00000024;
}

.pos-page .pos-control-panel {
    position: static;
    padding: 18px 15px 14px;
    overflow: hidden;
}

.pos-page .pos-panel-heading {
    padding: 0 6px 13px;
}

.pos-page .pos-panel-heading strong {
    margin-top: 5px;
    font: 500 19px var(--serif);
}

.pos-page .pos-panel-heading small {
    margin-top: 5px;
    font-size: 11px;
}

.pos-floor-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 0 5px 12px;
    border-bottom: 1px solid #30342f;
}

.pos-floor-tabs button {
    height: 38px;
    padding: 0 4px;
    color: var(--muted);
    border: 1px solid #252a26;
    border-radius: 6px;
    background: #141715;
    font-size: 11px;
}

.pos-floor-tabs button.active,
.pos-floor-tabs button:hover {
    color: #20170c;
    border-color: #ae803e;
    background: linear-gradient(135deg, #d2a45b, #8f672f);
}

.pos-page .pos-table-grid {
    min-height: 510px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(94px, 1fr);
    gap: 10px;
    padding: 16px 5px 12px;
    background-color: #111412;
    background-image: linear-gradient(#27302a 1px, transparent 1px), linear-gradient(90deg, #27302a 1px, transparent 1px);
    background-size: 37px 37px;
    border-bottom: 1px solid #30342f;
}

.pos-page .pos-table-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    text-align: center;
    border-color: #444943;
    border-radius: 10px;
    background: linear-gradient(145deg, #252a27, #171b19);
    box-shadow: 0 8px 12px #0008;
}

.pos-page .pos-table-card:nth-child(3n) {
    border-radius: 50%;
}

.pos-page .pos-table-card:nth-child(4n) {
    border-color: #a77b3b;
}

.pos-page .pos-table-card span {
    font-size: 9px;
}

.pos-page .pos-table-card strong {
    margin: 2px 0 5px;
    color: var(--text);
    font-size: 25px;
}

.pos-page .pos-table-card small {
    display: none;
}

.pos-page .pos-table-card em {
    position: static;
    padding: 0;
    color: var(--green);
    background: transparent;
    font-size: 10px;
}

.pos-page .pos-table-card em::first-letter {
    color: var(--green);
}

.pos-page .pos-table-card.active {
    color: var(--text);
    border-color: #e0b15f;
    background: linear-gradient(145deg, #6e5326, #302719);
    box-shadow: 0 0 0 1px #e0b15f, 0 10px 25px #0009;
}

.pos-page .pos-table-card .status-waiting,
.pos-page .pos-table-card .status-occupied,
.pos-page .pos-table-card .status-serving,
.pos-page .pos-table-card .status-bill_requested {
    color: #f0c774;
    background: transparent;
}

.pos-page .pos-category-heading,
.pos-page .pos-control-panel > .pos-category-list {
    display: none;
}

.pos-selected-table {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 5px 11px;
    padding: 15px;
    border: 1px solid #30342f;
    border-radius: 7px;
    background: #141715;
    color: var(--muted);
    font-size: 13px;
}

.pos-selected-table b {
    margin-left: 5px;
    color: var(--text);
    font-weight: 500;
}

.pos-selected-table i {
    color: var(--gold);
    font-size: 24px;
    font-style: normal;
}

.pos-table-legend {
    display: flex;
    justify-content: space-around;
    gap: 7px;
    margin: 0 5px;
    padding-top: 11px;
    color: var(--muted);
    font-size: 10px;
}

.pos-table-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pos-table-legend i {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: var(--green);
}

.pos-table-legend .is-occupied { background: #d25f55; }
.pos-table-legend .is-reserved { background: #d4a448; }
.pos-table-legend .is-bill { background: #5e93d2; }

.pos-page .pos-product-panel {
    padding: 17px 15px 14px;
    overflow: hidden;
}

.pos-page .pos-product-heading {
    min-height: 46px;
    margin: 0 4px 12px;
}

.pos-page .pos-product-heading h2 {
    margin-top: 4px;
    font-size: 21px;
}

.pos-page .pos-product-heading .eyebrow {
    display: none;
}

.pos-page .pos-search {
    width: 100%;
    max-width: 310px;
    height: 40px;
}

.pos-product-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30342f;
}

.pos-page .pos-center-category-list {
    display: flex;
    flex: 1;
    gap: 4px;
    min-width: 0;
    overflow: auto;
}

.pos-page .pos-center-category-list button {
    width: auto;
    min-width: max-content;
    padding: 9px 12px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    font-size: 11px;
}

.pos-page .pos-center-category-list button.active,
.pos-page .pos-center-category-list button:hover {
    color: var(--text);
    border-color: #8e692f;
    background: #3b2d19;
}

.pos-view-switch {
    display: flex;
    flex: 0 0 auto;
    border: 1px solid #30342f;
    border-radius: 5px;
    overflow: hidden;
}

.pos-view-switch button {
    width: 34px;
    height: 34px;
    color: var(--muted);
    background: transparent;
    font-size: 17px;
}

.pos-view-switch button.active {
    color: var(--gold);
    background: #3b2d19;
}

.pos-page .pos-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    max-height: calc(100vh - 243px);
    overflow-y: auto;
    padding: 2px 2px 10px;
}

.pos-page .pos-product-card {
    display: block;
    min-height: 145px;
    padding: 0 0 10px;
    overflow: hidden;
    border-color: #343a34;
    background: #171a18;
}

.pos-page .pos-product-card:hover {
    border-color: #a2793a;
    background: #20231f;
}

.pos-page .pos-product-image {
    width: 100%;
    height: 84px;
    border-radius: 0;
    background: #252b26;
}

.pos-page .pos-product-image img {
    transition: transform .3s ease;
}

.pos-page .pos-product-card:hover .pos-product-image img {
    transform: scale(1.05);
}

.pos-page .pos-product-copy {
    display: block;
    padding: 8px 9px 0;
}

.pos-page .pos-product-copy strong {
    font-size: 11px;
}

.pos-page .pos-product-copy small {
    display: none;
}

.pos-page .pos-product-card > b {
    display: block;
    padding: 5px 9px 0;
    color: var(--gold);
    font-size: 11px;
}

.pos-page .pos-add-mark {
    right: 8px;
    bottom: 8px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid #bb8d43;
    border-radius: 50%;
    background: #4a361a;
    font-size: 16px;
}

.pos-page .pos-ticket-panel {
    position: static;
    min-height: calc(100vh - 131px);
    padding: 17px 18px 14px;
    overflow: hidden;
}

.pos-page .pos-ticket-head {
    padding-bottom: 13px;
}

.pos-page .pos-ticket-head h2 {
    font-size: 20px;
}

.pos-page .pos-ticket-head .eyebrow {
    display: block;
    color: var(--text);
    font: 500 18px var(--serif);
    letter-spacing: 0;
}

.pos-page .pos-ticket-head .eyebrow::first-letter {
    color: var(--gold);
}

.pos-page .pos-ticket-head small,
.pos-page .pos-ticket-live {
    font-size: 10px;
}

.pos-page .pos-ticket-items {
    min-height: 150px;
    max-height: 300px;
}

.pos-page .pos-payment-section {
    padding-top: 11px;
}

.pos-page .pos-section-title {
    display: none;
}

.pos-page .pos-payment-methods {
    grid-template-columns: repeat(4, 1fr);
    margin: 7px 0;
}

.pos-page .pos-payment-methods button {
    min-height: 39px;
    font-size: 9px;
}

.pos-page .pos-payment-methods button span {
    display: inline;
    margin-right: 3px;
    font-size: 12px;
}

.pos-page .pos-customer-field input,
.pos-page .pos-input-with-suffix {
    height: 34px;
}

.pos-page .pos-note-label {
    display: none;
}

.pos-page .pos-total-box {
    padding-top: 9px;
}

.pos-page .pos-total-box > div {
    margin: 6px 0;
}

.pos-page .pos-grand-total strong {
    font-size: 25px;
}

.pos-page .pos-statusbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 14px -15px 0;
    padding: 12px 20px;
    border-top: 1px solid #30342f;
    color: var(--muted);
    background: #101211;
    font-size: 11px;
}

.pos-status-icon {
    margin-right: 6px;
    color: var(--text);
    font-size: 15px;
}

.status-online {
    margin-left: 8px;
    color: var(--green);
}

.pos-status-divider {
    display: inline-block;
    height: 18px;
    margin: 0 15px -5px;
    border-left: 1px solid #3b403b;
}

@media (max-width: 1450px) {
    .pos-page .pos-topbar {
        grid-template-columns: 195px 180px 210px 165px 170px minmax(280px, 1fr);
    }

    .pos-page .pos-layout {
        grid-template-columns: minmax(260px, .9fr) minmax(380px, 1.1fr) minmax(325px, .9fr);
    }

    .pos-page .pos-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .pos-page .pos-topbar {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .pos-page .pos-context-chip {
        flex: 1 1 170px;
    }

    .pos-page .pos-layout {
        grid-template-columns: 1fr 1fr;
    }

    .pos-page .pos-control-panel {
        grid-column: 1 / -1;
        min-height: auto;
    }

    .pos-page .pos-table-grid {
        min-height: 250px;
    }

    .pos-page .pos-ticket-panel {
        min-height: 650px;
    }
}

@media (max-width: 680px) {
    .pos-page .pos-shell {
        padding: 10px 8px 0;
    }

    .pos-page .pos-topbar {
        margin: 0 -8px 10px;
        padding: 0 10px 10px;
    }

    .pos-brand-lockup {
        width: 100%;
        border-right: 0;
    }

    .pos-brand-lockup strong {
        font-size: 25px;
    }

    .pos-page .pos-context-chip {
        display: none;
    }

    .pos-page .pos-top-actions {
        width: 100%;
    }

    .pos-page .pos-stat-card {
        flex: 1;
        min-width: 0;
    }

    .pos-page .pos-layout {
        display: block;
    }

    .pos-page .pos-control-panel,
    .pos-page .pos-product-panel,
    .pos-page .pos-ticket-panel {
        min-height: auto;
        margin-bottom: 10px;
    }

    .pos-page .pos-product-grid {
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pos-page .pos-ticket-panel {
        min-height: 610px;
    }

    .pos-page .pos-statusbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        margin: 0 -8px;
        padding: 12px;
    }
}

/* Readability and clean POS workspace */
.pos-page .pos-statusbar {
    display: none !important;
}

.pos-page .pos-floor-tabs button,
.pos-page .pos-center-category-list button {
    font-size: 13px;
}

.pos-page .pos-panel-heading strong,
.pos-page .pos-product-heading h2,
.pos-page .pos-ticket-head h2 {
    font-size: 22px;
}

.pos-page .pos-panel-heading small,
.pos-page .pos-ticket-head small,
.pos-page .pos-customer-field,
.pos-page .pos-payment-fields label,
.pos-page .pos-total-box > div,
.pos-page .pos-security-note {
    font-size: 13px;
}

.pos-page .pos-table-card span,
.pos-page .pos-table-card em {
    font-size: 12px;
}

.pos-page .pos-table-card strong {
    font-size: 29px;
}

.pos-page .pos-selected-table,
.pos-page .pos-table-legend {
    font-size: 13px;
}

.pos-page .pos-search input {
    font-size: 14px;
}

.pos-page .pos-product-copy strong,
.pos-page .pos-product-card > b {
    font-size: 13px;
}

.pos-page .pos-ticket-line strong {
    font-size: 15px;
}

.pos-page .pos-ticket-line small,
.pos-page .pos-qty b {
    font-size: 13px;
}

.pos-page .pos-payment-methods button {
    font-size: 12px;
}

.pos-page .pos-payment-methods button span {
    font-size: 14px;
}

.pos-page .pos-input-with-suffix input,
.pos-page .pos-customer-field input {
    font-size: 14px;
}

.pos-page .pos-grand-total strong {
    font-size: 30px;
}

@media (max-width: 680px) {
    .pos-page .pos-floor-tabs button,
    .pos-page .pos-center-category-list button,
    .pos-page .pos-payment-methods button {
        font-size: 12px;
    }

    .pos-page .pos-product-copy strong,
    .pos-page .pos-product-card > b {
        font-size: 12px;
    }
}

/* Payment panel and admin return action */
.pos-page .pos-top-link.pos-panel-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    color: #20170c;
    border-color: #b58742;
    background: linear-gradient(135deg, #e0b66a, #a77b3b);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pos-page .pos-top-link.pos-panel-link:hover {
    filter: brightness(1.08);
}

.pos-page .pos-ticket-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
}

.pos-page .pos-ticket-head .eyebrow {
    color: var(--text);
    font: 500 22px var(--serif);
}

.pos-order-number {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.pos-order-number b {
    color: var(--text);
    font-weight: 500;
}

.pos-ticket-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 73px 78px 72px;
    gap: 8px;
    padding: 12px 0 8px;
    color: var(--muted);
    border-bottom: 1px solid #30342f;
    font-size: 11px;
}

.pos-ticket-columns span:not(:first-child) {
    text-align: right;
}

.pos-page .pos-ticket-line {
    grid-template-columns: minmax(0, 1fr) 73px 78px 72px 18px;
    align-items: center;
    gap: 8px;
    min-height: 53px;
    padding: 10px 0;
}

.pos-ticket-product strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 13px;
}

.pos-ticket-quantity {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.pos-ticket-quantity button {
    width: 23px;
    height: 23px;
    color: var(--text);
    border: 1px solid #41463f;
    border-radius: 4px;
    background: #191d1a;
    font-size: 14px;
}

.pos-ticket-quantity b,
.pos-ticket-unit,
.pos-ticket-line-total {
    color: var(--text);
    font-size: 12px;
    text-align: right;
}

.pos-ticket-line-total {
    color: var(--gold);
}

.pos-ticket-remove {
    color: var(--muted);
    background: transparent;
    font-size: 16px;
}

.pos-ticket-remove:hover {
    color: var(--red);
}

@media (max-width: 680px) {
    .pos-page .pos-ticket-head {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pos-order-number {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .pos-ticket-columns,
    .pos-page .pos-ticket-line {
        grid-template-columns: minmax(0, 1fr) 57px 65px 18px;
    }

    .pos-ticket-columns span:nth-child(3),
    .pos-ticket-unit {
        display: none;
    }

    .pos-page .pos-ticket-line {
        grid-template-columns: minmax(0, 1fr) 57px 65px 18px;
    }

    .pos-page .pos-ticket-line-total {
        grid-column: 3;
    }

    .pos-page .pos-ticket-remove {
        grid-column: 4;
    }
}

@media (max-width: 900px) {
    body.pos-page {
        overflow-x: hidden;
    }

    .pos-page .pos-shell {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .pos-page .pos-topbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .pos-page .pos-context-chip {
        display: none;
    }

    .pos-page .pos-top-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .pos-page .pos-layout {
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .pos-page .pos-control-panel,
    .pos-page .pos-product-panel,
    .pos-page .pos-ticket-panel {
        width: 100%;
        min-width: 0;
        min-height: auto;
        margin-bottom: 12px;
    }

    .pos-page .pos-table-grid {
        min-height: 250px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 90px;
    }

    .pos-page .pos-product-grid {
        max-height: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-page .pos-ticket-panel {
        min-height: 600px;
    }
}

.pos-page .pos-fullscreen-button {
    min-width: 128px;
    gap: 8px;
    border-color: #76582b;
    color: #f0c777;
    background: rgba(198, 146, 63, .08);
    cursor: pointer;
}

.pos-page .pos-fullscreen-button:hover,
.pos-page .pos-fullscreen-button[aria-pressed="true"] {
    color: #20170c;
    border-color: #d5a858;
    background: linear-gradient(135deg, #e4b86a, #a87b3c);
}

.pos-page:fullscreen {
    width: 100vw;
    min-height: 100vh;
    overflow: auto;
    background: #0c0f0d;
}

.pos-page:fullscreen .pos-shell {
    min-height: 100vh;
}

html.pos-manual-fullscreen,
html.pos-manual-fullscreen body,
html.pos-manual-fullscreen .pos-page {
    width: 100%;
    min-height: 100%;
}

html.pos-manual-fullscreen body {
    position: fixed;
    inset: 0;
    overflow: auto;
}

html.pos-manual-fullscreen .pos-shell {
    min-height: 100vh;
}

/* POS header controls must remain visible above the compact topbar rules. */
.pos-page .pos-topbar {
    flex-wrap: wrap;
    min-width: 0;
}

.pos-page .pos-top-actions {
    flex-wrap: wrap;
    min-width: 0;
}

.pos-page .pos-fullscreen-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 13px;
    color: #f0c777;
    border: 1px solid #76582b;
    border-radius: 6px;
    background: rgba(198, 146, 63, .08);
    white-space: nowrap;
    cursor: pointer;
}

.pos-page .pos-fullscreen-button:hover,
.pos-page .pos-fullscreen-button[aria-pressed="true"] {
    color: #20170c;
    border-color: #d5a858;
    background: linear-gradient(135deg, #e4b86a, #a87b3c);
}

.pos-page .pos-product-grid.pos-list-view {
    grid-template-columns: minmax(0, 1fr);
}

.pos-page .pos-product-card.is-hidden {
    display: none !important;
}

.pos-page .pos-table-card.is-floor-hidden {
    display: none !important;
}

.pos-page .pos-product-grid.pos-list-view .pos-product-card {
    min-height: 84px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto 30px;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 0 12px;
    padding: 8px;
    text-align: left;
}

.pos-page .pos-product-grid.pos-list-view .pos-product-image {
    width: 82px;
    height: 68px;
    grid-row: 1 / span 2;
}

.pos-page .pos-product-grid.pos-list-view .pos-product-copy {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.pos-page .pos-product-grid.pos-list-view .pos-product-card > b {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    padding-top: 2px;
}

.pos-page .pos-product-grid.pos-list-view .pos-add-mark {
    position: static;
    grid-column: 4;
    grid-row: 1 / span 2;
    align-self: center;
}

@media (max-width: 1200px) {
    .pos-page .pos-context-chip {
        display: none;
    }

    .pos-page .pos-top-actions {
        margin-left: auto;
    }
}

@media (max-width: 680px) {
    .pos-page .pos-top-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .pos-page .pos-fullscreen-button span {
        display: inline;
    }

    .pos-page .pos-product-grid.pos-list-view .pos-product-card {
        grid-template-columns: 68px minmax(0, 1fr) 28px;
        gap: 0 9px;
    }

    .pos-page .pos-product-grid.pos-list-view .pos-product-image {
        width: 68px;
        height: 58px;
    }

    .pos-page .pos-product-grid.pos-list-view .pos-product-card > b {
        grid-column: 3;
    }

    .pos-page .pos-product-grid.pos-list-view .pos-add-mark {
        grid-column: 3;
        grid-row: 2;
        justify-self: end;
    }
}
