/* ======================================================================
   We Know IT Ltd — POS System CSS
   Bootstrap 5 companion stylesheet.
   Covers POS register app + admin back office.
   Primary: #025add | Accent: #f97316 | Dark-mode aware
   ====================================================================== */

/* ------------------------------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------------------------------ */
:root {
    --color-primary: #025add;
    --color-primary-hover: #0148b3;
    --color-primary-light: #e8f0fe;
    --color-primary-rgb: 2, 90, 221;

    --color-accent: #f97316;
    --color-accent-hover: #ea670c;
    --color-accent-light: #fff5eb;

    --color-success: #16a34a;
    --color-success-light: #f0fdf4;
    --color-danger: #dc2626;
    --color-danger-light: #fef2f2;
    --color-warning: #eab308;
    --color-warning-light: #fefce8;
    --color-info: #0ea5e9;
    --color-info-light: #f0f9ff;

    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-heading: #0f172a;

    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-sidebar: #0f172a;
    --color-bg-input: #ffffff;
    --color-border: #e2e8f0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .07), 0 2px 4px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1), 0 4px 6px rgba(0, 0, 0, .05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, .1), 0 8px 10px rgba(0, 0, 0, .04);

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;

    --sidebar-width: 250px;
    --header-height: 56px;
    --pos-header-height: 48px;
}

/* ------------------------------------------------------------------
   2. Dark Mode
   ------------------------------------------------------------------ */
body.dark {
    --color-primary-light: #1a2744;
    --color-accent-light: #2d2013;
    --color-success-light: #14291d;
    --color-danger-light: #2d1616;
    --color-warning-light: #2d2a10;
    --color-info-light: #122936;

    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-heading: #f1f5f9;

    --color-bg: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-sidebar: #020617;
    --color-bg-input: #1e293b;
    --color-border: #334155;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .2);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .4), 0 4px 6px rgba(0, 0, 0, .2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, .5), 0 8px 10px rgba(0, 0, 0, .3);
}

/* ------------------------------------------------------------------
   3. Base / Reset
   ------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Source+Code+Pro:wght@400;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

.font-mono {
    font-family: 'Source Code Pro', ui-monospace, monospace;
}

/* ------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    line-height: 1.5;
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.btn-accent {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-accent:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #fff;
}

.btn-success {
    background-color: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}
.btn-success:hover {
    background-color: #15803d;
    border-color: #15803d;
    color: #fff;
}

.btn-danger {
    background-color: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-muted);
    border-color: transparent;
}
.btn-ghost:hover {
    background-color: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-primary);
}

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: var(--radius);
}

.btn-icon.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
}

/* ------------------------------------------------------------------
   5. Badges
   ------------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.4;
    white-space: nowrap;
}

.badge-completed,
.badge-success,
.badge-paid {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.badge-refunded,
.badge-danger,
.badge-failed {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

.badge-voided,
.badge-closed,
.badge-inactive {
    background-color: #f1f5f9;
    color: #64748b;
}
body.dark .badge-voided,
body.dark .badge-closed,
body.dark .badge-inactive {
    background-color: #334155;
    color: #94a3b8;
}

.badge-open,
.badge-info,
.badge-active {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

.badge-low,
.badge-warning,
.badge-pending,
.badge-partial {
    background-color: var(--color-warning-light);
    color: #a16207;
}
body.dark .badge-low,
body.dark .badge-warning,
body.dark .badge-pending,
body.dark .badge-partial {
    color: var(--color-warning);
}

.badge-primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

/* ------------------------------------------------------------------
   6. Cards
   ------------------------------------------------------------------ */
.card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-header h3,
.card-header h4 {
    margin-bottom: 0;
    font-size: 1rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

/* ------------------------------------------------------------------
   7. Tables
   ------------------------------------------------------------------ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background-color: var(--color-bg);
}
body.dark .data-table thead {
    background-color: var(--color-bg-sidebar);
}

.data-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
    cursor: default;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable::after {
    content: '\2195';
    margin-left: 0.375rem;
    opacity: 0.3;
    font-size: 0.7rem;
}

.data-table th.sortable.asc::after {
    content: '\2191';
    opacity: 0.8;
}

.data-table th.sortable.desc::after {
    content: '\2193';
    opacity: 0.8;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb), 0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* ------------------------------------------------------------------
   8. Form Inputs
   ------------------------------------------------------------------ */
.form-control,
.form-select {
    background-color: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-heading);
}

.form-group {
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

/* ------------------------------------------------------------------
   9. Toast / Notification
   ------------------------------------------------------------------ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 420px;
    animation: toastSlideIn 0.3s ease forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.removing {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

.toast-body {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    font-size: 1.125rem;
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-danger  { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info    { border-left: 3px solid var(--color-info); }

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

/* ------------------------------------------------------------------
   10. Modal Enhancements
   ------------------------------------------------------------------ */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-header .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-heading);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ------------------------------------------------------------------
   11. Pagination
   ------------------------------------------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.pagination .page-link:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* ------------------------------------------------------------------
   12. Tab Navigation
   ------------------------------------------------------------------ */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-nav button,
.tab-nav a {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    text-decoration: none;
}

.tab-nav button:hover,
.tab-nav a:hover {
    color: var(--color-primary);
}

.tab-nav button.active,
.tab-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ------------------------------------------------------------------
   13. Filter Bar
   ------------------------------------------------------------------ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    max-width: 220px;
    font-size: 0.8125rem;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 200px;
}

/* ------------------------------------------------------------------
   14. Empty State
   ------------------------------------------------------------------ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--color-text-muted);
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    max-width: 320px;
    margin-bottom: 1.25rem;
}

/* ==================================================================
   ADMIN BACK OFFICE
   ================================================================== */

/* ------------------------------------------------------------------
   15. Admin Layout
   ------------------------------------------------------------------ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ------------------------------------------------------------------
   16. Admin Sidebar
   ------------------------------------------------------------------ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--color-bg-sidebar);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition-slow);
}

.sidebar-logo {
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-logo span {
    font-weight: 700;
    font-size: 1rem;
    color: #f1f5f9;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-section-title {
    padding: 1rem 1.25rem 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    margin-top: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 0;
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
}

.sidebar-nav a i {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    color: #f1f5f9;
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav a.active {
    color: #ffffff;
    background-color: rgba(var(--color-primary-rgb), 0.25);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav .badge {
    margin-left: auto;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background-color: rgba(var(--color-primary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #e8f0fe;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.6875rem;
    color: #64748b;
}

/* ------------------------------------------------------------------
   17. Admin Main Content
   ------------------------------------------------------------------ */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-height);
    box-shadow: var(--shadow-sm);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
}

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.admin-breadcrumbs a {
    color: var(--color-text-muted);
}

.admin-breadcrumbs a:hover {
    color: var(--color-primary);
}

.admin-breadcrumbs .separator {
    opacity: 0.5;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* ------------------------------------------------------------------
   18. Stat Cards
   ------------------------------------------------------------------ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
}

.stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card-icon.primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}
.stat-card-icon.success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}
.stat-card-icon.accent {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
}
.stat-card-icon.danger {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}
.stat-card-icon.info {
    background-color: var(--color-info-light);
    color: var(--color-info);
}

.stat-card-body {
    flex: 1;
}

.stat-card-value {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.125rem;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.375rem;
}

.stat-card-trend.up {
    color: var(--color-success);
}

.stat-card-trend.down {
    color: var(--color-danger);
}

/* ------------------------------------------------------------------
   19. CSS Bar Chart
   ------------------------------------------------------------------ */
.chart-bar {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-bar-label {
    width: 100px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-track {
    flex: 1;
    height: 1.5rem;
    background-color: var(--color-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: var(--radius-sm);
    transition: width 0.6s ease;
    min-width: 2px;
}

.chart-bar-fill.accent { background-color: var(--color-accent); }
.chart-bar-fill.success { background-color: var(--color-success); }
.chart-bar-fill.info { background-color: var(--color-info); }

.chart-bar-value {
    width: 60px;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Source Code Pro', monospace;
    color: var(--color-heading);
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   20. Permission Matrix
   ------------------------------------------------------------------ */
.permission-matrix {
    overflow-x: auto;
}

.permission-matrix table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.permission-matrix th {
    padding: 0.625rem 0.5rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.permission-matrix th:first-child {
    text-align: left;
}

.permission-matrix td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    vertical-align: middle;
}

.permission-matrix td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--color-heading);
    white-space: nowrap;
}

.permission-matrix input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.permission-matrix tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb), 0.04);
}

/* ==================================================================
   POS REGISTER
   ================================================================== */

/* ------------------------------------------------------------------
   21. POS Layout
   ------------------------------------------------------------------ */
.pos-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: var(--app-height, 100vh);
    height: 100dvh;
    overflow: hidden;
    background-color: var(--color-bg);
    /* Safe area for notch devices (iPhone, iPad) */
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

/* Touch device — larger tap targets */
body.pos-touch .pos-cart-item-qty button { min-width: 2.25rem; min-height: 2.25rem; }
body.pos-touch .pos-category-btn { min-height: 36px; }
body.pos-touch .pos-action-bar .btn { min-height: 40px; }
body.pos-touch .qty-btn { min-width: 2.25rem; min-height: 2.25rem; }

.pos-body,
.pos-body-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0; /* critical for flex overflow */
}

/* ------------------------------------------------------------------
   22. POS Header
   ------------------------------------------------------------------ */
.pos-header {
    height: var(--pos-header-height);
    background-color: var(--color-bg-sidebar);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    flex-shrink: 0;
    z-index: 100;
}

.pos-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pos-header-logo {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #fff;
    white-space: nowrap;
}

.pos-header-store {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.pos-header-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.pos-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pos-header-clock {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

.pos-header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #cbd5e1;
}

.pos-header-shift {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.625rem;
    background-color: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.pos-header-shift::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4ade80;
}

/* ------------------------------------------------------------------
   23. POS Products Panel
   ------------------------------------------------------------------ */
.pos-products-panel {
    flex: 6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--color-border);
}

.pos-search-bar {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-card);
    flex-shrink: 0;
}

.pos-search-bar .search-input-wrapper {
    flex: 1;
    position: relative;
}

.pos-search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1rem;
}

.pos-search-bar input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.pos-search-bar input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
    background-color: var(--color-bg-card);
}

.pos-search-bar input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* ------------------------------------------------------------------
   24. POS Category Bar
   ------------------------------------------------------------------ */
.pos-category-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    overflow-x: auto;
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pos-category-bar::-webkit-scrollbar {
    display: none;
}

.pos-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background-color: var(--color-bg-card);
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.pos-category-btn:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.pos-category-btn.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ------------------------------------------------------------------
   25. POS Product Grid
   ------------------------------------------------------------------ */
.pos-product-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

/* List view */
.pos-product-grid-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pos-product-list-item.pos-product-tile {
    aspect-ratio: auto !important;
    flex-direction: row !important;
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: var(--radius) !important;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    height: auto !important;
    max-height: none !important;
}

.pos-product-list-item.pos-product-tile:hover {
    transform: none !important;
}

.pos-product-list-name { color: #ffffff !important; }
.pos-product-list-meta { color: #94a3b8 !important; }
.pos-product-list-price { color: #38bdf8 !important; }

.pos-product-list-item:hover {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.pos-product-list-item:active {
    transform: scale(0.99);
}

.pos-product-list-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.pos-product-list-img-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pos-product-list-info {
    flex: 1;
    min-width: 0;
}

.pos-product-list-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-heading);
    line-height: 1.3;
}

.pos-product-list-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pos-product-list-price {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-heading);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Card view */
.pos-product-grid-cards {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-content: flex-start;
    min-height: 0;
}

.pos-product-card.pos-product-tile {
    aspect-ratio: auto !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    height: 68px;
    max-height: 68px;
    width: calc(50% - 0.2rem);
    flex-shrink: 0;
    flex-grow: 0;
}

.pos-product-card.pos-product-tile:hover {
    transform: none !important;
    border-color: #3b82f6 !important;
    box-shadow: var(--shadow) !important;
}

.pos-card-name { color: #ffffff !important; }
.pos-card-sku { color: #94a3b8 !important; }
.pos-card-price { color: #38bdf8 !important; }
.pos-card-stock { color: #94a3b8 !important; }
.pos-card-img-placeholder { background: #0f172a !important; color: #475569 !important; }

.pos-product-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.pos-product-card:active {
    transform: scale(0.98);
}

.pos-card-img-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    max-width: 52px;
    max-height: 52px;
    overflow: hidden;
    background: #0f172a;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    margin: 0 0 0 0.375rem;
}

.pos-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.pos-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.1rem;
    background: #0f172a;
    border-radius: var(--radius-sm);
}

.pos-card-img-wrap .tile-fav {
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 2;
}

.pos-card-img-wrap .tile-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 0.55rem;
    padding: 1px 4px;
}

.pos-card-body {
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 0.1rem;
    overflow: hidden;
    max-height: 100%;
}

.pos-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-heading);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-card-sku {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    font-family: 'Source Code Pro', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
}

.pos-card-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Source Code Pro', monospace;
    white-space: nowrap;
}

.pos-card-stock {
    font-size: 0.55rem;
    white-space: nowrap;
}

/* Responsive card sizes */
@media (max-width: 768px) {
    .pos-product-card { width: 100%; }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .pos-product-card { width: calc(50% - 0.2rem); }
}

@media (min-width: 1200px) {
    .pos-product-card { width: calc(33.333% - 0.25rem); }
}

@media (min-width: 1400px) {
    .pos-product-card { height: 72px; max-height: 72px; }
    .pos-card-img-wrap { width: 56px; height: 56px; min-width: 56px; min-height: 56px; max-width: 56px; max-height: 56px; }
    .pos-card-name { font-size: 0.8rem; }
    .pos-card-price { font-size: 0.85rem; }
}

@media (min-width: 1920px) {
    .pos-product-card { height: 76px; max-height: 76px; width: calc(33.333% - 0.25rem); }
    .pos-card-img-wrap { width: 60px; height: 60px; min-width: 60px; min-height: 60px; max-width: 60px; max-height: 60px; }
    .pos-card-name { font-size: 0.85rem; }
    .pos-card-price { font-size: 0.9rem; }
}

/* Text-only view */
.pos-product-grid-text {
    flex: 1;
    overflow-y: auto;
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pos-product-text-item.pos-product-tile {
    aspect-ratio: auto !important;
    border-radius: 6px !important;
    border: 1px solid #334155 !important;
    background: #1e293b !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.1s;
    height: auto !important;
    max-height: none !important;
}

.pos-product-text-item.pos-product-tile:hover {
    transform: none !important;
    background: #334155 !important;
    border-color: #3b82f6 !important;
    box-shadow: none !important;
}

.pos-product-text-item.pos-product-tile:active {
    background: #3b82f6 !important;
    transform: none !important;
}

.pos-text-name {
    font-size: 0.85rem;
    color: #ffffff !important;
    font-weight: 500;
}

.pos-text-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8 !important;
    font-family: 'Source Code Pro', monospace;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Layout toggle button styling */
#pos-layout-toggle .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

#pos-layout-toggle .btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

#pos-layout-toggle .btn:hover:not(.active) {
    background: #334155;
    color: #e2e8f0;
}

.pos-product-tile {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    background-color: var(--color-bg-card);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    position: relative;
}

.pos-product-tile:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

.pos-product-tile.active,
.pos-product-tile:active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.pos-product-tile .tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.pos-product-tile .tile-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-product-tile .tile-price {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
}

.pos-product-tile .tile-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pos-product-tile .tile-badge.out {
    background: #dc2626;
}

.pos-product-tile .tile-badge.low {
    background: #eab308;
    color: #000;
}

.pos-product-tile .tile-fav {
    position: absolute; top: 6px; left: 6px; font-size: 1rem; cursor: pointer; color: #fbbf24; text-shadow: 0 1px 2px rgba(0,0,0,0.3); z-index: 2;
}

.pos-product-tile-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 2rem;
    overflow: hidden;
}

.pos-product-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-product-tile-info {
    padding: 0.5rem;
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
}

.pos-product-tile-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-heading);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-product-tile-price {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 0.125rem;
}

.pos-product-tile-stock {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.pos-product-tile-stock.low {
    background-color: var(--color-warning-light);
    color: #a16207;
}

.pos-product-tile-stock.out {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

/* ------------------------------------------------------------------
   26. POS Cart Panel
   ------------------------------------------------------------------ */
/* Resize handle between products and cart */
.pos-resize-handle {
    width: 6px;
    cursor: col-resize;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    transition: background 0.15s;
}

.pos-resize-handle:hover,
.pos-resize-handle.dragging {
    background: var(--color-primary);
}

.pos-resize-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pos-resize-dots::before,
.pos-resize-dots::after,
.pos-resize-dots {
    content: '';
}

.pos-resize-handle::before {
    content: '⋮';
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1;
}

.pos-resize-handle:hover::before,
.pos-resize-handle.dragging::before {
    color: #fff;
}

@media (max-width: 768px) {
    .pos-resize-handle { display: none; }
}

.pos-cart-panel {
    flex: 4;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-card);
    overflow: hidden;
}

/* ------------------------------------------------------------------
   27. POS Customer Bar
   ------------------------------------------------------------------ */
.pos-customer-bar {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background-color var(--transition);
    flex-shrink: 0;
}

.pos-customer-bar:hover {
    background-color: var(--color-primary-light);
}

.pos-customer-bar-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pos-customer-bar-info {
    flex: 1;
    overflow: hidden;
}

.pos-customer-bar-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-customer-bar-detail {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.pos-customer-bar-action {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ------------------------------------------------------------------
   28. POS Cart
   ------------------------------------------------------------------ */
.pos-cart {
    flex: 1;
    min-height: 0; /* critical for flex scroll in all browsers */
    overflow-y: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.pos-cart .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-muted);
    gap: 0.5rem;
}

.pos-cart .empty-state i {
    font-size: 2rem;
    opacity: 0.5;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--transition);
}

.pos-cart-item:hover {
    background-color: rgba(var(--color-primary-rgb), 0.03);
}

.pos-cart-item-info {
    flex: 1;
    overflow: hidden;
}

.pos-cart-item-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-heading);
    word-break: break-word;
}

.pos-cart-item-sku {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.pos-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.pos-cart-item-qty button {
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
}

.pos-cart-item-qty button:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.pos-cart-item-qty button:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pos-cart-item-qty button:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.pos-cart-item-qty span {
    min-width: 2rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    background-color: var(--color-bg-card);
}

.pos-cart-item-price {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-heading);
    text-align: right;
    min-width: 70px;
    flex-shrink: 0;
}

.pos-cart-item-discount-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.4;
    transition: all var(--transition);
    flex-shrink: 0;
}

.pos-cart-item-discount-btn:hover {
    opacity: 1;
    color: var(--color-warning, #eab308);
}

.pos-cart-item-discount-label {
    font-size: 0.625rem;
    color: var(--color-danger);
    font-weight: 500;
}

.pos-cart-item-remove {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    opacity: 0.5;
    transition: all var(--transition);
    flex-shrink: 0;
}

.pos-cart-item-remove:hover {
    opacity: 1;
    color: var(--color-danger);
}

/* ------------------------------------------------------------------
   29. POS Cart Summary
   ------------------------------------------------------------------ */
.pos-cart-summary {
    border-top: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

.pos-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.pos-cart-summary-row span:last-child {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    color: var(--color-text);
}

.pos-cart-summary-row.discount {
    color: var(--color-success);
}

.pos-cart-summary-row.discount span:last-child {
    color: var(--color-success);
}

.pos-cart-summary-row.total {
    padding-top: 0.5rem;
    margin-top: 0.375rem;
    border-top: 2px solid var(--color-border);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-heading);
}

.pos-cart-summary-row.total span:last-child {
    font-size: 1.25rem;
    color: var(--color-heading);
}

/* ------------------------------------------------------------------
   29b. Cart Toggle Button (mobile only)
   ------------------------------------------------------------------ */
.pos-cart-toggle {
    display: none; /* hidden on desktop */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary-light);
    border: none;
    border-top: 1px solid var(--color-border);
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.pos-cart-toggle:hover {
    background: var(--color-primary);
    color: #fff;
}

.pos-cart-toggle .badge {
    font-size: 0.75rem;
}

/* ------------------------------------------------------------------
   30. POS Bottom Bar (fixed, always visible)
   ------------------------------------------------------------------ */
.pos-bottom-bar {
    flex-shrink: 0;
    background-color: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    z-index: 50;
}

.pos-action-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

.pos-action-bar .btn {
    flex: 1;
    font-size: 0.8125rem;
    padding: 0.5rem;
}

/* ------------------------------------------------------------------
   31. POS Pay Button
   ------------------------------------------------------------------ */
.pos-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: calc(100% - 2rem);
    margin: 0.25rem 1rem 0.5rem;
    padding: 0.875rem;
    background-color: var(--color-success);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.pos-pay-btn:hover {
    background-color: #15803d;
    box-shadow: var(--shadow-md);
}

.pos-pay-btn:active {
    transform: scale(0.98);
}

.pos-pay-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.pos-pay-btn .amount {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.25rem;
}

/* ------------------------------------------------------------------
   32. POS Payment Modal
   ------------------------------------------------------------------ */
.pos-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.pos-payment-modal-content,
.pos-payment-content {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 92%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    animation: scaleIn 0.2s ease;
}

.pos-payment-modal-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-payment-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.pos-payment-modal-body {
    padding: 1.5rem;
}

.pos-payment-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------------------------
   33. POS Tender Display
   ------------------------------------------------------------------ */
.pos-tender-display {
    text-align: center;
    padding: 1rem 0 1.5rem;
}

.pos-tender-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.pos-tender-amount {
    font-family: 'Source Code Pro', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.1;
}

.pos-tender-change {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.pos-tender-change .amount {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
    display: block;
    margin-top: 0.25rem;
}

/* ------------------------------------------------------------------
   34. POS Numpad
   ------------------------------------------------------------------ */
.pos-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.pos-numpad .key {
    height: 3.5rem;
    min-width: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    background-color: var(--color-bg);
    color: var(--color-heading);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
}

.pos-numpad .key:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
}

.pos-numpad .key:active {
    transform: scale(0.95);
    background-color: var(--color-primary);
    color: #fff;
}

.pos-numpad .key.clear {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    border-color: transparent;
}

.pos-numpad .key.clear:hover {
    background-color: var(--color-danger);
    color: #fff;
}

.pos-numpad .key.enter {
    background-color: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

.pos-numpad .key.enter:hover {
    background-color: #15803d;
}

/* ------------------------------------------------------------------
   34b. Split Payment Rows
   ------------------------------------------------------------------ */
.split-payment-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.split-payment-row .form-select {
    flex: 0 0 140px;
}

.split-payment-row .form-control {
    flex: 1;
}

.split-payment-row .btn-remove-split {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
}

/* ------------------------------------------------------------------
   35. POS Quick Amount Buttons
   ------------------------------------------------------------------ */
.pos-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.pos-quick-amount {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    padding: 0.625rem 0.75rem;
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}

.pos-quick-amount:hover {
    background-color: var(--color-accent);
    color: #fff;
}

.pos-quick-amount:active {
    transform: scale(0.97);
}

/* ------------------------------------------------------------------
   36. POS PIN Pad / Login
   ------------------------------------------------------------------ */
.pos-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.5rem;
}

.pos-login-card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.pos-login-logo {
    margin-bottom: 1.5rem;
}

.pos-login-logo img {
    max-width: 200px;
    height: auto;
}

.pos-login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 0.25rem;
}

.pos-login-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.pos-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 280px;
    margin: 0 auto;
}

.pos-pin-pad .key {
    width: 100%;
    height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: var(--color-bg);
    color: var(--color-heading);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
}

.pos-pin-pad .key:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
}

.pos-pin-pad .key:active {
    transform: scale(0.95);
    background-color: var(--color-primary);
    color: #fff;
}

.pos-pin-display {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pos-pin-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    transition: all var(--transition);
}

.pos-pin-dot.filled {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ------------------------------------------------------------------
   37. POS Store / Register Select
   ------------------------------------------------------------------ */
.pos-store-select {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem;
}

.pos-store-select-inner {
    max-width: 720px;
    width: 100%;
    text-align: center;
}

.pos-store-select-title {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pos-store-select-subtitle {
    color: #94a3b8;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.pos-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.pos-store-card {
    background-color: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.pos-store-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
    transform: translateY(-2px);
}

.pos-store-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
}

.pos-store-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0.25rem;
}

.pos-store-card-detail {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* ------------------------------------------------------------------
   38. POS Shift Dialog
   ------------------------------------------------------------------ */
.pos-shift-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.pos-shift-dialog-content {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    animation: scaleIn 0.2s ease;
}

.pos-shift-dialog h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pos-shift-field {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.pos-shift-field-label {
    color: var(--color-text-muted);
}

.pos-shift-field-value {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    color: var(--color-heading);
}

/* ------------------------------------------------------------------
   39. POS Receipt Preview
   ------------------------------------------------------------------ */
.pos-receipt-preview {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #fff;
    color: #000;
    border: 1px dashed #ccc;
    border-radius: var(--radius);
}

.pos-receipt-preview .receipt-header {
    text-align: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #aaa;
}

.pos-receipt-preview .receipt-header .store-name {
    font-size: 1rem;
    font-weight: 700;
}

.pos-receipt-preview .receipt-line {
    display: flex;
    justify-content: space-between;
}

.pos-receipt-preview .receipt-divider {
    border: none;
    border-top: 1px dashed #aaa;
    margin: 0.5rem 0;
}

.pos-receipt-preview .receipt-total {
    font-size: 0.9375rem;
    font-weight: 700;
}

.pos-receipt-preview .receipt-footer {
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #aaa;
    font-size: 0.6875rem;
    color: #666;
}

/* ------------------------------------------------------------------
   40. POS Held Tickets
   ------------------------------------------------------------------ */
.pos-held-tickets {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.pos-held-tickets-panel {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s ease;
}

.pos-held-tickets-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-held-tickets-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.pos-held-ticket {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background-color var(--transition);
}

.pos-held-ticket:hover {
    background-color: rgba(var(--color-primary-rgb), 0.04);
}

.pos-held-ticket-info {
    flex: 1;
}

.pos-held-ticket-ref {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-heading);
}

.pos-held-ticket-detail {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.pos-held-ticket-amount {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    color: var(--color-heading);
}

.pos-held-ticket-time {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

/* ==================================================================
   PRINT STYLES
   ================================================================== */

/* ------------------------------------------------------------------
   41. Print Receipt
   ------------------------------------------------------------------ */
@media print {
    body * {
        visibility: hidden !important;
    }

    .pos-receipt-preview,
    .pos-receipt-preview * {
        visibility: visible !important;
    }

    .pos-receipt-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 2mm;
    }

    @page {
        size: 80mm auto;
        margin: 0;
    }
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

/* ------------------------------------------------------------------
   42. Tablet (max-width: 1024px)
   ------------------------------------------------------------------ */
/* ------------------------------------------------------------------
   42. Tablet (max-width: 1024px)
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    /* Admin sidebar collapses */
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1035;
        background-color: rgba(0, 0, 0, 0.4);
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* POS: side-by-side but with smaller product tiles */
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .pos-product-tile-name {
        font-size: 0.75rem;
    }

    .pos-category-btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ------------------------------------------------------------------
   43. Mobile (max-width: 768px) — stacked layout
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
    .admin-content {
        padding: 0.75rem;
    }

    .admin-header {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* POS stacks vertically with tab toggle */
    .pos-body {
        flex-direction: column;
        position: relative;
    }

    .pos-products-panel {
        flex: 1;
        border-right: none;
        min-height: 0;
    }

    /* POS stacks: products on top, cart below, bottom bar always visible */
    .pos-body-content {
        flex-direction: column;
    }

    .pos-products-panel {
        flex: 1;
        border-right: none;
        min-height: 0;
    }

    .pos-cart-panel {
        flex: none;
        max-height: 40vh;
        border-top: 2px solid var(--color-primary);
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    /* Collapsed: hide cart on mobile, show only via toggle */
    .pos-cart-panel.cart-collapsed {
        max-height: 0;
        border-top: none;
    }

    /* Cart toggle button (visible on mobile only) */
    .pos-cart-toggle {
        display: flex;
    }

    /* Bottom bar fixed at bottom on mobile */
    .pos-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 300;
        background: var(--color-bg-card);
        border-top: 2px solid var(--color-border);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* Products need bottom padding so they're not hidden behind fixed bottom bar */
    .pos-layout {
        padding-bottom: 7.5rem;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .pos-product-tile {
        aspect-ratio: auto;
    }

    .pos-product-tile-img {
        height: 70px;
    }

    .pos-product-tile-info {
        padding: 0.375rem;
    }

    .pos-product-tile-name {
        font-size: 0.6875rem;
        line-height: 1.2;
    }

    .pos-product-tile-price {
        font-size: 0.75rem;
    }

    .pos-action-bar {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .pos-action-bar .btn {
        flex: 1 1 calc(33% - 0.25rem);
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .pos-pay-btn {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .pos-cart-summary {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .pos-search-bar input {
        font-size: 0.875rem;
    }

    .pos-category-bar {
        padding: 0.375rem 0.5rem;
    }

    .pos-category-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    /* Payment modal full screen */
    .pos-payment-content {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .pos-payment-tabs button {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .pos-numpad .key {
        height: 3.5rem;
        font-size: 1.1rem;
    }

    .pos-pin-pad .key {
        height: 3.75rem;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        max-width: none;
    }

    .tab-nav {
        gap: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-nav button,
    .tab-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Nav pills horizontal scroll on mobile */
    .nav-pills, .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-pills .nav-link, .nav-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.8rem;
    }

    /* Tables scroll horizontally */
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------------------
   44. Small Mobile (max-width: 480px)
   ------------------------------------------------------------------ */
@media (max-width: 480px) {
    .pos-header {
        padding: 0 0.5rem;
        font-size: 0.75rem;
        height: 40px;
    }

    .pos-header-center {
        display: none;
    }

    .pos-header-logo img {
        height: 24px;
    }

    .pos-header-store {
        font-size: 0.7rem;
    }

    .pos-search-bar {
        padding: 0.375rem 0.5rem;
    }

    .pos-search-bar input {
        font-size: 0.8rem;
        padding: 0.375rem 0.625rem;
    }

    .pos-category-bar {
        padding: 0.375rem 0.5rem;
    }

    .pos-category-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .pos-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.375rem;
        padding: 0.375rem;
    }

    .pos-product-tile-img {
        height: 55px;
    }

    .pos-product-tile-name {
        font-size: 0.625rem;
    }

    .pos-product-tile-price {
        font-size: 0.7rem;
    }

    .pos-cart-item {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }

    .pos-cart-summary {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }

    .pos-pay-btn {
        margin: 0.375rem 0.5rem;
        width: calc(100% - 1rem);
        font-size: 0.9rem;
        padding: 0.625rem;
    }

    .pos-action-bar .btn {
        font-size: 0.675rem;
        padding: 0.25rem 0.375rem;
    }

    /* Admin mobile tweaks */
    .stat-card {
        padding: 0.75rem;
    }

    .stat-card h4 {
        font-size: 1.1rem;
    }

    .card-header h6 {
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------------------
   44b. Large Desktop (min-width: 1400px) — spacious layout
   ------------------------------------------------------------------ */
@media (min-width: 1400px) {
    .pos-header {
        height: 56px;
        padding: 0 1.5rem;
        font-size: 0.9375rem;
    }

    .pos-header-logo { font-size: 1.0625rem; }
    .pos-header-store { font-size: 0.9375rem; }
    .pos-header-center { font-size: 0.9375rem; gap: 2rem; }

    .pos-search-bar { padding: 0.75rem 1.25rem; }
    .pos-search-bar input { font-size: 1rem; padding: 0.625rem 1rem; }

    .pos-category-bar { padding: 0.625rem 1.25rem; gap: 0.5rem; }
    .pos-category-btn { font-size: 0.9rem; padding: 0.4rem 1rem; }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 1rem;
        padding: 1.25rem;
    }

    .pos-product-tile-name { font-size: 0.9rem; }
    .pos-product-tile-price { font-size: 0.9375rem; }

    .pos-cart-item { padding: 0.75rem 1.25rem; }
    .pos-cart-item-name { font-size: 0.9375rem; }
    .pos-cart-item-sku { font-size: 0.8rem; }
    .pos-cart-item-price { font-size: 0.9375rem; min-width: 90px; }
    .pos-cart-item-qty button { width: 2rem; height: 2rem; font-size: 1rem; }
    .pos-cart-item-qty span { min-width: 2.25rem; height: 2rem; font-size: 0.9rem; }

    .pos-cart-summary { padding: 0.875rem 1.25rem; }
    .pos-cart-summary-row { font-size: 0.95rem; }
    .pos-cart-summary-row.total { font-size: 1.3rem; }

    .pos-pay-btn { font-size: 1.2rem; padding: 1rem; }

    .pos-action-bar { padding: 0.625rem 1rem; }
    .pos-action-bar .btn { font-size: 0.85rem; padding: 0.4rem 0.75rem; }

    .pos-customer-bar { padding: 0.625rem 1.25rem; font-size: 0.95rem; }
}

/* ------------------------------------------------------------------
   44c. Extra Large Desktop (min-width: 1920px) — full HD+
   ------------------------------------------------------------------ */
@media (min-width: 1920px) {
    .pos-header {
        height: 60px;
        padding: 0 2rem;
        font-size: 1rem;
    }

    .pos-header-logo { font-size: 1.125rem; }
    .pos-header-store { font-size: 1rem; }
    .pos-header-center { font-size: 1rem; gap: 2.5rem; }

    .pos-search-bar { padding: 0.875rem 1.5rem; }
    .pos-search-bar input { font-size: 1.0625rem; padding: 0.75rem 1.125rem; }

    .pos-category-bar { padding: 0.75rem 1.5rem; gap: 0.625rem; }
    .pos-category-btn { font-size: 0.95rem; padding: 0.5rem 1.25rem; }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 1.125rem;
        padding: 1.5rem;
    }

    .pos-product-tile { border-radius: 12px; }
    .pos-product-tile-name { font-size: 0.95rem; padding: 6px 8px 0; }
    .pos-product-tile-price { font-size: 1rem; padding: 0 8px 6px; }

    .pos-cart-item { padding: 0.875rem 1.5rem; }
    .pos-cart-item-name { font-size: 1rem; }
    .pos-cart-item-sku { font-size: 0.85rem; }
    .pos-cart-item-price { font-size: 1rem; min-width: 100px; }
    .pos-cart-item-qty button { width: 2.25rem; height: 2.25rem; font-size: 1.0625rem; }
    .pos-cart-item-qty span { min-width: 2.5rem; height: 2.25rem; font-size: 1rem; }

    .pos-cart-summary { padding: 1rem 1.5rem; }
    .pos-cart-summary-row { font-size: 1.0625rem; }
    .pos-cart-summary-row.total { font-size: 1.5rem; }

    .pos-pay-btn { font-size: 1.375rem; padding: 1.125rem; }

    .pos-action-bar { padding: 0.75rem 1.25rem; gap: 0.625rem; }
    .pos-action-bar .btn { font-size: 0.9rem; padding: 0.5rem 1rem; }

    .pos-customer-bar { padding: 0.75rem 1.5rem; font-size: 1rem; }

    .pos-numpad .key { height: 4rem; min-width: 4rem; font-size: 1.375rem; }
}

/* ------------------------------------------------------------------
   44d. iPad / Large Tablet (min-width: 1024px, max-width: 1366px, touch)
   ------------------------------------------------------------------ */
@media (min-width: 1024px) and (max-width: 1400px) and (pointer: coarse) {
    .pos-header { height: 52px; }
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
        padding: 0.875rem;
    }
    .pos-product-tile { border-radius: 10px; }
    .pos-cart-item { padding: 0.625rem 1rem; }
    .pos-cart-item-name { font-size: 0.875rem; }
    .pos-cart-item-qty button { width: 2.25rem; height: 2.25rem; }
    .pos-cart-item-qty span { min-width: 2.25rem; height: 2.25rem; }
    .pos-action-bar .btn { font-size: 0.85rem; padding: 0.5rem 0.875rem; }
    .pos-pay-btn { font-size: 1.15rem; padding: 0.875rem; }
    .pos-category-btn { font-size: 0.85rem; padding: 0.4rem 0.875rem; }
    .pos-numpad .key { height: 3.75rem; min-width: 3.75rem; font-size: 1.25rem; }
}

/* ------------------------------------------------------------------
   44e. Phone landscape (max-height: 500px, landscape)
   ------------------------------------------------------------------ */
@media (max-height: 500px) and (orientation: landscape) {
    .pos-header { height: 36px; font-size: 0.75rem; }
    .pos-header-center { display: none; }
    .pos-search-bar { padding: 0.25rem 0.5rem; }
    .pos-search-bar input { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
    .pos-category-bar { padding: 0.25rem 0.5rem; }
    .pos-category-btn { font-size: 0.7rem; padding: 0.2rem 0.5rem; }
    .pos-product-grid { gap: 0.375rem; padding: 0.375rem; }
    .pos-cart-item { padding: 0.3rem 0.5rem; }
    .pos-cart-summary { padding: 0.3rem 0.5rem; }
    .pos-pay-btn { padding: 0.5rem; font-size: 0.9rem; margin: 0.25rem 0.5rem; }
    .pos-action-bar { padding: 0.25rem 0.5rem; gap: 0.25rem; }
    .pos-action-bar .btn { font-size: 0.65rem; padding: 0.2rem 0.4rem; }
}

/* ------------------------------------------------------------------
   44f. High-DPI scaling helpers
   ------------------------------------------------------------------ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pos-product-tile .tile-badge { font-size: 0.65rem; }
    .pos-product-tile .tile-fav { font-size: 1.1rem; }
}

/* ------------------------------------------------------------------
   45a. POS Display Settings — Text Size
   ------------------------------------------------------------------ */
body.pos-text-small { font-size: 13px; }
body.pos-text-medium { font-size: 15px; }
body.pos-text-large { font-size: 18px; }

body.pos-text-small .pos-product-tile-name { font-size: 0.65rem; }
body.pos-text-small .pos-product-tile-price { font-size: 0.65rem; }
body.pos-text-small .pos-cart-item-name { font-size: 0.7rem; }
body.pos-text-small .pos-cart-item-sku { font-size: 0.6rem; }
body.pos-text-small .pos-cart-summary-row { font-size: 0.75rem; }
body.pos-text-small .pos-pay-btn { font-size: 0.95rem; }
body.pos-text-small .pos-action-bar .btn { font-size: 0.7rem; }
body.pos-text-small .pos-category-btn { font-size: 0.7rem; padding: 0.25rem 0.5rem; }

body.pos-text-large .pos-product-tile-name { font-size: 1rem; }
body.pos-text-large .pos-product-tile-price { font-size: 0.95rem; }
body.pos-text-large .pos-cart-item-name { font-size: 0.95rem; }
body.pos-text-large .pos-cart-item-sku { font-size: 0.8rem; }
body.pos-text-large .pos-cart-summary-row { font-size: 0.95rem; }
body.pos-text-large .pos-cart-summary-row.total { font-size: 1.3rem; }
body.pos-text-large .pos-pay-btn { font-size: 1.3rem; padding: 1rem; }
body.pos-text-large .pos-action-bar .btn { font-size: 0.9rem; }
body.pos-text-large .pos-category-btn { font-size: 0.9rem; }

/* ------------------------------------------------------------------
   45b. POS Display Settings — Grid Column Override
   ------------------------------------------------------------------ */
.pos-product-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr) !important; }
.pos-product-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr) !important; }
.pos-product-grid[data-cols="5"] { grid-template-columns: repeat(5, 1fr) !important; }
.pos-product-grid[data-cols="6"] { grid-template-columns: repeat(6, 1fr) !important; }

/* ------------------------------------------------------------------
   45c. POS Display Settings — Layout Density
   ------------------------------------------------------------------ */
body.pos-density-compact .pos-product-grid { gap: 0.25rem; padding: 0.375rem; }
body.pos-density-compact .pos-product-tile-info { padding: 0.25rem; }
body.pos-density-compact .pos-cart-item { padding: 0.3rem 0.5rem; }
body.pos-density-compact .pos-cart-summary { padding: 0.375rem 0.5rem; }
body.pos-density-compact .pos-action-bar { padding: 0.375rem 0.5rem; gap: 0.25rem; }
body.pos-density-compact .pos-pay-btn { padding: 0.625rem; margin: 0.25rem 0.5rem; }
body.pos-density-compact .pos-customer-bar { padding: 0.375rem 0.5rem; }
body.pos-density-compact .pos-search-bar { padding: 0.375rem 0.5rem; }
body.pos-density-compact .pos-category-bar { padding: 0.25rem 0.5rem; }

body.pos-density-spacious .pos-product-grid { gap: 1rem; padding: 1rem; }
body.pos-density-spacious .pos-product-tile-info { padding: 0.75rem; }
body.pos-density-spacious .pos-cart-item { padding: 0.875rem 1.25rem; }
body.pos-density-spacious .pos-cart-summary { padding: 1rem 1.25rem; }
body.pos-density-spacious .pos-action-bar { padding: 0.75rem 1rem; gap: 0.75rem; }
body.pos-density-spacious .pos-pay-btn { padding: 1.125rem; margin: 0.75rem 1rem; }
body.pos-density-spacious .pos-customer-bar { padding: 0.875rem 1.25rem; }

/* ------------------------------------------------------------------
   45. Utility Classes
   ------------------------------------------------------------------ */
.text-primary   { color: var(--color-primary) !important; }
.text-accent    { color: var(--color-accent) !important; }
.text-success   { color: var(--color-success) !important; }
.text-danger    { color: var(--color-danger) !important; }
.text-warning   { color: var(--color-warning) !important; }
.text-info      { color: var(--color-info) !important; }
.text-muted     { color: var(--color-text-muted) !important; }

.bg-primary-light { background-color: var(--color-primary-light) !important; }
.bg-accent-light  { background-color: var(--color-accent-light) !important; }
.bg-success-light { background-color: var(--color-success-light) !important; }
.bg-danger-light  { background-color: var(--color-danger-light) !important; }
.bg-warning-light { background-color: var(--color-warning-light) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded    { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow    { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading spinner */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
}

.spinner-lg {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

body.dark ::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ------------------------------------------------------------------
   Product Image Zoom Overlay
   ------------------------------------------------------------------ */
.pos-product-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
    cursor: pointer;
}

.pos-product-zoom-overlay img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------------------------------
   Theme Toggle Button
   ------------------------------------------------------------------ */
.pos-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.pos-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

body.pos-light-mode .pos-theme-toggle {
    border-color: var(--color-border);
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-muted);
}

body.pos-light-mode .pos-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--color-heading);
}

/* ------------------------------------------------------------------
   Light Mode (POS Register)
   Overrides dark-mode defaults for a light-themed POS experience.
   ------------------------------------------------------------------ */
body.pos-light-mode {
    --color-bg: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-sidebar: #1e293b;
    --color-bg-input: #ffffff;
    --color-text: #334155;
    --color-heading: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-bg-hover: #f1f5f9;

    --color-primary-light: #e8f0fe;
    --color-accent-light: #fff5eb;
    --color-success-light: #f0fdf4;
    --color-danger-light: #fef2f2;
    --color-warning-light: #fefce8;
    --color-info-light: #f0f9ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
}

/* POS Header in light mode — keep the dark sidebar/header look by default,
   but lighten the header slightly */
body.pos-light-mode .pos-header {
    background-color: #1e293b;
    color: #f1f5f9;
}

/* POS Login screen in light mode */
body.pos-light-mode .pos-login {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

body.pos-light-mode .pos-login-card {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
}

/* Cart panel */
body.pos-light-mode .pos-cart-panel {
    background-color: #ffffff;
}

/* Cart summary */
body.pos-light-mode .pos-cart-summary {
    border-top-color: #e2e8f0;
}

/* Action bar */
body.pos-light-mode .pos-action-bar {
    background-color: #ffffff;
}

/* Pay button — keep green regardless of theme */
body.pos-light-mode .pos-pay-btn {
    background-color: var(--color-success);
    color: #fff;
}

body.pos-light-mode .pos-pay-btn:hover {
    background-color: #15803d;
}

/* Product tiles */
body.pos-light-mode .pos-product-tile {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

body.pos-light-mode .pos-product-tile:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* Search bar */
body.pos-light-mode .pos-search-bar {
    background-color: #ffffff;
    border-bottom-color: #e2e8f0;
}

body.pos-light-mode .pos-search-bar input {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
}

/* Category bar */
body.pos-light-mode .pos-category-bar {
    background-color: #ffffff;
    border-bottom-color: #e2e8f0;
}

/* Products panel */
body.pos-light-mode .pos-products-panel {
    border-right-color: #e2e8f0;
}

/* Numpad keys */
body.pos-light-mode .pos-numpad .key {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.pos-light-mode .pos-numpad .key:hover {
    background-color: var(--color-primary-light);
}

/* PIN pad */
body.pos-light-mode .pos-pin-pad .key {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.pos-light-mode .pos-pin-pad .key:hover {
    background-color: var(--color-primary-light);
}

/* Badges in light mode */
body.pos-light-mode .badge-voided,
body.pos-light-mode .badge-closed,
body.pos-light-mode .badge-inactive {
    background-color: #f1f5f9;
    color: #64748b;
}

body.pos-light-mode .badge-low,
body.pos-light-mode .badge-warning,
body.pos-light-mode .badge-pending,
body.pos-light-mode .badge-partial {
    color: #a16207;
}

/* Table header in light mode */
body.pos-light-mode .data-table thead {
    background-color: #f8fafc;
}

/* Bottom bar */
body.pos-light-mode .pos-bottom-bar {
    background-color: #ffffff;
    border-top-color: #e2e8f0;
}

/* Scrollbars */
body.pos-light-mode ::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
}

body.pos-light-mode ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

/* ============================================================
   Training Mode Banner
   ============================================================ */
.training-banner {
    background: linear-gradient(90deg, #dc2626, #f97316);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 9999;
    animation: trainingPulse 2s ease-in-out infinite;
}

@keyframes trainingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ============================================================
   Split Bill
   ============================================================ */
.split-bill-container {
    display: flex;
    gap: 16px;
    min-height: 300px;
}

.split-bill-column {
    flex: 1;
    background: var(--pos-card-bg, #1e293b);
    border-radius: 8px;
    padding: 12px;
    border: 2px solid transparent;
}

.split-bill-column.active {
    border-color: var(--pos-primary, #38bdf8);
}

.split-bill-column h6 {
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.split-bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    cursor: grab;
    transition: background 0.2s;
}

.split-bill-item:hover {
    background: rgba(255,255,255,0.1);
}

/* ============================================================
   Cash Management
   ============================================================ */
.cash-summary-card {
    background: var(--pos-card-bg, #1e293b);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.cash-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.cash-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================================
   Age Verification Modal
   ============================================================ */
.age-verify-modal .modal-body {
    text-align: center;
    padding: 30px;
}

.age-verify-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 16px;
}

/* ============================================================
   Weight Input
   ============================================================ */
.weight-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weight-input-group input {
    font-size: 1.5rem;
    text-align: center;
    max-width: 150px;
}

.weight-input-group .unit-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pos-muted, #94a3b8);
}

/* ============================================================
   Delivery Tracking Timeline
   ============================================================ */
.tracking-timeline {
    position: relative;
    padding-left: 30px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--pos-border, #334155);
}

.tracking-step {
    position: relative;
    padding-bottom: 20px;
}

.tracking-step::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pos-primary, #38bdf8);
    border: 2px solid var(--pos-card-bg, #1e293b);
}

.tracking-step.completed::before {
    background: #16a34a;
}

.tracking-step .step-time {
    font-size: 0.75rem;
    color: var(--pos-muted, #94a3b8);
}

.tracking-step .step-status {
    font-weight: 600;
}

/* ============================================================
   Barcode Label Preview
   ============================================================ */
.barcode-label-preview {
    border: 1px dashed var(--pos-border, #334155);
    padding: 12px;
    text-align: center;
    background: #fff;
    color: #000;
    border-radius: 4px;
}

.barcode-label-preview .barcode-name {
    font-size: 10px;
    font-weight: 600;
}

.barcode-label-preview .barcode-price {
    font-size: 12px;
    font-weight: 700;
}

.barcode-label-preview .barcode-sku {
    font-size: 8px;
    color: #666;
}

/* ============================================================
   Gift Receipt Toggle
   ============================================================ */
.gift-receipt-section {
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 10px;
}

.gift-message-input {
    margin-top: 8px;
    font-style: italic;
}

/* ============================================================
   Multi-Register Dashboard
   ============================================================ */
.register-card {
    background: var(--pos-card-bg, #1e293b);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--pos-border, #334155);
    transition: transform 0.2s, box-shadow 0.2s;
}

.register-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.register-card .register-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.register-card .register-status.open {
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22,163,74,0.5);
}

.register-card .register-status.closed {
    background: #6b7280;
}

/* ============================================================
   White Label / Branding Preview
   ============================================================ */
.brand-preview {
    background: var(--pos-card-bg, #1e293b);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--pos-border, #334155);
    min-height: 200px;
}

.brand-preview-header {
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ============================================================
   Product Matrix Grid
   ============================================================ */
.product-matrix {
    overflow-x: auto;
}

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

.product-matrix th,
.product-matrix td {
    border: 1px solid var(--pos-border, #334155);
    padding: 8px 12px;
    text-align: center;
    min-width: 70px;
}

.product-matrix th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
    font-size: 0.8rem;
}

.product-matrix td.in-stock {
    color: #16a34a;
}

.product-matrix td.low-stock {
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
}

.product-matrix td.out-of-stock {
    color: #dc2626;
    background: rgba(220,38,38,0.1);
}

/* ============================================================
   Layaway
   ============================================================ */
.layaway-progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}
.layaway-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    transition: width 0.3s;
}

/* ============================================================
   Customer Tabs
   ============================================================ */
.tab-balance {
    font-size: 1.8rem;
    font-weight: 700;
}
.tab-balance.positive { color: #dc2626; }
.tab-balance.zero { color: #16a34a; }

/* ============================================================
   Queue Display
   ============================================================ */
.queue-now-serving {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 20px;
}
.queue-now-serving .number {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
}
.queue-now-serving .label {
    font-size: 1.2rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.queue-ticket-display {
    text-align: center;
    padding: 30px;
}
.queue-ticket-display .ticket-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--pos-primary, #38bdf8);
}

/* ============================================================
   Floor Plan Editor
   ============================================================ */
.floor-plan-canvas {
    position: relative;
    background: #1e293b;
    border: 2px solid var(--pos-border, #334155);
    border-radius: 8px;
    min-height: 500px;
    overflow: hidden;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}
.floor-plan-object {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    cursor: grab;
    user-select: none;
    transition: box-shadow 0.2s;
}
.floor-plan-object:hover {
    box-shadow: 0 0 0 2px var(--pos-primary, #38bdf8);
}
.floor-plan-object.selected {
    box-shadow: 0 0 0 3px #f59e0b;
}
.floor-plan-table {
    border-radius: 8px;
    background: #16a34a;
}
.floor-plan-table.occupied { background: #dc2626; }
.floor-plan-table.reserved { background: #f59e0b; }
.floor-plan-wall { background: #6b7280; border-radius: 2px; }
.floor-plan-counter { background: #8b5cf6; }
.floor-plan-bar { background: #0891b2; }
.floor-plan-door { background: #a3a3a3; border-style: dashed; }

.floor-plan-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.floor-plan-toolbar button {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ============================================================
   Expense Tracking
   ============================================================ */
.expense-summary-card {
    text-align: center;
    padding: 16px;
}
.expense-summary-card .amount {
    font-size: 1.6rem;
    font-weight: 700;
}
.expense-category-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* ============================================================
   Survey / NPS
   ============================================================ */
.nps-gauge {
    text-align: center;
    padding: 20px;
}
.nps-score {
    font-size: 3rem;
    font-weight: 800;
}
.nps-score.good { color: #16a34a; }
.nps-score.neutral { color: #f59e0b; }
.nps-score.bad { color: #dc2626; }
.nps-breakdown {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}
.nps-segment {
    text-align: center;
    padding: 8px 16px;
    border-radius: 8px;
}
.nps-segment.promoters { background: rgba(22,163,74,0.15); color: #16a34a; }
.nps-segment.passives { background: rgba(245,158,11,0.15); color: #f59e0b; }
.nps-segment.detractors { background: rgba(220,38,38,0.15); color: #dc2626; }

/* ============================================================
   Commission
   ============================================================ */
.commission-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.commission-stat {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: var(--pos-card-bg, #1e293b);
    border-radius: 10px;
    border: 1px solid var(--pos-border, #334155);
}
.commission-stat .value {
    font-size: 1.4rem;
    font-weight: 700;
}
.commission-stat .label {
    font-size: 0.8rem;
    color: var(--pos-muted, #94a3b8);
}
.commission-stat.pending .value { color: #f59e0b; }
.commission-stat.approved .value { color: #38bdf8; }
.commission-stat.paid .value { color: #16a34a; }

/* ============================================================
   Time-Based Pricing
   ============================================================ */
.happy-hour-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.time-pricing-active {
    animation: happyPulse 2s ease-in-out infinite;
}
@keyframes happyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
