/* Prevent default buttonface background on all buttons */
button {
    background-color: transparent !important;
}

* {
    box-sizing: border-box;
    user-select: none;
}

/* Ensure no element can cause page overflow */
* {
    max-width: 100%;
}

html {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', sans-serif;
    overflow: hidden;
    max-height: 100vh;
}

.inner {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.subheader {
    width: 354px;
}

.subheader-other {
    width: 118px;
}

.button {
    height: 102px;
}

.button-half {
    height: 51px;
}

.shield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 10000;
    opacity: 0;
    transition-duration: .3s;
    pointer-events: auto;
    touch-action: manipulation;
}

.modal {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    opacity: 0;
    transition-duration: .3s;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
}

.modal table {
    margin: 50px auto;
}

.modal-body-tabs {
    width: 80vw;
    max-width: 1000px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-payment-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    padding: 0px;
}

.tab-payment-container::-webkit-scrollbar {
    width: 60px; /* Much wider scrollbar for easier touch interaction */
}

.tab-payment-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.tab-payment-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    border: 3px solid rgba(0, 0, 0, 0.1);
}

.tab-payment-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-body-tabs table {
    width: 100%;
    margin: 0;
    display: table !important;
    border-collapse: collapse;
}

.modal-body-tab-management {
    position: relative;
    width: 80vw;
    max-width: 1000px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-management-container {
    flex: 1;
    overflow-y: auto;
    padding: 0px;
}

.tab-management-container::-webkit-scrollbar {
    width: 60px; /* Much wider scrollbar for easier touch interaction */
}

.tab-management-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.tab-management-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    border: 3px solid rgba(0, 0, 0, 0.1);
}

.tab-management-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-body-tab-management table {
    width: 100%;
    margin: 0;
    display: table !important;
    border-collapse: collapse;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    height: 43px;
    background-color: rgba(209, 59, 9, 1);
    border-bottom: 3px solid darkorange;
}

.main {
    flex: 1;
    display: flex;
    background-color: black;
}

.left-pane,
.right-pane {
    flex: 0;
}

.left-pane {
    display: flex;
    flex-direction: column;
}

.left-pane-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* A payment button that isn't valid for the current docket (e.g. CASH / ON TAB
   while a cash-out is present — EFTPOS only). Dimmed; the handler also guards. */
.button.pay-blocked {
    opacity: 0.35;
}

/* Joker Poker entry — same flush styling as the "Other" pane's category buttons
   (inherits the base .button size/shape/font/borders), just its own solid colour.
   Styled by id so the colour beats `.right-pane .button` (tan). Hidden for members
   in JS. Crimson so it doesn't clash with the purple Cider button. */
#joker-poker-btn {
    background-color: rgba(211, 47, 47, 1);
}

.left-pane,
.right-pane {
    opacity: 1;
    transition-duration: .3s;
}

.docket {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid saddlebrown;
}

.docket-inner {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid saddlebrown;
    border-left: 1px solid saddlebrown;
    background-color: antiquewhite;
}

.category {
    flex: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: rgba(215, 215, 215, .2);
    background-color: #333;
}

.category-inner {
    display: flex;
    flex-wrap: wrap;
}

.left-pane-row {
    display: flex;
}

.subheader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    /* background-color: orangered; */
    color: white;
    font-weight: 700;
    font-size: 22px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    border-top: 1px solid saddlebrown;
    border-left: 1px solid saddlebrown;
}

table {
    border-collapse: collapse;
}

td {
    position: relative;
    width: 118px;
    min-width: 118px;
    height: 102px;
    text-align: center;
    color: white;
    font-size: 18px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    font-weight: 700;
    padding: 0;
}

.footer {
    display: flex;
    align-items: stretch;
    /* No fixed height — size to content and flex within the 100vh layout like
       the original (which fit), so the bottom isn't clipped. Buttons fill this
       row via align-self:stretch (see .footer .button), keeping text centred. */
    background-color: #f46d43;
    border-top: 1px solid saddlebrown;
    background-color: rgba(0, 0, 0, .2);
}

.footer-left {
    display: flex;
    width: 826px;
}

.footer-item {
    width: 127px;
    min-width: 127px;
    border-right: 1px solid saddlebrown;
}

.subheader {
    height: 51px;
}

td:first-child {
    border-left: none;
}

.left-pane td {
    width: 33%;
}

.left-pane td:nth-child(2) {
    width: 34%;
}

.footer-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

.footer-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.footer-right .button {
    width: 200px;
    color: white;
    font-weight: 700;
    font-size: 22px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

.footer-right .button {
    background-color: #c00;
}

.left-pane-row:last-child tr:last-child td,
.right-pane tr:last-child td {
    border-bottom: none;
}

.button {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 118px;
    padding: 10px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    border-top: 1px solid saddlebrown;
    border-left: 1px solid saddlebrown;
    cursor: pointer;
    z-index: 1;
}

.button-petite {
    font-size: 14px;
}

/* Per-product colour dot in a product tile's top-left corner. Colour is set
   inline per tile (see makeStripeAllocator); the white ring keeps it legible on
   any category colour. pointer-events:none so it never swallows a tap. */
.tile-dot {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    pointer-events: none;
    z-index: 2;
}

.footer td {
    height: auto;
}

.footer .button {
    border-top: none;
    /* Fill the footer height and let .button's own flex centring vertically
       centre the text — consistent across desktop Chrome and the tablet WebView,
       unlike fixed heights + mixed align-items which the engines render
       differently. */
    height: auto;
    align-self: stretch;
}

.footer td:last-child,
.footer td:last-child .button {
    background-color: transparent;
}

.left-pane .left-pane-row:first-child .category:first-child .subheader {
    background-color: rgba(6, 172, 241, .8);
}

.left-pane .left-pane-row:first-child .category:first-child .button {
    background-color: rgba(6, 172, 241, 1);
}

.left-pane .left-pane-row:first-child .category:last-child .subheader {
    background-color: rgba(222, 119, 174, .8);
}

.left-pane .left-pane-row:first-child .category:last-child .button {
    background-color: rgba(222, 119, 174, 1);
}

.left-pane .left-pane-row:last-child .category:first-child .subheader {
    background-color: rgba(107, 168, 45, .8);
}

.left-pane .left-pane-row:last-child .category:first-child .button {
    background-color: rgba(107, 168, 45, 1);
}

.left-pane .left-pane-row:last-child .category:last-child .subheader {
    background-color: rgba(235, 171, 0, .8);
}

.left-pane .left-pane-row:last-child .category:last-child .button {
    background-color: rgba(235, 171, 0, .9);
}

.right-pane {
    background-color: antiquewhite;
    border-left: 1px solid saddlebrown;
}

.right-pane .subheader {
    background-color: rgba(181, 154, 133, .8);
    border-left: none;
}

.right-pane .button {
    background-color: rgba(181, 154, 133, 1);
    border-left: none;
}

.right-pane .category-inner .button:last-child {
    border-bottom: 1px solid saddlebrown;
}

.docket {
    background-color: #333;
}

.docket .subheader {
    background-color: orangered;
}

.inactive {
    opacity: .8;
}

.modal-body-more .button.inactive {
    pointer-events: none;
    cursor: default;
    opacity: 0.35;
}

.active {
    cursor: pointer;
}

.touched {
    opacity: .8;
}

.docket-list {
    flex: 1;
}

.docket-buttons {
    flex: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.docket-button-wrapper {
    display: flex;
    height: 102px;
}

.docket-button-wrapper .button {
    flex: 1;
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    font-weight: 700;
    font-size: 28px;
    border-left: none;
}

.docket-button-wrapper .button:first-child {
    border-right: 1px solid saddlebrown;
}

.footer-left .button {
    background-color: darkorange;
    font-weight: 700;
}

.docket-clear {
    background-color: rgba(180, 90, 0, .3);
}

.docket-cash,
.docket-eftpos,
.docket-tab {
    background-color: darkorange;
}

.docket-modes {
    display: flex;
    background-color: white;
}

.docket-modes div {
    flex: 1;
}

.happy-hour {
    font-size: 20px;
    background-color: #292;
    /* Fill the docket-modes row (instead of a fixed 51px that top-aligns in a
       taller row) so the flex centering vertically centres the text. */
    height: auto;
    align-self: stretch;
}

.happy-hour-active {
    animation: happyhour 2s ease-in-out infinite;
}

.more,
.close,
.back {
    font-size: 16px;
    font-weight: 700;
}

/* Universal close/cancel button styling */
.close,
.back,
.cancel,
.close-button,
.cancel-button {
    background-color: #f44336 !important;
    color: white !important;
}

.close:hover,
.back:hover,
.cancel:hover,
.close-button:hover,
.cancel-button:hover {
    background-color: #d32f2f !important;
}

/* Misc product add button - green */
.misc-add-product {
    background-color: #4CAF50 !important;
    color: white !important;
}

.misc-add-product:hover {
    background-color: #45a049 !important;
}

/* Stocktake save button - green */
.stocktake-save {
    background-color: #4CAF50 !important;
    color: white !important;
}

.stocktake-save:hover {
    background-color: #45a049 !important;
}

.back {
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

.blurred {
    filter: blur(2px);
}

.mode-indicator {
    display: flex;
}

.mode-indicator .button {
    flex: 1;
}

.sales-mode .button {
    font-size: 20px;
    border-left: 1px solid saddlebrown;
    border-top: 1px solid saddlebrown;
    border-right: none;
}

.sales-mode .member {
    background-color: #292;
}

.sales-mode .nonmember {
    background-color: #929;
}

.docket-list {
    max-height: 408px;
    overflow-y: scroll;
    padding-bottom: 5px;
}

.docket-entry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 20px;
    color: #222;
    padding: 7px 10px 0 10px;
    position: relative;
}

/* Touch-and-hold a docket line to delete it: a red wipe grows across the line
   over the hold duration (must match DOCKET_HOLD_MS in app.js). Release, tap, or
   drag before it completes and the line stays. */
.docket-entry.holding::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(239, 68, 68, 0.28);
    border-radius: 6px;
    transform: scaleX(0);
    transform-origin: left center;
    animation: docketHoldWipe 650ms linear forwards;
    pointer-events: none;
}

@keyframes docketHoldWipe {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.docket-entry-inner {
    display: flex;
}

.docket-entry-quantity {
    flex: 0;
    width: 28px;
    min-width: 28px;
}

.docket-entry-name {
    flex: 1;
    font-weight: 500;
}

.docket-entry-price {
    display: flex;
    justify-content: flex-end;
    padding-top: 5px;
}

.docket-entry-ea {
    margin-right: auto;
    margin-left: 28px;
    color: #555;
}

.docket-entry-subtotal {
    color: #111;
}

.docket-total-line {
    margin-top: auto;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 5px;
    border-top: 1px dotted saddlebrown;
}

.docket-total-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px;
}

.docket-last-sale {
    font-size: 16px;
    color: #666;
}

.docket-total {
    line-height: 1;
    font-size: 30px;
    color: #111;
}

.add-indicator {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 0px;
    bottom: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 1);
    color: #ccc;
    font-size: 32px;
    font-weight: 700;
    text-shadow: none;
    transition-duration: .3s;
    z-index: 10;
}

.tab-button {
    background-color: darkorange;
}

.new-tab {
    background-color: #292;
    font-weight: 700;
}

.modal-body,
.modal-entry {
    transition-duration: .3s;
    opacity: 0;
    width: auto;
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-name {
    transition-duration: .3s;
    opacity: 1;
}

.modal-keyboard {
    margin: 0 50px 50px 40px;
    display: flex;
    flex-wrap: wrap;
    background-color: black;
}

.key {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 85px;
    height: 85px;
    font-size: 32px;
    background-color: #aaa;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 1px black;
    cursor: pointer;
}

.key:nth-child(14n) {
    border-right: 1px solid #666;
}

/* .key:nth-child(28) ~ .key {
    border-bottom: 1px solid #666;
} */
.key-small {
    font-size: 18px;
}

.key:nth-last-child(4) {
    flex: 1;
    border-bottom: 1px solid #666;
}

.key:last-child {
    border-right: 1px solid #666;
}

.key:last-child,
.key:nth-last-child(2),
.key:nth-last-child(3) {
    width: 170px;
    border-bottom: 1px solid #666;
}

.key-held {
    background-color: #888;
}

.modal-input {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 50px 0 40px;
    background-color: #aaa;
    border-left: 1px solid #666;
    border-top: 1px solid #666;
    border-right: 1px solid #666;
}

.modal-input input {
    flex: 1;
    margin: 20px;
    border: 1px solid #999;
    font-size: 32px;
    padding: 10px;
    outline: none;
    color: #555;
}

.key-done {
    background-color: #292;
}

.spinner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    margin: 0 20px;
    transition-duration: .3s;
}

.spinner-disc {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    animation-name: jump;
    animation-duration: .8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.disabled {
    position: absolute;
    top: 1px;
    left: 1px;
    bottom: 0px;
    right: 1px;
    background: repeating-linear-gradient(45deg,
            #ccc,
            #ccc 5px,
            #333 5px,
            #333 10px);
    z-index: 10;
    opacity: .1;
}

.more-disc {
    position: absolute;
    top: calc(50% - 42.5px);
    left: calc(50% - 42.5px);
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background-color: rgba(90, 90, 90, .1);
    z-index: 0;
}

.right-pane .more {
    background-color: #a88f7c;
}

.button-text {
    z-index: 1;
    transition-duration: .3s;
}

.deactivated {
    pointer-events: none;
}

.deactivated .left-pane,
.deactivated .right-pane {
    opacity: .8;
}

/* Modal body more positioning - handled by JavaScript */

.modal-body-more.hidden {
    display: none !important;
    visibility: hidden !important;
}

.modal-body-more td:last-child .button,
.modal-body-tabs td:last-child .button,
.modal-body-tab-management td:last-child .button {
    border-right: 1px solid saddlebrown;
}

/* Category buttons in Other panel */
.right-pane .category-button {
    /* Use same styling as other buttons */
    color: white;
}

.modal-body-tab-management .tab-button {
    justify-content: flex-start;
}

.modal-body-tab-management .tab-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 75%;
}

/* Tab Detail Modal - Complete Rework */
.tab-detail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border: 1px solid rgba(205, 205, 205, 1);
    background-color: white;
    opacity: 0;
    transition-duration: .3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.tab-detail-outer-row {
    display: flex;
    width: 100%;
    min-height: 60px;
}

.tab-detail-outer-row:first-child {
    background-color: rgb(100, 120, 120);
    border-bottom: 1px solid rgba(185, 185, 185, 1);
}

.tab-detail-outer-row:last-child {
    flex: 1;
    overflow-y: auto;
    flex-direction: column;
    padding: 0;
}

.tab-detail-add-credit {
    background-color: #2a8a3e;
    color: #fff;
}

.tab-detail-name {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 60px;
    font-size: 24px;
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    padding: 0 20px;
}

.tab-detail-heading {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
    width: 100%;
    background-color: rgba(130, 150, 150, 1);
    border-bottom: 1px solid rgba(185, 185, 185, 1);
    color: white;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

.tab-detail-heading div {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 10px;
    border-right: 1px solid rgba(185, 185, 185, 1);
}

.tab-detail-heading div:last-child {
    border-right: none;
}

.tab-detail-heading div:nth-child(3) {
    justify-content: flex-start;
}

.tab-detail-heading div:nth-child(4),
.tab-detail-heading div:nth-child(5) {
    justify-content: flex-end;
}

/* Tab History Rows */
.tab-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
    width: 100%;
    min-height: 45px;
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
}

.tab-detail-row:last-child {
    border-bottom: none;
}

.tab-detail-row-empty {
    opacity: 0.3;
}

.tab-detail-row-empty .tab-detail-cell {
    color: #ccc;
}

.tab-detail-cell {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    padding: 8px 10px;
    word-wrap: break-word;
    overflow: hidden;
    border-right: 1px solid #f0f0f0;
}

.tab-detail-cell:last-child {
    border-right: none;
}

.tab-detail-cell.centered {
    justify-content: center;
}

.tab-detail-cell.tab-detail-currency {
    justify-content: flex-end;
    font-weight: 600;
}

.tab-detail-currency div {
    display: inline-block;
    margin-right: 2px;
}

/* Total Row */
.tab-detail-total-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    margin-top: 10px;
}

.tab-detail-total-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border-right: 1px solid #e0e0e0;
}

.tab-detail-total-cell:last-child {
    border-right: none;
}

.tab-detail-total {
    justify-content: flex-end;
    font-size: 16px;
    color: #28a745;
    font-weight: 700;
}

.tab-detail-total div {
    display: inline-block;
    margin-right: 2px;
}

.tab-detail-cell,
.tab-detail-total-cell {
    position: relative;
    display: flex;
    flex: 1;
    padding: 16px 24px;
    border-left: 1px solid rgba(205, 205, 205, 1);
    color: white;
    font-size: 16px;
    font-weight: 700;
    background-color: rgba(150, 170, 170, 1);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
}

.tab-detail-total-cell {
    padding: 16px 24px;
}

.tab-detail-cell:nth-child(3) {
    flex: 2;
}

.tab-detail-currency {
    display: flex;
    justify-content: space-between;
}

.tab-detail-total-row {
    flex-grow: 1;
    background-color: rgba(150, 170, 170, 1);
    justify-content: flex-end;
}

.tab-detail-total {
    flex-grow: 0;
    flex-shrink: 0;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.tab-detail-total-cell .button-half {
    border-left: none;
    border-top: none;
    background-color: darkorange;
}

.tab-detail-pay-some,
.tab-detail-pay-all {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #292;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
    font-size: 16px;
    font-weight: 700;
    border-left: 1px solid rgba(205, 205, 205, 1);
    border-top: none;
    cursor: pointer;
}

.tab-detail-hh {
    position: absolute;
    top: 6px;
    right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background-color: hotpink;
    border: 1px solid rgb(225, 85, 150);
    color: white;
    font-size: 14px;
    border-radius: 50%;
}

.tab-list-total {
    position: absolute;
    bottom: 10px;
    font-size: 14px;
}

.tab-half {
    width: 59px;
}

.centered {
    justify-content: center;
}

.align-right {
    justify-content: flex-end;
}

.hidden {
    display: none;
}

@keyframes jump {
    0% {
        left: -5px;
        transform: scale(1);
        opacity: .6;
    }

    25% {
        transform: scale(2);
    }

    50% {
        left: 100%;
        transform: scale(1);
        opacity: 1;
    }

    75% {
        transform: scale(2);
    }

    100% {
        left: -5px;
        transform: scale(1);
        opacity: .6;
    }
}

@keyframes happyhour {
    0% {
        background-color: #292;
    }

    20% {
        background-color: #292;
    }

    50% {
        background-color: darkorange;
    }

    70% {
        background-color: #292;
    }

    100% {
        background-color: #292;
    }
}

/* Toast-style notification system */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Allow clicking through the container */
}

.notification {
    pointer-events: auto; /* Make individual notifications clickable */
    padding: 20px 28px;
    border-radius: 11px;
    color: white;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.38;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    max-width: 520px;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Progress bar for notification timeout */
.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
    animation: progress-bar 3s linear;
    width: 100%;
}

/* Types of notifications */
.notification-error {
    background-color: #f44336;
    border-left: 4px solid #d32f2f;
}

.notification-success {
    background-color: #4caf50;
    border-left: 4px solid #2e7d32;
}

.notification-warning {
    background-color: #ff9800;
    border-left: 4px solid #ef6c00;
}

.notification-info {
    background-color: #2196f3;
    border-left: 4px solid #1565c0;
}

/* Add icons before text */
.notification::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.notification-success::before {
    content: '✓';
    font-weight: bold;
}

.notification-error::before {
    content: '✕';
    font-weight: bold;
}

.notification-warning::before {
    content: '!';
    font-weight: bold;
}

.notification-info::before {
    content: 'i';
    font-weight: bold;
    font-style: italic;
}

/* Animations */
.notification-hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(10%);
    }
}

@keyframes progress-bar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Click to dismiss functionality */
.notification {
    cursor: pointer;
}

.notification:hover {
    opacity: 0.9;
}

/* Responsive design for smaller screens */
@media (max-width: 480px) {
    .notification-container {
        left: 20px;
        right: 20px;
    }
    
    .notification {
        max-width: 100%;
    }
}
/* Network Status Indicator Styles */
.network-status-container {
    display: flex;
    align-items: center;
    /* Fill the footer row height. `height:100%` didn't resolve (footer-left has
       no definite height) and blocked the default stretch, top-aligning this. */
    align-self: stretch;
    padding: 0 10px;
    position: relative;
    border-left: 1px solid saddlebrown;
}

.wifi-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.wifi-icon.online {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%2328a745" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
}

.wifi-icon.offline {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23dc3545" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="none" stroke="%23dc3545" stroke-width="2"/><path d="M2 2l20 20" stroke="%23dc3545" stroke-width="2"/></svg>');
}

.status-text {
    font-size: 14px;
    color: white;
    font-weight: 700;
    margin-right: 5px;
    white-space: nowrap;
}

.network-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    white-space: nowrap;
    z-index: 1000;
}

.network-status-container:hover .network-tooltip {
    opacity: 1;
    visibility: visible;
}

.sync-button {
    margin-left: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.sync-icon {
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
}


.sync-button.syncing .sync-icon {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .status-text {
        display: none;
    }
    
    .network-status-container {
        padding: 0 5px;
    }
}

/* Optional animation for connection status change */
.wifi-icon.online {
    animation: pulse-green 1s;
}

.wifi-icon.offline {
    animation: pulse-red 1s;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

/* Admin Panel Styles */
.admin-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.admin-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
}

.admin-content h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.admin-buttons .button {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    font-size: 22px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: white !important;
}

/* Default admin button color for buttons without specific classes */
.admin-buttons .button:not([class*="admin-"]) {
    background-color: #2196F3 !important;
}

.admin-export-prices {
    background-color: #4CAF50 !important;
    color: white !important;
}

.admin-export-prices:hover {
    background-color: #45a049 !important;
}

.admin-import-prices {
    background-color: #2196F3 !important;
    color: white !important;
}

.admin-import-prices:hover {
    background-color: #1976D2 !important;
}

.admin-refresh-data {
    background-color: #FF9800 !important;
    color: white !important;
}

.admin-refresh-data:hover {
    background-color: #F57C00 !important;
}

.admin-pay-membership {
    background-color: #8e24aa !important;
    color: white !important;
}

.admin-pay-membership:hover {
    background-color: #6a1b9a !important;
}

.admin-clear-cache {
    background-color: #f44336 !important;
    color: white !important;
}

.admin-clear-cache:hover {
    background-color: #d32f2f !important;
}

.admin-help {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

.admin-help p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.admin-help strong {
    color: #333;
}

/* Function Tab Toggle Switch */
.admin-toggle {
    margin: 15px 0;
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
    margin-right: 12px;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Function Tab Button */
.function-tab-button {
    background-color: #FF9800 !important;
    color: white !important;
    font-weight: bold;
    border-left: 1px solid saddlebrown !important;
}

.function-tab-button:hover {
    background-color: #F57C00 !important;
}

.modal-body-function-tab-add-chooser {
    width: 92vw;
    max-width: 520px;
    max-height: 80vh;
    display: flex !important;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-body-function-tab-add-chooser.hidden {
    display: none !important;
}

.function-tab-add-chooser-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 80vh;
}

.function-tab-add-chooser-help {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.function-tab-add-chooser-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
}

.function-tab-add-chooser-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.function-tab-add-chooser-new {
    border-style: dashed !important;
    background: #fffef7 !important;
}

.function-tab-session-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-size: 16px;
    color: #333;
    gap: 12px;
}

.function-tab-session-picker-row:hover {
    border-color: #ff9800;
    background: #fff8f0;
}

.function-tab-session-picker-row.is-active {
    border-color: #ff9800;
    background: #fff3e0;
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.25);
}

.function-tab-session-picker-row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.function-tab-session-picker-row-name {
    font-weight: 700;
    color: #e65100;
}

.function-tab-session-picker-row-meta {
    font-size: 13px;
    color: #666;
}

.function-tab-session-picker-row-total {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}

.function-tab-pay-session {
    margin-top: 12px;
    width: 100%;
    background-color: #ff9800 !important;
    color: #fff !important;
    font-weight: bold;
}

.function-tab-pay-session:hover {
    background-color: #f57c00 !important;
}

.function-tab-session-block {
    border: 2px solid #ffe0b2;
    border-radius: 10px;
    padding: 12px;
    background: #fffefb;
}

.function-tab-subentry {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
}

.function-tab-subentry:first-of-type {
    margin-top: 8px;
    padding-top: 8px;
    border-top: none;
}

/* Function Tab Modal Styles */
.modal-body-function-tab {
    width: 95vw;
    max-width: 1200px;
    height: 85vh;
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    position: relative;
    z-index: 10002;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
    overflow: hidden;
}

.modal-body-function-tab.hidden {
    display: none !important;
    visibility: hidden !important;
}

.function-tab-content {
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.function-tab-stats {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 0;
    border-left: 4px solid #FF9800;
    flex-shrink: 0;
}

.function-tab-stats p {
    margin: 8px 0;
    font-size: 16px;
    color: #333;
}

.function-tab-stats strong {
    color: #FF9800;
    font-weight: bold;
}

.function-tab-entries {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

/* Custom scrollbar for entries */
.function-tab-entries::-webkit-scrollbar {
    width: 8px;
}

.function-tab-entries::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.function-tab-entries::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.function-tab-entries::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.function-tab-entry {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.function-tab-entry h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.function-tab-entry p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.function-tab-items {
    margin-top: 10px;
    padding-left: 15px;
}

.function-tab-item {
    padding: 5px 0;
    color: #555;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.function-tab-item:last-child {
    border-bottom: none;
}

.function-tab-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    background-color: white;
}

.function-tab-pay {
    background-color: #4CAF50 !important;
    color: white !important;
}

.function-tab-pay:hover {
    background-color: #45a049 !important;
}

.function-tab-close {
    background-color: #f44336 !important;
    color: white !important;
}

.function-tab-close:hover {
    background-color: #d32f2f !important;
}

/* Function Tab Payment Modal Styles */
.modal-body-function-tab-payment {
    width: 90vw;
    max-width: 600px;
    height: 70vh;
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    position: relative;
    z-index: 10002;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
    overflow: hidden;
}

.modal-body-function-tab-payment.hidden {
    display: none !important;
    visibility: hidden !important;
}

.function-tab-payment-content {
    padding: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.function-tab-payment-summary {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #FF9800;
    width: 100%;
}

.function-tab-payment-summary h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.function-tab-payment-summary p {
    margin: 8px 0;
    font-size: 16px;
    color: #666;
}

.function-tab-payment-summary .total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #FF9800;
    margin-top: 15px;
}

.function-tab-payment-methods {
    margin-bottom: 30px;
    width: 100%;
}

.function-tab-payment-methods h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.payment-methods {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-method-btn {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.payment-icon {
    font-size: 24px;
    display: block;
}

.cash-payment {
    background-color: #4CAF50 !important;
    color: white !important;
}

.cash-payment:hover {
    background-color: #45a049 !important;
    transform: translateY(-2px);
}

.eftpos-payment {
    background-color: #2196F3 !important;
    color: white !important;
}

.eftpos-payment:hover {
    background-color: #1976D2 !important;
    transform: translateY(-2px);
}

.function-tab-payment-actions {
    margin-top: auto;
}

.function-tab-payment-cancel {
    background-color: #f44336 !important;
    color: white !important;
    padding: 12px 30px;
    font-size: 16px;
}

.function-tab-payment-cancel:hover {
    background-color: #d32f2f !important;
}

/* Stocktake cancel button */
.stocktake-cancel {
    background-color: #f44336 !important;
    color: white !important;
}

.stocktake-cancel:hover {
    background-color: #d32f2f !important;
}

/* Login cancel button */
.login-cancel {
    background-color: #f44336 !important;
    color: white !important;
}

.login-cancel:hover {
    background-color: #d32f2f !important;
}

/* Credit cancel buttons */
.credit-cancel,
.credit-cancel-payment {
    background-color: #f44336 !important;
    color: white !important;
}

.credit-cancel:hover,
.credit-cancel-payment:hover {
    background-color: #d32f2f !important;
}

/* Miscellaneous Product Modal Styles */
.misc-product-content {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.misc-product-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.misc-product-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.misc-product-buttons .button {
    flex: 1;
    max-width: 200px;
}

.admin-misc-product {
    background-color: #17a2b8 !important;
    color: white !important;
}

.admin-view-function-tab {
    background-color: #9C27B0 !important;
    color: white !important;
}

.admin-view-function-tab:hover {
    background-color: #7B1FA2 !important;
}

.admin-pay-function-tab {
    background-color: #E91E63 !important;
    color: white !important;
}

.admin-pay-function-tab:hover {
    background-color: #C2185B !important;
}

.admin-stocktake {
    background-color: #FF5722 !important;
    color: white !important;
}

.admin-stocktake:hover {
    background-color: #D84315 !important;
}

.admin-open-drawer {
    background-color: #00BCD4 !important;
    color: white !important;
}

.admin-open-drawer:hover {
    background-color: #0097A7 !important;
}

/* Cash out = money leaving the till — an amber caution colour, distinct from the
   cyan "Open Cash Drawer" beside it. */
.admin-cash-out {
    background-color: #F59E0B !important;
    color: white !important;
}

.admin-cash-out:hover {
    background-color: #D97706 !important;
}

.admin-drawer-settings {
    background-color: #607D8B !important;
    color: white !important;
}

.admin-drawer-settings:hover {
    background-color: #455A64 !important;
}

/* Cash Drawer Settings Modal */
.drawer-settings-content {
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.drawer-settings-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.drawer-settings-info {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

.drawer-settings-info p {
    margin: 0;
    color: #1976d2;
}

.drawer-settings-form {
    margin-bottom: 25px;
}

.drawer-settings-form .form-group {
    margin-bottom: 20px;
}

.drawer-settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.drawer-settings-form input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

.drawer-settings-form input:focus {
    border-color: #00BCD4;
    outline: none;
}

.drawer-test-result {
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 500;
}

.drawer-test-result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.drawer-test-result.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.drawer-test-result.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.drawer-settings-buttons {
    display: flex;
    gap: 15px;
}

.drawer-settings-buttons .button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

.drawer-test {
    background-color: #607D8B !important;
    color: white !important;
}

.drawer-test:hover {
    background-color: #455A64 !important;
}

.drawer-save {
    background-color: #4CAF50 !important;
    color: white !important;
}

.drawer-save:hover {
    background-color: #45a049 !important;
}

.misc-add-product {
    background-color: #28a745;
    color: white;
}

/* Text Keyboard Styles - Using new tab keyboard styling */
.text-keyboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-keyboard {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.keyboard-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    background-color: #aaa;
    border-left: 1px solid #666;
    border-top: 1px solid #666;
    border-right: 1px solid #666;
    border-radius: 6px 6px 0 0;
}

.keyboard-display input {
    flex: 1;
    margin: 20px;
    border: 1px solid #999;
    font-size: 24px;
    padding: 15px;
    outline: none;
    color: #555;
    background: white;
}

.keyboard-keys {
    margin: 0 20px 20px 20px;
    display: flex;
    flex-wrap: wrap;
    background-color: black;
    border-radius: 0 0 6px 6px;
}

.keyboard-row {
    display: contents;
}

.keyboard-key, .keyboard-action, .keyboard-confirm, .keyboard-cancel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 20px;
    background-color: #aaa;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 1px black;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keyboard-key:hover, .keyboard-action:hover, .keyboard-confirm:hover, .keyboard-cancel:hover {
    background-color: #888;
}

.keyboard-key:nth-child(10n) {
    border-right: 1px solid #666;
}

.keyboard-confirm {
    background: #292;
}

.keyboard-cancel {
    background: #666;
}

.keyboard-space {
    flex: 1;
    border-bottom: 1px solid #666;
}

.keyboard-actions {
    display: flex;
    width: 100%;
}

.keyboard-actions .keyboard-confirm,
.keyboard-actions .keyboard-cancel {
    flex: 1;
    border-bottom: 1px solid #666;
}

.misc-add-product:hover {
    background-color: #218838;
}

/* Responsive design for admin panel */
@media (max-width: 768px) {
    .admin-buttons {
        flex-direction: column;
    }
    
    .admin-buttons .button {
        min-width: auto;
    }
    
    .admin-content {
        padding: 15px;
        margin: 10px;
    }
    
    .misc-product-content {
        padding: 15px;
        margin: 10px;
    }
    
    .misc-product-buttons {
        flex-direction: column;
    }
    
    .misc-product-buttons .button {
        max-width: none;
    }
}

/* Demo install only (added by applyDemoBranding in app.js). */
.demo-ribbon {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(246, 195, 68, 0.92);
  color: #1a202c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  pointer-events: none;
}
