* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    background: #111827;
    color: white;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 4px 0 0;
    color: #cbd5e1;
    font-size: 13px;
}

.status-area {
    font-size: 14px;
}

main {
    padding: 24px;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

.login-card {
    width: 100%;
    max-width: 420px;
    margin: 60px auto;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #111827;
    color: white;
}

.login-card button {
    width: 100%;
    margin-top: 20px;
}

.secondary-btn {
    background: #e5e7eb;
    color: #111827;
}

.hidden {
    display: none !important;
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
}

.panel-header input {
    max-width: 300px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.product-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
}

.product-card:hover {
    background: #f9fafb;
}

.product-name {
    font-weight: 700;
}

.product-price {
    margin-top: 8px;
    font-size: 18px;
}

.product-stock {
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.cart-items {
    min-height: 220px;
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.customer-area {
    margin-top: 18px;
}

.totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px 0;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    font-size: 22px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.message {
    margin-top: 12px;
    font-size: 14px;
}

.muted {
    color: #6b7280;
}

@media (max-width: 900px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.management-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
}

.sidebar {
    background: #0B5ED7;
    border-radius: 14px;
    padding: 18px 14px;
    min-height: 650px;
}

.sidebar-title {
    color: white;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 18px;
    padding: 0 8px;
}

.nav-btn {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
    background: transparent;
    color: #d1d5db;
}

.nav-btn:hover,
.nav-btn.active {
    background: white;
    color: #111827;
}

.main-workspace {
    min-width: 0;
}

@media (max-width: 1000px) {
    .management-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .sidebar-title {
        display: none;
    }

    .nav-btn {
        width: auto;
        white-space: nowrap;
        margin-bottom: 0;
    }
}

.management-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
}

.management-table th,
.management-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
}

.management-table th {
    background: #f8fafc;
    font-weight: 700;
}

.management-table tr:hover {
    background: #f9fafb;
}

.product-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.product-form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.product-form-grid input,
.product-form-grid select {
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 800px) {
    .product-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Purchase product autocomplete */
.purchase-product-picker {
    position: relative;
}

.purchase-product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    display: none;
}

.purchase-product-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.purchase-product-suggestion:last-child {
    border-bottom: none;
}

.purchase-product-suggestion:hover {
    background: #f3f4f6;
}

.purchase-product-suggestion small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
}

/* Compact View Product details */
.product-view-compact {
    gap: 10px 18px;
}

.product-view-compact label {
    margin-bottom: 2px;
}

@media print {
    .sidebar,
    .report-screen-controls,
    #managementPage > .panel-header {
        display: none !important;
    }

    .management-layout,
    .main-workspace,
    #managementPage,
    #managementContent,
    .report-print-area {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    body {
        margin: 0 !important;
        background: white !important;
    }
}

/* WIZTK POS - Permission checkbox visibility */
.staff-permission-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: #0B5ED7;
    border: 2px solid #64748b;
    cursor: pointer;
}

/* WIZTK POS - Align permission checkbox with its label */
.staff-permission-checkbox {
    margin: 0 8px 0 0 !important;
    flex: 0 0 20px;
    vertical-align: middle;
}

.staff-permission-checkbox + * {
    vertical-align: middle;
}

/* WIZTK POS - Permission rows */
label:has(.staff-permission-checkbox) {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin: 0 !important;
    width: auto !important;
}

label:has(.staff-permission-checkbox) .staff-permission-checkbox {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 20px !important;
}

label:has(.staff-permission-checkbox) span {
    display: inline-block;
    margin: 0;
}

/* WIZTK Stock table layout */
.stock-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-table th,
.stock-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.stock-table th:first-child,
.stock-table td:first-child {
    min-width: 150px;
    white-space: nowrap;
}

.stock-table th:nth-child(2),
.stock-table td:nth-child(2) {
    min-width: 200px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.stock-table th:nth-child(3),
.stock-table td:nth-child(3) {
    white-space: nowrap;
}

/* Products sidebar submenu */
.sidebar-menu-group {
    width: 100%;
}

.sidebar-menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-submenu {
    margin: -2px 0 8px 12px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
}

.sidebar-submenu button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin: 2px 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #e5e7eb;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-submenu button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* WIZTK POS - Purchase responsive layout */
.purchase-table-wrap {
    width: 100%;
    overflow: visible;
    margin-bottom: 18px;
}

.purchase-items-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.purchase-items-table th,
.purchase-items-table td {
    vertical-align: top;
}

@media (max-width: 700px) {
    main {
        padding: 12px;
    }

    .card {
        padding: 14px;
    }

    .purchase-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .purchase-items-table {
        min-width: 900px;
    }
}

/* WIZTK POS - Stock Transfer History */
.transfer-history-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.transfer-history-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.transfer-history-table th,
.transfer-history-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.transfer-history-table th {
    border-bottom: 2px solid #e5e7eb;
}

.transfer-history-table td {
    border-bottom: 1px solid #e5e7eb;
}

.transfer-history-table th:first-child,
.transfer-history-table td:first-child {
    padding-left: 4px;
}

@media (max-width: 700px) {
    .transfer-history-table {
        min-width: 800px;
    }
}

/* WIZTK POS - Transfer History column spacing */
.transfer-history-table th:nth-child(1),
.transfer-history-table td:nth-child(1) {
    min-width: 90px;
}

.transfer-history-table th:nth-child(2),
.transfer-history-table td:nth-child(2) {
    min-width: 150px;
}

.transfer-history-table th:nth-child(3),
.transfer-history-table td:nth-child(3) {
    min-width: 120px;
}

.transfer-history-table th:nth-child(4),
.transfer-history-table td:nth-child(4) {
    min-width: 180px;
}

.transfer-history-table th:nth-child(5),
.transfer-history-table td:nth-child(5) {
    min-width: 120px;
}

.transfer-history-table th:nth-child(6),
.transfer-history-table td:nth-child(6) {
    min-width: 160px;
}

.transfer-history-table th:nth-child(7),
.transfer-history-table td:nth-child(7) {
    min-width: 190px;
}

/* New Purchase compact column widths */
.purchase-items-table th:nth-child(2),
.purchase-items-table td:nth-child(2) {
    min-width: 105px;
}

.purchase-items-table th:nth-child(3),
.purchase-items-table td:nth-child(3),
.purchase-items-table th:nth-child(4),
.purchase-items-table td:nth-child(4) {
    min-width: 90px;
}

.purchase-items-table th:nth-child(5),
.purchase-items-table td:nth-child(5) {
    min-width: 120px;
}

/* New Purchase compact column widths */
.purchase-items-table th:nth-child(2),
.purchase-items-table td:nth-child(2) {
    min-width: 105px;
}

.purchase-items-table th:nth-child(3),
.purchase-items-table td:nth-child(3),
.purchase-items-table th:nth-child(4),
.purchase-items-table td:nth-child(4) {
    min-width: 90px;
}

.purchase-items-table th:nth-child(5),
.purchase-items-table td:nth-child(5) {
    min-width: 120px;
}

/* WIZTK POS - Purchase Details table */
.purchase-details-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.purchase-details-table th,
.purchase-details-table td {
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #e5e7eb;
}

.purchase-details-table th {
    border-bottom: 2px solid #e5e7eb;
}

/* Product */
.purchase-details-table th:nth-child(1),
.purchase-details-table td:nth-child(1) {
    width: 14%;
}

/* Code */
.purchase-details-table th:nth-child(2),
.purchase-details-table td:nth-child(2) {
    width: 17%;
}

/* Type */
.purchase-details-table th:nth-child(3),
.purchase-details-table td:nth-child(3) {
    width: 12%;
}

/* Qty */
.purchase-details-table th:nth-child(4),
.purchase-details-table td:nth-child(4) {
    width: 9%;
}

/* Units */
.purchase-details-table th:nth-child(5),
.purchase-details-table td:nth-child(5) {
    width: 9%;
}

/* Stock Qty */
.purchase-details-table th:nth-child(6),
.purchase-details-table td:nth-child(6) {
    width: 12%;
}

/* Cost */
.purchase-details-table th:nth-child(7),
.purchase-details-table td:nth-child(7) {
    width: 13%;
}

/* Total */
.purchase-details-table th:nth-child(8),
.purchase-details-table td:nth-child(8) {
    width: 14%;
}

@media (max-width: 700px) {
    .purchase-details-table {
        min-width: 850px;
        table-layout: auto;
    }
}

/* WIZTK Stock compact management table */
.stock-table th,
.stock-table td {
    padding: 10px 8px;
}

.stock-table th:first-child,
.stock-table td:first-child {
    min-width: 120px;
    width: 120px;
}

.stock-table th:nth-child(2),
.stock-table td:nth-child(2) {
    min-width: 140px;
    width: 140px;
    white-space: nowrap;
}

.stock-table th:nth-child(3),
.stock-table td:nth-child(3) {
    min-width: 110px;
    width: 110px;
}

.stock-table th:nth-child(4),
.stock-table td:nth-child(4) {
    width: 80px;
}

.stock-table th:nth-child(5),
.stock-table td:nth-child(5) {
    width: 80px;
}

.stock-table th:nth-child(6),
.stock-table td:nth-child(6) {
    width: 60px;
}

.stock-table th:nth-child(7),
.stock-table td:nth-child(7) {
    width: 80px;
}

.stock-table th:nth-child(8),
.stock-table td:nth-child(8) {
    width: 75px;
}


/* Highlight sidebar menu while its submenu is open */
.sidebar-menu-toggle.submenu-open {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.sidebar-menu-toggle.submenu-open:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Highlight sidebar menu while its submenu is open */
.sidebar-menu-toggle.submenu-open {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.sidebar-menu-toggle.submenu-open:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Products submenu panel */
.sidebar-submenu:not(.hidden) {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 6px 6px 6px 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.sidebar-submenu:not(.hidden) button:hover {
    background: rgba(255, 255, 255, 0.20);
}

/* Products dropdown distinct colour */
.sidebar-submenu:not(.hidden) {
    background: #0f172a;
    border-left: 0;
    border-radius: 8px;
    padding: 7px;
    margin: 4px 6px 8px 12px;
}

.sidebar-submenu:not(.hidden) button {
    color: #ffffff;
}

.sidebar-submenu:not(.hidden) button:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Products dropdown light colour */
.sidebar-submenu:not(.hidden) {
    background: #dbeafe;
}

.sidebar-submenu:not(.hidden) button {
    color: #1e3a8a;
    font-weight: 600;
}

.sidebar-submenu:not(.hidden) button:hover {
    background: #bfdbfe;
    color: #0f172a;
}

/* Reception room grid - responsive */
.reception-room-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

@media (max-width: 1024px) {
    .reception-room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .reception-room-grid {
        grid-template-columns: 1fr;
    }
}

/* WIZTK POS mobile navigation */
.mobile-nav-header {
    display: none;
}

@media (max-width: 600px) {
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: #0B5ED7;
        border-radius: 12px;
        padding: 10px 12px;
        color: white;
    }

    .mobile-nav-header strong {
        white-space: nowrap;
    }

    #mobileCurrentPage {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #mobileMenuBtn {
        width: auto;
        margin: 0;
        padding: 8px 10px;
        background: white;
        color: #0B5ED7;
        white-space: nowrap;
    }

    .management-layout {
        gap: 10px;
    }

    .sidebar {
        display: none;
        width: 100%;
        overflow: visible;
        padding: 10px;
        border-radius: 12px;
        min-height: auto;
        flex-direction: column;
    }

    .sidebar.mobile-menu-open {
        display: flex;
    }

    .sidebar .nav-btn {
        width: 100%;
        text-align: left;
        margin: 0 0 5px 0;
    }

    .sidebar-menu-group {
        width: 100%;
    }

    .sidebar-submenu:not(.hidden) {
        margin: 4px 0 8px 10px;
    }
}

/* Compact Reception room management controls on phones */
@media (max-width: 600px) {
    .reception-room-admin-controls {
        margin-top: 6px !important;
    }

    .reception-room-admin-controls select,
    .reception-room-admin-controls button {
        min-height: 36px;
        padding: 7px 8px;
        font-size: 13px;
    }

    .reception-room-admin-edit {
        width: auto !important;
        margin-top: 6px !important;
        padding: 7px 12px;
        font-size: 13px;
    }
}

/* WIZTK Professional Reception Design */
.reception-room-grid > div {
    border-radius: 14px !important;
    padding: 16px !important;
    box-shadow: 0 5px 18px rgba(15,23,42,.08);
    transition: box-shadow .2s ease, transform .2s ease;
    min-width: 0;
}

.reception-room-grid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(15,23,42,.12);
}

.reception-room-grid > div > div:first-child strong {
    font-size: 18px;
    color: #0f172a;
}

.reception-room-grid > div > div:first-child span {
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(255,255,255,.85);
    padding: 6px 9px;
}

.reception-room-grid button,
.reception-room-grid select {
    border-radius: 9px;
}


/* WIZTK Hotel Management Dashboard Summary */
.reception-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.reception-summary-grid .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(15,23,42,.06);
}

.reception-summary-grid .card strong {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

@media (max-width: 1000px) {
    .reception-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .reception-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* WIZTK Professional Staff Permission Management */
.staff-permissions-layout {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.staff-permission-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 3px 12px rgba(15,23,42,.04);
}

.staff-permission-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.staff-permission-heading h4 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
}

.staff-permission-heading span {
    font-size: 12px;
    color: #64748b;
}

.staff-permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.staff-permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.staff-permission-item:has(input:checked) {
    background: #eff6ff;
    border-color: #93c5fd;
}

.staff-permission-item input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: #0b5ed7;
}

.staff-permission-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .staff-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .staff-permission-grid {
        grid-template-columns: 1fr;
    }
    .staff-permission-panel {
        padding: 14px;
    }
}

/* Compact POS mobile dropdown */
@media (max-width: 600px) {
    .management-layout {
        position: relative;
    }

    #mainSidebar.mobile-menu-open {
        position: absolute;
        top: 48px;
        right: 0;
        left: auto;
        width: 200px;
        max-height: 70vh;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    #mainSidebar .nav-btn {
        width: auto;
        max-width: 100%;
        padding: 8px 10px;
        margin: 0;
        font-size: 14px;
        white-space: normal;
        text-align: left;
    }

    #mainSidebar .sidebar-menu-group {
        width: 100%;
    }
}

/* WIZTK POS — Professional Purchase Details */
.purchase-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.purchase-print-document {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.purchase-document-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 2px solid #1e293b;
}

.purchase-document-heading h2 {
    margin: 0 0 6px;
    color: #0f172a;
}

.purchase-document-heading p {
    margin: 4px 0;
    color: #64748b;
}

.purchase-document-heading > div:last-child {
    text-align: right;
}

.purchase-print-document .purchase-details-table {
    width: 100%;
    border-collapse: collapse;
}

.purchase-print-document .purchase-details-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
}

.purchase-print-document .purchase-details-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .purchase-print-document {
        padding: 15px;
    }

    .purchase-document-heading {
        flex-direction: column;
    }

    .purchase-document-heading > div:last-child {
        text-align: left;
    }
}

/* Print only the purchase document when viewing a purchase */
@media print {
    body:has(.purchase-print-document) * {
        visibility: hidden !important;
    }

    body:has(.purchase-print-document) .purchase-print-document,
    body:has(.purchase-print-document) .purchase-print-document * {
        visibility: visible !important;
    }

    body:has(.purchase-print-document) .purchase-print-document {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    body:has(.purchase-print-document) .purchase-table-wrap {
        overflow: visible !important;
    }

    body:has(.purchase-print-document) .purchase-details-table {
        min-width: 0 !important;
        table-layout: auto !important;
        font-size: 10px;
    }

    body:has(.purchase-print-document) .purchase-details-table th,
    body:has(.purchase-print-document) .purchase-details-table td {
        padding: 6px 4px;
        white-space: normal;
    }
}

/* WIZTK POS: Keep Current Sale visible while browsing products */
@media (min-width: 901px) {
    #sellPage.pos-layout {
        align-items: start;
    }

    #sellPage .cart-panel {
        position: sticky;
        top: 16px;
        align-self: start;
        max-height: calc(100vh - 32px);
        display: flex;
        flex-direction: column;
    }

    #sellPage .cart-items {
        min-height: 0;
        overflow-y: auto;
        flex: 1 1 auto;
    }
}


/* WIZTK COLOUR-CODED SALES CARDS */
.product-grid .product-card {
    color: #172033;
    border-width: 1px;
    border-style: solid;
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

.product-grid .product-colour-0 { background: #e5f1ff; border-color: #9ac5f5; }
.product-grid .product-colour-1 { background: #e3f5e9; border-color: #9ad4ae; }
.product-grid .product-colour-2 { background: #fff0db; border-color: #efbf82; }
.product-grid .product-colour-3 { background: #f0e8ff; border-color: #c8b2f0; }
.product-grid .product-colour-4 { background: #ffe8ef; border-color: #edb2c6; }
.product-grid .product-colour-5 { background: #fff8d9; border-color: #e8d37d; }

.product-grid .product-card:hover {
    filter: brightness(.96);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}

.product-grid .product-card:active {
    transform: translateY(0);
}
/* WIZTK COMPACT MOBILE SALES CARDS */
@media(max-width:600px){
#productGrid.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
#productGrid .product-card{min-width:0;min-height:0;padding:7px 5px;border-radius:7px;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
#productGrid .product-name{font-size:12px;line-height:1.2;font-weight:800;margin:0}
#productGrid .product-price{font-size:13px;line-height:1.2;font-weight:800;margin:0}
#productGrid .product-stock{display:none}
}
/* WIZTK MOBILE CART DRAWER */
@media(max-width:600px){
.mobile-nav-header #mobileCartBtn{width:auto;margin:0;padding:8px 6px;background:#fff;color:#0B5ED7;font-size:12px;white-space:nowrap}
#sellPage .cart-panel.mobile-cart-open{position:fixed!important;inset:0!important;z-index:9999!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;border-radius:0!important;padding:55px 14px 20px!important;background:#fff!important}
#sellPage .cart-panel.mobile-cart-open::before{content:"Current Sale";position:sticky;top:-55px;display:block;background:#0B5ED7;color:#fff;font-weight:700;padding:13px 12px;margin:-55px -14px 15px;z-index:1}
}
/* WIZTK MOBILE CART CLOSE BUTTON */
#mobileCartClose{display:none}
@media(max-width:600px){
#sellPage .cart-panel.mobile-cart-open #mobileCartClose{display:block;position:sticky;top:0;z-index:5;margin:0 0 12px auto;background:#dc2626;color:#fff;font-weight:700;padding:10px 16px;border-radius:8px}
}
/* WIZTK SELECTED PRODUCT HIGHLIGHT */
#productGrid .product-card.cart-selected{border:3px solid #111827!important;position:relative;box-shadow:0 0 0 1px #111827}
#productGrid .product-card.cart-selected::after{content:"✓";position:absolute;top:3px;right:3px;background:#111827;color:#fff;border-radius:50%;width:19px;height:19px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800}
#productGrid .product-card.cart-selected .product-name{padding-right:17px}
/* WIZTK SALES PRODUCT SEARCH DROPDOWN */
#sellPage .products-panel .panel-header{position:relative}
#sellProductSuggestions[hidden]{display:none!important}
#sellProductSuggestions{position:absolute;top:100%;right:0;width:min(360px,100%);max-height:300px;overflow-y:auto;background:#fff;border:1px solid #cbd5e1;border-radius:9px;box-shadow:0 8px 24px rgba(0,0,0,.18);z-index:1000}
#sellProductSuggestions .sell-suggestion{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:12px;text-align:left;background:#fff;color:#172033;border:0;border-bottom:1px solid #e5e7eb;cursor:pointer}
#sellProductSuggestions .sell-suggestion:hover,#sellProductSuggestions .sell-suggestion:focus{background:#e5f1ff}
#sellProductSuggestions .sell-suggestion-price{font-weight:800;white-space:nowrap}
@media(max-width:600px){#sellProductSuggestions{left:0;right:0;width:100%;max-height:45vh}}
/* WIZTK HOME DASHBOARD COLOURS */
.wiztk-home-colour-0{background:#e5f1ff!important;border:1px solid #9ac5f5!important}
.wiztk-home-colour-1{background:#e3f5e9!important;border:1px solid #9ad4ae!important}
.wiztk-home-colour-2{background:#fff0db!important;border:1px solid #efbf82!important}
.wiztk-home-colour-3{background:#f0e8ff!important;border:1px solid #c8b2f0!important}
.wiztk-home-colour-4{background:#ffe8ef!important;border:1px solid #edb2c6!important}
.wiztk-home-colour-5{background:#fff8d9!important;border:1px solid #e8d37d!important}
.wiztk-home-colour-6{background:#e0f2fe!important;border:1px solid #7dd3fc!important}
.wiztk-home-colour-7{background:#dcfce7!important;border:1px solid #86efac!important}
/* WIZTK PRODUCTS AND STOCK TABLE COLOURS */
#productTableBody tr:nth-child(6n+1) td,#stockTableBody tr:nth-child(6n+1) td{background:#e5f1ff!important}
#productTableBody tr:nth-child(6n+2) td,#stockTableBody tr:nth-child(6n+2) td{background:#e3f5e9!important}
#productTableBody tr:nth-child(6n+3) td,#stockTableBody tr:nth-child(6n+3) td{background:#fff0db!important}
#productTableBody tr:nth-child(6n+4) td,#stockTableBody tr:nth-child(6n+4) td{background:#f0e8ff!important}
#productTableBody tr:nth-child(6n+5) td,#stockTableBody tr:nth-child(6n+5) td{background:#ffe8ef!important}
#productTableBody tr:nth-child(6n+6) td,#stockTableBody tr:nth-child(6n+6) td{background:#fff8d9!important}
#productTableBody tr:hover td,#stockTableBody tr:hover td{filter:brightness(.96)}
/* WIZTK PURCHASE AND TRANSFER HISTORY COLOURS */
.purchase-history-table tbody tr:nth-child(6n+1) td,.transfer-history-table tbody tr:nth-child(6n+1) td{background:#e5f1ff!important}
.purchase-history-table tbody tr:nth-child(6n+2) td,.transfer-history-table tbody tr:nth-child(6n+2) td{background:#e3f5e9!important}
.purchase-history-table tbody tr:nth-child(6n+3) td,.transfer-history-table tbody tr:nth-child(6n+3) td{background:#fff0db!important}
.purchase-history-table tbody tr:nth-child(6n+4) td,.transfer-history-table tbody tr:nth-child(6n+4) td{background:#f0e8ff!important}
.purchase-history-table tbody tr:nth-child(6n+5) td,.transfer-history-table tbody tr:nth-child(6n+5) td{background:#ffe8ef!important}
.purchase-history-table tbody tr:nth-child(6n+6) td,.transfer-history-table tbody tr:nth-child(6n+6) td{background:#fff8d9!important}
.purchase-history-table tbody tr:hover td,.transfer-history-table tbody tr:hover td{filter:brightness(.96)}
/* WIZTK SUBTLE WHITE TABLE ROW SEPARATORS */
#productTableBody tr:not(:last-child) td,#stockTableBody tr:not(:last-child) td,.purchase-history-table tbody tr:not(:last-child) td,.transfer-history-table tbody tr:not(:last-child) td{border-bottom:2px solid #fff!important}

/* WIZTK SOFT PROFESSIONAL TABLE COLOURS */
#productTableBody tr:nth-child(6n+1) td,#stockTableBody tr:nth-child(6n+1) td,.purchase-history-table tbody tr:nth-child(6n+1) td,.transfer-history-table tbody tr:nth-child(6n+1) td{background:#f2f8ff!important}
#productTableBody tr:nth-child(6n+2) td,#stockTableBody tr:nth-child(6n+2) td,.purchase-history-table tbody tr:nth-child(6n+2) td,.transfer-history-table tbody tr:nth-child(6n+2) td{background:#f1faf4!important}
#productTableBody tr:nth-child(6n+3) td,#stockTableBody tr:nth-child(6n+3) td,.purchase-history-table tbody tr:nth-child(6n+3) td,.transfer-history-table tbody tr:nth-child(6n+3) td{background:#fff8ef!important}
#productTableBody tr:nth-child(6n+4) td,#stockTableBody tr:nth-child(6n+4) td,.purchase-history-table tbody tr:nth-child(6n+4) td,.transfer-history-table tbody tr:nth-child(6n+4) td{background:#f8f4ff!important}
#productTableBody tr:nth-child(6n+5) td,#stockTableBody tr:nth-child(6n+5) td,.purchase-history-table tbody tr:nth-child(6n+5) td,.transfer-history-table tbody tr:nth-child(6n+5) td{background:#fff4f7!important}
#productTableBody tr:nth-child(6n+6) td,#stockTableBody tr:nth-child(6n+6) td,.purchase-history-table tbody tr:nth-child(6n+6) td,.transfer-history-table tbody tr:nth-child(6n+6) td{background:#fffdf0!important}

/* WIZTK PRODUCTS — MOBILE TOOLBAR */
@media (max-width: 600px) {
    .wiz-products-toolbar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        margin-bottom: 16px;
    }

    .wiz-products-toolbar #productSearch {
        grid-column: 1 / -1;
    }

    .wiz-products-toolbar input,
    .wiz-products-toolbar select,
    .wiz-products-toolbar button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 13px;
    }

    .wiz-products-toolbar button {
        white-space: normal;
        padding: 10px 6px;
    }

    .table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* WIZTK Purchase Review - approved layout */
.purchase-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.purchase-items-table th:nth-child(6),
.purchase-items-table td:nth-child(6),
.purchase-items-table th:nth-child(7),
.purchase-items-table td:nth-child(7) {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 95px;
}

.purchase-items-table td.purchase-base-qty,
.purchase-items-table td.purchase-line-total {
    font-weight: 600;
}

/* Purchase autocomplete dropdown visibility on desktop */
@media (min-width: 701px) {
    .purchase-entry-wrap {
        overflow: visible !important;
    }
}

/* COMPACT NEW PURCHASE TABLE 20261017 */
.purchase-entry-wrap {
    width: 100%;
    overflow-x: auto !important;
}

.purchase-entry-wrap .purchase-items-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}

.purchase-entry-wrap th,
.purchase-entry-wrap td {
    padding: 7px 4px;
    box-sizing: border-box;
}

.purchase-entry-wrap th:nth-child(1) { width: 24%; }
.purchase-entry-wrap th:nth-child(2) { width: 12%; }
.purchase-entry-wrap th:nth-child(3) { width: 9%; }
.purchase-entry-wrap th:nth-child(4) { width: 13%; }
.purchase-entry-wrap th:nth-child(5) { width: 15%; }
.purchase-entry-wrap th:nth-child(6) { width: 12%; }
.purchase-entry-wrap th:nth-child(7) { width: 15%; }

.purchase-entry-wrap td input,
.purchase-entry-wrap td select {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

.purchase-entry-wrap .purchase-product-picker {
    position: relative;
}

.purchase-entry-wrap .remove-purchase-item {
    width: 100%;
    padding: 10px 5px;
    white-space: nowrap;
}


/* Purchase autocomplete desktop overflow fix */
@media (min-width: 701px) {
    .purchase-entry-wrap {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
}

/* WIZTK POS - Uniform Hotel Management room cards */
.reception-room-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.reception-room-grid > div {
    box-sizing: border-box;
    height: 100%;
}

/* WIZTK POS: Inactive guest actions */
.reception-room-guest-actions button:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 1 !important;
}










/* WIZTK POS - Unified Room Card Layout V1 */

/* Identical card heights throughout the room grid */
.reception-room-grid {
    display: grid;
    align-items: stretch !important;
    grid-auto-rows: 1fr;
}

/* Consistent card structure */
.reception-room-grid > div {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
    height: 100%;
    min-width: 0;
}

/* Guest information always occupies the same area */
.reception-room-guest-line {
    min-height: 24px;
    line-height: 24px;
}

/* Guest actions always occupy the same row */
.reception-room-guest-actions {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 8px;
}

.reception-room-guest-actions button {
    min-width: 0;
    white-space: normal !important;
    min-height: 40px;
}

/* Disabled buttons must look disabled */
.reception-room-guest-actions button:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Fixed room-status section */
.reception-room-admin-controls {
    min-height: 48px;
    box-sizing: border-box;
}

/* Occupied indicator replaces the unavailable status dropdown */
.reception-room-occupied-status {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    min-height: 48px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    text-align: center;
}

/* Edit Room stays at the bottom, regardless of occupancy */
.reception-room-grid > div > .reception-room-admin-edit {
    margin-top: auto !important;
    width: 100%;
}

/* WIZTK POS - Compact uniform room cards */
.reception-room-grid {
    grid-auto-rows: auto !important;
    align-items: stretch !important;
}

.reception-room-grid > div {
    height: auto !important;
    min-height: 0 !important;
}

.reception-room-grid > div > .reception-room-admin-edit {
    margin-top: auto !important;
}

/* WIZTK POS - Reduce excessive room-card height */
.reception-room-grid {
    grid-auto-rows: auto !important;
    align-items: stretch !important;
}

.reception-room-grid > div {
    height: auto !important;
    min-height: 0 !important;
    padding: 12px !important;
}

.reception-room-guest-line {
    min-height: 20px !important;
    line-height: 20px !important;
}

.reception-room-guest-actions {
    margin-top: 6px !important;
}

.reception-room-guest-actions button {
    min-height: 34px !important;
    padding: 7px 6px !important;
}

.reception-room-admin-controls {
    min-height: 36px !important;
    margin-top: 6px !important;
}

.reception-room-occupied-status {
    min-height: 36px !important;
}

.reception-room-grid > div > .reception-room-admin-edit {
    margin-top: auto !important;
}

/* WIZTK POS - Extra compact room cards */
.reception-room-grid > div {
    padding: 9px 12px !important;
    gap: 0 !important;
    min-height: 0 !important;
}

.reception-room-guest-line {
    margin-top: 4px !important;
    min-height: 18px !important;
    line-height: 18px !important;
}

.reception-room-guest-actions {
    margin-top: 4px !important;
    gap: 6px !important;
}

.reception-room-guest-actions button {
    min-height: 30px !important;
    padding: 5px 6px !important;
    font-size: 12px !important;
}

.reception-room-admin-controls,
.reception-room-occupied-status {
    min-height: 32px !important;
    margin-top: 4px !important;
}

.reception-room-grid > div > .reception-room-admin-edit {
    margin-top: auto !important;
    padding: 6px 8px !important;
}

/* WIZTK POS - Uniform room status and Update controls */
.reception-room-grid .reception-room-admin-controls:not(.reception-room-occupied-status) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 90px !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 36px !important;
    margin-top: 6px !important;
}

.reception-room-grid .reception-room-status-select,
.reception-room-grid .reception-room-status-save {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

.reception-room-grid .reception-room-status-save {
    background: #111827 !important;
    color: #ffffff !important;
    border: 1px solid #111827 !important;
    font-weight: 600 !important;
}

.reception-room-grid .reception-room-admin-edit {
    margin-top: auto !important;
}

/* WIZTK POS - Consistent separation above Edit Room */
.reception-room-grid > div > .reception-room-admin-edit {
    margin-top: 8px !important;
}

/* Keep Edit Room at the bottom of each card */
.reception-room-grid > div:has(> .reception-room-admin-edit) {
    display: flex !important;
    flex-direction: column !important;
}

.reception-room-grid > div > .reception-room-admin-controls {
    flex-shrink: 0;
}

/* WIZTK POS - Colour-coded room status indicators */

/* Available */
.reception-room-grid > div[style*="#f0fdf4"] .reception-room-occupied-status {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
}

/* Occupied */
.reception-room-grid > div[style*="#fef2f2"] .reception-room-occupied-status {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

/* Pending check-in */
.reception-room-grid > div[style*="#fff7ed"] .reception-room-occupied-status {
    background: #ffedd5 !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
}


/* WIZTK POS - Mobile Purchase Item Cards V1 */
@media (max-width: 600px) {

    .purchase-entry-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .purchase-entry-wrap .purchase-items-table,
    .purchase-entry-wrap .purchase-items-table tbody,
    .purchase-entry-wrap .purchase-items-table tr,
    .purchase-entry-wrap .purchase-items-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .purchase-entry-wrap .purchase-items-table {
        border: 0 !important;
        min-width: 0 !important;
        table-layout: auto !important;
    }

    .purchase-entry-wrap .purchase-items-table thead {
        display: none !important;
    }

    .purchase-entry-wrap .purchase-item-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 14px !important;
        margin-bottom: 14px !important;
        border: 1px solid #dbe3ee !important;
        border-radius: 12px !important;
        background: #f8fafc !important;
    }

    .purchase-entry-wrap .purchase-item-row > td {
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .purchase-entry-wrap .purchase-item-row > td::before {
        display: block;
        margin-bottom: 5px;
        color: #334155;
        font-size: 12px;
        font-weight: 700;
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(1) {
        grid-column: 1 / -1;
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(1)::before {
        content: "Product";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(2)::before {
        content: "Type";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(3)::before {
        content: "Quantity";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(4)::before {
        content: "Cost (₦)";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(5)::before {
        content: "Selling Price (₦)";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(6)::before {
        content: "Stock Quantity";
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(7) {
        grid-column: 1 / -1;
    }

    .purchase-entry-wrap .purchase-item-row > td:nth-child(7)::before {
        display: none;
    }

    .purchase-entry-wrap .purchase-product-picker,
    .purchase-entry-wrap .purchase-product-search,
    .purchase-entry-wrap .purchase-unit,
    .purchase-entry-wrap .purchase-quantity,
    .purchase-entry-wrap .purchase-unit-cost,
    .purchase-entry-wrap .purchase-selling-price {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .purchase-entry-wrap .purchase-item-row input,
    .purchase-entry-wrap .purchase-item-row select {
        height: 42px !important;
        font-size: 16px !important;
    }

    .purchase-entry-wrap .purchase-base-qty {
        font-size: 16px !important;
        font-weight: 700 !important;
    }

    .purchase-entry-wrap .remove-purchase-item {
        width: 100% !important;
        min-height: 40px !important;
    }

    #purchaseGrandTotal {
        white-space: nowrap;
    }

    #cancelNewPurchaseBtn,
    #savePurchaseBtn {
        min-width: 0 !important;
        white-space: normal !important;
    }
}


/* WIZTK HOME MOBILE TWO-COLUMN CARDS */
@media screen and (max-width: 600px) {
    .wiz-home-summary-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .wiz-home-summary-grid > .card {
        min-width: 0 !important;
        padding: 14px 8px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 105px !important;
        box-sizing: border-box !important;
    }

    .wiz-home-summary-grid > .card > .muted {
        font-size: 16px !important;
        font-weight: 650 !important;
        line-height: 1.3 !important;
        text-align: center !important;
        overflow-wrap: anywhere !important;
    }

    .wiz-home-summary-grid > .card > div:last-child {
        font-size: 28px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        overflow-wrap: anywhere !important;
        max-width: 100% !important;
    }
}
/* END WIZTK HOME MOBILE TWO-COLUMN CARDS */


/* WIZTK HOME IPHONE WIDGET CARDS */
@media screen and (max-width: 600px) {
    .wiz-home-summary-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    .wiz-home-summary-grid > .card {
        aspect-ratio: 1 / 1 !important;
        min-height: 0 !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 16px 10px !important;
        border-radius: 28px !important;
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    .wiz-home-summary-grid > .card > .muted {
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        text-align: center !important;
        overflow-wrap: anywhere !important;
        margin-bottom: 12px !important;
    }

    .wiz-home-summary-grid > .card > div:last-child {
        font-size: clamp(21px, 6vw, 28px) !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        overflow-wrap: anywhere !important;
        max-width: 100% !important;
    }
}
/* END WIZTK HOME IPHONE WIDGET CARDS */


/* WIZTK MOBILE PURCHASE HISTORY CARDS V1 */
@media screen and (max-width: 600px) {

    .purchase-history-table,
    .purchase-history-table tbody,
    .purchase-history-table tbody tr {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .purchase-history-table thead {
        display: none !important;
    }

    .purchase-history-table tbody tr {
        margin-bottom: 12px !important;
        padding: 12px !important;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    .purchase-history-table tbody td {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 7px 4px !important;
        border-bottom: 1px solid rgba(0,0,0,.06) !important;
        text-align: right !important;
        font-size: 15px !important;
        overflow-wrap: anywhere !important;
    }

    .purchase-history-table tbody td::before {
        font-weight: 700 !important;
        color: #334155 !important;
        text-align: left !important;
        flex-shrink: 0 !important;
    }

    .purchase-history-table tbody td:nth-child(1)::before {
        content: "Purchase";
    }

    .purchase-history-table tbody td:nth-child(2)::before {
        content: "Supplier";
    }

    .purchase-history-table tbody td:nth-child(3)::before {
        content: "Date";
    }

    .purchase-history-table tbody td:nth-child(4)::before {
        content: "Items";
    }

    .purchase-history-table tbody td:nth-child(5)::before {
        content: "Total";
    }

    .purchase-history-table tbody td:nth-child(6)::before {
        content: "Status";
    }

    .purchase-history-table tbody td:nth-child(7)::before {
        content: "Action";
    }

    .purchase-history-table .purchase-action-select {
        width: auto !important;
        min-width: 130px !important;
        max-width: 60% !important;
        font-size: 15px !important;
    }

    .purchase-history-table tbody td:last-child {
        border-bottom: none !important;
    }

    .purchase-history-table tbody td[colspan] {
        display: block !important;
        text-align: center !important;
    }

    .purchase-history-table tbody td[colspan]::before {
        content: none !important;
    }
}
/* END WIZTK MOBILE PURCHASE HISTORY CARDS V1 */


/* WIZTK PURCHASE HISTORY IPHONE STYLE V2 */
@media screen and (max-width: 600px) {
    .purchase-history-table tbody tr {
        border-radius: 26px !important;
        margin-bottom: 16px !important;
        padding: 12px !important;
        box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08) !important;
        overflow: hidden !important;
    }

    .purchase-history-table tbody td {
        padding: 9px 8px !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    .purchase-history-table tbody td::before {
        font-weight: 750 !important;
    }

    .purchase-history-table .purchase-action-select {
        border-radius: 12px !important;
        min-height: 44px !important;
        font-size: 16px !important;
    }
}
/* END WIZTK PURCHASE HISTORY IPHONE STYLE V2 */


/* WIZTK PURCHASE BACK TO TOP V1 */
@media screen and (max-width: 600px) {
    #wizPurchaseBackToTop {
        position: fixed !important;
        right: 18px !important;
        bottom: 24px !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: #0b5ed7 !important;
        color: white !important;
        font-size: 26px !important;
        font-weight: 800 !important;
        box-shadow: 0 5px 18px rgba(0,0,0,.25) !important;
        z-index: 900 !important;
        display: none;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    #wizPurchaseBackToTop.wiz-visible {
        display: flex !important;
    }
}
/* END WIZTK PURCHASE BACK TO TOP V1 */


/* WIZTK SIGNATURE MOBILE MENU V1 */
@media screen and (max-width: 600px) {

    #posScreen .mobile-nav-header {
        border-radius: 22px;
        padding: 12px;
    }

    #posScreen #mobileMenuBtn {
        border-radius: 14px;
        font-weight: 700;
    }

    #posScreen #mainSidebar.mobile-menu-open {
        width: min(290px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
        border-radius: 24px;
        padding: 12px;
        gap: 7px;
        background: #f8fafc;
        box-shadow: 0 12px 32px rgba(15,23,42,.18);
    }

    #posScreen #mainSidebar .nav-btn {
        width: 100%;
        padding: 12px 14px;
        border-radius: 16px;
        font-size: 15px;
        line-height: 1.35;
        text-align: left;
    }

    #posScreen #mainSidebar .sidebar-menu-group {
        width: 100%;
    }

    #posScreen #mainSidebar .sidebar-submenu:not(.hidden) {
        width: 100%;
        margin: 6px 0;
        padding: 8px;
        border-radius: 18px;
        background: #eaf2ff;
    }

    #posScreen #mainSidebar .sidebar-submenu:not(.hidden) button {
        width: 100%;
        border-radius: 12px;
        padding: 11px 12px;
        margin-bottom: 5px;
        text-align: left;
        font-size: 14px;
    }
}
/* END WIZTK SIGNATURE MOBILE MENU V1 */

/* WIZTK MOBILE MENU READABILITY STEP977 */
@media screen and (max-width: 600px) {
    #posScreen #mainSidebar.mobile-menu-open {
        box-sizing: border-box;
        max-height: min(70vh, 560px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #posScreen #mainSidebar .nav-btn {
        display: block;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        background: #ffffff;
        color: #172033;
        font-size: 15px !important;
        font-weight: 650 !important;
        line-height: 1.35;
        text-align: left;
        box-shadow: none !important;
        white-space: normal;
    }

    #posScreen #mainSidebar .nav-btn.active {
        background: #dbeafe;
        color: #0b5ed7;
        font-weight: 800 !important;
    }

    #posScreen #mainSidebar .sidebar-submenu:not(.hidden) button {
        color: #172033;
        background: #ffffff;
        font-size: 14px;
        font-weight: 600;
    }

    #posScreen #mainSidebar .sidebar-submenu:not(.hidden) button:hover {
        background: #dbeafe;
        color: #0b5ed7;
    }
}
/* END WIZTK MOBILE MENU READABILITY STEP977 */



/* WIZTK STOCK TRANSFER MOBILE STEP998 */
@media screen and (max-width: 600px) {
    #managementContent:has(#transferFromLocation) {
        min-width: 0;
        max-width: 100%;
    }

    #managementContent:has(#transferFromLocation) > div:first-child {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    #managementContent:has(#transferFromLocation) > div:first-child > div:first-child {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #managementContent:has(#transferFromLocation) select,
    #managementContent:has(#transferFromLocation) input,
    #managementContent:has(#transferFromLocation) textarea {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }

    #managementContent .transfer-item-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        background: #f8fafc;
    }

    #managementContent .transfer-item-row > div:first-child {
        grid-column: 1 / -1;
        min-width: 0;
    }

    #managementContent .transfer-product-picker {
        min-width: 0;
        max-width: 100%;
    }

    #managementContent .transfer-item-row .remove-transfer-item {
        grid-column: 1 / -1;
        width: 100%;
        margin: 0;
    }

    #managementContent:has(#transferFromLocation) .form-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    #managementContent:has(#transferFromLocation) .form-actions button {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}
/* END WIZTK STOCK TRANSFER MOBILE STEP998 */


/* REPORTS DASHBOARD V2 — scoped to Reports only */
.reports-v2-dashboard{color:#e9eafb;max-width:1500px;margin:auto}
.reports-v2-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;background:linear-gradient(125deg,#0d142a,#25164a);padding:27px;border-radius:24px;margin-bottom:16px}
.reports-v2-eyebrow{font-size:11px;font-weight:800;letter-spacing:1.5px;color:#b9a4ff}
.reports-v2-hero h2{color:#fff;font-size:28px;margin:8px 0}
.reports-v2-hero p{color:#b8bfd7;margin:0}
.reports-v2-date{background:#ffffff16;border:1px solid #ffffff24;padding:11px 16px;border-radius:15px;color:#fff}
.reports-v2-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:#121b33;padding:16px;border-radius:20px;margin-bottom:17px}
.reports-v2-controls label{display:block;color:#c9c9e7;margin-bottom:5px}
.reports-v2-controls input{max-width:190px}
.reports-v2-controls button{border-radius:12px}
.reports-v2-section{margin-bottom:17px}
.reports-v2-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px}
.reports-v2-section-heading h3{margin:0;color:#f8f7ff;font-size:18px}
.reports-v2-section-heading>span{font-size:12px;color:#a9a6c8}
.reports-v2-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.reports-v2-kpi{background:#131e38;border:1px solid #283456;border-radius:22px;padding:22px;min-width:0;min-height:115px;display:flex;flex-direction:column;justify-content:space-between;gap:16px}
.reports-v2-kpi span{font-size:13px;color:#c2c8e2}
.reports-v2-kpi strong{font-size:clamp(18px,2vw,29px);color:#fff;overflow-wrap:anywhere}
.reports-v2-primary{background:linear-gradient(145deg,#172849,#263e7c)}
.reports-v2-purple{background:linear-gradient(145deg,#3b216c,#6b3eae)}
.reports-v2-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:16px}
.reports-v2-panel{background:#121b33;border:1px solid #2b3454;border-radius:22px;padding:22px;min-width:0}
.reports-v2-payment{margin:21px 0}
.reports-v2-payment-label{display:flex;justify-content:space-between;gap:12px;color:#d5d9ec;font-size:14px;margin-bottom:9px}
.reports-v2-payment-label strong{color:#fff}
.reports-v2-track{height:10px;border-radius:20px;background:#303957;overflow:hidden}
.reports-v2-track>div{height:100%;border-radius:20px;background:linear-gradient(90deg,#6876ef,#b179f7)}
.reports-v2-footnote{font-size:12px;color:#aeb7d2}
.reports-v2-operations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.reports-v2-operation{background:#1b2642;border:1px solid #2b3657;border-radius:15px;padding:14px;display:flex;flex-direction:column;gap:8px;min-width:0}
.reports-v2-operation span{color:#bfc8df;font-size:12px}
.reports-v2-operation strong{color:#fff;font-size:19px;overflow-wrap:anywhere}
.reports-v2-upload{background:#121b33!important;color:#e9eafb!important;border:1px solid #34375d!important;border-radius:22px!important;margin-top:17px!important}
.reports-v2-upload h3{color:#fff}
.reports-v2-upload .muted{color:#bfc8df}
.reports-v2-upload input[type=file]{max-width:100%;color:#e9eafb}
.reports-v2-upload table{color:#e9eafb}
.reports-v2-upload th,.reports-v2-upload td{padding:10px;text-align:left;border-bottom:1px solid #39425c}
@media(max-width:950px){.reports-v2-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reports-v2-columns{grid-template-columns:1fr}}
@media(max-width:550px){.reports-v2-hero{padding:19px}.reports-v2-hero h2{font-size:23px}.reports-v2-kpi{padding:15px;border-radius:18px;min-height:95px}.reports-v2-kpi strong{font-size:19px}.reports-v2-panel{padding:15px}.reports-v2-operations{gap:8px}.reports-v2-operation{padding:11px}.reports-v2-controls button{flex:1 1 auto}}
@media print{
  .reports-v2-dashboard{color:#111!important;max-width:none}
  .reports-v2-hero,.reports-v2-controls,#reportsV2ReconciliationMount{display:none!important}
  .reports-v2-kpi,.reports-v2-panel,.reports-v2-operation{background:#fff!important;color:#111!important;border:1px solid #ccc!important;break-inside:avoid}
  .reports-v2-dashboard strong,.reports-v2-dashboard span,.reports-v2-dashboard h3{color:#111!important}
  .reports-v2-track{border:1px solid #888;background:#eee!important}
  .reports-v2-track>div{background:#555!important}
}


/* REPORTS V2 FINAL DESIGN REFINEMENTS */
.reports-v2-section-heading h3 {
    color: #182440 !important;
    font-weight: 800;
}
.reports-v2-section-heading > span {
    color: #626b86 !important;
}
.reports-v2-columns {
    align-items: start;
}
.reports-v2-payment {
    margin: 15px 0;
}
body:has(.reports-v2-dashboard) #mainSidebar {
    background: linear-gradient(165deg,#10182e,#211643) !important;
    border: 1px solid #39305c;
}
body:has(.reports-v2-dashboard) #mainSidebar .nav-btn.active {
    background: #7146ca !important;
    color: #fff !important;
}
body:has(.reports-v2-dashboard) #mainSidebar .nav-btn:hover {
    background: #302653 !important;
    color: #fff !important;
}
@media print {
    .reports-v2-section-heading h3 {
        color: #111 !important;
    }
}

/* WIZTK SIDEBAR ONLY — NAVY AND PURPLE */
#posScreen #mainSidebar {
    background: linear-gradient(165deg, #10182e, #211643) !important;
    border: 1px solid #39305c;
}
#posScreen #mainSidebar .nav-btn {
    color: #d9d5ed;
}
#posScreen #mainSidebar .nav-btn.active {
    background: #7146ca !important;
    color: #ffffff !important;
}
#posScreen #mainSidebar .nav-btn:hover {
    background: #302653 !important;
    color: #ffffff !important;
}

/* WIZTK MOBILE DROPDOWN CONTRAST FIX — STEP 1315 */
@media screen and (max-width: 600px) {
    #posScreen #mainSidebar .nav-btn:not(.active) {
        background: #ffffff !important;
        color: #172033 !important;
        font-weight: 700 !important;
    }

    #posScreen #mainSidebar .nav-btn.active {
        background: #7146ca !important;
        color: #ffffff !important;
    }

    #posScreen #mainSidebar .nav-btn:not(.active):hover {
        background: #e9ddff !important;
        color: #211643 !important;
    }
}
/* END STEP 1315 */

/* WIZTK MOBILE LAVENDER MENU — STEP 1318 */
@media screen and (max-width: 600px) {
    #posScreen #mainSidebar .nav-btn:not(.active) {
        background: #e8ddf8 !important;
        color: #211643 !important;
    }

    #posScreen #mainSidebar .nav-btn.active {
        background: #7146ca !important;
        color: #ffffff !important;
    }
}
/* END STEP 1318 */
