/* MasterTech Global POS - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* Clean UI: Hide visual scrollbars while maintaining scrolling functionality */
* {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE, Edge */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, etc. */
}


:root {
    --primary-teal: #043e33;
    --accent-gold: #b48332;
    --accent-gold-hover: #966b28;
    --bg-light: #f4f7f6;
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, 0.6);
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --sidebar-width: 252px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --error-red: #ef4444;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
}

/* Dark Theme Overrides */
body.dark-theme {
    --bg-light: #111827;
    --card-bg: #1f2937;
    --border-color: #374151;
    --text-dark: #f9fafb;
    --text-muted: #9ca3af;
}

body.dark-theme .app-frame {
    background: #111827;
    outline-color: #0d9488;
    /* Slightly brighter teal for dark mode */
}

body.dark-theme .main-content {
    background: #0f172a;
}

body.dark-theme .card,
body.dark-theme .modal-content,
body.dark-theme .side-panel {
    background: #1f2937;
    color: #f9fafb;
    border-color: #374151;
}

body.dark-theme .data-table th {
    background: #374151;
    color: #f3f4f6;
}

body.dark-theme .search-input,
body.dark-theme .inventory-summary-bar {
    background: #111827;
    border-color: #374151;
    color: #fff;
}

body.dark-theme .top-bar {
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

body.dark-theme .breadcrumb {
    color: #9ca3af;
}

body.dark-theme .welcome-badge {
    background: #064e3b;
    border-color: #065f46;
    color: #34d399;
}

body.dark-theme .welcome-badge span {
    color: #fff;
}

body.dark-theme .search-container {
    background: #111827;
    border-color: #374151;
}

body.dark-theme .stat-card {
    background: #1f2937;
    border: 1px solid #374151;
    color: #f9fafb;
}

body.dark-theme .stat-card label {
    color: #9ca3af;
}

body.dark-theme .stat-card .value {
    color: #fff;
}

body.dark-theme .stat-card.active {
    border-left: 4px solid #10b981;
}

body.dark-theme .stat-card.caution {
    border-left: 4px solid #f59e0b;
}

body.dark-theme .stat-card.danger {
    border-left: 4px solid #ef4444;
}

body.dark-theme .side-panel-header {
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

body.dark-theme .side-panel-footer {
    background: #111827;
    border-top: 1px solid #374151;
}

body.dark-theme .dossier-item input,
body.dark-theme .dossier-item select,
body.dark-theme .dossier-item textarea {
    background: #111827;
    border-color: #374151;
    color: #fff;
}



/* Corporate Theme Overrides */
body.corporate-theme {
    --bg-light: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --primary-teal: #1e1b4b;
    /* Indigo */
    --accent-gold: #4f46e5;
    /* Electric Indigo */
}

body.corporate-theme .app-frame {
    background: #f1f5f9;
    outline-color: #1e1b4b;
}

body.corporate-theme .sidebar {
    background-color: #1e1b4b;
}

body.corporate-theme .logo-circle {
    background: #4f46e5;
}

body.corporate-theme .btn-primary {
    background: #1e1b4b;
}

body.corporate-theme .dossier-item input,
body.corporate-theme .dossier-item select,
body.corporate-theme .dossier-item textarea {
    border-color: #cbd5e1;
}


body.corporate-theme .btn-primary:hover {
    background: #312e81;
}

body.corporate-theme .top-bar {
    background: #ffffff;
    border-bottom: 4px solid #1e1b4b;
}

body.corporate-theme .welcome-badge {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #1e1b4b;
}

body.corporate-theme .welcome-badge span {
    color: #4f46e5;
}

body.corporate-theme .stat-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
}

body.corporate-theme .data-table th {
    background: #f1f5f9;
    color: #1e1b4b;
}

body.corporate-theme .search-container {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.corporate-theme .side-panel {
    background: #ffffff;
}

body.corporate-theme .side-panel-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* UI Utility Classes */
.loading-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-text {
    color: var(--error-red);
    font-weight: 600;
    text-align: center;
    padding: 2rem;
}

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

    to {
        transform: rotate(360deg);
    }
}

/* Compact Mode Overrides */
body.compact-view {
    font-size: 65%;
}

body.compact-view .card {
    padding: 1rem !important;
}

body.compact-view .inventory-card-grid {
    gap: 10px;
}

body.compact-view .inv-card {
    padding: 10px;
}

body.compact-view .page-view {
    padding: 1rem !important;
}

body.compact-view .sidebar {
    width: 220px;
}

body.compact-view .brand {
    padding-bottom: 1.5rem;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 70%;
    /* Increased from 60% for better readability */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #ccd9d6;
    /* Light greenish-gray to match background */
    color: var(--text-dark);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

/* App Frame (Tablet look) */
.app-frame {
    display: flex;
    width: 100%;
    height: 100%;
    background: white;
    border: 8px solid #000000;
    /* Outer black frame */
    outline: 4px solid var(--primary-teal);
    /* Inner teal/green border */
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-teal);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 0;
    color: var(--sidebar-text);
    height: 100%;
    overflow: hidden;
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1.5rem 2.5rem;
}

.logo-circle {
    width: 32px;
    height: 32px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-group {
    margin-bottom: 2rem;
}

.nav-label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-label-wrapper:hover {
    color: white;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sidebar-muted);
}

.nav-label-wrapper:hover .nav-label {
    color: white;
}

.chevron-icon {
    color: var(--sidebar-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.nav-group.collapsed .nav-links {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.nav-links {
    list-style: none;
    max-height: 500px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 1;
}

.nav-links li {
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-links li.active {
    background: var(--accent-gold);
    color: white;
    font-weight: 600;
}

/* Sidebar Profile Card */
.profile-card {
    margin: 0 1rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-details {
    display: flex;
    flex-direction: column;
}

.staff-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: white;
    letter-spacing: -0.01em;
}

.staff-meta {
    font-size: 0.75rem;
    color: var(--sidebar-muted);
}

.open-profile-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Main Layout */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    height: 64px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.welcome-badge {
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: var(--primary-teal);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 1.5rem;
}

.welcome-badge span {
    font-weight: 800;
    color: #0f172a;
}

.app-content-inner {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Two-Pane Layout (Settings/Bills) */
.split-view {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1px;
    background: var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: calc(100vh - 128px);
}

.pane-left {
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.pane-right {
    background: #fdfdfd;
    padding: 2.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Page Header for Settings/Forms */
.page-header-alt {
    margin-bottom: 2rem;
}

.page-header-alt h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.page-header-alt p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.settings-form {
    max-width: 600px;
    animation: fadeInSlideUp 0.4s ease-out;
}

.duo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Settings: Logo Upload Row ──────────────────────────────── */
.settings-logo-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.settings-logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #e5e7eb center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px dashed var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    overflow: hidden;
}

.settings-logo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-logo-actions small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── Settings: Toggle Label Row ──────────────────────────────── */
.settings-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
    margin-bottom: 0.25rem;
}

.settings-toggle-label span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ─── Settings: Checkbox Pills (Payment Methods) ──────────────── */
.settings-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.settings-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    transition: all 0.2s ease;
    user-select: none;
}

.settings-checkbox-item input {
    display: none;
}

.settings-checkbox-item.active,
.settings-checkbox-item.checked {
    border-color: var(--primary-teal);
    background: rgba(4, 62, 51, 0.07);
    color: var(--primary-teal);
}

.settings-checkbox-item:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Dedicated Payment Mode Pills */
.settings-mode-pill {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.settings-mode-pill:hover {
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.settings-mode-pill.active {
    border-color: var(--primary-teal);
    background: #f0fdf4;
    box-shadow: 0 0 0 1px var(--primary-teal);
}

.settings-mode-pill.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-teal);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ─── Settings: Radio Pills (Paper Size) ─────────────────────── */
.settings-radio-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.settings-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    transition: all 0.2s ease;
    user-select: none;
}

.settings-radio-item input {
    display: none;
}

.settings-radio-item.checked {
    border-color: var(--accent-gold);
    background: rgba(180, 131, 50, 0.08);
    color: var(--accent-gold-hover);
}

/* ─── Settings: Category Tags ────────────────────────────────── */
.settings-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.settings-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.settings-tag:hover {
    border-color: var(--primary-teal);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 62, 51, 0.08);
}

.category-count-badge {
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.settings-tag-remove {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.settings-tag-remove:hover {
    color: #ef4444;
}

.settings-tag-remove:hover {
    color: white;
}

/* ─── Settings: Section Divider ──────────────────────────────── */
.settings-divider {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 1.25rem 0 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

/* Input group: small helper text */
.input-group small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Components */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.btn-primary {
    background: var(--accent-gold);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-gold-hover);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-debt {
    background: #fff7ed;
    color: #9a3412;
}

/* Staff Card Grid System */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.staff-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-gold);
}

.staff-card-status-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.staff-card-status-dot.active {
    background: var(--success-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.staff-card-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.staff-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.staff-card-id {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.role-badge {
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.role-admin {
    background: #ede9fe;
    color: #5b21b6;
}

.role-cashier {
    background: #ecfdf5;
    color: #065f46;
}

.role-manager {
    background: #eff6ff;
    color: #1e40af;
}

.staff-card-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-card-action {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    /* For loading spinner positioning */
}

.btn-view-profile {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

.btn-view-profile:hover {
    background: #f1f5f9;
}

.btn-toggle-status {
    border: none;
    color: white;
}

.btn-toggle-status.active {
    background: #fee2e2;
    color: #991b1b;
}

.btn-toggle-status.active:hover {
    background: #fecaca;
}

.btn-toggle-status.inactive {
    background: var(--success-green);
}

.btn-toggle-status.inactive:hover {
    background: #059669;
}

/* Search Interface */
.search-container {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 350px;
    transition: all 0.2s;
}

.search-container:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(180, 131, 50, 0.1);
}

.search-icon {
    color: var(--text-muted);
}

.search-input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Mini View Toggle for POS */
.view-toggle-mini {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    gap: 2px;
}

.view-toggle-mini .toggle-btn {
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.view-toggle-mini .toggle-btn:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.view-toggle-mini .toggle-btn.active {
    background: white;
    color: var(--primary-teal);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* POS List View Styling */
.pos-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
}

.pos-list-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pos-list-item:hover {
    border-color: var(--primary-teal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.list-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    background: #f0fdf4;
    color: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.list-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.list-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list-item-right {
    text-align: right;
}

.list-item-stock {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.list-item-stock.low {
    color: #f59e0b;
}

.list-item-price {
    font-weight: 700;
    color: var(--primary-teal);
    font-size: 1.05rem;
}

/* Side Panel (Dossier) Styling */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-panel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -650px;
    width: 600px;
    height: 100%;
    background: white;
    box-shadow: -15px 0 60px rgba(0, 0, 0, 0.2);
    z-index: 2100;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
    overflow: hidden;
}

.side-panel.active {
    right: 0;
}

/* Password Reset Inline UI */
.pass-reset-container {
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    /* Controlled by JS */
    animation: slideUpFade 0.3s ease;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pass-reset-input-group {
    display: flex;
    gap: 10px;
}

.pass-reset-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

.pass-reset-input:focus {
    border-color: var(--accent-gold);
}

.btn-confirm-reset {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-confirm-reset:hover {
    background: #064e40;
}

.side-panel-header {
    padding: 2.5rem;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    background: #fdfdfd;
}

.btn-close-panel {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-close-panel:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

.side-panel-footer {
    padding: 2rem 2.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

/* Dossier Section Styles */
.dossier-section {
    margin-bottom: 2.5rem;
}

.dossier-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.dossier-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.dossier-hero-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary-teal);
    opacity: 0.03;
    border-radius: 50%;
}

.dossier-price-badge {
    background: var(--primary-teal);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(4, 62, 51, 0.15);
}

.dossier-stock-meter {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
    position: relative;
}

.dossier-stock-meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dossier-item label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dossier-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.action-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.audit-timeline {
    position: relative;
    padding-left: 20px;
}

.audit-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

/* Form Elements within Dossier (Settings) */
.dossier-item input,
.dossier-item select,
.dossier-item textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}

.dossier-item input:focus,
.dossier-item select:focus,
.dossier-item textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(180, 131, 50, 0.1);
}

.dossier-item input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}


.dossier-media-preview {
    width: 100%;
    height: 180px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.dossier-signature img {
    max-width: 100%;
    max-height: 100%;
}

/* --- Thermal Receipt Preview --- */
.receipt-preview-pane {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 30px;
    background: #e2e8f0;
    /* Soft contrast background */
    border-radius: 16px;
    min-height: 500px;
    position: sticky;
    top: 20px;
}

.thermal-receipt {
    background: #fff;
    width: 300px;
    /* Base width for 80mm */
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', Courier, monospace;
    color: #333;
    position: relative;
    transition: width 0.3s ease;
    /* Realistic Paper Edge */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.thermal-receipt::before,
.thermal-receipt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background-size: 12px 6px;
    background-position: center;
    background-repeat: repeat-x;
}

.thermal-receipt::before {
    top: -6px;
    background-image: radial-gradient(circle at 6px -1px, transparent 6px, #fff 7px);
}

.thermal-receipt::after {
    bottom: -6px;
    background-image: radial-gradient(circle at 6px 7px, transparent 6px, #fff 7px);
}

.thermal-receipt.size-58mm {
    width: 220px;
}

.receipt-logo-mock {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #000;
}

.receipt-header-mock {
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.receipt-divider {
    border-bottom: 1px dashed #ccc;
    margin: 10px 0;
}

.receipt-totals {
    text-align: right;
    font-size: 0.85rem;
    margin: 10px 0;
}

.receipt-footer-mock {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin-top: 15px;
    line-height: 1.4;
}

.receipt-barcode-mock {
    margin-top: 20px;
    height: 40px;
    background: repeating-linear-gradient(90deg, #000, #000 2px, #fff 2px, #fff 4px);
    opacity: 0.8;
}

/* Theme Adjustments for Preview Container */
body.dark-theme .receipt-preview-pane {
    background: #1e293b;
}

body.dark-theme .thermal-receipt {
    background: #fdfdfd;
    /* Keep receipt white even in dark theme for realism */
    color: #000;
}

.dossier-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.dossier-media-preview:hover img {
    transform: scale(1.05);
}

/* Premium Searchable Select Component */
.premium-select-wrapper {
    position: relative;
    width: 100%;
}

.premium-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    /* Controlled by JS */
    animation: dropdownFadeIn 0.2s ease;
}

.premium-select-dropdown.active {
    display: block;
}

.select-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.select-item:hover {
    background: rgba(4, 62, 51, 0.05);
    /* Teal tint */
    color: var(--primary-teal);
}

.select-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme Adjustments for Dropdown */
body.dark-theme .premium-select-dropdown {
    background: rgba(17, 24, 39, 0.95);
    border-color: #374151;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

body.dark-theme .select-item {
    color: #f3f4f6;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .select-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

body.corporate-theme .premium-select-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: #cbd5e1;
}

body.corporate-theme .select-item:hover {
    background: rgba(79, 70, 229, 0.05);
    color: #4f46e5;
}


.dossier-signature {
    height: 100px;
    background: white;
    border: 1px dashed var(--border-color);
    padding: 10px;
}

.dossier-signature img {
    object-fit: contain;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.btn-action {
    background: white;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    position: relative;
}

.btn-action:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-card-action {
    position: relative;
}

/* Shared Button Loading State (Prevents whole button from spinning) */
button.loading-spinner,
.btn.loading-spinner,
.btn-action.loading-spinner,
.btn-card-action.loading-spinner {
    color: transparent !important;
    pointer-events: none;
    position: relative;
    animation: none !important;
    /* Prevent element rotation */
}

button.loading-spinner::after,
.btn.loading-spinner::after,
.btn-action.loading-spinner::after,
.btn-card-action.loading-spinner::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: spin-centered 0.6s linear infinite;
    transform: translate(-50%, -50%);
}

/* Specific color override for light buttons */
.btn-view-profile.loading-spinner::after {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-teal);
}

@keyframes spin-centered {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Form Elements */
.toggle-switch {
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
}

.toggle-switch.active {
    background: var(--accent-gold);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch.active::after {
    left: 22px;
}

/* Login & Onboarding Split Screen */
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ccd9d6;
    /* Light greenish background */
    padding: 40px;
}

.login-split {
    display: flex;
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 600px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.2);
    border: 3px solid #000;
}

.login-left {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.onboarding-image img {
    width: 100%;
    max-width: 320px;
    margin-bottom: 2rem;
}

.onboarding-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.dot {
    width: 24px;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
}

.dot.active {
    background: var(--accent-gold);
}

.login-right {
    flex: 1;
    background: #e6e9e8;
    /* Light gray from image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
}

.login-brand-header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.logo-circle-large {
    width: 100px;
    height: 100px;
    background: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 4px solid white;
}

.shop-name-display {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary-teal);
    letter-spacing: -0.5px;
    text-align: center;
}

.onboarding-carousel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.carousel-item {
    display: none;
    width: 100%;
}

.carousel-item.active {
    display: block;
}

/* Conveyor Belt Animation Utilities (Right-to-Left) */
.carousel-item.exit-left {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    animation: slideExitLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.carousel-item.enter-right {
    animation: slideEnterRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideExitLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideEnterRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-form-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-form-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.form-group-alt {
    margin-bottom: 1.25rem;
}

.form-group-alt input {
    width: 100%;
    padding: 14px 18px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    opacity: 0.6;
}

.btn-primary-large {
    width: 100%;
    padding: 14px;
    background: var(--accent-gold);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

.login-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    position: relative;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    background: white;
    border: 1px solid #d1d5db;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-social img {
    width: 18px;
    height: 18px;
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
}

.registration-prompt {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.registration-prompt a {
    color: var(--accent-gold);
    font-weight: 600;
    text-decoration: none;
}

.login-copyright {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsiveness */
.menu-toggle,
.mobile-close {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 150px;
    }

    .brand-name,
    .nav-label,
    .nav-links li span:not(.icon),
    .staff-details,
    .open-profile-btn {
        display: none;
    }

    .brand,
    .nav-links li,
    .profile-card {
        justify-content: left;
        padding-left: 10px;
        padding-right: 0;
    }

    .split-view {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .app-frame {
        border: none;
        outline: none;
        border-radius: 0;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        height: 100%;
        width: 280px;
        transition: 0.3s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        left: 0;
    }

    .brand-name,
    .nav-label,
    .nav-links li span:not(.icon),
    .staff-details,
    .open-profile-btn {
        display: block;
    }

    .nav-links li {
        padding-left: 1.5rem;
    }

    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        margin-right: 1.5rem;
    }

    .mobile-close {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        margin-left: auto;
    }

    .split-view {
        display: flex;
        flex-direction: column;
        background: none;
        height: auto;
    }

    .pane-left,
    .pane-right {
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .top-bar {
        padding: 0 1rem;
    }

    .app-content-inner {
        padding: 1rem;
    }
}

.btn-logout {
    background: #ef4444;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}


.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease-out;
    animation: slideUpModal 0.3s ease-out;
}

@keyframes slideUpModal {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-teal);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.modal-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    color: var(--text-dark);
}

.modal-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.btn-primary-small {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary-small:hover {
    background: #0d2826;
}

.btn-primary-large:hover {
    background: #0d2826;
    transform: translateY(-2px);
}

.btn-primary-large.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Button Loading Overlay */
button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

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

/* Custom Dropdown Styling */
.custom-select-trigger:hover {
    border-color: var(--primary-teal) !important;
}

.custom-opt {
    padding: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    transition: background-color 0.2s, color 0.2s;
}

.custom-opt:last-child {
    border-bottom: none;
}

.custom-opt:hover {
    background: var(--primary-teal);
    color: #ffffff;
}

/* Glassmorphism Forms (Date, Select, File) */
.glass-date-input,
.glass-select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.glass-date-input:focus,
.glass-select:focus {
    outline: none;
    border-color: var(--primary-teal);
    background: rgba(255, 255, 255, 0.9);
}

.glass-select-wrapper {
    position: relative;
}

.glass-select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--primary-teal);
    border-radius: 12px;
    background: rgba(45, 114, 102, 0.03);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-zone:hover {
    background: rgba(45, 114, 102, 0.08);
    transform: translateY(-2px);
}

.file-upload-zone input[type="file"] {
    display: none;
}

.file-icon {
    color: var(--primary-teal);
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.file-label-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Smart Avatar Uploader */
/* Step-specific Grid for 30/70 Split */
.wizard-step-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .wizard-step-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.avatar-upload-zone {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    border: 3px dashed var(--primary-teal);
    background-color: rgba(45, 114, 102, 0.05);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.avatar-upload-zone:hover {
    background-color: rgba(45, 114, 102, 0.15);
    transform: scale(1.05);
}

.avatar-upload-zone input[type="file"] {
    display: none;
}

.avatar-placeholder {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    pointer-events: none;
}

.avatar-icon {
    color: var(--primary-teal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-teal);
}

.avatar-upload-zone.has-image .avatar-placeholder {
    display: none;
}

.avatar-upload-zone.has-image {
    border-style: solid;
}

/* Flatpickr Theme Overrides */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    border: none !important;
    padding: 5px !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:focus,
.flatpickr-day.selected:hover {
    background: var(--primary-teal) !important;
    border-color: var(--primary-teal) !important;
}

/* Beautify Native Month Select */
select.flatpickr-monthDropdown-months {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: rgba(45, 114, 102, 0.06) !important;
    color: var(--primary-teal) !important;
    font-weight: 700 !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 8px !important;
    outline: none !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    transition: all 0.2s !important;
    text-align: center !important;
}

select.flatpickr-monthDropdown-months:hover {
    background: rgba(45, 114, 102, 0.12) !important;
    border-color: rgba(45, 114, 102, 0.4) !important;
}

.flatpickr-current-month .numInputWrapper {
    width: 6ch;
    margin-left: 5px;
}

.numInput.cur-year {
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}


/* Success/Error modifiers */
.modal-overlay.error .modal-icon {
    background: #ef4444;
}

.modal-overlay.success .modal-icon {
    background: var(--accent-gold);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-secondary-small {
    background: #666;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary-small:hover {
    background: #555;
}

.btn-secondary-pill {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary-pill:hover {
    background: #e2e8f0;
    color: var(--text-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Modal Forms */
.auth-form-inner {
    text-align: left;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-dark);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-teal);
    background: white;
    box-shadow: 0 0 0 3px rgba(4, 62, 51, 0.1);
}

/* Wizard Progression styling */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.step-indicator {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s;
}

.step-indicator.active {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    background: #e6f0ef;
}

.step-indicator.completed {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
    color: white;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s;
}

.wizard-step.active {
    display: block;
}

.duo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.section-divider {
    font-weight: 700;
    color: var(--primary-teal);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.wizard-actions {
    display: flex;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.alert-box {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 4px solid #ffeeba;
}

.agreement-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton Loading */
.skeleton-shimmer {
    background: #e2e8f0;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 100%;
    width: 100%;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 100% 0;
    }
}

/* Validation States */
.input-group {
    position: relative;
}

.input-group input.invalid,
.input-group select.invalid,
.input-group textarea.invalid,
.custom-select-trigger.invalid {
    border-color: var(--error-red) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.input-group input.valid,
.input-group select.valid,
.input-group textarea.valid,
.custom-select-trigger.valid {
    border-color: var(--success-green) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.validation-icon.show {
    opacity: 1;
}

.validation-icon.error::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: var(--error-red);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>') no-repeat center;
}

.validation-icon.success::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: var(--success-green);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
}

.error-tooltip {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--error-red);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.error-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid var(--error-red);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.error-tooltip.show {
    opacity: 1;
}

.input-group input:focus.invalid,
.input-group select:focus.invalid {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group input:focus.valid,
.input-group select:focus.valid {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* File Upload Validation */
.file-upload-zone.invalid,
.avatar-upload-zone.invalid {
    border-color: var(--error-red) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.file-upload-zone.valid,
.avatar-upload-zone.valid {
    border-color: var(--success-green) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Inventory Dashboard & Summary Bar */
.inventory-summary-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-card label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-teal);
}

.stat-card.warning .value {
    color: #f59e0b;
}

.stat-card.danger .value {
    color: #ef4444;
}

/* Status Pill for Inventory Table */
.inventory-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status Dots for Table */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.status-active {
    background: #10b981;
}

.status-dot.status-warning {
    background: #f59e0b;
}

.status-dot.status-inactive {
    background: #ef4444;
}

/* Category Tags */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.tag-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.tag-remove:hover {
    color: #ef4444;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s;
}

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

/* Tabs Small */
.tabs-small {
    display: flex;
    gap: 5px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 10px;
}

.tabs-small button {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s;
}

.tabs-small button.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Product Wizard Form Styling */
.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fff;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(180, 131, 50, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* Scanner Container in Wizard */
#wizard-scanner-container {
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#wizard-reader {
    background: #000;
}

/* Small adjustments to side-panel sizing for Wizard */
#product-wizard-panel {
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
}

.btn-secondary-small {
    background: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-small:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* ======================================
   Premium Scanner UI System
   ====================================== */

/* Outer wrapper - shifts shape based on mode */
.scanner-container {
    position: relative;
    background: #0a0a0a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.scanner-container.mode-barcode {
    height: 180px;
}

.scanner-container.mode-qr {
    height: 260px;
}

/* Suppress ALL default html5-qrcode UI chrome */
#wizard-reader {
    border: none !important;
    padding: 0 !important;
}

#wizard-reader video {
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

#wizard-reader img {
    display: none !important;
}

/* Hide the default semi-transparent shaded border overlay */
#wizard-reader #qr-shaded-region {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Hide the default "Start Scanning" / "Stop Scanning" buttons */
#wizard-reader button {
    display: none !important;
}

/* Hide the default file scan / camera select UI */
#wizard-reader #html5-qrcode-button-camera-start,
#wizard-reader #html5-qrcode-button-camera-stop,
#wizard-reader #html5-qrcode-select-camera,
#wizard-reader #html5-qrcode-anchor-scan-type-change {
    display: none !important;
}

/* Viewfinder overlay — sits on top of the video feed */
.scanner-viewfinder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Viewfinder shape tied to parent mode class */
.scanner-container.mode-barcode .scanner-viewfinder {
    width: 240px;
    height: 80px;
}

.scanner-container.mode-qr .scanner-viewfinder {
    width: 160px;
    height: 160px;
}

/* Corner brackets — the "HUD" corners */
.scanner-viewfinder .corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #22c55e;
    border-style: solid;
    border-width: 0;
    border-radius: 2px;
}

/* Per-corner border assignment */
.corner.tl {
    top: 0;
    left: 0;
    border-top-width: 4px;
    border-left-width: 4px;
    border-top-left-radius: 5px;
}

.corner.tr {
    top: 0;
    right: 0;
    border-top-width: 4px;
    border-right-width: 4px;
    border-top-right-radius: 5px;
}

.corner.bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 4px;
    border-left-width: 4px;
    border-bottom-left-radius: 5px;
}

.corner.br {
    bottom: 0;
    right: 0;
    border-bottom-width: 4px;
    border-right-width: 4px;
    border-bottom-right-radius: 5px;
}

/* Pulsing glow on all corners */
.scanner-viewfinder .corner {
    animation: corner-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

@keyframes corner-pulse {

    0%,
    100% {
        border-color: #22c55e;
        box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
    }

    50% {
        border-color: #4ade80;
        box-shadow: 0 0 16px rgba(74, 222, 128, 1);
    }
}

/* Scanning laser line */
.scan-line {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    animation: scan-sweep 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.scanner-container.mode-barcode .scan-line {
    top: 50%;
    transform: translateY(-50%);
    animation: scan-blink 1s ease-in-out infinite;
}

.scanner-container.mode-qr .scan-line {
    top: 4px;
    animation: scan-sweep 2s ease-in-out infinite;
}

@keyframes scan-sweep {
    0% {
        top: 4px;
    }

    50% {
        top: calc(100% - 6px);
    }

    100% {
        top: 4px;
    }
}

@keyframes scan-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

/* --- Added Missing & Refactored Inventory Styles --- */

/* Full Page Loading */
.loading-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    gap: 1.5rem;
}

/* Standalone Spinner (Generic - only spins when NOT on a button) */
.loading-spinner:not(button):not(.btn-card-action) {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(13, 148, 136, 0.1);
    border-top: 4px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Typography & Utility */
.text-semibold {
    font-weight: 600;
}

.text-bold {
    font-weight: 700;
}

.text-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.text-danger {
    color: var(--error-red);
}

.error-text {
    color: var(--error-red);
    text-align: center;
    padding: 2rem;
    font-weight: 600;
}

.price-tag {
    font-weight: 700;
    color: var(--text-dark);
}

/* Inventory Header Refactoring */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.inventory-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.inventory-header-right {
    display: flex;
    gap: 10px;
}

/* Container for search with specific sizing */
.inventory-search-wrap {
    width: 350px;
}

/* Table Container */
#inventory-table-container {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Link Button */
.link-btn {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    margin-top: 10px;
}

.link-btn:hover {
    color: var(--accent-gold-hover);
}

/* Empty State Card */
.empty-state-card {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-state-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ======================================
   Inventory Card Grid System
   ====================================== */

.inventory-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    padding: 0.5rem 0 2rem;
}

/* Individual Product Card - Premium Layout */
.inv-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.inv-card::after {
    /* Premium bottom gradient bar on hover */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-gold), var(--primary-teal));
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.inv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.inv-card:hover::after {
    opacity: 1;
}

.inv-card:hover .inv-card-name {
    color: var(--primary-teal);
}

/* Card Top Row: Category + Status Badge */
.inv-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.25rem;
}

/* Category Badge Override (softer than standard role logic) */
.inv-card-category.role-badge {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Stock Status Badge - Refined Pill */
.inv-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.inv-badge-in {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #d1fae5;
}

.inv-badge-low {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.inv-badge-out {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

/* Product Name */
.inv-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Barcode */
.inv-card-barcode {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -0.25rem;
}

/* Footer: Price + Stock */
.inv-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.inv-card-price-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 4px;
}

.inv-card-price {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-teal);
    letter-spacing: -0.01em;
}

.inv-card-stock {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.inv-card-stock-val {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-dark);
    line-height: 1;
}

.inv-card-stock-unit {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

/* ======================================
   View Toggle (Grid / Table)
   ====================================== */

.view-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    background: white;
    color: var(--text-dark);
}

.view-toggle-btn.active {
    background: white;
    color: var(--primary-teal);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ======================================
   Inventory Filter Pills
   ====================================== */

/* ======================================
   Inventory Filter Dropdown (Premium)
   ====================================== */

.inv-filter-trigger {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.inv-filter-trigger:hover {
    border-color: var(--primary-teal);
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(4, 62, 51, 0.1);
}

.inv-filter-options {
    animation: dropdownSlide 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid var(--border-color) !important;
    padding: 6px;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inv-filter-options .custom-opt {
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inv-filter-options .custom-opt:hover {
    background: #f1f5f9;
    color: var(--primary-teal);
    padding-left: 20px;
}

.inv-filter-options .custom-opt.active {
    background: var(--primary-teal);
    color: white;
    font-weight: 700;
}

.inv-filter-options .custom-opt.active::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    background-color: white;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center;
}

.stat-card.warning .value {
    color: #f59e0b;
}

.stat-card.danger .value {
    color: #ef4444;
}

/* Deleted State Polish */
.inv-card.is-deleted {
    filter: grayscale(1);
    opacity: 0.7;
    border-style: dashed;
}

.inv-card.is-deleted:hover {
    filter: grayscale(0.2);
    opacity: 1;
}

.status-deleted {
    background: #64748b;
}

.inv-badge-deleted {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.text-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Premium Audit Trail Styles --- */

.audit-monitor-header {
    background: linear-gradient(90deg, #043e33 0%, #065e4e 100%);
    padding: 2rem;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(4, 62, 51, 0.2);
}

.audit-monitor-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-pulse {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.audit-row-new {
    animation: slideInDownFade 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        background-color: rgba(4, 62, 51, 0.1);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        background-color: transparent;
    }
}

/* Premium Activity Stream Architecture */
.audit-stream-container {
    padding: 0 1rem;
    position: relative;
}

.audit-stream-rail {
    position: absolute;
    left: 4.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, #e2e8f0 5%, #e2e8f0 95%, transparent 100%);
    z-index: 1;
}

.audit-node {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audit-node:hover {
    transform: translateX(5px);
}

.audit-node-time {
    width: 3.5rem;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    padding-top: 0.5rem;
}

.audit-node-actor {
    width: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.actor-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    /* Modern squircle */
    background: var(--primary-teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(4, 62, 51, 0.2);
    border: 2px solid white;
}

.audit-node-content {
    flex: 1;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.audit-node-content:hover {
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.node-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.node-module {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.node-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.node-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
}

.actor-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.expand-hint {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Module Specific Badges */
.badge-auth {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-inventory {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-hr {
    background: #f5f3ff;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

.badge-settings {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

/* Inspector Dossier Upgrade */
.inspector-drawer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.inspector-drawer.open {
    max-height: 800px;
    margin-top: 1rem;
}

.inspector-content {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    position: relative;
    border: 1px dashed var(--border-color);
}

.inspector-label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--primary-teal);
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dossier Grid System */
.dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.dossier-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dossier-prop {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dossier-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Courier New', Courier, monospace;
}

/* Timeline Visual Thread */
.audit-table-row {
    position: relative;
}

.audit-table-row::before {
    content: '';
    position: absolute;
    left: 3.4rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.audit-table-row:first-child::before {
    top: 50%;
}

.audit-table-row:last-child::before {
    bottom: 50%;
}

.audit-ops-bar {
    display: flex;
    gap: 15px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.audit-filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.audit-filter-chip:hover {
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

.audit-filter-chip.active {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
}

/* Advanced Filter Tooling */
.audit-date-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 2px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.audit-date-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.audit-date-input {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
}

.icon-only-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.icon-only-btn:hover {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(4, 62, 51, 0.2);
}

.icon-only-btn svg {
    width: 18px;
    height: 18px;
}

/* Formal Audit Report Print Styles */
.print-only {
    display: none;
}

@media print {

    /* Hide non-essential UI */
    .sidebar,
    .top-bar,
    .breadcrumb,
    .welcome-badge,
    .top-actions,
    .audit-monitor-header,
    .audit-ops-bar,
    .audit-stream-rail,
    .expand-hint,
    .audit-monitor-status,
    .live-pulse {
        display: none !important;
    }

    body {
        background: white !important;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .print-only {
        display: block !important;
    }

    /* Print Header / Letterhead */
    .print-report-header {
        border-bottom: 2px solid var(--primary-teal);
        padding-bottom: 1rem;
        margin-bottom: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Better alignment for logo */
    }

    .print-logo {
        height: 70px;
        width: 70px;
        object-fit: cover;
        border-radius: 50%;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .print-header-text {
        text-align: right;
    }

    .print-header-text h1 {
        color: var(--primary-teal);
        margin: 0;
        font-size: 1.5rem;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .print-report-meta {
        font-size: 0.8rem;
        color: #64748b;
        margin-top: 5px;
    }

    /* Formal Ledger Table */
    .print-audit-ledger {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .print-audit-ledger th {
        background: #f1f5f9;
        text-align: left;
        padding: 10px;
        border: 1px solid #e2e8f0;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--primary-teal);
    }

    .print-audit-ledger td {
        padding: 10px;
        border: 1px solid #e2e8f0;
        vertical-align: top;
    }

    .audit-stream-container {
        padding: 0 !important;
    }

    /* Authority Features & Symmetry */
    .print-bottom-signature {
        margin-top: 3.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Center the seal vertically relative to fields */
        padding: 0 1rem;
    }

    .signature-box {
        border-top: 1px solid #334155;
        width: 200px;
        padding-top: 10px;
        font-size: 0.8rem;
        color: #1e293b;
        text-align: center;
    }

    .print-seal {
        height: 100px;
        width: 100px;
        object-fit: cover;
        border-radius: 50%;
        opacity: 0.95;
        border: 1px solid #e2e8f0;
    }

    /* Keep the Activity Stream hidden during print */
    .audit-node {
        display: none !important;
    }

    .confidential-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 0.7rem;
        color: #94a3b8;
        padding: 10px;
        border-top: 1px solid #f1f5f9;
        z-index: 100;
    }
}

/* POS Module Styles */
.pos-workspace {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 160px);
    width: 100%;
    overflow: hidden;
}

.pos-catalog {
    flex: 1.8;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.pos-catalog-header {
    margin-bottom: 1rem;
}

.pos-search {
    width: 100%;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pos-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem;
    font-size: 1rem;
}

.pos-search .btn-scan {
    background: var(--primary-teal);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.pos-category-pills {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 10px 0;
}

.pos-category-pills .pill {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.pos-category-pills .pill.active,
.pos-category-pills .pill:hover {
    background: var(--primary-teal);
    color: #fff;
    border-color: var(--primary-teal);
}

.pos-product-grid,
.pos-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    padding-bottom: 2rem;
    flex: 1;
}

.pos-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    animation: fadeIn 0.3s ease-out;
}

.list-item:hover {
    border-color: var(--primary-teal);
    background: #f0fdf4;
    transform: translateX(4px);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.list-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.list-item-right {
    text-align: right;
}

.list-item-price {
    font-weight: 800;
    color: var(--primary-teal);
    font-size: 1rem;
}

.list-item-stock {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.list-item-stock.low {
    color: #f59e0b;
}

.pos-product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pos-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-teal);
}

.pos-product-card .prod-img {
    height: 100px;
    background: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.pos-cart-panel {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-width: 320px;
    height: 100%;
    min-height: 0;
}

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

.btn-clear-cart {
    background: transparent;
    color: var(--error-red);
    border: 1px solid var(--error-red);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.pos-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.pos-summary-row.total-row {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--border-color);
}

.pos-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-secondary-large {
    background: transparent;
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    border-radius: 8px;
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

.btn-charge {
    background: var(--accent-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-weight: 700;
    cursor: pointer;
    flex: 2;
    font-size: 1.1rem;
}

/* -------- POS Camera Scanner Overlay -------- */
.pos-scanner-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 62, 51, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pos-scanner-overlay.active {
    display: flex;
    animation: fadeInSlideUp 0.25s ease-out;
}

.pos-scanner-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

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

.btn-close-scanner {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-scanner:hover {
    background: #fee2e2;
    color: var(--error-red);
}

.pos-scanner-status {
    padding: 0.75rem 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Shrink the html5-qrcode default styling to fit */
#pos-qr-reader video {
    width: 100% !important;
    height: auto !important;
}

#pos-qr-reader img {
    display: none !important;
}

/* ==========================================================================
   TRANSACTIONS DASHBOARD & REGISTRY
   ========================================================================== */

.transactions-container {
    padding: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

.txn-header {
    margin-bottom: 2rem;
}

.txn-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.txn-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.txn-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.txn-filter-item label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-left: 4px;
}

/* Premium Dropdown & Input styling for Transactions */
.txn-premium-input {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    background: white;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s;
    min-width: 160px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.txn-premium-input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(4, 62, 51, 0.08);
}

/* Fixed Height Table with Sticky Header - Slightly increased */
.txn-table-wrapper {
    max-height: 189px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    /* Hide scrollbar while keeping scroll active */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.txn-table-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.txn-table-wrapper .data-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
    box-shadow: inset 0 -2px 0 var(--border-color);
}

/* Premium Custom Dropdown System */
.premium-dropdown {
    position: relative;
    min-width: 200px;
    user-select: none;
}

.premium-dropdown-trigger {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.premium-dropdown-trigger:hover {
    border-color: var(--primary-teal);
    box-shadow: 0 6px 16px rgba(4, 62, 51, 0.05);
}

.premium-dropdown-trigger .chevron {
    transition: transform 0.3s;
    opacity: 0.5;
}

.premium-dropdown.active .premium-dropdown-trigger .chevron {
    transform: rotate(180deg);
}

.premium-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.premium-dropdown.active .premium-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.premium-dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.premium-dropdown-option:hover {
    background: rgba(4, 62, 51, 0.04);
    color: var(--primary-teal);
}

.premium-dropdown-option.selected {
    background: var(--primary-teal);
    color: #fff;
}

/* Payment Method Badges */
.payment-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.payment-badge.cash {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bcf0da;
}

.payment-badge.pos {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.payment-badge.transfer {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

/* Receipt Preview Pane */
.receipt-preview-style {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
    font-family: 'Inter', sans-serif;
    color: #334155;
    overflow: hidden;
}

.receipt-preview-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-teal);
}

/* Floating Menu Button (Mobile Only) */
.floating-menu-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--primary-teal);
    color: white;
    border: none;
    display: none; /* Hidden by default (desktop) */
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(4, 62, 51, 0.3);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-menu-btn:hover {
    transform: scale(1.1);
    background: var(--accent-gold);
}

@media (max-width: 992px) {
    .floating-menu-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1001;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.open {
        left: 0;
        box-shadow: 0 0 50px rgba(0,0,0,0.5);
    }

    main {
        padding-left: 0 !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}/* Cloudinary Integration & UI Enhancements */
.inv-card-image-wrapper {
    width: 100%;
    height: 140px;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
}

.inv-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.inv-card:hover .inv-card-image {
    transform: scale(1.08);
}

.inv-card-body {
    padding: 1.25rem;
}

.btn-change-photo {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.btn-change-photo:hover {
    transform: scale(1.1);
    background: #b59150;
}

.btn-change-photo:active {
    transform: scale(0.95);
}

.dossier-avatar-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    overflow: visible;
    background: #fff;
    flex-shrink: 0;
}

.dossier-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.glass-file-input {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.glass-file-input::file-selector-button {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
}
/* --- Subscription Lock Overlay --- */
.subscription-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    z-index: 9999; /* High enough to cover app, but below Paystack's overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayFadeIn 0.5s ease-out forwards;
}

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

.lock-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transform: translateY(20px);
    animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardSlideUp {
    to { transform: translateY(0); }
}

.lock-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0D9488, #0F766E);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 20px rgba(13, 148, 136, 0.2);
}

.lock-icon-wrapper svg {
    color: white;
}

.lock-card h2 {
    font-size: 2rem;
    color: #111827;
    margin-bottom: 12px;
    font-weight: 800;
}

.lock-card p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.price-tag {
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.price-label {
    display: block;
    font-size: 0.85rem;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 4px;
}

.price-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
}

.btn-activate {
    width: 100%;
    padding: 18px;
    background: linear-gradient(to right, #0D9488, #0F766E);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-activate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.4);
    opacity: 0.95;
}

.btn-activate:active {
    transform: translateY(0);
}

.dev-footer {
    margin-top: 32px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.dev-footer a {
    color: #0d9488;
    text-decoration: none;
    font-weight: 600;
}
