/* Modern Watch POS & Inventory - Light Theme CSS */
@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e2e8f0;
    
    --primary: #0d9488;       /* Medical Teal */
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --secondary: #2563eb;     /* Cool Blue */
    --accent: #10b981;        /* Emerald Green */
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --success: #10b981;
    --success-light: #d1fae5;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    left: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-260px);
}

.brand-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item a:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.nav-item.active a {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Sidebar Submenu Styling */
.nav-item-has-submenu {
    display: flex;
    flex-direction: column;
}

.submenu-list {
    list-style: none;
    padding-left: 20px;
    padding-top: 4px;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.submenu-item a {
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.submenu-item a:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
}

.submenu-item.active a {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    font-weight: 700 !important;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Main Layout */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 0 !important;
}

/* Header Bar */
.top-header {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-header-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-time-pill {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-quick-pos {
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
    transition: all 0.2s ease;
}

.btn-quick-pos:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* User Profile Pill & Logout Button in Header */
.header-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
}

.user-avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.user-name-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role-admin {
    color: #ef4444;
}

.user-role-pos {
    color: var(--primary);
}

.btn-header-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background-color: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-header-logout:hover {
    background-color: #ffe4e6;
    color: #be123c;
    transform: translateY(-1px);
}

/* Page Content Container */
.content-body {
    padding: 28px 32px;
    flex: 1;
}

/* Cards & Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-info .stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.teal { background-color: #e6fffa; color: #0d9488; }
.stat-icon.blue { background-color: #eff6ff; color: #2563eb; }
.stat-icon.warning { background-color: #fffbe6; color: #d97706; }
.stat-icon.danger { background-color: #ffeef0; color: #dc2626; }

/* Custom UI Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: #f1f5f9;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

/* Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success { background-color: var(--success-light); color: #047857; }
.badge-warning { background-color: var(--warning-light); color: #b45309; }
.badge-danger { background-color: var(--danger-light); color: #b91c1c; }
.badge-secondary { background-color: #f1f5f9; color: #475569; }

/* POS Terminal Specific Layout */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 24px;
    align-items: start;
}

.pos-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.search-input-group input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 4px;
}

.med-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.med-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.med-card .med-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.med-card .med-generic {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.med-card .med-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.med-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 15px;
}

/* POS Cart Drawer */
.cart-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    position: sticky;
    top: 90px;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
}

.cart-item-info h4 {
    font-size: 13px;
    font-weight: 700;
}

.cart-item-info span {
    font-size: 11px;
    color: var(--text-secondary);
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-qty {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-weight: bold;
    cursor: pointer;
}

.cart-summary {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.summary-row.grand-total {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    margin-top: 12px;
}

.btn-checkout:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
}

/* Thermal POS Receipt Styling (SF UI Text Font & Black Patti) */
.pk-receipt-box {
    width: 100%;
    max-width: 285px;
    margin: 0 auto;
    background: #ffffff;
    padding: 8px 6px;
    font-family: 'SF UI Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #000000;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    line-height: 1.35;
    box-sizing: border-box;
}

.pk-black-patti {
    background: #000000;
    color: #ffffff;
    text-align: center;
    padding: 6px 4px;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    border-radius: 2px;
}

.pk-receipt-bismillah {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Noto Nastaliq Urdu', 'SF UI Text', serif;
    margin-bottom: 6px;
}

.pk-receipt-brand {
    text-align: center;
    margin-bottom: 8px;
}

.pk-receipt-brand p {
    font-size: 11px;
    color: #111;
    margin-bottom: 2px;
}

.pk-receipt-meta {
    font-size: 11px;
    margin: 8px 0;
}

.pk-receipt-meta div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.pk-receipt-divider {
    border-top: 1px dashed #000;
    margin: 6px 0;
}

.pk-receipt-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    margin: 6px 0;
    box-sizing: border-box;
}

.pk-receipt-table thead tr {
    background-color: #000000 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.pk-receipt-table th {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 4px 2px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.pk-receipt-table td {
    padding: 4px 2px;
    vertical-align: top;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
}

.pk-receipt-totals {
    font-size: 11px;
    margin-top: 4px;
}

.pk-receipt-totals div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.pk-receipt-urdu-footer {
    text-align: center;
    font-size: 11px;
    font-family: 'Noto Nastaliq Urdu', sans-serif;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #000;
    line-height: 1.6;
}

/* Form Styling */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Custom Searchable Select Dropdown Component */
.searchable-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.searchable-dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.searchable-dropdown-trigger:hover, .searchable-dropdown-wrapper.open .searchable-dropdown-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.searchable-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    z-index: 9999 !important;
    overflow: hidden;
    padding: 8px;
    min-width: 280px;
}

.searchable-input-box, .searchable-search-box {
    position: relative;
    margin-bottom: 8px;
}

.searchable-input-box i, .searchable-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.searchable-input-box input, .searchable-search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: #f8fafc;
}

.searchable-input-box input:focus, .searchable-search-box input:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.searchable-options-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.searchable-option-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

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

.searchable-option-item:hover, .searchable-option-item.active {
    background-color: #f0fdf4 !important;
}

.searchable-option-item.highlighted {
    background-color: #e0f2fe !important;
    border-left: 3px solid var(--primary) !important;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    outline: none;
    line-height: 1.2;
}

.btn-primary { 
    background-color: var(--primary); 
    color: #ffffff !important; 
}

.btn-primary:hover { 
    background-color: var(--primary-dark); 
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-secondary { 
    background-color: #f1f5f9; 
    color: var(--text-secondary) !important; 
    border: 1px solid var(--border-color);
}

.btn-secondary:hover { 
    background-color: #e2e8f0; 
    color: var(--text-primary) !important;
}

.btn-danger { 
    background-color: var(--danger); 
    color: #ffffff !important; 
}

.btn-sm { 
    padding: 6px 14px; 
    font-size: 12px; 
    border-radius: var(--radius-sm);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }
    .cart-card {
        height: auto;
        position: static;
    }
}

/* Sidebar Backdrop Overlay */
.sidebar-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    body:not(.sidebar-collapsed) .sidebar-overlay-backdrop {
        opacity: 1;
        visibility: visible;
    }
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .top-header {
        padding: 0 16px;
    }
    .pos-grid-container {
        grid-template-columns: 1fr !important;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .top-header {
        height: auto;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .page-header-title h2 {
        font-size: 16px;
    }
    .page-header-title p {
        display: none;
    }
    .no-mobile {
        display: none !important;
    }
    .content-body {
        padding: 14px 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .form-row-2col, [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .modal-container {
        width: 96% !important;
        margin: 10px auto !important;
        max-height: 92vh;
        overflow-y: auto;
    }
    .modal-header h3 {
        font-size: 14px;
    }
    .modal-body {
        padding: 12px !important;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .custom-table th, .custom-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .btn-quick-pos span {
        display: none;
    }
    .btn-quick-pos {
        padding: 8px 12px;
    }
    .custom-table {
        min-width: 500px;
    }
}

/* ===================================================
   Expense Module Responsive Styles (Mobile, Tablet, Desktop)
   =================================================== */
.expense-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    width: 100%;
}

.exp-search-field {
    flex: 1.5;
    min-width: 240px;
}

.exp-date-quick-field {
    flex: 1.5;
    min-width: 260px;
}

.exp-date-field {
    width: 140px;
}

.exp-cat-field {
    width: 160px;
}

.exp-actions-field {
    display: flex;
    gap: 6px;
    align-self: flex-end;
}

@media (max-width: 992px) {
    .exp-search-field,
    .exp-date-quick-field {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .expense-filter-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .exp-search-field,
    .exp-date-quick-field,
    .exp-date-field,
    .exp-cat-field {
        width: 100% !important;
        min-width: 100% !important;
    }
    .exp-actions-field {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    .exp-actions-field button,
    .exp-actions-field a {
        flex: 1 !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .exp-header-responsive {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .exp-header-responsive .exp-header-tools {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
    }
    .exp-add-container {
        max-width: 100% !important;
    }
    .exp-grid-2,
    .exp-grid-title-cat,
    .edit-modal-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .exp-submit-btn-wrap {
        text-align: center !important;
    }
    .exp-submit-btn {
        width: 100% !important;
    }
}

/* Dedicated POS Thermal Receipt Print Container */
#thermal-print-area {
    display: none;
}

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

@media print {
    .no-print,
    .sidebar,
    .top-header,
    .sidebar-overlay-backdrop,
    header,
    aside,
    nav {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.printing-thermal > *:not(.main-wrapper) {
        display: none !important;
    }

    body.printing-thermal .main-wrapper > *:not(.content-body) {
        display: none !important;
    }

    body.printing-thermal .content-body > *:not(#thermal-print-area) {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    body.printing-thermal .main-wrapper,
    body.printing-thermal .content-body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    body.printing-thermal #thermal-print-area {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 4px 6px !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        color: #000000 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    body.printing-thermal #thermal-print-area * {
        visibility: visible !important;
    }
}
