/* aPOS in-app overlay — restyles shared chrome without changing markup or JS. */

:root {
    --apos-lime: #4CAF50;
    --apos-lime-hi: #66BB6A;
    --apos-lime-deep: #388E3C;
    --apos-soft: #E8F5E9;
    --apos-ink: #263238;
    --apos-on-primary: #FFFFFF;
    --apos-page: #F7F9FB;
    --apos-card: #FFFFFF;
    --apos-line: #E3E8ED;
    --apos-muted: #607D8B;
    --apos-danger: #C62828;
    --apos-radius: 16px;
    --apos-radius-sm: 12px;
    --apos-shadow: 0 1px 2px rgba(38, 50, 56, 0.06);
    --clr-primary: var(--apos-lime);
    --clr-primary-ink: var(--apos-on-primary);
    --bs-primary: #4CAF50;
    --bs-primary-rgb: 76, 175, 80;
}

body:not(.apos-auth) {
    background: var(--apos-page);
    color: var(--apos-ink);
    letter-spacing: -0.01em;
}

#main-wrapper {
    background: var(--apos-page);
}

.section-container {
    background: var(--apos-page);
}

/* -------------------------------------------------------------------------
   Sidebar — dark teal like the 2026 mockup
   ------------------------------------------------------------------------- */
.side-bar {
    background: linear-gradient(180deg, #0b3b36 0%, #0f5a4a 52%, #147a5a 100%);
    box-shadow: none;
    border-right: 0;
}

.side-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
}

.side-bar-logo {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 14px;
}

.side-bar-logo a {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border-radius: 12px;
    padding: 4px 2px;
}

.side-bar-logo img {
    height: 36px;
}

.side-bar .close-btn {
    color: rgba(255, 255, 255, 0.72);
}

.side-bar-manu {
    padding: 6px 10px 14px;
}

.side-bar-manu > ul {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 92px);
}

.side-bar-manu li a {
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.88) !important;
}

.side-bar-manu li.sidebar-create-sale > a {
    background: rgba(76, 175, 80, 0.22) !important;
    color: #fff !important;
    font-weight: 650 !important;
    border: 1px solid rgba(165, 214, 167, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.side-bar-manu li.sidebar-create-sale:hover > a,
.side-bar-manu li.sidebar-create-sale.active > a {
    background: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
    border-color: transparent;
}

.side-bar-manu li.sidebar-dues > a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-bar-manu li.sidebar-dues .sidebar-link-text {
    flex: 1;
    min-width: 0;
}

.sidebar-dues-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.25rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #5d4037;
    background: #ffe0b2;
    flex-shrink: 0;
}

.side-bar-manu li.sidebar-dues.active .sidebar-dues-badge,
.side-bar-manu li.sidebar-dues:hover .sidebar-dues-badge {
    background: rgba(255, 255, 255, 0.92);
    color: #4e342e;
}

.side-bar-manu .dropdown::before {
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.side-bar-manu .dropdown.active > .dropdown-menu,
.side-bar-manu .dropdown.menu-open > .dropdown-menu {
    display: block;
}

.side-bar-manu li:hover:before {
    transform: none;
}

.side-bar-manu li.dropdown.active:before,
.side-bar-manu li.dropdown.menu-open:before {
    transform: rotate(90deg);
    color: #fff;
}

.side-bar-manu li a .sidebar-icon img,
.side-bar-manu li a .sidebar-icon svg {
    filter: brightness(0) invert(1);
    opacity: 0.88;
}

.side-bar-manu li:hover > a {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    box-shadow: none;
}

.side-bar-manu > ul > li.active:not(.dropdown) > a,
.side-bar-manu li .dropdown-menu li a.active,
.side-bar-manu li .dropdown-menu li li.active > a {
    background-color: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
}

.side-bar-manu > ul > li.active:not(.dropdown) > a {
    box-shadow: 0 0 0 1px rgba(165, 214, 167, 0.35), 0 10px 24px rgba(76, 175, 80, 0.32);
}

.side-bar-manu > ul > li.dropdown.active > a {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none;
}

.side-bar-manu > ul > li.dropdown.active:hover > a {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.side-bar-manu li .dropdown-menu li a:hover,
.side-bar-manu li .dropdown-menu li li:hover > a {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    box-shadow: none;
}

.side-bar-manu li:hover > a .sidebar-icon img,
.side-bar-manu > ul > li.active:not(.dropdown) > a .sidebar-icon img,
.side-bar-manu li:hover > a .sidebar-icon svg,
.side-bar-manu > ul > li.active:not(.dropdown) > a .sidebar-icon svg,
.side-bar-manu li .dropdown-menu li a:hover .sidebar-icon img,
.side-bar-manu li .dropdown-menu li a:hover .sidebar-icon svg,
.side-bar-manu li .dropdown-menu li a.active .sidebar-icon img,
.side-bar-manu li .dropdown-menu li a.active .sidebar-icon svg {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.side-bar-manu li:hover:before,
.side-bar-manu li.active:before {
    color: var(--apos-on-primary);
}

.side-bar-manu .sidebar-plan-item {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.side-bar-manu .sidebar-plan-item > a,
.side-bar-manu .sidebar-plan-item:hover > a,
.side-bar-manu .sidebar-plan-item.active > a {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.82) !important;
    padding: 8px 10px;
    box-shadow: none;
}

.sidebar-plan-name {
    display: block;
    font-size: 0.68rem;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-plan-expiry {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.side-bar-manu .sidebar-help-item {
    margin-top: 4px;
    margin-bottom: 4px;
}

.side-bar-manu .sidebar-help-item > a,
.side-bar-manu .sidebar-help-item:hover > a,
.side-bar-manu .sidebar-help-item.active > a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 10px;
    box-shadow: none;
}

.side-bar-manu .sidebar-help-item:hover > a {
    background: rgba(255, 255, 255, 0.16) !important;
}

.sidebar-help-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sidebar-help-copy strong {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.sidebar-help-copy span {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-help-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4CAF50;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.28);
}

.sidebar-help-icon svg,
.sidebar-help-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
}

.sidebar-help-arrow {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}

.side-bar-manu li.sidebar-group-label {
    list-style: none;
    margin: 8px 0 2px;
    padding: 0 12px;
    pointer-events: none;
    line-height: 1.2;
}

.side-bar-manu li.sidebar-group-label span {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.side-bar-manu li.sidebar-group-label:hover,
.side-bar-manu li.sidebar-group-label.active {
    background: transparent;
}

@media (min-width: 1151px) {
    .side-bar.active .sidebar-group-label,
    .side-bar.active .sidebar-help-copy,
    .side-bar.active .sidebar-help-arrow,
    .side-bar.active .sidebar-plan-name,
    .side-bar.active .sidebar-plan-expiry,
    .side-bar.active .sidebar-dues-badge,
    .side-bar.active .sidebar-create-sale-label,
    .side-bar.active .sidebar-link-text {
        display: none;
    }

    .side-bar.active:hover .sidebar-group-label {
        display: list-item;
    }

    .side-bar.active:hover .sidebar-help-copy,
    .side-bar.active:hover .sidebar-plan-name,
    .side-bar.active:hover .sidebar-plan-expiry {
        display: flex;
    }

    .side-bar.active:hover .sidebar-help-arrow,
    .side-bar.active:hover .sidebar-dues-badge,
    .side-bar.active:hover .sidebar-create-sale-label,
    .side-bar.active:hover .sidebar-link-text {
        display: inline-flex;
    }

    .side-bar.active:hover .sidebar-create-sale-label,
    .side-bar.active:hover .sidebar-link-text {
        display: inline;
    }

    .side-bar.active:hover .sidebar-plan-name,
    .side-bar.active:hover .sidebar-plan-expiry {
        display: block;
    }

    .side-bar.active:hover .dropdown.menu-open > .dropdown-menu {
        display: block !important;
    }
}

@media (min-width: 1150px) {
    .side-bar.active:hover .dropdown.active > .dropdown-menu,
    .side-bar.active:hover .dropdown.menu-open > .dropdown-menu {
        display: block !important;
    }
}

.nav-role {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--apos-muted);
    line-height: 1.2;
}

.greet-name .nav-name {
    margin: 0;
    line-height: 1.2;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.main-header-section {
    background: var(--apos-card);
    border-bottom: 1px solid var(--apos-line);
    box-shadow: none;
    padding: 12px 20px;
}

.view-website,
.view-website.text-custom-primary,
.view-website.text-custom-primary:hover {
    color: var(--apos-ink) !important;
    font-weight: 600;
    border: 1px solid var(--apos-line);
    background: var(--apos-card);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
}

.view-website:hover {
    border-color: var(--apos-lime);
    background: var(--apos-soft);
}

.header-right {
    align-items: center;
    gap: 12px;
}

.header-left .pos-logo {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #1b1f23;
    border-radius: 10px;
    padding: 4px;
    line-height: 0;
}

.header-left .pos-logo img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

@media (min-width: 1151px) {
    .side-bar.active .side-bar-logo {
        display: none;
    }

    .side-bar.active:hover .side-bar-logo {
        display: block;
    }

    body:has(.side-bar.active) .header-left .pos-logo {
        display: inline-flex;
    }
}

.header-invoice-logo {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    max-width: 180px;
    max-height: 44px;
}

.header-invoice-logo img {
    max-height: 40px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .header-left .pos-logo {
        display: inline-flex;
    }

    .header-invoice-logo {
        max-width: 96px;
    }

    .header-invoice-logo img {
        max-height: 32px;
        max-width: 96px;
    }
}

.search-btn {
    color: var(--apos-ink) !important;
}

/* -------------------------------------------------------------------------
   Cards / list pages / forms
   ------------------------------------------------------------------------- */
.erp-table-section .card,
.erp-table-section .return-card {
    min-height: 0;
    height: auto;
    background: var(--apos-card);
    border: 1px solid var(--apos-line) !important;
    border-radius: var(--apos-radius);
    box-shadow: var(--apos-shadow);
}

.erp-table-section {
    padding-top: 12px;
    padding-bottom: 24px;
}

.table-header h4 {
    letter-spacing: -0.03em;
    font-weight: 700;
    color: var(--apos-ink);
}

.table-header.p-16 {
    padding: 20px 20px 8px;
    margin-bottom: 4px;
}

.erp-table-section .table-top-form {
    padding-top: 4px;
}

.erp-table-section .table thead th {
    background: var(--apos-soft);
    color: var(--apos-ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    border-bottom: 1px solid var(--apos-line);
}

.erp-table-section .table tbody tr:hover {
    background: var(--apos-soft);
}

.erp-table-section .table th,
.erp-table-section .table td {
    border-bottom-color: var(--apos-line);
}

.erp-table-section .responsive-table {
    min-height: 0;
    margin-top: 0;
}

.notifications-list-page .notification-message-col {
    white-space: normal;
    word-break: break-word;
    min-width: 220px;
    max-width: 520px;
    text-align: start !important;
}

.notifications-list-page .notification-message-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.notifications-list-page .notification-date-col {
    white-space: nowrap;
}

.paid-badge {
    background-color: rgba(46, 141, 28, 0.14);
    color: #1f6b16;
}

.unpaid-badge {
    background-color: rgba(255, 149, 0, 0.16);
    color: #b45309;
}

.unpaid-badge-2 {
    background-color: rgba(220, 53, 69, 0.12);
    color: #b42318;
}

.aproved {
    background: rgba(46, 141, 28, 0.12) !important;
    color: #1f6b16 !important;
}

.pending {
    background: rgba(255, 164, 28, 0.16) !important;
    color: #b45309 !important;
}

.erp-table-section .form-control,
.erp-table-section .form-select,
.order-form-section .form-control,
.order-form-section .form-select,
.role-input-label .form-control,
.permission .form-control,
.modal-body .form-control,
.table-top-form .form-control {
    border-radius: var(--apos-radius-sm);
    border-color: var(--apos-line);
}

.erp-table-section .form-control:focus,
.erp-table-section .form-select:focus,
.order-form-section .form-control:focus,
.order-form-section .form-select:focus,
.role-input-label .form-control:focus,
.permission .form-control:focus,
.modal-body .form-control:focus,
.table-top-form .form-control:focus {
    border-color: var(--apos-lime) !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.22) !important;
    outline: 0 !important;
}

/* -------------------------------------------------------------------------
   Soft-green filled actions — white label for contrast
   ------------------------------------------------------------------------- */
.btn-primary,
.theme-btn,
.add-order-btn,
.search-btn,
.submit-btn.btn-primary,
.table-header .button-group a.active,
.multiple-button-group .multi-delete-btn {
    background: var(--apos-lime) !important;
    border-color: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.theme-btn:hover,
.theme-btn:focus,
.add-order-btn:hover,
.add-order-btn:focus,
.submit-btn.btn-primary:hover {
    background: var(--apos-lime-deep) !important;
    border-color: var(--apos-lime-deep) !important;
    color: var(--apos-on-primary) !important;
}

.border-btn {
    color: var(--apos-ink);
    border-color: var(--apos-line);
}

.border-btn:hover {
    color: var(--apos-ink);
    border-color: var(--apos-lime);
}

.erp-table-section .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.erp-table-section .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--apos-lime) !important;
    border-color: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
}

.settings-guide .settings-intro {
    color: var(--apos-muted);
    max-width: 720px;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 6px;
}

.settings-guide .settings-block {
    background: var(--apos-card);
    border: 1px solid var(--apos-line);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.settings-guide .settings-block h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--apos-ink);
    margin: 0 0 4px;
}

.settings-guide .settings-lead {
    color: var(--apos-muted);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 14px;
}

.settings-guide .settings-lead a {
    color: var(--apos-lime-deep);
    font-weight: 600;
    text-decoration: none;
}

.settings-guide .settings-lead a:hover {
    color: var(--apos-ink);
}

.settings-guide .settings-hint,
.settings-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--apos-muted);
}

.settings-guide .apos-setting-card,
.settings-guide .settings-toggle {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    padding: 16px;
    height: 100%;
}

.settings-guide .apos-setting-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
}

.settings-guide .apos-setting-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.settings-guide .apos-setting-icon--brand {
    background: #fff;
    border: 1px solid var(--apos-line);
    overflow: hidden;
    padding: 8px;
    box-sizing: border-box;
}

.settings-guide .apos-setting-icon--brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.settings-guide .apos-setting-body {
    min-width: 0;
    flex: 1 1 auto;
}

.settings-guide .apos-setting-body > label:first-child,
.settings-guide .apos-setting-body > .custom-top-label:first-child,
.settings-guide .apos-setting-body > .title:first-child {
    margin-top: 0;
}

.settings-guide .settings-toggle .apos-setting-body {
    width: 100%;
}

.settings-guide .apos-setting-card .settings-toggle {
    background: #fff;
    padding: 12px 14px;
    height: auto;
}

.settings-guide .settings-toggle .form-check-label {
    font-weight: 600;
    color: var(--apos-ink);
}

.settings-guide .settings-toggle .form-check-input:checked {
    background-color: var(--apos-lime);
    border-color: var(--apos-lime);
}

.settings-guide .settings-hero {
    align-items: flex-start;
    gap: 16px;
}

.settings-guide .settings-kicker {
    color: var(--apos-lime-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-guide .settings-hero-save {
    flex-shrink: 0;
    min-width: 120px;
}

.settings-guide .settings-block-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.settings-guide .settings-step {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--apos-lime);
    color: var(--apos-on-primary);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-guide .settings-block {
    background: #fff;
    box-shadow: var(--apos-shadow);
}

.apos-co-settings .apos-co-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.apos-co-settings .apos-co-media-frame {
    display: block;
    position: relative;
    margin: 0;
    cursor: pointer;
    border: 1px dashed var(--apos-line);
    border-radius: 16px;
    padding: 10px;
    background: var(--apos-card);
}

.apos-co-settings .apos-co-media-frame .apos-co-media-shot {
    display: block;
    overflow: hidden;
    background: var(--apos-soft);
}

.apos-co-settings .apos-co-media-frame.is-logo .apos-co-media-shot {
    width: 128px;
    height: 128px;
    border-radius: 20px;
}

.apos-co-settings .apos-co-media-frame.is-banner .apos-co-media-shot {
    width: 168px;
    height: 224px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
}

.apos-co-settings .apos-co-media-frame .apos-co-media-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.apos-co-settings .apos-co-media-frame.is-empty .apos-co-media-shot img {
    object-fit: contain;
    padding: 32px;
    opacity: 0.5;
}

.apos-co-settings .apos-co-media-cta {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--apos-lime-deep);
    text-align: center;
}

.apos-co-settings .apos-co-media-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.settings-guide .apos-co-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.settings-guide .apos-co-status.is-on {
    background: rgba(76, 175, 80, 0.16);
    color: var(--apos-lime-deep);
}

.settings-guide .apos-co-status.is-off {
    background: var(--apos-soft);
    color: var(--apos-muted);
}

.settings-guide .apos-co-still {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b45309;
}

.settings-guide .apos-co-checklist {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
}

.settings-guide .apos-co-checklist li {
    margin-bottom: 4px;
    font-size: 13px;
}

.settings-guide .apos-co-checklist a {
    color: var(--apos-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.settings-guide .apos-co-checklist a:hover {
    color: var(--apos-lime-deep);
}

.settings-guide .apos-co-map {
    height: 240px;
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid var(--apos-line);
    overflow: hidden;
}

.apos-hours-toolbar {
    margin-bottom: 12px;
}

.apos-hours-table {
    display: grid;
    gap: 8px;
}

.apos-hours-row {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto minmax(108px, 1fr) auto minmax(108px, 1fr);
    gap: 8px;
    align-items: center;
}

.apos-hours-day {
    font-weight: 700;
    font-size: 13px;
}

.apos-hours-closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.apos-hours-to {
    color: var(--apos-muted, #6b7280);
    font-size: 12px;
    font-weight: 600;
}

.apos-hours-row.is-closed .apos-hours-open,
.apos-hours-row.is-closed .apos-hours-close,
.apos-hours-row.is-closed .apos-hours-to {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 720px) {
    .apos-hours-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "day closed"
            "open to"
            "close to2";
    }

    .apos-hours-day { grid-area: day; }
    .apos-hours-closed { grid-area: closed; justify-self: end; }
    .apos-hours-open { grid-column: 1 / -1; }
    .apos-hours-to { display: none; }
    .apos-hours-close { grid-column: 1 / -1; }
}

.apos-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.apos-app-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    padding: 16px;
    height: 100%;
}

.apos-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apos-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apos-app-icon--apos {
    background: var(--apos-soft);
    padding: 12px;
    box-sizing: border-box;
}

.apos-app-icon--apos img {
    object-fit: contain;
}

.apos-app-icon--alerts {
    background: #06101c;
}

.apos-app-body {
    min-width: 0;
    flex: 1 1 auto;
}

.apos-app-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}

.apos-app-title-row h6 {
    margin: 0;
    font-weight: 800;
    color: var(--apos-ink);
}

.apos-app-meta {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--apos-muted);
}

.apos-app-tagline {
    margin: 0 0 4px;
    font-weight: 600;
    color: var(--apos-ink);
}

.apos-app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.apos-app-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.apos-app-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.apos-app-more:hover {
    color: var(--apos-ink);
}

.settings-guide .form-switch .form-check-input {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
}

.settings-guide .apos-seamless-heading {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--apos-ink);
    letter-spacing: -0.02em;
}

.settings-guide .apos-seamless-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.settings-guide .apos-seamless-actions .theme-btn {
    margin: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
}

.settings-guide .apos-seamless-actions .border-btn {
    background: #fff !important;
    border: 1.5px solid var(--apos-line) !important;
    color: var(--apos-ink) !important;
}

.settings-guide .apos-seamless-actions .border-btn:hover {
    border-color: var(--apos-lime) !important;
    color: var(--apos-ink) !important;
}

.apos-party-page .settings-hero-save,
.apos-product-page .settings-hero-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apos-party-photo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apos-party-photo-preview {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--apos-soft);
    border: 1px solid var(--apos-line);
    flex-shrink: 0;
}

.apos-product-image-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border: 1px dashed var(--apos-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fafcfa 0%, #fff 100%);
}

.apos-product-image-preview-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--apos-line);
    background: var(--apos-soft);
    display: grid;
    place-items: center;
}

.apos-product-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.apos-product-image-controls {
    flex: 1;
    min-width: 0;
}

.apos-product-image-title {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--apos-ink);
}

.apos-product-image-hint {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: var(--apos-muted);
    line-height: 1.45;
}

.apos-product-image-input {
    max-width: 360px;
}

.product-modifier-groups-block {
    margin-bottom: 16px;
}

.product-modifier-groups-list {
    display: grid;
    gap: 12px;
}

.product-modifier-group-card {
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    padding: 16px;
    background: #fafcfa;
}

.product-modifier-group-card .modifier-option-row {
    padding-top: 4px;
}

@media (max-width: 767.98px) {
    .apos-product-image-upload {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .apos-product-image-preview-wrap {
        margin: 0 auto;
    }

    .apos-product-image-input {
        max-width: none;
    }
}

.apos-party-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0 4px;
}

.apos-party-live-due {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--apos-line);
    background: #f4faf4;
}

.apos-party-live-due-label {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apos-muted);
}

.apos-party-live-due-amount {
    margin: 2px 0 6px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--apos-ink);
}

.apos-party-live-due-hint {
    margin: 0;
    color: var(--apos-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.apos-party-dup {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #f0c36d;
    background: #fff8e8;
}

.apos-party-dup p {
    margin: 0 0 8px;
    line-height: 1.45;
}

.apos-party-dup-inline {
    color: #8a5a00;
    font-weight: 650;
}

.apos-party-dup-hint {
    margin-top: 10px !important;
    color: #6b5320;
    font-size: 13px;
}

.apos-party-dup-delete {
    margin-left: 8px;
    background: #b4231f;
    border-color: #b4231f;
}

.table-floor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.table-floor-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--apos-line);
    border-radius: 16px;
    background: #fff;
    color: var(--apos-muted);
    text-align: left;
    cursor: pointer;
}

.table-floor-stat strong {
    color: var(--apos-ink);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.table-floor-stat span {
    font-size: 12px;
    font-weight: 700;
}

.table-floor-stat.is-on {
    border-color: var(--apos-lime);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.18);
}

.table-floor-stat.is-busy.is-on,
.table-floor-stat.is-busy:hover {
    border-color: #f59e0b;
}

.table-floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.table-floor-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    min-height: 148px;
    padding: 14px;
    border: 1px solid var(--apos-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--apos-shadow, 0 10px 28px rgba(16, 24, 16, 0.06));
}

.table-floor-plate {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.55), transparent 46%),
        var(--apos-soft);
    border: 3px solid #C8E6C9;
}

.table-floor-card.is-busy .table-floor-plate {
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.5), transparent 46%),
        #fff7ed;
    border-color: #fdba74;
}

.table-floor-card.is-off .table-floor-plate {
    background: var(--apos-page);
    border-color: var(--apos-line);
    opacity: 0.85;
}

.table-floor-card.is-free {
    border-color: #C8E6C9;
}

.table-floor-card.is-busy {
    border-color: #fed7aa;
}

.table-floor-card.is-off {
    background: var(--apos-page);
}

.table-floor-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.table-floor-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.table-floor-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--apos-ink);
}

.table-floor-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.table-floor-num {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: var(--apos-ink);
    line-height: 1;
}

.table-floor-pill {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 8px;
}

.table-floor-pill.is-free {
    background: var(--apos-lime);
    color: var(--apos-on-primary, #111);
}

.table-floor-pill.is-busy {
    background: #fdba74;
    color: #7c2d12;
}

.table-floor-pill.is-off {
    background: var(--apos-line);
    color: var(--apos-muted);
}

.table-floor-pill.is-qr {
    background: #111;
    color: #fff;
}

.table-floor-meta {
    font-size: 13px;
    color: var(--apos-muted);
    line-height: 1.35;
    flex: 1;
}

.table-floor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.table-floor-btn,
.table-floor-more summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid var(--apos-line);
    border-radius: 999px;
    background: #fff;
    color: var(--apos-lime-deep);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.table-floor-btn:hover,
.table-floor-more summary:hover {
    color: var(--apos-ink);
    border-color: var(--apos-ink);
}

.table-floor-btn.is-ghost {
    background: transparent;
}

.table-floor-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.table-floor-link:hover {
    color: var(--apos-ink);
}

.table-floor-link.is-danger,
.table-floor-more-menu .is-danger {
    color: #b42318;
}

.table-floor-more {
    position: relative;
}

.table-floor-more summary {
    list-style: none;
}

.table-floor-more summary::-webkit-details-marker {
    display: none;
}

.table-floor-more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 4;
    min-width: 160px;
    padding: 8px;
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(16, 24, 16, 0.12);
}

.table-floor-more-menu a,
.table-floor-more-menu button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--apos-ink);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.table-floor-more-menu a:hover,
.table-floor-more-menu button:hover {
    background: var(--apos-soft);
}

.table-floor-empty {
    grid-column: 1 / -1;
    padding: 48px 16px;
    text-align: center;
    color: var(--apos-muted);
}

@media (max-width: 520px) {
    .table-floor-card {
        grid-template-columns: 1fr;
    }

    .table-floor-plate {
        min-height: 72px;
        border-radius: 18px;
    }
}

.gst-pack-boxes {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .gst-pack-boxes {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gst-pack-boxes article {
    background: #fff;
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    padding: 16px 18px;
}

.gst-pack-boxes span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--apos-muted);
    margin-bottom: 6px;
}

.gst-pack-boxes strong {
    display: block;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: var(--apos-ink);
}

.gst-pack-boxes em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: var(--apos-muted);
    margin-top: 4px;
}

.gst-pack-boxes article.is-payable strong {
    color: #7a4d00;
}

.gst-pack-boxes article.is-refund strong {
    color: #17663a;
}

.gst-sales-pager .pagination {
    margin-bottom: 0;
}

#apos-input-tax-warnings {
    border-color: #f3c14e;
    background: #fff8e8;
    color: #7a4d00;
}

/* aPOSAlerts + toastr: top-center, out of the till buttons */
#toast-container.toast-top-center {
    top: 18px;
    right: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}
#toast-container.toast-top-center > div {
    width: min(420px, calc(100% - 32px));
    margin: 0 auto 8px;
    pointer-events: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(38, 50, 56, 0.16);
    opacity: 1;
    font-weight: 600;
}
#toast-container > .toast-success { background-color: #4CAF50; }
#toast-container > .toast-error { background-color: #C62828; }
#toast-container > .toast-warning { background-color: #F59E0B; color: #1b1f23; }
#toast-container > .toast-info { background-color: #388E3C; }

.apos-alert-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translate(-50%, -12px);
    z-index: 1090;
    width: min(520px, calc(100vw - 24px));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.apos-alert-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.apos-alert-toast-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #1b1f23;
    color: #FFFFFF;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 18px 40px rgba(27, 31, 35, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.apos-alert-toast-copy,
.apos-alert-toast-title,
.apos-alert-toast-body,
.apos-alert-toast-body strong,
.apos-alert-toast-body b {
    color: #FFFFFF !important;
}
.apos-alert-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #4CAF50;
    color: #fff;
}
.apos-ops-toast-icon {
    background: #fffbeb;
    color: inherit;
    font-size: 1.45rem;
    line-height: 1;
}
.rpos-ops-wave {
    display: inline-block;
    transform-origin: 70% 85%;
    animation: rpos-wave 1.15s ease-in-out infinite;
}
@keyframes rpos-wave {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(18deg); }
    30% { transform: rotate(-10deg); }
    45% { transform: rotate(16deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
    .rpos-ops-wave {
        animation: none;
    }
}
.apos-alert-toast-copy {
    flex: 1;
    min-width: 0;
}
.apos-alert-toast-kicker {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #A5D6A7 !important;
}
.apos-alert-toast-title {
    margin: 2px 0 4px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.apos-alert-toast-body {
    font-size: 0.84rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92) !important;
}
.apos-alert-toast-body strong,
.apos-alert-toast-body b {
    font-weight: 700;
}
.apos-alert-toast-body span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72) !important;
}
.apos-alert-toast-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.apos-alert-toast-actions a,
.apos-alert-toast-actions button {
    border: 0;
    background: transparent;
    color: #A5D6A7 !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    text-align: right;
    cursor: pointer;
    padding: 0;
}
.apos-alert-toast-actions button {
    color: rgba(255, 255, 255, 0.72) !important;
}
.apos-alert-toast-actions a:hover,
.apos-alert-toast-actions button:hover {
    color: #FFFFFF !important;
}

.apos-alert-sound-bar {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1085;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: min(560px, calc(100vw - 24px));
    padding: 10px 14px;
    border-radius: 12px;
    background: #263238;
    color: #FFFFFF;
    box-shadow: 0 10px 28px rgba(38, 50, 56, 0.28);
}
.apos-alert-sound-bar[hidden] {
    display: none !important;
}
.apos-alert-sound-bar span {
    flex: 1;
    min-width: 180px;
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 600;
}
.apos-alert-sound-bar button {
    border: 0;
    border-radius: 8px;
    background: #4CAF50;
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
}
.apos-alert-sound-bar button:hover {
    background: #43A047;
}

@media (max-width: 575.98px) {
    .apos-alert-toast {
        top: 12px;
    }
    .apos-alert-toast-card {
        flex-wrap: wrap;
    }
    .apos-alert-toast-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
        gap: 12px;
    }
}

/* -------------------------------------------------------------------------
   Purchase pay + edit (match Island Shop / aPOS lime)
   ------------------------------------------------------------------------- */
.apos-purchase-lead {
    margin: 6px 0 0;
    color: var(--apos-muted);
    font-size: 13px;
    font-weight: 500;
}

.apos-purchase-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.apos-pay-row-btn,
.apos-purchase-page .is-btn-primary,
.apos-pay-modal .is-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid var(--apos-lime);
    background: var(--apos-lime);
    color: var(--apos-on-primary) !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.apos-pay-row-btn:hover,
.apos-purchase-page .is-btn-primary:hover,
.apos-pay-modal .is-btn-primary:hover {
    background: var(--apos-lime-deep);
    border-color: var(--apos-lime-deep);
    color: var(--apos-on-primary) !important;
}

.apos-pay-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apos-lime);
}

.apos-pay-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--apos-soft);
    border: 1px solid #c8e6c9;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 0 16px;
}

.apos-pay-banner p {
    margin: 4px 0 0;
    color: var(--apos-muted);
    font-size: 13px;
}

.apos-pay-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.apos-pay-modal .modal-header,
.apos-pay-modal .modal-footer {
    border-color: var(--apos-line);
}

.apos-pay-modal .modal-body label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--apos-muted);
    margin-bottom: 12px;
}

.apos-pay-modal .modal-body input,
.apos-pay-modal .modal-body select {
    min-height: 44px;
    border: 1px solid var(--apos-line);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--apos-ink);
}

.apos-pay-shop {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--apos-ink);
}

.apos-pay-meta {
    margin: 4px 0 16px;
    color: var(--apos-muted);
}

.apos-pay-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--apos-muted);
}

.apos-pay-modal .is-btn,
.apos-purchase-page .is-btn-ghost,
.apos-purchase-page .apos-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--apos-line);
    background: var(--apos-card);
    color: var(--apos-ink) !important;
    font-weight: 650;
    cursor: pointer;
}

.apos-purchase-page .save-btn.cancel-sale-btn {
    background: var(--apos-card) !important;
    color: var(--apos-ink) !important;
    border: 1px solid var(--apos-line);
    border-radius: 12px;
}

.apos-purchase-page .payment-btn,
.apos-purchase-page .submit-btn.payment-btn {
    background: var(--apos-lime) !important;
    border-color: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
    border-radius: 12px;
}

.apos-purchase-page .quick-actions-container a,
.apos-purchase-page .quick-actions-container button {
    background: var(--apos-soft) !important;
    color: var(--apos-ink) !important;
    border: 1px solid var(--apos-line);
    border-radius: 999px;
    padding: 6px 12px;
}

.apos-purchase-page .payment-container,
.apos-purchase-page .amount-info-container {
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 14px;
}

.apos-purchase-page .table-background {
    background: var(--apos-soft);
    color: var(--apos-ink);
}

.apos-purchase-page .btn-danger {
    background: var(--apos-lime) !important;
    border-color: var(--apos-lime) !important;
}

.erp-table-section .table thead th {
    background: var(--apos-soft);
    color: var(--apos-ink);
    font-weight: 650;
}

/* Table row actions — large enough to tap, calm aPOS chrome */
.table-action > button,
.table-action .table-action-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--apos-line);
    background: var(--apos-card);
    color: var(--apos-ink);
    font-size: 18px;
    line-height: 1;
    touch-action: manipulation;
}

.table-action > button:hover,
.table-action > button:focus,
.table-action.show > button,
.table-action > button[aria-expanded="true"],
.table-action .table-action-toggle:hover,
.table-action .table-action-toggle:focus,
.table-action .table-action-toggle[aria-expanded="true"] {
    background: var(--apos-soft);
    border-color: var(--apos-lime);
    color: var(--apos-lime-deep);
}

.table-action .dropdown-menu {
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    background: var(--apos-card);
    box-shadow: 0 12px 32px rgba(38, 50, 56, 0.14);
    z-index: 1080;
}

.table-action .dropdown-menu li + li {
    margin-top: 4px;
}

.table-action .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--apos-ink) !important;
    touch-action: manipulation;
}

.table-action .dropdown-menu a i {
    width: 32px;
    height: 32px;
    margin: 0 !important;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apos-soft);
    color: var(--apos-lime-deep) !important;
    font-size: 14px;
}

.table-action .dropdown-menu a:hover,
.table-action .dropdown-menu a:focus {
    background: var(--apos-soft);
}

.table-action .dropdown-menu a.confirm-action {
    color: var(--apos-danger) !important;
}

.table-action .dropdown-menu a.confirm-action i {
    background: #FFEBEE;
    color: var(--apos-danger) !important;
}

.table-action .dropdown-menu a.confirm-action:hover,
.table-action .dropdown-menu a.confirm-action:focus {
    background: #FFEBEE;
}

.apos-spectate-banner {
    margin: 12px 16px 0;
    padding: 10px 16px;
    border-radius: var(--apos-radius-sm);
    background: #FFF8E1;
    color: #F57F17;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #FFE082;
}

.apos-team-page .apos-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.apos-team-card {
    background: var(--apos-card);
    border: 1px solid var(--apos-line);
    border-radius: var(--apos-radius);
    padding: 18px;
    box-shadow: var(--apos-shadow);
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.apos-team-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.apos-team-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
    font-weight: 800;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.apos-team-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
}

.apos-team-badge-manager {
    background: #E3F2FD;
    color: #1565C0;
}

.apos-team-badge-staff {
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
}

.apos-team-badge-spectator {
    background: #ECEFF1;
    color: var(--apos-muted);
}

.apos-team-badge-shop-owner {
    background: #FFF8E1;
    color: #F57F17;
}

.apos-team-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--apos-ink);
}

.apos-team-card > p {
    margin: 4px 0 0;
    color: var(--apos-muted);
    font-size: 13px;
    word-break: break-word;
}

.apos-team-face {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 14px;
}

.settings-guide .apos-team-face .apos-setting-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.settings-guide .apos-team-face .apos-setting-icon svg {
    width: 18px;
    height: 18px;
}

.apos-team-face.is-enrolled {
    background: var(--apos-soft);
    border-color: rgba(76, 175, 80, 0.28);
}

.apos-team-face.is-warn {
    background: #FFF8E1;
    border-color: #FFE082;
}

.apos-team-face-body {
    min-width: 0;
    flex: 1 1 120px;
}

.apos-team-face-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apos-muted);
}

.apos-team-face-body > p:last-child,
.apos-team-face .apos-face-status {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--apos-ink);
}

.apos-team-face.is-owner .apos-team-face-body > p:last-child {
    font-weight: 500;
    color: var(--apos-muted);
}

.apos-team-face-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.apos-team-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    background: var(--apos-lime);
    color: #fff;
}

.apos-team-btn-primary {
    background: var(--apos-lime);
    color: #fff;
}

.apos-team-btn-ghost {
    background: #fff;
    border-color: var(--apos-line);
    color: var(--apos-ink);
}

.apos-team-btn-ghost.is-danger {
    color: var(--apos-danger);
    border-color: rgba(198, 40, 40, 0.25);
}

.apos-team-btn:hover,
.apos-team-btn:focus {
    filter: brightness(0.96);
}

.apos-team-card-actions {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    gap: 16px;
}

.apos-team-link {
    font-weight: 700;
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.apos-team-page button.apos-team-link {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.apos-team-link:hover {
    color: var(--apos-ink);
}

.apos-team-link.is-danger {
    color: var(--apos-danger);
}

.apos-team-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--apos-ink);
    margin-bottom: 8px;
}

.apos-team-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.apos-team-role-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--apos-line);
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    min-height: 108px;
    position: relative;
}

.apos-team-role-card.is-selected {
    border-color: var(--apos-lime);
    background: var(--apos-soft);
    box-shadow: inset 0 0 0 1px var(--apos-lime);
}

.apos-team-role-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.apos-team-role-name {
    font-weight: 800;
    color: var(--apos-ink);
}

.apos-team-role-hint {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--apos-muted);
}

.apos-team-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--apos-muted);
    cursor: pointer;
}

.apos-team-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.apos-team-perm {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--apos-line);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: var(--apos-ink);
}

.apos-team-perm:has(input:checked) {
    border-color: var(--apos-lime);
    background: var(--apos-soft);
}

.apos-team-form .form-control {
    min-height: 48px;
    border-radius: 12px;
}

.apos-team-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--apos-line);
}

.apos-team-page .theme-btn,
.apos-team-page .apos-team-btn-secondary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 48px !important;
    min-height: 48px !important;
    min-width: 168px !important;
    padding: 0 24px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em;
    text-decoration: none !important;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.apos-team-page .settings-hero .apos-team-btn-secondary {
    flex-shrink: 0;
}

.apos-team-btn-secondary {
    background: var(--apos-soft) !important;
    border: 2px solid var(--apos-lime) !important;
    color: var(--apos-lime-deep) !important;
    box-shadow: none !important;
}

.apos-team-btn-secondary:hover,
.apos-team-btn-secondary:focus {
    background: #fff !important;
    border-color: var(--apos-lime-deep) !important;
    color: var(--apos-lime-deep) !important;
}

/* Product recipe — searchable ingredient Select2 */
.apos-product-page .recipe-component-row .select2-container {
    width: 100% !important;
}

.apos-product-page .select2-container--default .select2-selection--single {
    min-height: 42px;
    border: 1px solid var(--apos-line, #d9e2da);
    border-radius: 10px;
    padding: 4px 8px;
}

.apos-product-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px;
    padding-left: 4px;
}

.apos-product-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.apos-product-page .select2-dropdown .select2-search__field {
    border-radius: 8px;
    padding: 8px 10px;
}

/* Profile — account snapshot + form */
.apos-profile-page .apos-profile-layout {
    align-items: stretch;
}

.apos-profile-page .apos-profile-snapshot {
    height: 100%;
}

.apos-profile-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.apos-profile-avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.apos-profile-avatar,
.apos-profile-avatar-fallback {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    object-fit: cover;
    border: 1px solid var(--apos-line);
    background: linear-gradient(160deg, var(--apos-soft) 0%, #fff 100%);
}

.apos-profile-avatar-fallback {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--apos-lime-deep);
}

.apos-profile-metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.apos-profile-metrics li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--apos-line);
    border-radius: 12px;
    background: #fff;
}

.apos-profile-metrics span {
    color: var(--apos-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.apos-profile-metrics strong {
    color: var(--apos-ink);
    font-size: 0.92rem;
    text-align: right;
    font-weight: 700;
}

.apos-profile-form .form-control {
    min-height: 44px;
    border-radius: 12px;
}

.apos-profile-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 4px;
}

@media (max-width: 991px) {
    .apos-profile-identity {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Shared shop-setup lists (currencies, payment types, …) */
.apos-settings-list-page .settings-hero-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apos-settings-list-page .card,
.apos-settings-list-page .card-bodys,
.apos-settings-list-page .responsive-table {
    overflow: visible !important;
}

.apos-settings-list-page .table-action .dropdown-menu {
    z-index: 2000;
}

.apos-settings-list-page .table thead th {
    background: var(--apos-soft) !important;
    color: var(--apos-ink) !important;
    font-weight: 700;
    border-bottom: 1px solid var(--apos-line) !important;
}

.apos-settings-list-page .table tbody td {
    vertical-align: middle;
}

.apos-settings-list-page .table-action .dropdown-item-text {
    display: block;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.apos-mono-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.apos-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.apos-pill-muted {
    background: #eceff1;
    color: #546e7a;
}

.apos-pill-info {
    background: #e3f2fd;
    color: #1565c0;
}

.apos-settings-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.apos-settings-modal .modal-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--apos-line);
    padding: 18px 20px 14px;
}

.apos-settings-modal .modal-body {
    padding: 18px 20px 20px;
}

.apos-settings-modal .form-control {
    min-height: 44px;
    border-radius: 12px;
}

.apos-settings-modal .apos-seamless-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

/* Telegram channel connect modal */
.apos-telegram-channel-modal .settings-intro {
    color: var(--apos-muted);
    font-size: 13px;
    line-height: 1.45;
    max-width: 34rem;
}

.apos-telegram-channel-modal .apos-telegram-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apos-telegram-channel-modal .apos-telegram-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    background: var(--apos-page, #f6f8f5);
}

.apos-telegram-channel-modal .apos-telegram-step h6 {
    font-weight: 700;
    color: var(--apos-ink);
    letter-spacing: -0.02em;
}

.apos-telegram-channel-modal .apos-telegram-bot-chip {
    min-width: auto;
    padding: 6px 12px;
    font-size: 0.92rem;
}

.apos-telegram-channel-modal .apos-telegram-otp-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: lowercase;
}

.apos-telegram-setup-card {
    border: 1px solid var(--apos-line);
    border-radius: 16px;
}

.notifications-list-page .settings-kicker {
    color: var(--apos-lime-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notifications-list-page .settings-intro {
    color: var(--apos-muted);
    font-size: 13.5px;
    line-height: 1.45;
}

.notifications-list-page .settings-hero {
    align-items: flex-start;
    gap: 16px;
}

.notifications-list-page .settings-hero-save {
    flex-shrink: 0;
}

/* Report pages (sale reports, profit & loss, …) */
.apos-report-page .card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.apos-report-page .settings-intro .apos-report-day {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--apos-lime-deep);
    font-weight: 600;
}

.apos-report-page .table thead th {
    background: var(--apos-soft) !important;
    color: var(--apos-ink) !important;
    font-weight: 700;
    border-bottom: 1px solid var(--apos-line) !important;
}

.apos-report-page .table tbody td {
    vertical-align: middle;
}

.apos-report-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.apos-report-kpis-inline {
    display: contents;
}

.apos-report-kpi {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 220px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8f0;
    border: 1px solid rgba(38, 50, 56, 0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.apos-report-kpi span {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #607d8b;
    text-transform: uppercase;
}

.apos-report-kpi strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--apos-ink);
    line-height: 1.2;
}

.apos-report-kpi-primary {
    background: var(--apos-soft);
    border-color: rgba(76, 175, 80, 0.22);
}

.apos-report-kpi-primary strong {
    color: var(--apos-lime-deep);
}

.apos-report-kpi-profit {
    background: #e8f5e9;
    border-color: rgba(76, 175, 80, 0.2);
}

.apos-report-kpi-profit strong {
    color: var(--apos-lime-deep);
}

.apos-report-kpi-loss {
    background: #e3f2fd;
    border-color: rgba(21, 101, 192, 0.15);
}

.apos-report-kpi-loss strong {
    color: #1565c0;
}

@media (max-width: 575px) {
    .apos-report-kpi {
        max-width: none;
        flex-basis: calc(50% - 6px);
    }
}

.apos-face-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(10, 18, 14, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 16px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.apos-face-modal[hidden] {
    display: none !important;
}
.apos-face-sheet {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    margin: auto;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
    position: relative;
    z-index: 1;
}
.apos-face-sheet-sm {
    text-align: center;
}
.apos-face-sheet h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
}
.apos-face-copy,
.apos-face-hint,
.apos-face-status-line {
    color: #5b6560;
    font-size: 14px;
    margin: 0 0 10px;
    max-height: 4.8em;
    overflow: hidden;
    word-break: break-word;
}
.apos-face-video-wrap {
    position: relative;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    margin-bottom: 12px;
}
.apos-face-video-wrap video,
.apos-face-overlay {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.apos-face-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.apos-face-badge {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(10, 18, 14, 0.82);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    pointer-events: none;
}
.apos-face-badge.is-match {
    background: rgba(56, 142, 60, 0.92);
}
.apos-face-badge.is-miss {
    background: rgba(191, 118, 16, 0.92);
}
.apos-face-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.apos-face-modal.is-override .apos-face-video-wrap {
    max-height: 140px;
    pointer-events: none;
}
.apos-face-override {
    margin-top: 12px;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}
.apos-face-override input {
    pointer-events: auto;
    -webkit-user-select: text;
    user-select: text;
    font-size: 16px;
    touch-action: manipulation;
}
.apos-face-status {
    margin: 8px 0 0;
    font-size: 13px;
    color: #3d5c47;
}

/* -------------------------------------------------------------------------
   Sales invoice
   ------------------------------------------------------------------------- */
body.apos-invoice-page {
    background: var(--apos-page);
    min-height: 100vh;
}

.apos-invoice {
    padding: 20px 16px 40px;
}

.apos-invoice-toolbar {
    max-width: 880px;
    margin: 0 auto 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.apos-invoice-kicker {
    margin: 0 0 4px;
    color: var(--apos-lime-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apos-invoice-toolbar h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--apos-ink);
    letter-spacing: -0.02em;
}

.apos-invoice-toolbar-ref {
    margin: 4px 0 0;
    color: var(--apos-muted);
    font-size: 13px;
}

.apos-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-end;
}

.apos-invoice-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apos-invoice-action-group form {
    margin: 0;
    display: inline-flex;
}

.apos-invoice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--apos-line);
    background: var(--apos-card);
    color: var(--apos-ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.apos-invoice-btn img,
.apos-invoice-btn i {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.apos-invoice-btn-whatsapp i {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.apos-invoice-btn:hover,
.apos-invoice-btn:focus {
    color: var(--apos-ink);
    border-color: var(--apos-lime);
    background: var(--apos-soft);
}

.apos-invoice-btn-pdf {
    background: var(--apos-ink) !important;
    border-color: var(--apos-ink) !important;
    color: var(--apos-on-primary) !important;
}

.apos-invoice-btn-pdf:hover,
.apos-invoice-btn-pdf:focus {
    background: #1b262c !important;
    border-color: #1b262c !important;
    color: var(--apos-on-primary) !important;
}

.apos-invoice-btn-print,
.apos-invoice-btn-receipt {
    background: var(--apos-lime) !important;
    border-color: var(--apos-lime) !important;
    color: var(--apos-on-primary) !important;
}

.apos-invoice-btn-print:hover,
.apos-invoice-btn-print:focus,
.apos-invoice-btn-receipt:hover,
.apos-invoice-btn-receipt:focus {
    background: var(--apos-lime-deep);
    border-color: var(--apos-lime-deep);
    color: var(--apos-on-primary);
}

.apos-invoice-btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.apos-invoice-btn-whatsapp:hover,
.apos-invoice-btn-whatsapp:focus {
    background: #1ebe5b;
    border-color: #1ebe5b;
    color: #fff;
}

.apos-invoice-btn-viber {
    background: #7360f2;
    border-color: #7360f2;
    color: #fff;
}

.apos-invoice-btn-viber:hover,
.apos-invoice-btn-viber:focus {
    background: #6653e0;
    border-color: #6653e0;
    color: #fff;
}

.apos-invoice .invoice-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0;
    display: block;
}

.apos-invoice .invoice-content.apos-invoice-paper {
    background: var(--apos-card);
    border: 1px solid var(--apos-line);
    border-radius: var(--apos-radius);
    box-shadow: var(--apos-shadow);
    padding: 28px 28px 20px;
    margin: 0;
    overflow: hidden;
}

.apos-invoice-masthead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--apos-line);
    position: relative;
}

.apos-invoice-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.apos-invoice .invoice-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.apos-invoice-shop {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--apos-ink);
}

.apos-invoice-shop-meta {
    margin: 0;
    color: var(--apos-muted);
    font-size: 13px;
}

.apos-invoice-badge {
    flex-shrink: 0;
    background: var(--apos-lime);
    color: var(--apos-on-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 999px;
}

.apos-invoice-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 22px 0 8px;
}

.apos-invoice-meta dl {
    margin: 0;
}

.apos-invoice-meta dl > div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.apos-invoice-meta dt {
    color: var(--apos-muted);
    font-weight: 600;
}

.apos-invoice-meta dd {
    margin: 0;
    color: var(--apos-ink);
    font-weight: 600;
}

.apos-invoice-table-wrap {
    margin-top: 8px;
}

.apos-invoice-section-label {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apos-muted);
}

.apos-invoice .apos-invoice-table {
    margin: 0;
    font-size: 13px;
}

.apos-invoice .apos-invoice-table thead th {
    background: var(--apos-lime);
    color: var(--apos-on-primary);
    border: 0;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.apos-invoice .apos-invoice-table tbody td {
    border-color: var(--apos-line);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--apos-ink);
    vertical-align: top;
}

.apos-invoice .apos-invoice-table tbody tr:nth-of-type(odd) > * {
    background: var(--apos-soft);
}

.apos-invoice-modifiers {
    display: block;
    margin-top: 2px;
    color: var(--apos-muted);
    font-size: 12px;
}

.apos-invoice-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
}

.apos-invoice-notes {
    flex: 1 1 240px;
    min-width: 0;
}

.apos-invoice .word-amount {
    position: static;
    top: auto;
    max-width: none;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--apos-ink);
    line-height: 1.4;
}

.apos-invoice .paid-by {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--apos-ink);
}

.apos-invoice .paid-by span {
    display: block;
    color: var(--apos-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.apos-invoice-totals {
    min-width: 280px;
    margin-left: auto;
    border-collapse: collapse;
}

.apos-invoice-totals th,
.apos-invoice-totals td {
    padding: 6px 0 6px 16px;
    font-size: 13px;
    border: 0;
}

.apos-invoice-totals th {
    font-weight: 600;
    color: var(--apos-muted);
    text-align: left;
}

.apos-invoice-totals td {
    font-weight: 700;
    text-align: right;
    color: var(--apos-ink);
    white-space: nowrap;
}

.apos-invoice-totals .apos-invoice-payable th,
.apos-invoice-totals .apos-invoice-payable td {
    background: var(--apos-lime);
    color: var(--apos-on-primary);
    padding: 10px 12px;
}

.apos-invoice-totals .apos-invoice-payable th:first-child {
    border-radius: 10px 0 0 10px;
}

.apos-invoice-totals .apos-invoice-payable td {
    border-radius: 0 10px 10px 0;
}

.apos-invoice-pay {
    margin: 28px 0 8px;
    text-align: left;
}

.apos-invoice-pay h6 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--apos-ink);
}

.apos-invoice-pay-table td {
    padding: 2px 10px 2px 0;
    vertical-align: top;
}

.apos-invoice-pay-table .lbl {
    width: 148px;
    color: var(--apos-muted);
    font-size: 12px;
    font-weight: 600;
}

.apos-invoice-pay-table .val {
    color: var(--apos-ink);
    font-size: 14px;
    font-weight: 700;
}

.apos-invoice-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--apos-line);
    text-align: center;
}

.apos-invoice-footer .in-signature-container {
    justify-content: center;
    padding: 0;
}

.apos-invoice-footer p {
    margin: 0;
    color: var(--apos-muted);
    font-size: 12px;
}

@media (max-width: 768px) {
    .apos-invoice-meta {
        grid-template-columns: 1fr;
    }

    .apos-invoice .invoice-content.apos-invoice-paper {
        padding: 20px 16px 16px;
    }

    .apos-invoice-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media print {
    body.apos-invoice-page {
        background: #fff;
    }

    .apos-invoice {
        padding: 0;
    }

    .apos-invoice-toolbar,
    .apos-invoice .print-container {
        display: none !important;
    }

    .apos-invoice .invoice-container {
        max-width: none;
    }

    .apos-invoice .invoice-content.apos-invoice-paper {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    .apos-invoice-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .apos-invoice .apos-invoice-table thead th,
    .apos-invoice-totals .apos-invoice-payable th,
    .apos-invoice-totals .apos-invoice-payable td,
    .apos-invoice .apos-invoice-table tbody tr:nth-of-type(odd) > * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Sales list: date on the first line, time underneath so the column stays narrow. */
.apos-sales-list .apos-sale-when {
    white-space: nowrap;
    vertical-align: middle;
}

.apos-sales-list .apos-sale-when time {
    display: block;
}

.apos-sales-list .apos-sale-when-date {
    display: block;
    color: var(--apos-ink);
    font-weight: 600;
    line-height: 1.3;
}

.apos-sales-list .apos-sale-when-time {
    display: block;
    margin-top: 2px;
    color: var(--apos-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

/* Online Orders staff queue */
.apos-queue-card .card-bodys {
    padding: 0;
}

.apos-queue {
    padding: 20px 20px 28px;
}

.apos-queue-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.apos-queue-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--apos-ink);
}

.apos-queue-intro {
    margin: 6px 0 0;
    color: var(--apos-muted);
    font-size: 14px;
    line-height: 1.45;
    max-width: 42rem;
}

.apos-queue-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apos-queue-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--apos-muted);
}

.apos-queue-stat strong {
    color: var(--apos-ink);
    font-variant-numeric: tabular-nums;
}

.apos-queue-history {
    margin: 16px 0 4px;
    padding: 16px;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 16px;
}

.apos-queue-history-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.apos-queue-history-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #607d8b;
    text-transform: uppercase;
}

.apos-queue-history-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--apos-ink);
    text-decoration: none;
}

.apos-queue-history-link:hover {
    text-decoration: underline;
}

.apos-queue-history .apos-report-kpi {
    max-width: none;
}

.apos-queue-section {
    margin-top: 20px;
    padding-top: 4px;
}

.apos-queue-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.apos-queue-section-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--apos-ink);
}

.apos-queue-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.apos-queue-empty {
    background: var(--apos-page);
    border: 1px dashed var(--apos-line);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: left;
}

.apos-queue-empty-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--apos-ink);
}

.apos-queue-empty-hint {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--apos-muted);
}

.apos-queue-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.apos-queue-row strong {
    display: block;
    font-size: 15px;
}

.apos-queue-meta {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--apos-muted);
}

.apos-queue-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.apos-queue-order {
    background: var(--apos-card);
    border: 1px solid var(--apos-line);
    border-radius: 16px;
    box-shadow: var(--apos-shadow);
    padding: 16px 16px 14px;
    margin-bottom: 12px;
}

.apos-queue-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apos-queue-code {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.apos-queue-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.apos-queue-pill.is-new {
    background: #FFF3E0;
    color: #E65100;
}

.apos-queue-pill.is-ok {
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
}

.apos-queue-pill.is-busy {
    background: #E3F2FD;
    color: #1565C0;
}

.apos-queue-pill.is-ready {
    background: #F3E5F5;
    color: #6A1B9A;
}

.apos-queue-pill.is-muted {
    background: var(--apos-page);
    color: var(--apos-muted);
}

.apos-queue-summary {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--apos-ink);
}

.apos-queue-notes {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--apos-muted);
}

.apos-queue-items {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.apos-queue-items li + li {
    margin-top: 4px;
}

.apos-queue-actions {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.apos-queue-accept,
.apos-queue-decline {
    display: grid;
    gap: 8px;
}

.apos-queue-reason-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--apos-muted);
}

.apos-queue-btn {
    min-width: 0 !important;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.apos-queue-btn-sm {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.apos-queue-btn-ghost {
    background: #fff !important;
    color: var(--apos-ink) !important;
    border: 1px solid var(--apos-line) !important;
}

.apos-queue-btn-ghost:hover,
.apos-queue-btn-ghost:focus {
    border-color: var(--apos-lime) !important;
    color: var(--apos-ink) !important;
    background: #fff !important;
}

.apos-queue-btn-decline {
    background: #fff !important;
    color: var(--apos-danger) !important;
    border: 1px solid #ef9a9a !important;
}

.apos-queue-btn-decline:hover,
.apos-queue-btn-decline:focus {
    background: #ffebee !important;
    color: var(--apos-danger) !important;
    border-color: var(--apos-danger) !important;
}

.apos-queue-details {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.apos-queue-details:hover {
    color: var(--apos-ink);
    text-decoration: underline;
}

/* Customer order details */
.apos-order {
    padding: 20px 20px 28px;
}

.apos-order-back {
    display: inline-block;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.apos-order-back:hover {
    color: var(--apos-ink);
    text-decoration: underline;
}

.apos-order-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.apos-order-code {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--apos-ink);
}

.apos-order-summary {
    margin: 6px 0 0;
    color: var(--apos-muted);
    font-size: 14px;
}

.apos-order-notes {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--apos-soft);
    color: var(--apos-lime-deep);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.apos-order-decline {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffebee;
    color: var(--apos-danger);
    font-size: 14px;
    font-weight: 600;
}

.apos-order-grid {
    display: grid;
    gap: 16px;
}

.apos-order-panel {
    background: var(--apos-page);
    border: 1px solid var(--apos-line);
    border-radius: 16px;
    padding: 16px 16px 14px;
}

.apos-order-panel h2 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apos-muted);
}

.apos-order-dl {
    margin: 0;
}

.apos-order-dl > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 8px 0;
    border-top: 1px solid var(--apos-line);
}

.apos-order-dl > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.apos-order-dl dt {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--apos-muted);
}

.apos-order-dl dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--apos-ink);
    overflow-wrap: anywhere;
}

.apos-order-dl a {
    color: var(--apos-lime-deep);
    text-decoration: none;
}

.apos-order-dl a:hover {
    text-decoration: underline;
}

.apos-order-lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apos-order-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--apos-line);
    font-size: 15px;
}

.apos-order-lines li:first-child {
    border-top: 0;
    padding-top: 0;
}

.apos-order-lines small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--apos-muted);
    font-weight: 500;
}

.apos-order-lines strong,
.apos-order-totals dd {
    font-variant-numeric: tabular-nums;
}

.apos-order-totals {
    margin: 12px 0 0;
    padding-top: 8px;
    border-top: 1px dashed var(--apos-line);
}

.apos-order-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 14px;
    color: var(--apos-muted);
}

.apos-order-totals .is-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--apos-line);
    color: var(--apos-ink);
    font-size: 16px;
    font-weight: 700;
}

.apos-order-advance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.apos-queue-order .apos-order-advance {
    margin-top: 14px;
}

.apos-order-activity {
    margin-top: 16px;
}

.apos-order-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apos-order-timeline li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--apos-line);
    font-size: 14px;
}

.apos-order-timeline li:first-child {
    border-top: 0;
    padding-top: 0;
}

.apos-order-timeline time {
    color: var(--apos-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (min-width: 720px) {
    .apos-queue {
        padding: 24px 24px 32px;
    }

    .apos-queue-actions {
        grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr);
        align-items: end;
    }

    .apos-order {
        padding: 24px 24px 32px;
    }

    .apos-order-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        align-items: start;
    }
}




/* My aPOS desk — find a customer, then link or unlink */
.apos-myapos-search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.apos-myapos-search .cc-search {
    flex: 1 1 260px;
    min-width: 0;
}

.apos-myapos-caption {
    margin-bottom: 16px;
}

.apos-myapos-list {
    display: grid;
    gap: 12px;
}

.apos-myapos-card {
    border: 1px solid var(--apos-line);
    border-radius: 14px;
    background: #fff;
    padding: 16px;
}

.apos-myapos-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
}

.apos-myapos-name {
    margin: 0 0 2px;
}

.apos-myapos-sub {
    margin: 0;
    color: var(--apos-muted);
    font-size: 14px;
}

.apos-myapos-pill {
    flex: none;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.apos-myapos-pill.is-linked {
    background: #e7f6ec;
    color: #17663a;
}

.apos-myapos-pill.is-unlinked {
    background: #f1f2f4;
    color: #5b6470;
}

.apos-myapos-when,
.apos-myapos-blocked,
.apos-myapos-msg {
    margin: 8px 0 0;
}

.apos-myapos-msg {
    color: #b23c3c;
}

.apos-myapos-qr {
    margin-top: 12px;
}

.apos-myapos-qr img {
    display: block;
    width: 220px;
    height: 220px;
}

.apos-myapos-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    align-items: center;
}

.apos-myapos-send {
    margin: 0;
    display: inline-flex;
}

.apos-myapos-send .apos-invoice-btn {
    font-family: inherit;
}

.apos-myapos-empty .card-bodys h5 {
    margin-bottom: 6px;
}

@media (min-width: 720px) {
    .apos-myapos-list {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}
